feat: 添加认购记录组件并在产品页面中集成对话框

This commit is contained in:
2026-01-25 19:18:47 +07:00
parent bed8d5905a
commit 2ca0357f01
4 changed files with 62 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
<script lang="ts" setup>
import SubscriptionPage from '@/views/subscription/index.vue';
defineOptions({
name: 'SubscriptionDialog'
});
const props = defineProps<{
productId?: string;
}>();
</script>
<template>
<SubscriptionPage :product-id="productId" :scroll-x="1200" :show-header-operation="false" />
</template>
<style lang="css" scoped></style>

View File

@@ -6,6 +6,7 @@ import { client, safeClient } from '@/service/api';
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
import Add from './components/add.vue';
import Edit from './components/edit.vue';
import Records from './components/records.vue';
const message = useMessage();
const dialog = useDialog();
@@ -97,9 +98,9 @@ const columns: TableBaseColumns = [
{
key: 'operations',
title: '操作',
width: 200,
width: 240,
fixed: 'right',
operations: row => [
operations: (row: any) => [
{
contentText: '编辑',
size: 'small',
@@ -127,6 +128,18 @@ const columns: TableBaseColumns = [
}
});
}
},
{
contentText: '认购记录',
size: 'small',
onClick() {
dialog.create({
title: '认购记录',
showIcon: false,
style: { width: '1000px' },
content: () => h(Records, { productId: row.id })
});
}
}
]
}

View File

@@ -0,0 +1,17 @@
<script lang="ts" setup>
import SubscriptionPage from '@/views/subscription/index.vue';
defineOptions({
name: 'SubscriptionDialog'
});
const props = defineProps<{
userId?: string;
}>();
</script>
<template>
<SubscriptionPage :user-id="userId" :scroll-x="1200" :show-header-operation="false" />
</template>
<style lang="css" scoped></style>

View File

@@ -13,6 +13,7 @@ import Team from './components/team.vue';
import Kyc from './components/kyc.vue';
import Ledger from './components/ledger.vue';
import Deposit from './components/deposit.vue';
import Subscription from './components/subscription.vue';
const dialog = useDialog();
const message = useMessage();
@@ -108,6 +109,18 @@ const columns: TableBaseColumns = [
});
}
},
{
contentText: '认购记录',
size: 'small',
onClick: () => {
dialog.create({
title: '认购记录',
showIcon: false,
style: { width: '1000px' },
content: () => h(Subscription, { userId: row.id })
});
}
},
{
contentText: '提现订单',
size: 'small',