|
@@ -1,5 +1,6 @@
|
|
|
import { ProColumns } from '@ant-design/pro-components';
|
|
|
import { useModel } from '@umijs/max';
|
|
|
+import { Space } from 'antd';
|
|
|
|
|
|
export const columns = (): ProColumns<any>[] => {
|
|
|
let { getEnum } = useModel('global')
|
|
@@ -8,10 +9,9 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
title: 'openId',
|
|
|
dataIndex: 'openId',
|
|
|
align: 'center',
|
|
|
- width: 70,
|
|
|
ellipsis: true,
|
|
|
render: (_, row) => {
|
|
|
- return row?.wechatMiniappUser?.openId
|
|
|
+ return row?.wechatMiniappUser?.openId || "-"
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -19,17 +19,15 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
dataIndex: 'bookName',
|
|
|
key: 'bookName',
|
|
|
align: 'center',
|
|
|
- width: 150,
|
|
|
ellipsis: true,
|
|
|
render: (a, b) => {
|
|
|
- return b?.bookInfo?.bookName;
|
|
|
+ return b?.bookInfo?.bookName || "-"
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
title: '应用名称',
|
|
|
dataIndex: 'appName',
|
|
|
key: 'appName',
|
|
|
- width: 120,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
render: (a, b) => {
|
|
@@ -40,7 +38,6 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
title: '分销商名称',
|
|
|
dataIndex: 'companyName',
|
|
|
key: 'companyName',
|
|
|
- width: 120,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
render: (a, b) => {
|
|
@@ -50,29 +47,25 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
{
|
|
|
title: '订单号',
|
|
|
dataIndex: 'orderNo',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '商户订单号',
|
|
|
dataIndex: 'merchantOrderId',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '订单类型',
|
|
|
dataIndex: 'orderType',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
- valueEnum:getEnum("ORDER_TYPE","map")
|
|
|
+ valueEnum: getEnum("ORDER_TYPE", "map")
|
|
|
},
|
|
|
{
|
|
|
title: '充值金额',
|
|
|
dataIndex: 'amount',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
hideInSearch: true,
|
|
@@ -80,7 +73,6 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
{
|
|
|
title: '实际支付金额',
|
|
|
dataIndex: 'payAmount',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
hideInSearch: true,
|
|
@@ -88,16 +80,14 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
{
|
|
|
title: '支付渠道',
|
|
|
dataIndex: 'payChannel',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
hideInSearch: true,
|
|
|
- valueEnum:getEnum("PAY_CHANNEL","map")
|
|
|
+ valueEnum: getEnum("PAY_CHANNEL", "map")
|
|
|
},
|
|
|
{
|
|
|
title: '支付状态',
|
|
|
dataIndex: 'orderStatus',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
valueEnum: getEnum("ORDER_STATUS", "stateObj", { "2": "success", "1": "processing", "3": "warning", "-2": "error", " -1": "default" })
|
|
@@ -105,14 +95,12 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
{
|
|
|
title: '支付场景',
|
|
|
dataIndex: 'orderCondition',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '下单时间',
|
|
|
dataIndex: 'orderTime',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
hideInSearch: true,
|
|
@@ -120,15 +108,42 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
{
|
|
|
title: '支付时间',
|
|
|
dataIndex: 'payTime',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
hideInSearch: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ title: "充值次数",
|
|
|
+ dataIndex: 'chargeNum',
|
|
|
+ key: "chargeNum",
|
|
|
+ hideInSearch: true,
|
|
|
+ align: "center",
|
|
|
+ render: (_, row) => {
|
|
|
+ return row?.wechatMiniappUser?.chargeNum
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "上报金额",
|
|
|
+ dataIndex: 'backMoney',
|
|
|
+ key: "backMoney",
|
|
|
+ hideInSearch: true,
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "上报状态",
|
|
|
+ dataIndex: 'backStatus',
|
|
|
+ key: "backStatus",
|
|
|
+ hideInSearch: true,
|
|
|
+ align: "center",
|
|
|
+ render: (_, row) => {
|
|
|
+ let obj = getEnum("BACK_STATUS", "stateObj", { "0": 'default', "-1": "error", "1": "processing", "2": "success", "3": "warning" })
|
|
|
+ let isShowBtn = [1, -1].includes(row?.backStatus)
|
|
|
+ return <Space>{obj[row.backStatus]?.text}{isShowBtn}</Space>
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
title: '归因渠道',
|
|
|
dataIndex: 'userChannel',
|
|
|
- width: 170,
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
valueType: 'select',
|
|
@@ -138,6 +153,25 @@ export const columns = (): ProColumns<any>[] => {
|
|
|
return str
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '渠道名称',
|
|
|
+ dataIndex: 'userSource',
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ render: (_, row) => {
|
|
|
+ return row?.wechatMiniappUser?.userSource
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "用户注册时间",
|
|
|
+ dataIndex: 'createTime',
|
|
|
+ key: "createTime",
|
|
|
+ hideInSearch: true,
|
|
|
+ align: "center",
|
|
|
+ render: (_, row) => {
|
|
|
+ return row?.wechatMiniappUser?.createTime
|
|
|
+ }
|
|
|
+ },
|
|
|
// 搜索
|
|
|
{
|
|
|
title: '支付金额',
|