feat: 退款充值换货列表提交人与审批摘要
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m20s

This commit is contained in:
luo
2026-07-22 18:37:41 +08:00
parent 7d3352038a
commit d5fd8ac564
20 changed files with 420 additions and 19 deletions

View File

@@ -349,16 +349,6 @@ export class CardService extends BaseService {
return this.getPage<StandaloneIotCard>('/api/admin/iot-cards/standalone', params)
}
/**
* 获取 IoT 卡列表
* @param params 查询参数
*/
static getIotCards(
params?: StandaloneCardQueryParams
): Promise<PaginationResponse<StandaloneIotCard>> {
return this.getPage<StandaloneIotCard>('/api/admin/iot-cards', params)
}
/**
* 批量分配单卡
* @param data 分配参数

View File

@@ -53,6 +53,13 @@ export interface ExchangeResponse {
express_no?: string
inherited_shop_id?: number | null
inherited_shop_name?: string | null
submitter_name?: string | null // 提交人名称
approval_source?: 'none' | 'legacy' | 'wecom' | null // 审批来源
approval_status?: string | null // 审批状态
approval_status_name?: string | null // 审批状态名称
current_approver_summary?: string | null // 当前审批人摘要
processing_status?: string | null // 业务处理状态
processing_status_name?: string | null // 业务处理状态名称
remark?: string
created_at: string
updated_at: string

View File

@@ -34,6 +34,13 @@ export interface AgentRecharge {
payment_voucher_key?: string[] | string // 凭证附件列表;历史数据可能为单字符串或逗号字符串
rejection_reason?: string | null // 拒绝原因
remark?: string // 运营备注
submitter_name?: string | null // 提交人名称
approval_source?: 'none' | 'legacy' | 'wecom' | null // 审批来源
approval_status?: string | null // 审批状态
approval_status_name?: string | null // 审批状态名称
current_approver_summary?: string | null // 当前审批人摘要
processing_status?: string | null // 业务处理状态
processing_status_name?: string | null // 业务处理状态名称
created_at: string
paid_at: string | null
completed_at: string | null

View File

@@ -31,6 +31,13 @@ export interface Refund {
remark: string
asset_reset: boolean
commission_deducted: boolean
submitter_name?: string | null // 提交人名称
approval_source?: 'none' | 'legacy' | 'wecom' | null // 审批来源
approval_status?: string | null // 审批状态
approval_status_name?: string | null // 审批状态名称
current_approver_summary?: string | null // 当前审批人摘要
processing_status?: string | null // 业务处理状态
processing_status_name?: string | null // 业务处理状态名称
creator: number
processor_id: number | null
processed_at: string | null

View File

@@ -0,0 +1,22 @@
export type ApprovalSource = 'none' | 'legacy' | 'wecom'
export interface ApprovalSummary {
approval_source?: ApprovalSource | null
approval_status_name?: string | null
current_approver_summary?: string | null
processing_status_name?: string | null
}
export const getApprovalStatusText = (summary: ApprovalSummary): string => {
if (summary.approval_source === 'legacy') return '历史审批'
if (summary.approval_source === 'wecom') return summary.approval_status_name || '-'
return '-'
}
export const getCurrentApproverSummaryText = (summary: ApprovalSummary): string => {
if (summary.approval_source !== 'wecom') return '-'
return summary.current_approver_summary || '-'
}
export const getProcessingStatusText = (summary: ApprovalSummary): string =>
summary.processing_status_name || '-'

View File

@@ -7,4 +7,5 @@ export * from './validate'
export * from './calculate'
export * from './voucher'
export * from './apiRateLimit'
export * from './approvalSummary'
export * from './expiryEstimate'

View File

@@ -5,7 +5,7 @@
<ArtSearchBar
v-model:filter="searchForm"
:items="searchFormItems"
:show-expand="false"
:show-expand="true"
label-width="90"
@reset="handleReset"
@search="handleSearch"
@@ -390,6 +390,11 @@
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import { useAuth } from '@/composables/useAuth'
import { formatDateTime } from '@/utils/business/format'
import {
getApprovalStatusText,
getCurrentApproverSummaryText,
getProcessingStatusText
} from '@/utils/business/approvalSummary'
import { RoutesAlias } from '@/router/routesAlias'
defineOptions({ name: 'ExchangeManagement' })
@@ -712,6 +717,33 @@
width: 220,
formatter: (row: ExchangeResponse) => row.new_asset_identifier || '--'
},
{
prop: 'submitter_name',
label: '提交人',
width: 120,
showOverflowTooltip: true,
formatter: (row: ExchangeResponse) => row.submitter_name || '-'
},
{
prop: 'approval_status',
label: '审批状态',
width: 120,
formatter: (row: ExchangeResponse) => getApprovalStatusText(row)
},
{
prop: 'current_approver_summary',
label: '当前审批人摘要',
minWidth: 180,
showOverflowTooltip: true,
formatter: (row: ExchangeResponse) => getCurrentApproverSummaryText(row)
},
{
prop: 'processing_status_name',
label: '业务处理状态',
width: 140,
showOverflowTooltip: true,
formatter: (row: ExchangeResponse) => getProcessingStatusText(row)
},
{
prop: 'recipient_name',
label: '收货人姓名',

View File

@@ -2365,7 +2365,7 @@
}
})
const res = await CardService.getIotCards(params)
const res = await CardService.getStandaloneIotCards(params)
if (res.code === 0) {
cardList.value = res.data.items || []
pagination.total = res.data.total || 0

View File

@@ -236,6 +236,11 @@
import type { SearchFormItem } from '@/types'
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import { formatDateTime } from '@/utils/business/format'
import {
getApprovalStatusText,
getCurrentApproverSummaryText,
getProcessingStatusText
} from '@/utils/business/approvalSummary'
import { hasVoucherKeys, toVoucherKeyList } from '@/utils/business'
import { useAuth } from '@/composables/useAuth'
import PaymentVoucherDialog from '@/components/business/PaymentVoucherDialog.vue'
@@ -365,6 +370,10 @@
{ label: '店铺名称', prop: 'shop_name' },
{ label: '充值金额', prop: 'amount' },
{ label: '状态', prop: 'status' },
{ label: '提交人', prop: 'submitter_name' },
{ label: '审批状态', prop: 'approval_status' },
{ label: '当前审批人摘要', prop: 'current_approver_summary' },
{ label: '业务处理状态', prop: 'processing_status_name' },
{ label: '支付方式', prop: 'payment_method' },
{ label: '支付通道', prop: 'payment_channel' },
{ label: '驳回原因', prop: 'rejection_reason' },
@@ -524,6 +533,33 @@
)
}
},
{
prop: 'submitter_name',
label: '提交人',
width: 120,
showOverflowTooltip: true,
formatter: (row: AgentRecharge) => row.submitter_name || '-'
},
{
prop: 'approval_status',
label: '审批状态',
width: 120,
formatter: (row: AgentRecharge) => getApprovalStatusText(row)
},
{
prop: 'current_approver_summary',
label: '当前审批人摘要',
minWidth: 180,
showOverflowTooltip: true,
formatter: (row: AgentRecharge) => getCurrentApproverSummaryText(row)
},
{
prop: 'processing_status_name',
label: '业务处理状态',
width: 140,
showOverflowTooltip: true,
formatter: (row: AgentRecharge) => getProcessingStatusText(row)
},
{
prop: 'payment_method',
label: '支付方式',

View File

@@ -267,6 +267,11 @@
import type { SearchFormItem } from '@/types'
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import { fenToYuan, formatDateTime, yuanToFen } from '@/utils/business/format'
import {
getApprovalStatusText,
getCurrentApproverSummaryText,
getProcessingStatusText
} from '@/utils/business/approvalSummary'
import { hasVoucherKeys, toVoucherKeyList } from '@/utils/business'
import { RoutesAlias } from '@/router/routesAlias'
import PaymentVoucherDialog from '@/components/business/PaymentVoucherDialog.vue'
@@ -391,6 +396,10 @@
{ label: '实际退款金额', prop: 'approved_refund_amount' },
{ label: '实收金额', prop: 'actual_received_amount' },
{ label: '状态', prop: 'status' },
{ label: '提交人', prop: 'submitter_name' },
{ label: '审批状态', prop: 'approval_status' },
{ label: '当前审批人摘要', prop: 'current_approver_summary' },
{ label: '业务处理状态', prop: 'processing_status_name' },
{ label: '退款原因', prop: 'refund_reason' },
{ label: '拒绝原因', prop: 'reject_reason' },
{ label: '审批备注', prop: 'remark' },
@@ -547,6 +556,33 @@
return h(ElTag, { type: getStatusType(row.status) }, () => getStatusText(row.status))
}
},
{
prop: 'submitter_name',
label: '提交人',
width: 120,
showOverflowTooltip: true,
formatter: (row: Refund) => row.submitter_name || '-'
},
{
prop: 'approval_status',
label: '审批状态',
width: 120,
formatter: (row: Refund) => getApprovalStatusText(row)
},
{
prop: 'current_approver_summary',
label: '当前审批人摘要',
minWidth: 180,
showOverflowTooltip: true,
formatter: (row: Refund) => getCurrentApproverSummaryText(row)
},
{
prop: 'processing_status_name',
label: '业务处理状态',
width: 140,
showOverflowTooltip: true,
formatter: (row: Refund) => getProcessingStatusText(row)
},
{
prop: 'refund_reason',
label: '退款原因',