refactor(card-jd-ck): clean up and optimize account and order components

Remove unused code, update table column definitions, and simplify UI elements.
This commit is contained in:
danial
2025-04-24 23:43:57 +08:00
parent 7453842de2
commit a66eff51ee
5 changed files with 24 additions and 57 deletions

View File

@@ -0,0 +1,3 @@
1. Always chat in Chinese.
2. Add function-level comments when generating code.
3. My system is Mac/Windows.

View File

@@ -82,6 +82,7 @@ const generateFormData = () => {
status: KamiApiCardRedeemJdV1AccountAddReqStatusEnum.Normal
};
};
const formData = ref<KamiApiCardRedeemJdV1AccountAddReq>(generateFormData());
const formDataRef = ref<FormInstance>();

View File

@@ -36,14 +36,6 @@ const tableColumns: TableColumnData[] = [
title: '昵称',
dataIndex: 'nickname'
},
{
title: '限额(金额)',
dataIndex: 'maxAmountLimit'
},
{
title: '限额(次数)',
dataIndex: 'maxCountLimit'
},
{
title: 'cookie',
dataIndex: 'cookie',
@@ -157,7 +149,8 @@ export const batchImportModel = defineComponent({
return () => (
<>
<Button
type='primary'
type='secondary'
status='warning'
size='small'
onClick={() => (state.visible = !state.visible)}
>

View File

@@ -62,12 +62,6 @@
</template>
添加
</a-button>
<!-- <a-button @click="download">
<template #icon>
<icon-download />
</template>
导出
</a-button> -->
<batchImportModel @close="() => search()" />
</a-space>
</a-row>
@@ -146,17 +140,12 @@
</template>
</a-table>
</a-card>
<!-- <summary-card /> -->
</a-space>
<add-modal
:id="state.accountId"
v-model:visible="state.addModalVisible"
:account="state.account"
/>
<!-- <account-detail
v-model:visible="state.accountDetailVisible"
:accountId="state.accountId"
/> -->
</div>
</template>
@@ -194,26 +183,22 @@ const columns: TableColumnData[] = [
title: '名称',
dataIndex: 'name'
},
{
title: '昵称',
dataIndex: 'nickname'
},
{
title: '拉单次数',
dataIndex: 'amountTotalCount'
},
{
title: '成功订单',
dataIndex: 'amountTotalCount'
},
{
title: '支付总金额',
dataIndex: 'amountTotalSum'
},
{
title: '今日支付金额',
dataIndex: 'amountTodaySum'
},
{
title: '成功次数',
dataIndex: 'amountTodaySum'
},
{
title: '拉单支付金额',
dataIndex: 'amountTodayCount'
},
{
title: '最近拉单时间',
dataIndex: 'maxAmountLimit'
},
{
title: 'ck',
dataIndex: 'cookie',
@@ -230,6 +215,10 @@ const columns: TableColumnData[] = [
dataIndex: 'createdAt',
slotName: 'createdAt'
},
{
title: '最近拉单时间',
dataIndex: 'updatedAt'
},
{
title: '操作',
dataIndex: 'operations',
@@ -255,8 +244,6 @@ const state = reactive({
account: null
});
const groupList = ref<KamiInternalModelEntityV1CardRedeemAccountGroup[]>([]);
const fetchData = async () => {
setLoading(true);
try {

View File

@@ -2,7 +2,7 @@
<div class="container">
<Breadcrumb :items="['京东ck管理', '订单管理']" />
<a-card class="general-card" title="流水记录">
<!-- <a-row>
<a-row>
<a-col :flex="1">
<a-form
:model="formModel"
@@ -78,26 +78,9 @@
</a-space>
</a-space>
</a-col>
</a-row> -->
</a-row>
<a-divider style="margin-top: 0" />
<a-space direction="vertical" fill>
<a-row style="justify-content: space-between; margin-bottom: 16px">
<config v-if="state.showConfig" />
<a-tabs
default-active-key=""
type="capsule"
:onChange="onChangeRadio"
animation
>
<a-tab-pane key="" title="全部" />
<a-tab-pane
v-for="item in groupList"
:key="item.id"
:title="item.name"
:value="item.id"
/>
</a-tabs>
</a-row>
<a-table
:loading="loading"
:pagination="{