This commit is contained in:
@@ -51,14 +51,14 @@ test('agent recharge rejection posts the rejection reason to the order rejection
|
||||
const { AgentRechargeService } = await import(pathToFileURL(bundlePath).href)
|
||||
|
||||
await AgentRechargeService.rejectAgentRecharge(42, {
|
||||
reject_reason: '支付凭证不符合要求'
|
||||
rejection_reason: '支付凭证不符合要求'
|
||||
})
|
||||
|
||||
assert.deepEqual(calls, [
|
||||
{
|
||||
url: '/api/admin/agent-recharges/42/reject',
|
||||
data: {
|
||||
reject_reason: '支付凭证不符合要求'
|
||||
rejection_reason: '支付凭证不符合要求'
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
@@ -32,6 +32,7 @@ export interface AgentRecharge {
|
||||
payment_config_id: number | null
|
||||
payment_transaction_id: string
|
||||
payment_voucher_key?: string[] | string // 凭证附件列表;历史数据可能为单字符串或逗号字符串
|
||||
rejection_reason?: string | null // 拒绝原因
|
||||
remark?: string // 运营备注
|
||||
created_at: string
|
||||
paid_at: string | null
|
||||
@@ -75,5 +76,5 @@ export interface ConfirmOfflinePaymentRequest {
|
||||
|
||||
// 拒绝代理充值订单请求
|
||||
export interface RejectAgentRechargeRequest {
|
||||
reject_reason: string
|
||||
rejection_reason: string
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { hasVoucherKeys, toVoucherKeyList } from '@/utils/business'
|
||||
import PaymentVoucherDialog from '@/components/business/PaymentVoucherDialog.vue'
|
||||
import { formatRejectionReason } from './agentRechargeDisplay'
|
||||
|
||||
defineOptions({ name: 'AgentRechargeDetail' })
|
||||
|
||||
@@ -111,6 +112,12 @@
|
||||
h(ElTag, { type: getStatusType(data.status) }, () =>
|
||||
getStatusText(data.status, data.status_name)
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '驳回原因',
|
||||
prop: 'rejection_reason',
|
||||
formatter: (value) => formatRejectionReason(value),
|
||||
fullWidth: true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -178,9 +178,9 @@
|
||||
<ElFormItem label="充值单号">
|
||||
<span>{{ currentRecharge?.recharge_no }}</span>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="拒绝原因" prop="reject_reason">
|
||||
<ElFormItem label="拒绝原因" prop="rejection_reason">
|
||||
<ElInput
|
||||
v-model="rejectForm.reject_reason"
|
||||
v-model="rejectForm.rejection_reason"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
maxlength="500"
|
||||
@@ -241,6 +241,7 @@
|
||||
import PaymentVoucherDialog from '@/components/business/PaymentVoucherDialog.vue'
|
||||
import VoucherUpload from '@/components/business/VoucherUpload.vue'
|
||||
import { buildAgentRechargeActions } from './agentRechargeActions'
|
||||
import { formatRejectionReason } from './agentRechargeDisplay'
|
||||
|
||||
defineOptions({ name: 'AgentRechargeList' })
|
||||
|
||||
@@ -366,6 +367,7 @@
|
||||
{ label: '状态', prop: 'status' },
|
||||
{ label: '支付方式', prop: 'payment_method' },
|
||||
{ label: '支付通道', prop: 'payment_channel' },
|
||||
{ label: '驳回原因', prop: 'rejection_reason' },
|
||||
{ label: '创建时间', prop: 'created_at' },
|
||||
{ label: '支付时间', prop: 'paid_at' },
|
||||
{ label: '完成时间', prop: 'completed_at' }
|
||||
@@ -412,7 +414,7 @@
|
||||
})
|
||||
|
||||
const rejectRules = reactive<FormRules>({
|
||||
reject_reason: [{ required: true, message: '请输入拒绝原因', trigger: 'blur' }]
|
||||
rejection_reason: [{ required: true, message: '请输入拒绝原因', trigger: 'blur' }]
|
||||
})
|
||||
|
||||
const createForm = reactive<{
|
||||
@@ -434,7 +436,7 @@
|
||||
})
|
||||
|
||||
const rejectForm = reactive<RejectAgentRechargeRequest>({
|
||||
reject_reason: ''
|
||||
rejection_reason: ''
|
||||
})
|
||||
|
||||
const rechargeList = ref<AgentRecharge[]>([])
|
||||
@@ -541,6 +543,13 @@
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row: AgentRecharge) => row.remark || '-'
|
||||
},
|
||||
{
|
||||
prop: 'rejection_reason',
|
||||
label: '驳回原因',
|
||||
minWidth: 180,
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row: AgentRecharge) => formatRejectionReason(row.rejection_reason)
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '创建时间',
|
||||
@@ -789,7 +798,7 @@
|
||||
// 拒绝对话框关闭后的清理
|
||||
const handleRejectDialogClosed = () => {
|
||||
rejectFormRef.value?.resetFields()
|
||||
rejectForm.reject_reason = ''
|
||||
rejectForm.rejection_reason = ''
|
||||
currentRecharge.value = null
|
||||
}
|
||||
|
||||
@@ -804,7 +813,7 @@
|
||||
rejectLoading.value = true
|
||||
try {
|
||||
await AgentRechargeService.rejectAgentRecharge(recharge.id, {
|
||||
reject_reason: rejectForm.reject_reason
|
||||
rejection_reason: rejectForm.rejection_reason
|
||||
})
|
||||
ElMessage.success('拒绝成功')
|
||||
rejectDialogVisible.value = false
|
||||
|
||||
Reference in New Issue
Block a user