2
0

feat:多货币以及支付方式配置

This commit is contained in:
zhongzm
2025-04-27 19:19:03 +08:00
parent 59d54185f5
commit 4422a2bab2
8 changed files with 233 additions and 13 deletions

View File

@@ -76,8 +76,7 @@
:min="0.01"
:precision="2"
style="width: 100%"
:formatter="value => `¥ ${value}`"
:parser="value => (value || '').replace(/[¥\s,]/g, '')"
:addon-before="currencyStore.symbol"
/>
</AFormItem>
@@ -166,8 +165,8 @@ import { computed, shallowRef, ref, onMounted } from 'vue';
import { useElementSize } from '@vueuse/core';
import { fetchPackageList, addPackage, fetchRateLimitList, updatePackage, deletePackage } from '@/service/api/auth';
import { Button as AButton, message, Modal, Form as AForm, Input as AInput, InputNumber as AInputNumber, Select as ASelect, Switch as ASwitch, Tag as ATag } from 'ant-design-vue';
import { PlusOutlined } from '@ant-design/icons-vue';
import type { Rule } from 'ant-design-vue/es/form';
import { useCurrencyStore } from '@/views/billing/rule/modules/currency';
import {
formatBandwidth,
formatStorage,
@@ -185,6 +184,7 @@ const timeUnits = useTimeUnits();
const formatTime = useFormatTime();
const wrapperEl = shallowRef<HTMLElement | null>(null);
const { height: wrapperElHeight } = useElementSize(wrapperEl);
const currencyStore = useCurrencyStore();
const scrollConfig = computed(() => {
return {
@@ -241,9 +241,9 @@ const { columns, columnChecks, data, loading, getData, mobilePagination } = useT
{
key: 'price',
dataIndex: 'price',
title: t('page.package.price'),
title: t('page.package.price')+currencyStore.symbol,
align: 'center',
customRender: ({ text }) => `${Number(text).toFixed(2)}`
customRender: ({ text }) => `${Number(text).toFixed(2)} ${currencyStore.symbol}`
},
{
key: 'traffic',