Add currency auto transform (#83)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
3f16b60071
commit
c83b4fcc9f
21 files changed
+245
-22
No files matched your search
@@ -38,7 +38,7 @@
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :label="$t('order.field.price')">
|
||||
<span v-if="order?.price && order?.price > 0" class="price unfree">
|
||||
${{ order?.price?.toFixed(2) }}
|
||||
{{ getPriceString({ value: order?.price }) }}
|
||||
</span>
|
||||
<span v-else class="price free"> {{ $t('order.message.free') }} </span>
|
||||
</el-descriptions-item>
|
||||
@@ -142,6 +142,7 @@ import {
|
||||
import WechatPayOrder from '@/components/order/WechatPay.vue';
|
||||
import StripePayOrder from '@/components/order/StripePay.vue';
|
||||
import { IApplicationType, IOrder, IOrderDetailResponse, OrderState } from '@/models';
|
||||
import { getPriceString } from '@/utils';
|
||||
|
||||
enum PayWay {
|
||||
WechatPay = 'WechatPay',
|
||||
@@ -216,6 +217,7 @@ export default defineComponent({
|
||||
this.onFetchData();
|
||||
},
|
||||
methods: {
|
||||
getPriceString,
|
||||
onFetchData() {
|
||||
this.loading = true;
|
||||
orderOperator
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('order.field.price')" width="100px">
|
||||
<template #default="scope">
|
||||
<span class="price">${{ scope.row?.price?.toFixed(2) }}</span>
|
||||
<span class="price">{{ getPriceString({ value: scope.row?.price }) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="state" :label="$t('order.field.state')" class-name="text-center" width="150px">
|
||||
@@ -108,6 +108,7 @@ import Pagination from '@/components/common/Pagination.vue';
|
||||
import CopyToClipboard from '@/components/common/CopyToClipboard.vue';
|
||||
import { ElRow, ElCol, ElTable, ElTableColumn, ElButton, ElTag, ElCard } from 'element-plus';
|
||||
import { IOrder, IOrderListResponse, OrderState } from '@/models';
|
||||
import { getPriceString } from '@/utils';
|
||||
|
||||
interface IData {
|
||||
orders: IOrder[];
|
||||
@@ -159,6 +160,7 @@ export default defineComponent({
|
||||
this.onFetchData();
|
||||
},
|
||||
methods: {
|
||||
getPriceString,
|
||||
onPageChange(page: number) {
|
||||
this.$router.push({
|
||||
name: this.$route.name?.toString(),
|
||||
|
||||
Reference in new issue
Block a user