vue2-client 1.16.23 → 1.16.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursorrules +19 -19
- package/.env.apply +19 -19
- package/.env.gaslink +19 -19
- package/.env.his +19 -19
- package/.env.liuli +20 -20
- package/.env.scada +19 -19
- package/.eslintrc.js +90 -90
- package/CHANGELOG.md +824 -824
- package/Components.md +60 -60
- package/docs/LowCode/lowcode.md +155 -155
- package/docs/LowCode/lowcodeForDeveloper.md +230 -230
- package/docs/index.md +30 -30
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.setup.js +7 -7
- package/jsconfig.json +19 -19
- package/package.json +112 -112
- package/public/his/editor/editor.html +51 -51
- package/public/his/editor/mock/bind_data.html +779 -779
- package/public/his/editor/mock/data_table.html +40 -40
- package/public/his/editor/mock/sign.html +75 -75
- package/public/his/editor/vender/JsBarcode.all.js +3669 -3669
- package/public/his/editor/vender/date97/My97DatePicker.htm +65 -65
- package/public/his/editor/vender/date97/WdatePicker.js +677 -677
- package/public/his/editor/vender/date97/calendar.js +4 -4
- package/public/his/editor/vender/date97/lang/en.js +13 -13
- package/public/his/editor/vender/date97/lang/zh-cn.js +13 -13
- package/public/his/editor/vender/date97/lang/zh-tw.js +13 -13
- package/public/his/editor/vender/date97/skin/WdatePicker.css +10 -10
- package/public/his/editor/vender/date97/skin/default/datepicker.css +328 -328
- package/public/his/editor/vender/date97/skin/ext/datepicker.css +308 -308
- package/public/his/editor/vender/date97/skin/whyGreen/datepicker.css +255 -255
- package/public/his/editor/vender/diff.js +1627 -1627
- package/public/his/editor/vender/editor.js +1 -1
- package/public/his/editor/vender/fabric.js +31187 -31187
- package/public/his/editor/vender/jquery/jquery.base64.js +190 -190
- package/public/his/editor/vender/jquery/jquery.js +10872 -10872
- package/public/his/editor/vender/jquery/jquery.print.js +255 -255
- package/public/his/editor/vender/jquery/zTreeStyle/zTreeStyle.css +96 -96
- package/public/his/editor/vender/mui/mui.min.css +4 -4
- package/public/his/editor/vender/mui/mui.min.js +5 -5
- package/public/his/editor/vender/mui/mui.picker.min.css +6 -6
- package/public/his/editor/vender/mui/mui.picker.min.js +6 -6
- package/public/his/editor/vender/qrcode.js +7 -7
- package/public/his/editor/vender/requirejs/require.js +2145 -2145
- package/public/his/editor/vender/signature/jSignature.CompressorSVG.js +518 -518
- package/public/his/editor/vender/signature/jSignature.UndoButton.js +164 -164
- package/public/his/editor/vender/signature/jSignature.js +1486 -1486
- package/public/his/editor/vender/validator.js +5094 -5094
- package/public/his/editor/vender/weui/weui.css +5659 -5659
- package/public/his/editor/vender/weui/weui.min.css +4 -4
- package/public/his/editor/vender/weui/weui.min.js +11 -11
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/assets/svg/badtwo.svg +1 -1
- package/src/assets/svg/goodtwo.svg +1 -1
- package/src/base-client/components/AI/AskAiBtn.vue +136 -136
- package/src/base-client/components/AI/demo.vue +31 -31
- package/src/base-client/components/common/AddressSearchCombobox/IcMapIcon.vue +16 -16
- package/src/base-client/components/common/AddressSearchCombobox/demo.vue +36 -36
- package/src/base-client/components/common/AddressSearchCombobox/ic_map.svg +6 -6
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/CitySelect/CitySelect.vue +1 -1
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1014 -1014
- package/src/base-client/components/common/CreateQuery/index.js +3 -3
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +452 -452
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +511 -511
- package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
- package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm.vue +478 -478
- package/src/base-client/components/common/HIS/HAddNativeForm/index.js +3 -3
- package/src/base-client/components/common/HIS/HButtons/HButtons.vue +365 -365
- package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +219 -219
- package/src/base-client/components/common/HIS/HTab/HTab.vue +293 -293
- package/src/base-client/components/common/HIS/demo.vue +54 -54
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorModal.vue +108 -108
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorPanel.vue +413 -413
- package/src/base-client/components/common/LowCodeComponent/LowCodePageOrganization.vue +502 -502
- package/src/base-client/components/common/LowCodeComponent/LowCodeRender.vue +728 -728
- package/src/base-client/components/common/LowCodeComponent/LowCodeRenderEnter.vue +29 -29
- package/src/base-client/components/common/LowCodeComponent/LowCodeUIStore.vue +219 -219
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue +117 -117
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue +80 -80
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue +398 -398
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue +65 -65
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue +64 -64
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue +73 -73
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue +76 -76
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Recording/Recording.vue +243 -243
- package/src/base-client/components/common/Recording/index.js +3 -3
- package/src/base-client/components/common/Tree/Tree.vue +149 -149
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +113 -113
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XAddNativeFormOA/XAddNativeFormOA.vue +303 -303
- package/src/base-client/components/common/XAddNativeFormOA/index.js +3 -3
- package/src/base-client/components/common/XAddNativeFormOA/index.md +146 -146
- package/src/base-client/components/common/XAddReport/index.js +3 -3
- package/src/base-client/components/common/XAddReport/index.md +56 -56
- package/src/base-client/components/common/XBadge/XBadge.vue +94 -94
- package/src/base-client/components/common/XButtons/XButtonDemo.vue +28 -28
- package/src/base-client/components/common/XButtons/index.js +3 -3
- package/src/base-client/components/common/XButtons/index.md +61 -61
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XCheckList/XCheckList.vue +106 -106
- package/src/base-client/components/common/XCheckList/XCheckListDemo.vue +41 -41
- package/src/base-client/components/common/XDataCard/index.js +3 -3
- package/src/base-client/components/common/XDataCard/index.md +1 -1
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDatePicker/demo.vue +153 -153
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +83 -83
- package/src/base-client/components/common/XDetailsView/XDetailsView.vue +238 -238
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XForm/XStatusButton.vue +54 -54
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XForm/itemComponent/XClickChangeBtn/index.vue +49 -49
- package/src/base-client/components/common/XFormGroup/index.js +3 -3
- package/src/base-client/components/common/XFormGroup/index.md +38 -38
- package/src/base-client/components/common/XFormGroupDetails/XFormGroupDetails.vue +72 -72
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XFormTable/index.md +92 -92
- package/src/base-client/components/common/XLabelSelect/XLabelSelect.vue +110 -110
- package/src/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue +35 -35
- package/src/base-client/components/common/XLicensePlate/XLicensePlate.vue +193 -193
- package/src/base-client/components/common/XLicensePlate/XLicensePlateDemo.vue +48 -48
- package/src/base-client/components/common/XPrint/OpenInvoice.vue +21 -21
- package/src/base-client/components/common/XPrint/PrintHtml.js +98 -98
- package/src/base-client/components/common/XPrint/css/hiPrintCss.js +359 -359
- package/src/base-client/components/common/XPrint/css/lodopCss.js +26 -26
- package/src/base-client/components/common/XPrint/css/print-lock.css +351 -351
- package/src/base-client/components/common/XPrint/index.vue +97 -97
- package/src/base-client/components/common/XReport/XReportDesign.vue +463 -463
- package/src/base-client/components/common/XReport/XReportJsonRender.vue +381 -381
- package/src/base-client/components/common/XReport/index.js +3 -3
- package/src/base-client/components/common/XReport/print.js +186 -186
- package/src/base-client/components/common/XReportDrawer/index.js +3 -3
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +813 -813
- package/src/base-client/components/common/XReportGrid/index.js +3 -3
- package/src/base-client/components/common/XReportGrid/index.md +44 -44
- package/src/base-client/components/common/XReportSlot/XReportSlot.vue +110 -110
- package/src/base-client/components/common/XReportSlot/index.js +3 -3
- package/src/base-client/components/common/XReportSlot/index.md +48 -48
- package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
- package/src/base-client/components/common/XSimpleDescriptions/index.js +3 -3
- package/src/base-client/components/common/XSimpleDescriptions/index.md +7 -7
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTab/XTabDemo.vue +22 -22
- package/src/base-client/components/common/XTab/index.js +3 -3
- package/src/base-client/components/common/XTable/CustomFuncCel.vue +51 -51
- package/src/base-client/components/common/XTable/TableCellRenderer.vue +161 -161
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/common/XTagGroup/index.vue +52 -52
- package/src/base-client/components/common/XTree/XTree.vue +424 -424
- package/src/base-client/components/common/XTree/index.js +3 -3
- package/src/base-client/components/common/XTree/index.md +36 -36
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +113 -113
- package/src/base-client/components/common/XTreeOne/XTreeOnePro.vue +128 -128
- package/src/base-client/components/common/richTextModal/index.vue +56 -56
- package/src/base-client/components/common/richTextModal/richDemo.vue +48 -48
- package/src/base-client/components/his/XCharge/XCharge.vue +610 -610
- package/src/base-client/components/his/XHisEditor/index.js +3 -3
- package/src/base-client/components/his/XSidebar/XSidebar.vue +283 -283
- package/src/base-client/components/his/XSimpleTable/XSimpleTable.vue +119 -119
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +200 -192
- package/src/base-client/components/his/threeTestOrders/threeTestOrders.vue +482 -482
- package/src/base-client/components/index.js +51 -51
- package/src/base-client/components/layout/XTreeView/XTreeView.vue +130 -130
- package/src/base-client/components/layout/XTreeView/index.js +3 -3
- package/src/base-client/components/layout/XTreeView/index.md +46 -46
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/GetLoginInfoService.js +183 -183
- package/src/base-client/plugins/Recording.js +258 -258
- package/src/base-client/plugins/index.js +23 -23
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/components/Charts/Bar.vue +62 -62
- package/src/components/Charts/ChartCard.vue +134 -134
- package/src/components/Charts/Liquid.vue +67 -67
- package/src/components/Charts/MiniArea.vue +39 -39
- package/src/components/Charts/MiniBar.vue +39 -39
- package/src/components/Charts/MiniProgress.vue +75 -75
- package/src/components/Charts/MiniSmoothArea.vue +40 -40
- package/src/components/Charts/Radar.vue +68 -68
- package/src/components/Charts/RankList.vue +77 -77
- package/src/components/Charts/TagCloud.vue +113 -113
- package/src/components/Charts/TransferBar.vue +64 -64
- package/src/components/Charts/Trend.vue +82 -82
- package/src/components/Charts/chart.less +12 -12
- package/src/components/Charts/smooth.area.less +13 -13
- package/src/components/CodeMirror/inedx.vue +118 -118
- package/src/components/CodeMirror/setting.js +40 -40
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/NumberInfo/index.js +3 -3
- package/src/components/NumberInfo/index.less +54 -54
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/card/ChartCard.vue +79 -79
- package/src/components/chart/Bar.vue +60 -60
- package/src/components/chart/MiniArea.vue +67 -67
- package/src/components/chart/MiniBar.vue +59 -59
- package/src/components/chart/MiniProgress.vue +57 -57
- package/src/components/chart/Radar.vue +80 -80
- package/src/components/chart/RankingList.vue +60 -60
- package/src/components/chart/Trend.vue +79 -79
- package/src/components/chart/index.less +9 -9
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/checkbox/ImgCheckbox.vue +117 -117
- package/src/components/checkbox/ImgCheckboxGroup.vue +76 -76
- package/src/components/checkbox/index.js +9 -9
- package/src/components/exception/ExceptionPage.vue +70 -70
- package/src/components/g2Charts/constants.js +202 -202
- package/src/components/g2Charts/demo.vue +808 -808
- package/src/components/g2Charts/designer.vue +228 -228
- package/src/components/g2Charts/designerBaseConfig.vue +61 -61
- package/src/components/g2Charts/designerDataConfig.vue +259 -259
- package/src/components/g2Charts/designerStyleConfig.vue +16 -16
- package/src/components/g2Charts/index.vue +397 -397
- package/src/components/index.js +36 -36
- package/src/components/input/IInput.vue +66 -66
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/setting/Setting.vue +234 -234
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/config/CreateQueryConfig.js +325 -325
- package/src/config/default/antd.config.js +89 -89
- package/src/config/default/setting.config.js +55 -55
- package/src/font-style/font.css +60 -60
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +136 -136
- package/src/layouts/header/AdminHeader.vue +132 -132
- package/src/layouts/header/HeaderNotice.vue +177 -177
- package/src/layouts/header/InstitutionDetail.vue +181 -181
- package/src/layouts/tabs/TabsHead.vue +189 -189
- package/src/lib.js +1 -1
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/DefaultExample/index.vue +77 -77
- package/src/pages/DynamicStatistics/ChartSelector.vue +331 -331
- package/src/pages/DynamicStatistics/DataTabs.vue +83 -83
- package/src/pages/DynamicStatistics/DynamicTable.vue +128 -128
- package/src/pages/DynamicStatistics/EvaluationArea.vue +69 -69
- package/src/pages/DynamicStatistics/FavoriteList.vue +50 -50
- package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +591 -591
- package/src/pages/DynamicStatistics/SearchBar.vue +192 -192
- package/src/pages/DynamicStatistics/index.vue +282 -282
- package/src/pages/Example/childIndex.vue +15 -15
- package/src/pages/Example/index.vue +30 -30
- package/src/pages/NewDynamicStatistics/ChartSelector.vue +331 -331
- package/src/pages/NewDynamicStatistics/DataTabs.vue +122 -122
- package/src/pages/NewDynamicStatistics/DynamicTable.vue +128 -128
- package/src/pages/NewDynamicStatistics/EvaluationArea.vue +69 -69
- package/src/pages/NewDynamicStatistics/FavoriteList.vue +50 -50
- package/src/pages/NewDynamicStatistics/QuestionHistoryAndFavorites.vue +289 -289
- package/src/pages/NewDynamicStatistics/SearchBar.vue +193 -193
- package/src/pages/NewDynamicStatistics/index.vue +258 -258
- package/src/pages/Recording/index.vue +77 -77
- package/src/pages/ServiceReview/index.vue +284 -284
- package/src/pages/SubExample/index.vue +26 -26
- package/src/pages/WorkflowDetail/WorkflowPageDetail/TrimTextTail.vue +23 -23
- package/src/pages/XReportView/index.vue +64 -64
- package/src/pages/XTreeOneProExample/index.vue +67 -67
- package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
- package/src/pages/login/Login.vue +379 -379
- package/src/pages/login/LoginV3.vue +389 -389
- package/src/pages/lowCode/lowCodeEditor.vue +1219 -1219
- package/src/pages/lowCode/lowCodeRenderPage.vue +43 -43
- package/src/pages/report/ReportTable.js +124 -124
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/pages/system/settings/modifyPassword.vue +117 -117
- package/src/pages/system/ticket/index.vue +480 -480
- package/src/pages/system/ticket/submitTicketSuccess.vue +484 -484
- package/src/pages/userInfoDetailManage/ChangeMeterRecordQuery/index.vue +64 -64
- package/src/pages/userInfoDetailManage/InfoChangeRecordQuery/index.vue +64 -64
- package/src/pages/userInfoDetailManage/InstructRecordQuery/index.vue +64 -64
- package/src/pages/userInfoDetailManage/MeterParamRecordQuery/index.vue +64 -64
- package/src/pages/userInfoDetailManage/TransferRecordQuery/index.vue +66 -66
- package/src/pages/userInfoDetailManage/WatchCollectionRecordQuery/index.vue +64 -64
- package/src/plugins/EventLogPlugin.js +33 -33
- package/src/plugins/FindParentsData.js +17 -17
- package/src/router/async/config.async.js +35 -35
- package/src/router/async/router.map.js +129 -129
- package/src/router/index.js +27 -27
- package/src/services/DataModel.js +30 -30
- package/src/services/LodopFuncs.js +137 -137
- package/src/services/api/TicketDetailsViewApi.js +46 -46
- package/src/services/api/cas.js +79 -79
- package/src/services/api/common.js +346 -346
- package/src/services/api/entity.js +18 -18
- package/src/services/api/index.js +17 -17
- package/src/store/modules/account.js +115 -115
- package/src/store/modules/index.js +5 -5
- package/src/store/modules/lowCode.js +33 -33
- package/src/store/modules/setting.js +119 -119
- package/src/theme/default/style.less +58 -58
- package/src/utils/authority-utils.js +85 -85
- package/src/utils/errorCode.js +6 -6
- package/src/utils/formatter.js +74 -74
- package/src/utils/htmlToPDF.js +108 -108
- package/src/utils/htmlToPDFApi.js +5 -5
- package/src/utils/login.js +188 -188
- package/src/utils/lowcode/lowcodeComponentMixin.js +120 -120
- package/src/utils/lowcode/lowcodeLog.js +29 -29
- package/src/utils/lowcode/lowcodeUtils.js +373 -373
- package/src/utils/lowcode/registerComponentForEditor.js +1 -1
- package/src/utils/lowcode/registerComponentForRender.js +11 -11
- package/src/utils/map-utils.js +47 -47
- package/src/utils/reg.js +95 -95
- package/src/utils/runEvalFunction.js +14 -14
- package/src/utils/theme-color-replacer-extend.js +92 -92
- package/src/utils/util.js +329 -329
- package/src/utils/waterMark.js +31 -31
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
@@ -1,610 +1,610 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="xcharge-wrapper">
|
3
|
-
<!-- 顶部金额信息区(表单行风格,宽度固定,每行4个) -->
|
4
|
-
<a-row :gutter="0" class="amount-info">
|
5
|
-
<a-col v-for="item in config.amountFields" :key="item.field" :span="6" class="form-row">
|
6
|
-
<label class="form-label">{{ item.label }}</label>
|
7
|
-
<a-input
|
8
|
-
v-model="data[item.field]"
|
9
|
-
:value="data[item.field]"
|
10
|
-
:disabled="item.disabled"
|
11
|
-
class="form-input"
|
12
|
-
/>
|
13
|
-
</a-col>
|
14
|
-
</a-row>
|
15
|
-
|
16
|
-
<a-divider/>
|
17
|
-
|
18
|
-
<!-- 支付方式选择区 -->
|
19
|
-
<div class="payment-methods">
|
20
|
-
<a-button
|
21
|
-
v-for="method in config.paymentMethods"
|
22
|
-
:key="method.key"
|
23
|
-
:class="['payment-btn', {
|
24
|
-
active: isMixedPaymentEnabled ? selectedMethods.includes(method.key) : selectedMethod === method.key
|
25
|
-
}]"
|
26
|
-
@click="isMixedPaymentEnabled ? toggleMethod(method.key) : selectMethod(method.key)"
|
27
|
-
>
|
28
|
-
<div>
|
29
|
-
<div class="pay-label">{{ method.label }}</div>
|
30
|
-
<div v-if="isMixedPaymentEnabled && selectedMethods.includes(method.key)" class="selected-indicator">✓</div>
|
31
|
-
</div>
|
32
|
-
</a-button>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<a-divider v-if="isMixedPaymentEnabled && selectedMethods.length > 1"/>
|
36
|
-
|
37
|
-
<!-- 支付详情(同一行展示,仅在混合支付且选择方式>1时出现) -->
|
38
|
-
<div v-if="isMixedPaymentEnabled && selectedMethods.length > 1" class="mixed-payment-section simple">
|
39
|
-
<div class="payment-operation-row">
|
40
|
-
<div class="payment-inline">
|
41
|
-
<div v-for="method in selectedMethods" :key="method" class="inline-field">
|
42
|
-
<label class="form-label">{{ getAmountLabel(method) }}</label>
|
43
|
-
<a-input
|
44
|
-
v-model="paymentAmounts[method]"
|
45
|
-
type="number"
|
46
|
-
placeholder="请输入金额"
|
47
|
-
class="form-input"
|
48
|
-
@change="updatePaymentAmount(method, $event)"
|
49
|
-
/>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
|
55
|
-
<a-divider/>
|
56
|
-
|
57
|
-
<!-- 底部金额和操作区(表单行风格,宽度固定) -->
|
58
|
-
<a-row :gutter="0" class="bottom-info">
|
59
|
-
<a-col v-for="item in config.bottomFields" :key="item.field" :span="8" class="form-row">
|
60
|
-
<label class="form-label">{{ item.label }}</label>
|
61
|
-
<a-input
|
62
|
-
v-model="data[item.field]"
|
63
|
-
:disabled="item.disabled"
|
64
|
-
class="form-input"
|
65
|
-
@change="bottomFieldsChange($event,item)"
|
66
|
-
/>
|
67
|
-
</a-col>
|
68
|
-
</a-row>
|
69
|
-
<a-row class="actions-row" justify="center">
|
70
|
-
<a-button
|
71
|
-
v-for="btn in config.actionButtons"
|
72
|
-
:key="btn.key"
|
73
|
-
@click="handleAction(btn.key)"
|
74
|
-
:icon="btn.icon"
|
75
|
-
style="margin: 0 8px"
|
76
|
-
>
|
77
|
-
{{ btn.label }}
|
78
|
-
</a-button>
|
79
|
-
</a-row>
|
80
|
-
</div>
|
81
|
-
</template>
|
82
|
-
|
83
|
-
<script>
|
84
|
-
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
85
|
-
|
86
|
-
export default {
|
87
|
-
name: 'XCharge',
|
88
|
-
props: {
|
89
|
-
queryParamsName: {
|
90
|
-
type: String,
|
91
|
-
default: ''
|
92
|
-
},
|
93
|
-
parameter: {
|
94
|
-
type: Object,
|
95
|
-
default: () => ({})
|
96
|
-
}
|
97
|
-
},
|
98
|
-
data () {
|
99
|
-
return {
|
100
|
-
config: {
|
101
|
-
amountFields: [],
|
102
|
-
paymentMethods: [],
|
103
|
-
bottomFields: [],
|
104
|
-
actionButtons: [],
|
105
|
-
enableMixedPayment: false // 默认关闭混合支付
|
106
|
-
},
|
107
|
-
data: {},
|
108
|
-
selectedMethod: '', // 保持向后兼容
|
109
|
-
selectedMethods: [], // 新增:支持多选支付方式
|
110
|
-
paymentAmounts: {}, // 各支付方式的金额
|
111
|
-
// 事件名配置(可通过配置覆盖)
|
112
|
-
eventNames: {
|
113
|
-
method: 'method',
|
114
|
-
methods: 'methods',
|
115
|
-
totalPaymentAmount: 'totalPaymentAmount',
|
116
|
-
action: 'action',
|
117
|
-
// 新增:单个支付方式金额变更事件
|
118
|
-
paymentAmountChange: 'paymentAmountChange'
|
119
|
-
},
|
120
|
-
hasInitialized: false
|
121
|
-
}
|
122
|
-
},
|
123
|
-
emits: ['init'],
|
124
|
-
computed: {
|
125
|
-
// 安全访问混合支付配置
|
126
|
-
isMixedPaymentEnabled () {
|
127
|
-
return this.config && this.config.enableMixedPayment === true
|
128
|
-
},
|
129
|
-
// 预计算:金额标签映射(仅基于 paymentMethods 配置)
|
130
|
-
amountLabelMap () {
|
131
|
-
const map = {}
|
132
|
-
const methods = Array.isArray(this.config.paymentMethods) ? this.config.paymentMethods : []
|
133
|
-
// 先用 methods 构建默认与自定义
|
134
|
-
methods.forEach(m => {
|
135
|
-
const key = m && m.key
|
136
|
-
const label = m && m.label
|
137
|
-
if (!key) return
|
138
|
-
map[key] = m && m.amountLabel ? m.amountLabel : `${label || key}金额`
|
139
|
-
})
|
140
|
-
return map
|
141
|
-
}
|
142
|
-
},
|
143
|
-
created () {
|
144
|
-
const hasParam = this.parameter && Object.keys(this.parameter).length > 0
|
145
|
-
// 始终加载组件配置;仅当有参数时,getConfig 内部才会拉取数据
|
146
|
-
this.getConfig(this.queryParamsName, this.parameter || {})
|
147
|
-
if (hasParam) this.hasInitialized = true
|
148
|
-
},
|
149
|
-
methods: {
|
150
|
-
// 同步 data 中的 selectedMethods / paymentAmounts 到本地状态;并补回缺失的 data 字段
|
151
|
-
hydrateFromData () {
|
152
|
-
const incomingMethods = Array.isArray(this.data && this.data.selectedMethods) ? this.data.selectedMethods : undefined
|
153
|
-
const incomingAmounts = this.data && this.data.paymentAmounts && typeof this.data.paymentAmounts === 'object' ? this.data.paymentAmounts : undefined
|
154
|
-
|
155
|
-
if (incomingMethods) {
|
156
|
-
this.selectedMethods = [...incomingMethods]
|
157
|
-
this.selectedMethod = this.selectedMethods[0] || ''
|
158
|
-
} else {
|
159
|
-
this.data.selectedMethods = [...this.selectedMethods]
|
160
|
-
this.data.selectedMethod = this.selectedMethod
|
161
|
-
}
|
162
|
-
|
163
|
-
if (incomingAmounts) {
|
164
|
-
// 用 $set 逐项写入,保持响应式
|
165
|
-
Object.keys(incomingAmounts).forEach(k => this.$set(this.paymentAmounts, k, incomingAmounts[k]))
|
166
|
-
} else if (!this.data.paymentAmounts) {
|
167
|
-
this.$set(this.data, 'paymentAmounts', { ...this.paymentAmounts })
|
168
|
-
}
|
169
|
-
|
170
|
-
// 根据 amounts 回算合计
|
171
|
-
this.calculateTotalPayment()
|
172
|
-
},
|
173
|
-
selectMethod (value) {
|
174
|
-
this.selectedMethod = value
|
175
|
-
this.data.selectedMethod = value
|
176
|
-
// 单一模式下初始化对应的支付数据
|
177
|
-
if (!this.isMixedPaymentEnabled && value) {
|
178
|
-
if (!this.paymentAmounts[value]) this.initPaymentData(value)
|
179
|
-
}
|
180
|
-
// 同步到数据模型,单一模式下也记录 selectedMethods 便于父层读取
|
181
|
-
this.data.selectedMethods = this.isMixedPaymentEnabled ? [...this.selectedMethods] : (value ? [value] : [])
|
182
|
-
this.$emit(this.eventNames.method, value)
|
183
|
-
},
|
184
|
-
// 新增:切换支付方式选择(支持多选)
|
185
|
-
toggleMethod (methodKey) {
|
186
|
-
const index = this.selectedMethods.indexOf(methodKey)
|
187
|
-
if (index > -1) {
|
188
|
-
// 如果已选中,则移除
|
189
|
-
this.selectedMethods.splice(index, 1)
|
190
|
-
this.removePaymentData(methodKey)
|
191
|
-
} else {
|
192
|
-
// 如果未选中,则添加
|
193
|
-
this.selectedMethods.push(methodKey)
|
194
|
-
this.initPaymentData(methodKey)
|
195
|
-
}
|
196
|
-
|
197
|
-
// 更新选中状态
|
198
|
-
this.selectedMethod = this.selectedMethods.length > 0 ? this.selectedMethods[0] : ''
|
199
|
-
this.data.selectedMethod = this.selectedMethod
|
200
|
-
this.data.selectedMethods = [...this.selectedMethods]
|
201
|
-
|
202
|
-
this.$emit(this.eventNames.methods, this.selectedMethods)
|
203
|
-
this.$emit(this.eventNames.method, this.selectedMethod) // 保持向后兼容
|
204
|
-
},
|
205
|
-
// 新增:移除支付方式
|
206
|
-
removeMethod (methodKey) {
|
207
|
-
const index = this.selectedMethods.indexOf(methodKey)
|
208
|
-
if (index > -1) {
|
209
|
-
this.selectedMethods.splice(index, 1)
|
210
|
-
this.removePaymentData(methodKey)
|
211
|
-
// 同步所选方式到数据模型
|
212
|
-
this.data.selectedMethods = [...this.selectedMethods]
|
213
|
-
this.selectedMethod = this.selectedMethods[0] || ''
|
214
|
-
this.data.selectedMethod = this.selectedMethod
|
215
|
-
this.$emit(this.eventNames.methods, this.selectedMethods)
|
216
|
-
}
|
217
|
-
},
|
218
|
-
// 新增:初始化支付数据(可传入初始金额,默认空字符串)
|
219
|
-
initPaymentData (methodKey, initialValue = '') {
|
220
|
-
this.$set(this.paymentAmounts, methodKey, initialValue)
|
221
|
-
if (!this.data.paymentAmounts || typeof this.data.paymentAmounts !== 'object') this.$set(this.data, 'paymentAmounts', {})
|
222
|
-
this.$set(this.data.paymentAmounts, methodKey, initialValue)
|
223
|
-
},
|
224
|
-
// 新增:移除支付数据
|
225
|
-
removePaymentData (methodKey) {
|
226
|
-
this.$delete(this.paymentAmounts, methodKey)
|
227
|
-
if (this.data && this.data.paymentAmounts) this.$delete(this.data.paymentAmounts, methodKey)
|
228
|
-
},
|
229
|
-
// 新增:获取支付方式标签
|
230
|
-
getMethodLabel (methodKey) {
|
231
|
-
const method = this.config.paymentMethods.find(m => m.key === methodKey)
|
232
|
-
return method ? method.label : methodKey
|
233
|
-
},
|
234
|
-
// 获取支付金额字段标签(优先配置映射,其次方法自带 amountLabel,最后回退)
|
235
|
-
getAmountLabel (methodKey) {
|
236
|
-
const mapped = (this.config.paymentAmountLabels && this.config.paymentAmountLabels[methodKey]) || ''
|
237
|
-
if (mapped) return mapped
|
238
|
-
const method = this.config.paymentMethods.find(m => m.key === methodKey)
|
239
|
-
if (method && method.amountLabel) return method.amountLabel
|
240
|
-
return `${method ? method.label : methodKey}金额`
|
241
|
-
},
|
242
|
-
// 新增:更新支付金额
|
243
|
-
updatePaymentAmount (methodKey, event) {
|
244
|
-
const amount = parseFloat(event.target.value) || 0
|
245
|
-
this.$set(this.paymentAmounts, methodKey, amount)
|
246
|
-
if (!this.data.paymentAmounts || typeof this.data.paymentAmounts !== 'object') this.$set(this.data, 'paymentAmounts', {})
|
247
|
-
this.$set(this.data.paymentAmounts, methodKey, amount)
|
248
|
-
this.calculateTotalPayment()
|
249
|
-
// 单个方式金额变更事件,向父组件上抛
|
250
|
-
this.$emit(this.eventNames.paymentAmountChange, { method: methodKey, amount })
|
251
|
-
},
|
252
|
-
// 新增:计算总支付金额
|
253
|
-
calculateTotalPayment () {
|
254
|
-
const total = Object.values(this.paymentAmounts).reduce((sum, amount) => {
|
255
|
-
return sum + (parseFloat(amount) || 0)
|
256
|
-
}, 0)
|
257
|
-
this.data.totalPaymentAmount = total
|
258
|
-
this.$emit(this.eventNames.totalPaymentAmount, total)
|
259
|
-
},
|
260
|
-
getConfig (configName, param) {
|
261
|
-
if (configName) {
|
262
|
-
console.log('configName', configName)
|
263
|
-
getConfigByName(configName, 'af-his', res => {
|
264
|
-
console.log('res', res)
|
265
|
-
// 检查是否有错误
|
266
|
-
if (res && res.ERROR) {
|
267
|
-
console.warn('配置获取失败:', res.ERROR)
|
268
|
-
return
|
269
|
-
}
|
270
|
-
this.config = {
|
271
|
-
amountFields: res.amountFields || [],
|
272
|
-
paymentMethods: res.paymentMethods || [],
|
273
|
-
bottomFields: res.bottomFields || [],
|
274
|
-
actionButtons: res.actionButtons || [],
|
275
|
-
enableMixedPayment: res.enableMixedPayment === true
|
276
|
-
}
|
277
|
-
// 事件名覆盖(fronImport风格)
|
278
|
-
if (res.eventNames && typeof res.eventNames === 'object') {
|
279
|
-
this.eventNames = { ...this.eventNames, ...res.eventNames }
|
280
|
-
}
|
281
|
-
// 处理默认选中项(支持 paymentMethods[].default === true)
|
282
|
-
const methods = Array.isArray(this.config.paymentMethods) ? this.config.paymentMethods : []
|
283
|
-
const defaultMethods = methods.filter(m => m && m.default === true)
|
284
|
-
|
285
|
-
if (this.isMixedPaymentEnabled) {
|
286
|
-
// 混合支付:默认选中全部 default=true 的方式;若没有默认,则保留现有逻辑选择第一个
|
287
|
-
if (defaultMethods.length > 0) {
|
288
|
-
this.selectedMethods = defaultMethods.map(m => m.key).filter(Boolean)
|
289
|
-
} else if (methods.length > 0) {
|
290
|
-
this.selectedMethods = [methods[0].key]
|
291
|
-
} else {
|
292
|
-
this.selectedMethods = []
|
293
|
-
}
|
294
|
-
// 初始化金额为 0
|
295
|
-
this.selectedMethods.forEach(k => this.initPaymentData(k, 0))
|
296
|
-
this.selectedMethod = this.selectedMethods[0] || ''
|
297
|
-
// 同步到数据模型
|
298
|
-
this.data.selectedMethods = [...this.selectedMethods]
|
299
|
-
} else {
|
300
|
-
// 单一支付:若存在默认项,选中第一个默认;否则选中第一个
|
301
|
-
if (defaultMethods.length > 0) {
|
302
|
-
this.selectedMethod = defaultMethods[0] && defaultMethods[0].key || ''
|
303
|
-
} else {
|
304
|
-
this.selectedMethod = methods[0] && methods[0].key || ''
|
305
|
-
}
|
306
|
-
if (this.selectedMethod) this.initPaymentData(this.selectedMethod, 0)
|
307
|
-
// 同步到数据模型,单一模式下也记录 selectedMethods
|
308
|
-
this.data.selectedMethods = this.selectedMethod ? [this.selectedMethod] : []
|
309
|
-
}
|
310
|
-
|
311
|
-
// 初始化数据:仅当传入了有效 param 时才拉取数据
|
312
|
-
const hasParam = param && Object.keys(param || {}).length > 0
|
313
|
-
if (hasParam && res.dataSourceConfig) {
|
314
|
-
runLogic(res.dataSourceConfig, param, 'af-his').then(resData => {
|
315
|
-
// 合并数据,避免覆盖 selectedMethods / paymentAmounts 等本地状态
|
316
|
-
this.data = { ...this.data, ...resData }
|
317
|
-
// 让本地状态与 data 保持一致
|
318
|
-
this.hydrateFromData()
|
319
|
-
}).catch(error => {
|
320
|
-
console.warn('数据获取失败(保持现有数据):', error)
|
321
|
-
})
|
322
|
-
}
|
323
|
-
})
|
324
|
-
}
|
325
|
-
},
|
326
|
-
refreshList (param) {
|
327
|
-
this.getConfig(this.queryParamsName, param)
|
328
|
-
},
|
329
|
-
async init (conditionData) {
|
330
|
-
if (conditionData.data) {
|
331
|
-
// 合并初始化数据,避免覆盖 selectedMethods / paymentAmounts 等本地状态
|
332
|
-
this.data = { ...this.data, ...conditionData.data }
|
333
|
-
this.hydrateFromData()
|
334
|
-
}
|
335
|
-
if (conditionData.params) {
|
336
|
-
await this.getConfig(this.queryParamsName, conditionData.params)
|
337
|
-
}
|
338
|
-
this.hasInitialized = true
|
339
|
-
},
|
340
|
-
// 使用默认数据
|
341
|
-
useDefaultData () {
|
342
|
-
this.data = {
|
343
|
-
f_amount: 100,
|
344
|
-
f_insurance_amount: 0,
|
345
|
-
f_self_amount: 100,
|
346
|
-
f_balance: 100,
|
347
|
-
out_of_pocket_amount: 0,
|
348
|
-
biscount_amount: 0,
|
349
|
-
billing_amount: 0,
|
350
|
-
received: 100,
|
351
|
-
change: 0
|
352
|
-
}
|
353
|
-
},
|
354
|
-
handleAction (key) {
|
355
|
-
console.warn('选择的的方法 ====》' + key)
|
356
|
-
console.warn('页面数据 ====》' + JSON.stringify(this.data))
|
357
|
-
console.warn('选择的支付方式 ====》' + this.selectedMethod)
|
358
|
-
|
359
|
-
if (this.isMixedPaymentEnabled) {
|
360
|
-
console.warn('混合支付方式 ====》' + JSON.stringify(this.selectedMethods))
|
361
|
-
console.warn('支付详情 ====》' + JSON.stringify({ amounts: this.paymentAmounts }))
|
362
|
-
}
|
363
|
-
|
364
|
-
const actionData = {
|
365
|
-
key,
|
366
|
-
data: this.data,
|
367
|
-
method: this.selectedMethod,
|
368
|
-
// 统一返回支付详情,单一模式时 selectedMethods 仅含一个
|
369
|
-
mixedPayment: {
|
370
|
-
selectedMethods: this.isMixedPaymentEnabled ? this.selectedMethods : (this.selectedMethod ? [this.selectedMethod] : []),
|
371
|
-
paymentAmounts: this.paymentAmounts,
|
372
|
-
totalPaymentAmount: this.data.totalPaymentAmount || 0
|
373
|
-
}
|
374
|
-
}
|
375
|
-
|
376
|
-
this.$emit(this.eventNames.action, actionData)
|
377
|
-
},
|
378
|
-
bottomFieldsChange (e, item) {
|
379
|
-
// 统一抛出到底部字段变更事件到父级组件
|
380
|
-
this.$emit('bottomFieldChange', {
|
381
|
-
event: e,
|
382
|
-
item: item,
|
383
|
-
field: item.field,
|
384
|
-
value: e && e.target ? e.target.value : undefined
|
385
|
-
})
|
386
|
-
|
387
|
-
// 保持原有的自定义事件逻辑(向后兼容)
|
388
|
-
if (item.changeEventName && this.$listeners[item.changeEventName]) this.$emit(item.changeEventName, e, item)
|
389
|
-
}
|
390
|
-
},
|
391
|
-
watch: {
|
392
|
-
configName (val) {
|
393
|
-
this.getConfig()
|
394
|
-
}
|
395
|
-
}
|
396
|
-
}
|
397
|
-
</script>
|
398
|
-
|
399
|
-
<style scoped>
|
400
|
-
.xcharge-wrapper {
|
401
|
-
background: #fff;
|
402
|
-
padding: 24px;
|
403
|
-
border-radius: 8px;
|
404
|
-
}
|
405
|
-
|
406
|
-
.amount-info {
|
407
|
-
margin-bottom: 20px;
|
408
|
-
display: flex;
|
409
|
-
flex-wrap: wrap;
|
410
|
-
row-gap: 16px;
|
411
|
-
}
|
412
|
-
|
413
|
-
.form-row {
|
414
|
-
display: flex;
|
415
|
-
align-items: center;
|
416
|
-
margin-bottom: 30px;
|
417
|
-
}
|
418
|
-
|
419
|
-
.form-label {
|
420
|
-
width: 100px;
|
421
|
-
font-size: 18px;
|
422
|
-
color: #333;
|
423
|
-
font-weight: bold;
|
424
|
-
text-align: left;
|
425
|
-
letter-spacing: 1px;
|
426
|
-
flex-shrink: 0;
|
427
|
-
}
|
428
|
-
|
429
|
-
.form-input {
|
430
|
-
width: 180px;
|
431
|
-
height: 40px;
|
432
|
-
font-size: 18px;
|
433
|
-
border-radius: 8px;
|
434
|
-
border: 1.5px solid #dcdfe6;
|
435
|
-
background: #fff;
|
436
|
-
color: #333;
|
437
|
-
padding-left: 12px;
|
438
|
-
}
|
439
|
-
|
440
|
-
.form-input[disabled] {
|
441
|
-
color: #999;
|
442
|
-
background: #f5f5f5;
|
443
|
-
}
|
444
|
-
|
445
|
-
.payment-methods {
|
446
|
-
display: flex;
|
447
|
-
justify-content: space-around;
|
448
|
-
margin: 32px 0;
|
449
|
-
}
|
450
|
-
|
451
|
-
.payment-btn {
|
452
|
-
width: 180px;
|
453
|
-
height: 120px;
|
454
|
-
margin: 0 16px;
|
455
|
-
display: flex;
|
456
|
-
align-items: center;
|
457
|
-
justify-content: center;
|
458
|
-
background: #f7f8fa;
|
459
|
-
border: 1.5px solid #e4e7ed;
|
460
|
-
color: #333;
|
461
|
-
font-weight: bold;
|
462
|
-
font-size: 24px;
|
463
|
-
transition: all 0.2s;
|
464
|
-
box-shadow: none;
|
465
|
-
border-radius: 12px;
|
466
|
-
}
|
467
|
-
|
468
|
-
.payment-btn.active {
|
469
|
-
background: #409eff;
|
470
|
-
border-color: #409eff;
|
471
|
-
color: #fff;
|
472
|
-
}
|
473
|
-
|
474
|
-
.pay-label {
|
475
|
-
font-size: 24px;
|
476
|
-
font-weight: bold;
|
477
|
-
}
|
478
|
-
|
479
|
-
.selected-indicator {
|
480
|
-
position: absolute;
|
481
|
-
top: 8px;
|
482
|
-
right: 8px;
|
483
|
-
background: #52c41a;
|
484
|
-
color: #fff;
|
485
|
-
border-radius: 50%;
|
486
|
-
width: 24px;
|
487
|
-
height: 24px;
|
488
|
-
display: flex;
|
489
|
-
align-items: center;
|
490
|
-
justify-content: center;
|
491
|
-
font-size: 14px;
|
492
|
-
font-weight: bold;
|
493
|
-
}
|
494
|
-
|
495
|
-
.mixed-payment-section {
|
496
|
-
margin: 24px 0;
|
497
|
-
padding: 20px;
|
498
|
-
background: #f8f9fa;
|
499
|
-
border-radius: 8px;
|
500
|
-
border: 1px solid #e9ecef;
|
501
|
-
}
|
502
|
-
|
503
|
-
.mixed-payment-section.simple {
|
504
|
-
padding: 0;
|
505
|
-
background: transparent;
|
506
|
-
border: none;
|
507
|
-
}
|
508
|
-
|
509
|
-
.mixed-payment-section.simple .payment-operation-row {
|
510
|
-
border: none;
|
511
|
-
background: transparent;
|
512
|
-
padding: 0;
|
513
|
-
margin-bottom: 12px;
|
514
|
-
}
|
515
|
-
|
516
|
-
.section-title {
|
517
|
-
margin: 0 0 20px 0;
|
518
|
-
font-size: 18px;
|
519
|
-
font-weight: bold;
|
520
|
-
color: #333;
|
521
|
-
text-align: center;
|
522
|
-
}
|
523
|
-
|
524
|
-
.payment-operation-row {
|
525
|
-
margin-bottom: 20px;
|
526
|
-
padding: 16px;
|
527
|
-
background: #fff;
|
528
|
-
border-radius: 6px;
|
529
|
-
border: 1px solid #d9d9d9;
|
530
|
-
}
|
531
|
-
|
532
|
-
.payment-method-header {
|
533
|
-
display: flex;
|
534
|
-
justify-content: space-between;
|
535
|
-
align-items: center;
|
536
|
-
margin-bottom: 16px;
|
537
|
-
padding-bottom: 8px;
|
538
|
-
border-bottom: 1px solid #f0f0f0;
|
539
|
-
}
|
540
|
-
|
541
|
-
.method-name {
|
542
|
-
font-size: 16px;
|
543
|
-
font-weight: bold;
|
544
|
-
color: #1890ff;
|
545
|
-
}
|
546
|
-
|
547
|
-
.remove-btn {
|
548
|
-
color: #ff4d4f;
|
549
|
-
padding: 0;
|
550
|
-
height: auto;
|
551
|
-
}
|
552
|
-
|
553
|
-
.remove-btn:hover {
|
554
|
-
color: #ff7875;
|
555
|
-
}
|
556
|
-
|
557
|
-
.payment-fields {
|
558
|
-
margin-top: 12px;
|
559
|
-
}
|
560
|
-
|
561
|
-
.payment-inline {
|
562
|
-
display: flex;
|
563
|
-
flex-wrap: nowrap;
|
564
|
-
align-items: center;
|
565
|
-
justify-content: center;
|
566
|
-
column-gap: 32px;
|
567
|
-
overflow-x: auto;
|
568
|
-
}
|
569
|
-
|
570
|
-
.inline-field {
|
571
|
-
display: inline-flex;
|
572
|
-
align-items: center;
|
573
|
-
column-gap: 16px;
|
574
|
-
white-space: nowrap;
|
575
|
-
}
|
576
|
-
|
577
|
-
.payment-inline .form-label {
|
578
|
-
width: auto;
|
579
|
-
}
|
580
|
-
|
581
|
-
.pay-shortcut {
|
582
|
-
font-size: 16px;
|
583
|
-
color: #888;
|
584
|
-
}
|
585
|
-
|
586
|
-
.bottom-info {
|
587
|
-
margin-top: 24px;
|
588
|
-
display: flex;
|
589
|
-
flex-wrap: wrap;
|
590
|
-
row-gap: 16px;
|
591
|
-
}
|
592
|
-
|
593
|
-
.actions-row {
|
594
|
-
margin-top: 32px;
|
595
|
-
display: flex;
|
596
|
-
justify-content: center;
|
597
|
-
}
|
598
|
-
|
599
|
-
.actions-row .ant-btn {
|
600
|
-
margin: 0 8px;
|
601
|
-
background: #444;
|
602
|
-
color: #fff;
|
603
|
-
border-radius: 6px;
|
604
|
-
border: none;
|
605
|
-
font-size: 16px;
|
606
|
-
font-weight: 500;
|
607
|
-
height: 38px;
|
608
|
-
min-width: 90px;
|
609
|
-
}
|
610
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="xcharge-wrapper">
|
3
|
+
<!-- 顶部金额信息区(表单行风格,宽度固定,每行4个) -->
|
4
|
+
<a-row :gutter="0" class="amount-info">
|
5
|
+
<a-col v-for="item in config.amountFields" :key="item.field" :span="6" class="form-row">
|
6
|
+
<label class="form-label">{{ item.label }}</label>
|
7
|
+
<a-input
|
8
|
+
v-model="data[item.field]"
|
9
|
+
:value="data[item.field]"
|
10
|
+
:disabled="item.disabled"
|
11
|
+
class="form-input"
|
12
|
+
/>
|
13
|
+
</a-col>
|
14
|
+
</a-row>
|
15
|
+
|
16
|
+
<a-divider/>
|
17
|
+
|
18
|
+
<!-- 支付方式选择区 -->
|
19
|
+
<div class="payment-methods">
|
20
|
+
<a-button
|
21
|
+
v-for="method in config.paymentMethods"
|
22
|
+
:key="method.key"
|
23
|
+
:class="['payment-btn', {
|
24
|
+
active: isMixedPaymentEnabled ? selectedMethods.includes(method.key) : selectedMethod === method.key
|
25
|
+
}]"
|
26
|
+
@click="isMixedPaymentEnabled ? toggleMethod(method.key) : selectMethod(method.key)"
|
27
|
+
>
|
28
|
+
<div>
|
29
|
+
<div class="pay-label">{{ method.label }}</div>
|
30
|
+
<div v-if="isMixedPaymentEnabled && selectedMethods.includes(method.key)" class="selected-indicator">✓</div>
|
31
|
+
</div>
|
32
|
+
</a-button>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<a-divider v-if="isMixedPaymentEnabled && selectedMethods.length > 1"/>
|
36
|
+
|
37
|
+
<!-- 支付详情(同一行展示,仅在混合支付且选择方式>1时出现) -->
|
38
|
+
<div v-if="isMixedPaymentEnabled && selectedMethods.length > 1" class="mixed-payment-section simple">
|
39
|
+
<div class="payment-operation-row">
|
40
|
+
<div class="payment-inline">
|
41
|
+
<div v-for="method in selectedMethods" :key="method" class="inline-field">
|
42
|
+
<label class="form-label">{{ getAmountLabel(method) }}</label>
|
43
|
+
<a-input
|
44
|
+
v-model="paymentAmounts[method]"
|
45
|
+
type="number"
|
46
|
+
placeholder="请输入金额"
|
47
|
+
class="form-input"
|
48
|
+
@change="updatePaymentAmount(method, $event)"
|
49
|
+
/>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<a-divider/>
|
56
|
+
|
57
|
+
<!-- 底部金额和操作区(表单行风格,宽度固定) -->
|
58
|
+
<a-row :gutter="0" class="bottom-info">
|
59
|
+
<a-col v-for="item in config.bottomFields" :key="item.field" :span="8" class="form-row">
|
60
|
+
<label class="form-label">{{ item.label }}</label>
|
61
|
+
<a-input
|
62
|
+
v-model="data[item.field]"
|
63
|
+
:disabled="item.disabled"
|
64
|
+
class="form-input"
|
65
|
+
@change="bottomFieldsChange($event,item)"
|
66
|
+
/>
|
67
|
+
</a-col>
|
68
|
+
</a-row>
|
69
|
+
<a-row class="actions-row" justify="center">
|
70
|
+
<a-button
|
71
|
+
v-for="btn in config.actionButtons"
|
72
|
+
:key="btn.key"
|
73
|
+
@click="handleAction(btn.key)"
|
74
|
+
:icon="btn.icon"
|
75
|
+
style="margin: 0 8px"
|
76
|
+
>
|
77
|
+
{{ btn.label }}
|
78
|
+
</a-button>
|
79
|
+
</a-row>
|
80
|
+
</div>
|
81
|
+
</template>
|
82
|
+
|
83
|
+
<script>
|
84
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
85
|
+
|
86
|
+
export default {
|
87
|
+
name: 'XCharge',
|
88
|
+
props: {
|
89
|
+
queryParamsName: {
|
90
|
+
type: String,
|
91
|
+
default: ''
|
92
|
+
},
|
93
|
+
parameter: {
|
94
|
+
type: Object,
|
95
|
+
default: () => ({})
|
96
|
+
}
|
97
|
+
},
|
98
|
+
data () {
|
99
|
+
return {
|
100
|
+
config: {
|
101
|
+
amountFields: [],
|
102
|
+
paymentMethods: [],
|
103
|
+
bottomFields: [],
|
104
|
+
actionButtons: [],
|
105
|
+
enableMixedPayment: false // 默认关闭混合支付
|
106
|
+
},
|
107
|
+
data: {},
|
108
|
+
selectedMethod: '', // 保持向后兼容
|
109
|
+
selectedMethods: [], // 新增:支持多选支付方式
|
110
|
+
paymentAmounts: {}, // 各支付方式的金额
|
111
|
+
// 事件名配置(可通过配置覆盖)
|
112
|
+
eventNames: {
|
113
|
+
method: 'method',
|
114
|
+
methods: 'methods',
|
115
|
+
totalPaymentAmount: 'totalPaymentAmount',
|
116
|
+
action: 'action',
|
117
|
+
// 新增:单个支付方式金额变更事件
|
118
|
+
paymentAmountChange: 'paymentAmountChange'
|
119
|
+
},
|
120
|
+
hasInitialized: false
|
121
|
+
}
|
122
|
+
},
|
123
|
+
emits: ['init'],
|
124
|
+
computed: {
|
125
|
+
// 安全访问混合支付配置
|
126
|
+
isMixedPaymentEnabled () {
|
127
|
+
return this.config && this.config.enableMixedPayment === true
|
128
|
+
},
|
129
|
+
// 预计算:金额标签映射(仅基于 paymentMethods 配置)
|
130
|
+
amountLabelMap () {
|
131
|
+
const map = {}
|
132
|
+
const methods = Array.isArray(this.config.paymentMethods) ? this.config.paymentMethods : []
|
133
|
+
// 先用 methods 构建默认与自定义
|
134
|
+
methods.forEach(m => {
|
135
|
+
const key = m && m.key
|
136
|
+
const label = m && m.label
|
137
|
+
if (!key) return
|
138
|
+
map[key] = m && m.amountLabel ? m.amountLabel : `${label || key}金额`
|
139
|
+
})
|
140
|
+
return map
|
141
|
+
}
|
142
|
+
},
|
143
|
+
created () {
|
144
|
+
const hasParam = this.parameter && Object.keys(this.parameter).length > 0
|
145
|
+
// 始终加载组件配置;仅当有参数时,getConfig 内部才会拉取数据
|
146
|
+
this.getConfig(this.queryParamsName, this.parameter || {})
|
147
|
+
if (hasParam) this.hasInitialized = true
|
148
|
+
},
|
149
|
+
methods: {
|
150
|
+
// 同步 data 中的 selectedMethods / paymentAmounts 到本地状态;并补回缺失的 data 字段
|
151
|
+
hydrateFromData () {
|
152
|
+
const incomingMethods = Array.isArray(this.data && this.data.selectedMethods) ? this.data.selectedMethods : undefined
|
153
|
+
const incomingAmounts = this.data && this.data.paymentAmounts && typeof this.data.paymentAmounts === 'object' ? this.data.paymentAmounts : undefined
|
154
|
+
|
155
|
+
if (incomingMethods) {
|
156
|
+
this.selectedMethods = [...incomingMethods]
|
157
|
+
this.selectedMethod = this.selectedMethods[0] || ''
|
158
|
+
} else {
|
159
|
+
this.data.selectedMethods = [...this.selectedMethods]
|
160
|
+
this.data.selectedMethod = this.selectedMethod
|
161
|
+
}
|
162
|
+
|
163
|
+
if (incomingAmounts) {
|
164
|
+
// 用 $set 逐项写入,保持响应式
|
165
|
+
Object.keys(incomingAmounts).forEach(k => this.$set(this.paymentAmounts, k, incomingAmounts[k]))
|
166
|
+
} else if (!this.data.paymentAmounts) {
|
167
|
+
this.$set(this.data, 'paymentAmounts', { ...this.paymentAmounts })
|
168
|
+
}
|
169
|
+
|
170
|
+
// 根据 amounts 回算合计
|
171
|
+
this.calculateTotalPayment()
|
172
|
+
},
|
173
|
+
selectMethod (value) {
|
174
|
+
this.selectedMethod = value
|
175
|
+
this.data.selectedMethod = value
|
176
|
+
// 单一模式下初始化对应的支付数据
|
177
|
+
if (!this.isMixedPaymentEnabled && value) {
|
178
|
+
if (!this.paymentAmounts[value]) this.initPaymentData(value)
|
179
|
+
}
|
180
|
+
// 同步到数据模型,单一模式下也记录 selectedMethods 便于父层读取
|
181
|
+
this.data.selectedMethods = this.isMixedPaymentEnabled ? [...this.selectedMethods] : (value ? [value] : [])
|
182
|
+
this.$emit(this.eventNames.method, value)
|
183
|
+
},
|
184
|
+
// 新增:切换支付方式选择(支持多选)
|
185
|
+
toggleMethod (methodKey) {
|
186
|
+
const index = this.selectedMethods.indexOf(methodKey)
|
187
|
+
if (index > -1) {
|
188
|
+
// 如果已选中,则移除
|
189
|
+
this.selectedMethods.splice(index, 1)
|
190
|
+
this.removePaymentData(methodKey)
|
191
|
+
} else {
|
192
|
+
// 如果未选中,则添加
|
193
|
+
this.selectedMethods.push(methodKey)
|
194
|
+
this.initPaymentData(methodKey)
|
195
|
+
}
|
196
|
+
|
197
|
+
// 更新选中状态
|
198
|
+
this.selectedMethod = this.selectedMethods.length > 0 ? this.selectedMethods[0] : ''
|
199
|
+
this.data.selectedMethod = this.selectedMethod
|
200
|
+
this.data.selectedMethods = [...this.selectedMethods]
|
201
|
+
|
202
|
+
this.$emit(this.eventNames.methods, this.selectedMethods)
|
203
|
+
this.$emit(this.eventNames.method, this.selectedMethod) // 保持向后兼容
|
204
|
+
},
|
205
|
+
// 新增:移除支付方式
|
206
|
+
removeMethod (methodKey) {
|
207
|
+
const index = this.selectedMethods.indexOf(methodKey)
|
208
|
+
if (index > -1) {
|
209
|
+
this.selectedMethods.splice(index, 1)
|
210
|
+
this.removePaymentData(methodKey)
|
211
|
+
// 同步所选方式到数据模型
|
212
|
+
this.data.selectedMethods = [...this.selectedMethods]
|
213
|
+
this.selectedMethod = this.selectedMethods[0] || ''
|
214
|
+
this.data.selectedMethod = this.selectedMethod
|
215
|
+
this.$emit(this.eventNames.methods, this.selectedMethods)
|
216
|
+
}
|
217
|
+
},
|
218
|
+
// 新增:初始化支付数据(可传入初始金额,默认空字符串)
|
219
|
+
initPaymentData (methodKey, initialValue = '') {
|
220
|
+
this.$set(this.paymentAmounts, methodKey, initialValue)
|
221
|
+
if (!this.data.paymentAmounts || typeof this.data.paymentAmounts !== 'object') this.$set(this.data, 'paymentAmounts', {})
|
222
|
+
this.$set(this.data.paymentAmounts, methodKey, initialValue)
|
223
|
+
},
|
224
|
+
// 新增:移除支付数据
|
225
|
+
removePaymentData (methodKey) {
|
226
|
+
this.$delete(this.paymentAmounts, methodKey)
|
227
|
+
if (this.data && this.data.paymentAmounts) this.$delete(this.data.paymentAmounts, methodKey)
|
228
|
+
},
|
229
|
+
// 新增:获取支付方式标签
|
230
|
+
getMethodLabel (methodKey) {
|
231
|
+
const method = this.config.paymentMethods.find(m => m.key === methodKey)
|
232
|
+
return method ? method.label : methodKey
|
233
|
+
},
|
234
|
+
// 获取支付金额字段标签(优先配置映射,其次方法自带 amountLabel,最后回退)
|
235
|
+
getAmountLabel (methodKey) {
|
236
|
+
const mapped = (this.config.paymentAmountLabels && this.config.paymentAmountLabels[methodKey]) || ''
|
237
|
+
if (mapped) return mapped
|
238
|
+
const method = this.config.paymentMethods.find(m => m.key === methodKey)
|
239
|
+
if (method && method.amountLabel) return method.amountLabel
|
240
|
+
return `${method ? method.label : methodKey}金额`
|
241
|
+
},
|
242
|
+
// 新增:更新支付金额
|
243
|
+
updatePaymentAmount (methodKey, event) {
|
244
|
+
const amount = parseFloat(event.target.value) || 0
|
245
|
+
this.$set(this.paymentAmounts, methodKey, amount)
|
246
|
+
if (!this.data.paymentAmounts || typeof this.data.paymentAmounts !== 'object') this.$set(this.data, 'paymentAmounts', {})
|
247
|
+
this.$set(this.data.paymentAmounts, methodKey, amount)
|
248
|
+
this.calculateTotalPayment()
|
249
|
+
// 单个方式金额变更事件,向父组件上抛
|
250
|
+
this.$emit(this.eventNames.paymentAmountChange, { method: methodKey, amount })
|
251
|
+
},
|
252
|
+
// 新增:计算总支付金额
|
253
|
+
calculateTotalPayment () {
|
254
|
+
const total = Object.values(this.paymentAmounts).reduce((sum, amount) => {
|
255
|
+
return sum + (parseFloat(amount) || 0)
|
256
|
+
}, 0)
|
257
|
+
this.data.totalPaymentAmount = total
|
258
|
+
this.$emit(this.eventNames.totalPaymentAmount, total)
|
259
|
+
},
|
260
|
+
getConfig (configName, param) {
|
261
|
+
if (configName) {
|
262
|
+
console.log('configName', configName)
|
263
|
+
getConfigByName(configName, 'af-his', res => {
|
264
|
+
console.log('res', res)
|
265
|
+
// 检查是否有错误
|
266
|
+
if (res && res.ERROR) {
|
267
|
+
console.warn('配置获取失败:', res.ERROR)
|
268
|
+
return
|
269
|
+
}
|
270
|
+
this.config = {
|
271
|
+
amountFields: res.amountFields || [],
|
272
|
+
paymentMethods: res.paymentMethods || [],
|
273
|
+
bottomFields: res.bottomFields || [],
|
274
|
+
actionButtons: res.actionButtons || [],
|
275
|
+
enableMixedPayment: res.enableMixedPayment === true
|
276
|
+
}
|
277
|
+
// 事件名覆盖(fronImport风格)
|
278
|
+
if (res.eventNames && typeof res.eventNames === 'object') {
|
279
|
+
this.eventNames = { ...this.eventNames, ...res.eventNames }
|
280
|
+
}
|
281
|
+
// 处理默认选中项(支持 paymentMethods[].default === true)
|
282
|
+
const methods = Array.isArray(this.config.paymentMethods) ? this.config.paymentMethods : []
|
283
|
+
const defaultMethods = methods.filter(m => m && m.default === true)
|
284
|
+
|
285
|
+
if (this.isMixedPaymentEnabled) {
|
286
|
+
// 混合支付:默认选中全部 default=true 的方式;若没有默认,则保留现有逻辑选择第一个
|
287
|
+
if (defaultMethods.length > 0) {
|
288
|
+
this.selectedMethods = defaultMethods.map(m => m.key).filter(Boolean)
|
289
|
+
} else if (methods.length > 0) {
|
290
|
+
this.selectedMethods = [methods[0].key]
|
291
|
+
} else {
|
292
|
+
this.selectedMethods = []
|
293
|
+
}
|
294
|
+
// 初始化金额为 0
|
295
|
+
this.selectedMethods.forEach(k => this.initPaymentData(k, 0))
|
296
|
+
this.selectedMethod = this.selectedMethods[0] || ''
|
297
|
+
// 同步到数据模型
|
298
|
+
this.data.selectedMethods = [...this.selectedMethods]
|
299
|
+
} else {
|
300
|
+
// 单一支付:若存在默认项,选中第一个默认;否则选中第一个
|
301
|
+
if (defaultMethods.length > 0) {
|
302
|
+
this.selectedMethod = defaultMethods[0] && defaultMethods[0].key || ''
|
303
|
+
} else {
|
304
|
+
this.selectedMethod = methods[0] && methods[0].key || ''
|
305
|
+
}
|
306
|
+
if (this.selectedMethod) this.initPaymentData(this.selectedMethod, 0)
|
307
|
+
// 同步到数据模型,单一模式下也记录 selectedMethods
|
308
|
+
this.data.selectedMethods = this.selectedMethod ? [this.selectedMethod] : []
|
309
|
+
}
|
310
|
+
|
311
|
+
// 初始化数据:仅当传入了有效 param 时才拉取数据
|
312
|
+
const hasParam = param && Object.keys(param || {}).length > 0
|
313
|
+
if (hasParam && res.dataSourceConfig) {
|
314
|
+
runLogic(res.dataSourceConfig, param, 'af-his').then(resData => {
|
315
|
+
// 合并数据,避免覆盖 selectedMethods / paymentAmounts 等本地状态
|
316
|
+
this.data = { ...this.data, ...resData }
|
317
|
+
// 让本地状态与 data 保持一致
|
318
|
+
this.hydrateFromData()
|
319
|
+
}).catch(error => {
|
320
|
+
console.warn('数据获取失败(保持现有数据):', error)
|
321
|
+
})
|
322
|
+
}
|
323
|
+
})
|
324
|
+
}
|
325
|
+
},
|
326
|
+
refreshList (param) {
|
327
|
+
this.getConfig(this.queryParamsName, param)
|
328
|
+
},
|
329
|
+
async init (conditionData) {
|
330
|
+
if (conditionData.data) {
|
331
|
+
// 合并初始化数据,避免覆盖 selectedMethods / paymentAmounts 等本地状态
|
332
|
+
this.data = { ...this.data, ...conditionData.data }
|
333
|
+
this.hydrateFromData()
|
334
|
+
}
|
335
|
+
if (conditionData.params) {
|
336
|
+
await this.getConfig(this.queryParamsName, conditionData.params)
|
337
|
+
}
|
338
|
+
this.hasInitialized = true
|
339
|
+
},
|
340
|
+
// 使用默认数据
|
341
|
+
useDefaultData () {
|
342
|
+
this.data = {
|
343
|
+
f_amount: 100,
|
344
|
+
f_insurance_amount: 0,
|
345
|
+
f_self_amount: 100,
|
346
|
+
f_balance: 100,
|
347
|
+
out_of_pocket_amount: 0,
|
348
|
+
biscount_amount: 0,
|
349
|
+
billing_amount: 0,
|
350
|
+
received: 100,
|
351
|
+
change: 0
|
352
|
+
}
|
353
|
+
},
|
354
|
+
handleAction (key) {
|
355
|
+
console.warn('选择的的方法 ====》' + key)
|
356
|
+
console.warn('页面数据 ====》' + JSON.stringify(this.data))
|
357
|
+
console.warn('选择的支付方式 ====》' + this.selectedMethod)
|
358
|
+
|
359
|
+
if (this.isMixedPaymentEnabled) {
|
360
|
+
console.warn('混合支付方式 ====》' + JSON.stringify(this.selectedMethods))
|
361
|
+
console.warn('支付详情 ====》' + JSON.stringify({ amounts: this.paymentAmounts }))
|
362
|
+
}
|
363
|
+
|
364
|
+
const actionData = {
|
365
|
+
key,
|
366
|
+
data: this.data,
|
367
|
+
method: this.selectedMethod,
|
368
|
+
// 统一返回支付详情,单一模式时 selectedMethods 仅含一个
|
369
|
+
mixedPayment: {
|
370
|
+
selectedMethods: this.isMixedPaymentEnabled ? this.selectedMethods : (this.selectedMethod ? [this.selectedMethod] : []),
|
371
|
+
paymentAmounts: this.paymentAmounts,
|
372
|
+
totalPaymentAmount: this.data.totalPaymentAmount || 0
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
376
|
+
this.$emit(this.eventNames.action, actionData)
|
377
|
+
},
|
378
|
+
bottomFieldsChange (e, item) {
|
379
|
+
// 统一抛出到底部字段变更事件到父级组件
|
380
|
+
this.$emit('bottomFieldChange', {
|
381
|
+
event: e,
|
382
|
+
item: item,
|
383
|
+
field: item.field,
|
384
|
+
value: e && e.target ? e.target.value : undefined
|
385
|
+
})
|
386
|
+
|
387
|
+
// 保持原有的自定义事件逻辑(向后兼容)
|
388
|
+
if (item.changeEventName && this.$listeners[item.changeEventName]) this.$emit(item.changeEventName, e, item)
|
389
|
+
}
|
390
|
+
},
|
391
|
+
watch: {
|
392
|
+
configName (val) {
|
393
|
+
this.getConfig()
|
394
|
+
}
|
395
|
+
}
|
396
|
+
}
|
397
|
+
</script>
|
398
|
+
|
399
|
+
<style scoped>
|
400
|
+
.xcharge-wrapper {
|
401
|
+
background: #fff;
|
402
|
+
padding: 24px;
|
403
|
+
border-radius: 8px;
|
404
|
+
}
|
405
|
+
|
406
|
+
.amount-info {
|
407
|
+
margin-bottom: 20px;
|
408
|
+
display: flex;
|
409
|
+
flex-wrap: wrap;
|
410
|
+
row-gap: 16px;
|
411
|
+
}
|
412
|
+
|
413
|
+
.form-row {
|
414
|
+
display: flex;
|
415
|
+
align-items: center;
|
416
|
+
margin-bottom: 30px;
|
417
|
+
}
|
418
|
+
|
419
|
+
.form-label {
|
420
|
+
width: 100px;
|
421
|
+
font-size: 18px;
|
422
|
+
color: #333;
|
423
|
+
font-weight: bold;
|
424
|
+
text-align: left;
|
425
|
+
letter-spacing: 1px;
|
426
|
+
flex-shrink: 0;
|
427
|
+
}
|
428
|
+
|
429
|
+
.form-input {
|
430
|
+
width: 180px;
|
431
|
+
height: 40px;
|
432
|
+
font-size: 18px;
|
433
|
+
border-radius: 8px;
|
434
|
+
border: 1.5px solid #dcdfe6;
|
435
|
+
background: #fff;
|
436
|
+
color: #333;
|
437
|
+
padding-left: 12px;
|
438
|
+
}
|
439
|
+
|
440
|
+
.form-input[disabled] {
|
441
|
+
color: #999;
|
442
|
+
background: #f5f5f5;
|
443
|
+
}
|
444
|
+
|
445
|
+
.payment-methods {
|
446
|
+
display: flex;
|
447
|
+
justify-content: space-around;
|
448
|
+
margin: 32px 0;
|
449
|
+
}
|
450
|
+
|
451
|
+
.payment-btn {
|
452
|
+
width: 180px;
|
453
|
+
height: 120px;
|
454
|
+
margin: 0 16px;
|
455
|
+
display: flex;
|
456
|
+
align-items: center;
|
457
|
+
justify-content: center;
|
458
|
+
background: #f7f8fa;
|
459
|
+
border: 1.5px solid #e4e7ed;
|
460
|
+
color: #333;
|
461
|
+
font-weight: bold;
|
462
|
+
font-size: 24px;
|
463
|
+
transition: all 0.2s;
|
464
|
+
box-shadow: none;
|
465
|
+
border-radius: 12px;
|
466
|
+
}
|
467
|
+
|
468
|
+
.payment-btn.active {
|
469
|
+
background: #409eff;
|
470
|
+
border-color: #409eff;
|
471
|
+
color: #fff;
|
472
|
+
}
|
473
|
+
|
474
|
+
.pay-label {
|
475
|
+
font-size: 24px;
|
476
|
+
font-weight: bold;
|
477
|
+
}
|
478
|
+
|
479
|
+
.selected-indicator {
|
480
|
+
position: absolute;
|
481
|
+
top: 8px;
|
482
|
+
right: 8px;
|
483
|
+
background: #52c41a;
|
484
|
+
color: #fff;
|
485
|
+
border-radius: 50%;
|
486
|
+
width: 24px;
|
487
|
+
height: 24px;
|
488
|
+
display: flex;
|
489
|
+
align-items: center;
|
490
|
+
justify-content: center;
|
491
|
+
font-size: 14px;
|
492
|
+
font-weight: bold;
|
493
|
+
}
|
494
|
+
|
495
|
+
.mixed-payment-section {
|
496
|
+
margin: 24px 0;
|
497
|
+
padding: 20px;
|
498
|
+
background: #f8f9fa;
|
499
|
+
border-radius: 8px;
|
500
|
+
border: 1px solid #e9ecef;
|
501
|
+
}
|
502
|
+
|
503
|
+
.mixed-payment-section.simple {
|
504
|
+
padding: 0;
|
505
|
+
background: transparent;
|
506
|
+
border: none;
|
507
|
+
}
|
508
|
+
|
509
|
+
.mixed-payment-section.simple .payment-operation-row {
|
510
|
+
border: none;
|
511
|
+
background: transparent;
|
512
|
+
padding: 0;
|
513
|
+
margin-bottom: 12px;
|
514
|
+
}
|
515
|
+
|
516
|
+
.section-title {
|
517
|
+
margin: 0 0 20px 0;
|
518
|
+
font-size: 18px;
|
519
|
+
font-weight: bold;
|
520
|
+
color: #333;
|
521
|
+
text-align: center;
|
522
|
+
}
|
523
|
+
|
524
|
+
.payment-operation-row {
|
525
|
+
margin-bottom: 20px;
|
526
|
+
padding: 16px;
|
527
|
+
background: #fff;
|
528
|
+
border-radius: 6px;
|
529
|
+
border: 1px solid #d9d9d9;
|
530
|
+
}
|
531
|
+
|
532
|
+
.payment-method-header {
|
533
|
+
display: flex;
|
534
|
+
justify-content: space-between;
|
535
|
+
align-items: center;
|
536
|
+
margin-bottom: 16px;
|
537
|
+
padding-bottom: 8px;
|
538
|
+
border-bottom: 1px solid #f0f0f0;
|
539
|
+
}
|
540
|
+
|
541
|
+
.method-name {
|
542
|
+
font-size: 16px;
|
543
|
+
font-weight: bold;
|
544
|
+
color: #1890ff;
|
545
|
+
}
|
546
|
+
|
547
|
+
.remove-btn {
|
548
|
+
color: #ff4d4f;
|
549
|
+
padding: 0;
|
550
|
+
height: auto;
|
551
|
+
}
|
552
|
+
|
553
|
+
.remove-btn:hover {
|
554
|
+
color: #ff7875;
|
555
|
+
}
|
556
|
+
|
557
|
+
.payment-fields {
|
558
|
+
margin-top: 12px;
|
559
|
+
}
|
560
|
+
|
561
|
+
.payment-inline {
|
562
|
+
display: flex;
|
563
|
+
flex-wrap: nowrap;
|
564
|
+
align-items: center;
|
565
|
+
justify-content: center;
|
566
|
+
column-gap: 32px;
|
567
|
+
overflow-x: auto;
|
568
|
+
}
|
569
|
+
|
570
|
+
.inline-field {
|
571
|
+
display: inline-flex;
|
572
|
+
align-items: center;
|
573
|
+
column-gap: 16px;
|
574
|
+
white-space: nowrap;
|
575
|
+
}
|
576
|
+
|
577
|
+
.payment-inline .form-label {
|
578
|
+
width: auto;
|
579
|
+
}
|
580
|
+
|
581
|
+
.pay-shortcut {
|
582
|
+
font-size: 16px;
|
583
|
+
color: #888;
|
584
|
+
}
|
585
|
+
|
586
|
+
.bottom-info {
|
587
|
+
margin-top: 24px;
|
588
|
+
display: flex;
|
589
|
+
flex-wrap: wrap;
|
590
|
+
row-gap: 16px;
|
591
|
+
}
|
592
|
+
|
593
|
+
.actions-row {
|
594
|
+
margin-top: 32px;
|
595
|
+
display: flex;
|
596
|
+
justify-content: center;
|
597
|
+
}
|
598
|
+
|
599
|
+
.actions-row .ant-btn {
|
600
|
+
margin: 0 8px;
|
601
|
+
background: #444;
|
602
|
+
color: #fff;
|
603
|
+
border-radius: 6px;
|
604
|
+
border: none;
|
605
|
+
font-size: 16px;
|
606
|
+
font-weight: 500;
|
607
|
+
height: 38px;
|
608
|
+
min-width: 90px;
|
609
|
+
}
|
610
|
+
</style>
|