refactor(card-jd-ck): 重构京东CK管理页面
- 修改页面标题为"京东CK管理" - 移除不必要的按钮和功能 - 更新表格列显示内容 - 注释掉部分API调用 - 优化页面布局和样式
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<Breadcrumb :items="['充值账户管理', '京东Cookie']" />
|
||||
<Breadcrumb :items="['京东Cookie管理', 'ck管理']" />
|
||||
<a-space direction="vertical" fill>
|
||||
<a-card class="general-card" title="京东Cookie管理">
|
||||
<a-row>
|
||||
@@ -167,17 +167,6 @@
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</a-popconfirm>
|
||||
<a-tooltip content="检查账号状态">
|
||||
<a-button
|
||||
size="small"
|
||||
status="warning"
|
||||
@click="checkOne(record.id)"
|
||||
>
|
||||
<template #icon>
|
||||
<icon-check-circle />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip content="删除">
|
||||
<a-button
|
||||
size="small"
|
||||
@@ -225,11 +214,9 @@ import {
|
||||
} from '@/api/card-walmart-account';
|
||||
import { batchImportModel } from './components/component.tsx';
|
||||
import {
|
||||
ApiCardInfoWalmartAccountGetListGetPageSizeEnum,
|
||||
KamiApiCardInfoWalmartV1AccountListRecord,
|
||||
KamiInternalModelEntityV1CardRedeemAccountGroup
|
||||
} from '@/api/generated/index.ts';
|
||||
import { apiClient } from '@/api/index.ts';
|
||||
|
||||
const basePagination: Pagination = {
|
||||
current: 1,
|
||||
@@ -255,43 +242,27 @@ const columns: TableColumnData[] = [
|
||||
dataIndex: 'nickname'
|
||||
},
|
||||
{
|
||||
title: '余额',
|
||||
dataIndex: 'balance'
|
||||
},
|
||||
{
|
||||
title: '今日充值金额',
|
||||
title: '拉单次数',
|
||||
dataIndex: 'amountTodaySum'
|
||||
},
|
||||
{
|
||||
title: '今日充值次数',
|
||||
title: '成功次数',
|
||||
dataIndex: 'amountTodaySum'
|
||||
},
|
||||
{
|
||||
title: '拉单支付金额',
|
||||
dataIndex: 'amountTodayCount'
|
||||
},
|
||||
{
|
||||
title: '充值限制(金额)',
|
||||
title: '最近拉单时间',
|
||||
dataIndex: 'maxAmountLimit'
|
||||
},
|
||||
{
|
||||
title: '充值限制(次数)',
|
||||
dataIndex: 'maxCountLimit'
|
||||
},
|
||||
{
|
||||
title: '累计充值金额',
|
||||
dataIndex: 'amountTotalSum'
|
||||
},
|
||||
{
|
||||
title: '累计充值次数',
|
||||
dataIndex: 'amountTotalCount'
|
||||
},
|
||||
{
|
||||
title: 'ck',
|
||||
dataIndex: 'cookie',
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
dataIndex: 'uploadUser.username'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
@@ -338,25 +309,25 @@ const groupList = ref<KamiInternalModelEntityV1CardRedeemAccountGroup[]>([]);
|
||||
const fetchData = async (
|
||||
params: WalmartCardParams = { current: 1, pageSize: 50 }
|
||||
) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const res = await apiClient.apiCardInfoWalmartAccountGetListGet(
|
||||
params.current,
|
||||
params.pageSize as ApiCardInfoWalmartAccountGetListGetPageSizeEnum,
|
||||
formModel.value.name,
|
||||
formModel.value.nickname,
|
||||
formModel.value.cookie,
|
||||
formModel.value.createdUserName,
|
||||
formModel.value.groupId
|
||||
);
|
||||
renderData.value = res.data.list;
|
||||
pagination.current = params.current;
|
||||
pagination.pageSize = params.pageSize;
|
||||
pagination.total = res.data.total;
|
||||
} catch (err) {
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
// setLoading(true);
|
||||
// try {
|
||||
// const res = await apiClient.apiCardInfoWalmartAccountGetListGet(
|
||||
// params.current,
|
||||
// params.pageSize as ApiCardInfoWalmartAccountGetListGetPageSizeEnum,
|
||||
// formModel.value.name,
|
||||
// formModel.value.nickname,
|
||||
// formModel.value.cookie,
|
||||
// formModel.value.createdUserName,
|
||||
// formModel.value.groupId
|
||||
// );
|
||||
// renderData.value = res.data.list;
|
||||
// pagination.current = params.current;
|
||||
// pagination.pageSize = params.pageSize;
|
||||
// pagination.total = res.data.total;
|
||||
// } catch (err) {
|
||||
// } finally {
|
||||
// setLoading(false);
|
||||
// }
|
||||
};
|
||||
const onPageChange = (current: number) => {
|
||||
fetchData({ ...pagination, current });
|
||||
@@ -375,9 +346,9 @@ const reset = () => {
|
||||
};
|
||||
|
||||
const getAllGroupList = () => {
|
||||
apiClient.apiCardInfoWalmartGroupAllListGet().then(res => {
|
||||
groupList.value = res.data.list;
|
||||
});
|
||||
// apiClient.apiCardInfoWalmartGroupAllListGet().then(res => {
|
||||
// groupList.value = res.data.list;
|
||||
// });
|
||||
};
|
||||
|
||||
const deleteOne = async (id: string) => {
|
||||
@@ -394,31 +365,6 @@ const deleteOne = async (id: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
const checkOne = async (id: string) => {
|
||||
try {
|
||||
const result = await apiClient.apiCardInfoWalmartAccountStatusDetectGet(id);
|
||||
if (result.data.status) {
|
||||
Notification.info({
|
||||
id: 'walmartAccountNotice',
|
||||
content: 'ck有效',
|
||||
closable: true
|
||||
});
|
||||
} else {
|
||||
Notification.error({
|
||||
id: 'walmartAccountNotice',
|
||||
content: 'ck无效',
|
||||
closable: true
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
Notification.error({
|
||||
id: 'walmartAccountNotice',
|
||||
content: '检测沃尔玛卡失败',
|
||||
closable: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const showAddModel = (record: walmartCardUpdateRecord) => {
|
||||
state.addModalVisible = true;
|
||||
state.accountId = record.id;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<Breadcrumb :items="['充值账户管理', '充值流水']" />
|
||||
<Breadcrumb :items="['京东ck管理', '订单管理']" />
|
||||
<a-card class="general-card" title="流水记录">
|
||||
<a-row>
|
||||
<!-- <a-row>
|
||||
<a-col :flex="1">
|
||||
<a-form
|
||||
:model="formModel"
|
||||
@@ -78,7 +78,7 @@
|
||||
</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">
|
||||
@@ -201,11 +201,9 @@ import OrderHistory from './components/history.vue';
|
||||
import { checkTokenFromIframe } from '@/utils/auth';
|
||||
import { walmartCardOrderParams } from '@/api/card-walmart-order.ts';
|
||||
import {
|
||||
ApiCardInfoWalmartOrderListGetPageSizeEnum,
|
||||
KamiInternalModelEntityV1CardRedeemAccountGroup,
|
||||
KamiInternalModelEntityV1CardRedeemOrderInfo
|
||||
} from '@/api/generated/index.ts';
|
||||
import { apiClient } from '@/api/index.ts';
|
||||
|
||||
const basePagination: Pagination = {
|
||||
current: 1,
|
||||
@@ -231,54 +229,40 @@ const columns: TableColumnData[] = [
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '系统订单号',
|
||||
title: '订单号',
|
||||
dataIndex: 'merchantId'
|
||||
},
|
||||
{
|
||||
title: '商户订单号',
|
||||
title: '京东订单号',
|
||||
dataIndex: 'attach'
|
||||
},
|
||||
{
|
||||
title: '分配账号',
|
||||
dataIndex: 'accountName'
|
||||
},
|
||||
{
|
||||
title: '卡种',
|
||||
title: '系统订单号',
|
||||
dataIndex: 'cardTypeName'
|
||||
},
|
||||
{
|
||||
title: '卡号',
|
||||
title: '支付链接',
|
||||
dataIndex: 'accountName'
|
||||
},
|
||||
{
|
||||
title: '产品种类',
|
||||
dataIndex: 'actualAmount'
|
||||
},
|
||||
{
|
||||
title: '提取信息',
|
||||
dataIndex: 'cardNo',
|
||||
tooltip: true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '礼品卡密码',
|
||||
dataIndex: 'giftCardPwd'
|
||||
},
|
||||
{
|
||||
title: '卡面金额',
|
||||
title: '订单金额',
|
||||
dataIndex: 'orderAmount'
|
||||
},
|
||||
{
|
||||
title: '实际金额',
|
||||
dataIndex: 'actualAmount'
|
||||
},
|
||||
{
|
||||
title: '充值状态',
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
slotName: 'status'
|
||||
},
|
||||
{
|
||||
title: '状态明细',
|
||||
dataIndex: 'orderStatus',
|
||||
slotName: 'orderStatus'
|
||||
},
|
||||
{
|
||||
title: '回调状态',
|
||||
dataIndex: 'notifyStatus',
|
||||
slotName: 'notifyStatus'
|
||||
},
|
||||
// {
|
||||
// title: '备注',
|
||||
// dataIndex: 'remark'
|
||||
@@ -307,10 +291,10 @@ const generateFormModel = () => {
|
||||
};
|
||||
|
||||
const resetStatus = (orderNo: string) => {
|
||||
apiClient.apiCardInfoWalmartOrderStatusResetPut({ id: orderNo }).then(() => {
|
||||
Message.success('重置成功');
|
||||
search();
|
||||
});
|
||||
// apiClient.apiCardInfoWalmartOrderStatusResetPut({ id: orderNo }).then(() => {
|
||||
// Message.success('重置成功');
|
||||
// search();
|
||||
// });
|
||||
};
|
||||
|
||||
const { loading, setLoading } = useLoading(true);
|
||||
@@ -332,28 +316,28 @@ const fetchData = async (
|
||||
pageSize: 50
|
||||
}
|
||||
) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const res = await apiClient.apiCardInfoWalmartOrderListGet(
|
||||
pagination.current,
|
||||
pagination.pageSize as ApiCardInfoWalmartOrderListGetPageSizeEnum,
|
||||
formModel.value.giftCardPwd,
|
||||
formModel.value.merchantId,
|
||||
formModel.value.attach,
|
||||
formModel.value.accountNickName,
|
||||
formModel.value.groupId,
|
||||
formModel.value.accountCk,
|
||||
formModel.value.dateRange
|
||||
);
|
||||
renderData.value = res.data.list;
|
||||
pagination.current = params.current;
|
||||
pagination.pageSize = params.pageSize;
|
||||
pagination.total = res.data.total;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
// setLoading(true);
|
||||
// try {
|
||||
// const res = await apiClient.apiCardInfoWalmartOrderListGet(
|
||||
// pagination.current,
|
||||
// pagination.pageSize as ApiCardInfoWalmartOrderListGetPageSizeEnum,
|
||||
// formModel.value.giftCardPwd,
|
||||
// formModel.value.merchantId,
|
||||
// formModel.value.attach,
|
||||
// formModel.value.accountNickName,
|
||||
// formModel.value.groupId,
|
||||
// formModel.value.accountCk,
|
||||
// formModel.value.dateRange
|
||||
// );
|
||||
// renderData.value = res.data.list;
|
||||
// pagination.current = params.current;
|
||||
// pagination.pageSize = params.pageSize;
|
||||
// pagination.total = res.data.total;
|
||||
// } catch (err) {
|
||||
// console.error(err);
|
||||
// } finally {
|
||||
// setLoading(false);
|
||||
// }
|
||||
};
|
||||
|
||||
const onPageChange = (current: number) => {
|
||||
@@ -432,18 +416,18 @@ onMounted(() => {
|
||||
});
|
||||
const callback = async (orderNo: string) => {
|
||||
try {
|
||||
await apiClient.apiCardInfoWalmartOrderCallbackGet(orderNo);
|
||||
Notification.success({
|
||||
title: '成功',
|
||||
content: '等待回调'
|
||||
});
|
||||
// await apiClient.apiCardInfoWalmartOrderCallbackGet(orderNo);
|
||||
// Notification.success({
|
||||
// title: '成功',
|
||||
// content: '等待回调'
|
||||
// });
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
const getAllGroupList = () => {
|
||||
apiClient.apiCardInfoWalmartGroupAllListGet().then(res => {
|
||||
groupList.value = res.data.list;
|
||||
});
|
||||
// apiClient.apiCardInfoWalmartGroupAllListGet().then(res => {
|
||||
// groupList.value = res.data.list;
|
||||
// });
|
||||
};
|
||||
|
||||
const onChangeRadio = (value: string | number | boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user