fix: git branch
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 8m48s

This commit is contained in:
luo
2026-09-17 15:46:33 +08:00
parent 9a3a764120
commit 068d0c4ac2
5 changed files with 47 additions and 88 deletions

View File

@@ -55,10 +55,18 @@
</ElFormItem>
<template v-if="formData.method === RefundMethod.CUSTOMER_ACCOUNT">
<ElFormItem label="收款账户名" prop="customer_account_name">
<ElInput v-model="formData.customer_account_name" placeholder="请输入收款账户名" maxlength="50" />
<ElInput
v-model="formData.customer_account_name"
placeholder="请输入收款账户名"
maxlength="50"
/>
</ElFormItem>
<ElFormItem label="收款账号" prop="customer_account_number">
<ElInput v-model="formData.customer_account_number" placeholder="请输入收款账号" maxlength="64" />
<ElInput
v-model="formData.customer_account_number"
placeholder="请输入收款账号"
maxlength="64"
/>
</ElFormItem>
<ElFormItem label="开户银行">
<ElInput v-model="formData.customer_bank_name" placeholder="选填" maxlength="50" />
@@ -295,13 +303,7 @@
requested_refund_amount: yuanToFen(formData.requested_refund_amount) ?? 0
}
if (formData.method === RefundMethod.CUSTOMER_ACCOUNT) {
data.customer_account_info = {
account_name: formData.customer_account_name.trim(),
account_number: formData.customer_account_number.trim(),
...(formData.customer_bank_name.trim()
? { bank_name: formData.customer_bank_name.trim() }
: {})
}
data.customer_account_info = `${formData.customer_account_name.trim()} ${formData.customer_account_number.trim()}${formData.customer_bank_name.trim() ? ` ${formData.customer_bank_name.trim()}` : ''}`
data.refund_voucher_key = formData.refund_voucher_key
} else if (formData.refund_voucher_key.length) {
data.refund_voucher_key = formData.refund_voucher_key

View File

@@ -80,7 +80,7 @@ export interface RefundAttemptItem {
refund_amount?: number | null // 退款金额(分)
frozen_actual_received_amount?: number | null // 冻结实收金额(分)
refund_reason?: string | null // 退款原因
customer_account_info?: Record<string, string> | null // 客户收款信息
customer_account_info?: string | null // 客户收款信息,如 "张三 1111111111
customer_voucher_key?: string[] | string | null // 客户凭证键
channel_refund_request_no?: string | null // 渠道退款申请号
submitted_by_account_id?: number | null // 提交人账号ID
@@ -109,7 +109,7 @@ export interface Refund {
method?: RefundMethod | null // 退款方式
method_name?: string | null // 退款方式名称
frozen_actual_received_amount?: number | null // 冻结实收金额(分)
customer_account_info?: Record<string, string> | null // 客户收款信息
customer_account_info?: string | null // 客户收款信息,如 "张三 1111111111
channel_refund_status?: ChannelRefundStatus | null // 渠道退款状态
channel_refund_status_name?: string | null // 渠道退款状态名称
channel_refund_no?: string | null // 渠道退款单号
@@ -182,7 +182,7 @@ export interface CreateRefundRequest {
requested_refund_amount: number // 申请退款金额(分)
package_usage_id: number // 关联套餐使用记录 ID无关联记录时传 0
refund_reason: string
customer_account_info?: Record<string, string> | null // 客户收款信息customer_account 方式必填)
customer_account_info?: string | null // 客户收款信息,如 "张三 1111111111customer_account 方式必填)
refund_voucher_key?: string[] | null // 退款凭证customer_account 方式必填至少 1 个)
}
@@ -191,7 +191,7 @@ export interface ResubmitRefundRequest {
method?: RefundMethod | null // 退款方式(不传沿用原值)
requested_refund_amount?: number
refund_reason?: string
customer_account_info?: Record<string, string> | null // 客户收款信息(不传沿用原值)
customer_account_info?: string | null // 客户收款信息,如 "张三 1111111111(不传沿用原值)
refund_voucher_key?: string[] | null
attachments?: RefundAttachment[]
}

View File

@@ -25,10 +25,18 @@
>
通过
</ElButton>
<ElButton v-if="hasAuth('refund:reject')" type="danger" @click="openApprovalDialog('reject')">
<ElButton
v-if="hasAuth('refund:reject')"
type="danger"
@click="openApprovalDialog('reject')"
>
拒绝
</ElButton>
<ElButton v-if="hasAuth('refund:return')" type="primary" @click="openApprovalDialog('return')">
<ElButton
v-if="hasAuth('refund:return')"
type="primary"
@click="openApprovalDialog('return')"
>
退回
</ElButton>
</template>
@@ -111,11 +119,7 @@
/>
</ElFormItem>
<ElFormItem label="开户银行">
<ElInput
v-model="resubmitForm.customer_bank_name"
placeholder="选填"
maxlength="50"
/>
<ElInput v-model="resubmitForm.customer_bank_name" placeholder="选填" maxlength="50" />
</ElFormItem>
</template>
<ElFormItem label="退款原因">
@@ -125,8 +129,8 @@
:rows="3"
maxlength="1000"
show-word-limit
placeholder="请输入退款原因"
/>
placeholder="请输入退款原因"
/>
</ElFormItem>
<ElFormItem
:label="
@@ -226,8 +230,7 @@
const resubmitUploadRef = ref<InstanceType<typeof VoucherUpload>>()
const requireResubmitCustomerAccount =
(message: string) =>
(_rule: unknown, value: string, callback: (error?: Error) => void) => {
(message: string) => (_rule: unknown, value: string, callback: (error?: Error) => void) => {
if (resubmitForm.method === RefundMethod.CUSTOMER_ACCOUNT && !value?.trim()) {
callback(new Error(message))
} else {
@@ -373,9 +376,7 @@
[
`退款方式:${item.method_name || '-'}`,
`金额:${formatCurrency(item.refund_amount)}`,
item.channel_refund_request_no
? `渠道申请号:${item.channel_refund_request_no}`
: '',
item.channel_refund_request_no ? `渠道申请号:${item.channel_refund_request_no}` : '',
item.created_at ? `提交时间:${formatDateTime(item.created_at)}` : ''
]
.filter(Boolean)
@@ -479,9 +480,7 @@
{
label: '异常标记',
formatter: (_, data) =>
Number(data.anomaly_flag) === 1
? `异常:${data.anomaly_reason || ''}`
: '正常'
Number(data.anomaly_flag) === 1 ? `异常:${data.anomaly_reason || ''}` : '正常'
},
{
label: '套餐已用量/总量',
@@ -493,7 +492,7 @@
fullWidth: true,
render: (data) =>
data.method === RefundMethod.CUSTOMER_ACCOUNT && data.customer_account_info
? renderStructuredValue(data.customer_account_info)
? h('span', data.customer_account_info)
: h('span', '-')
},
...(!isRestrictedCustomerRole.value
@@ -741,13 +740,7 @@
data.method = resubmitForm.method
}
if (resubmitForm.method === RefundMethod.CUSTOMER_ACCOUNT) {
data.customer_account_info = {
account_name: resubmitForm.customer_account_name.trim(),
account_number: resubmitForm.customer_account_number.trim(),
...(resubmitForm.customer_bank_name.trim()
? { bank_name: resubmitForm.customer_bank_name.trim() }
: {})
}
data.customer_account_info = `${resubmitForm.customer_account_name.trim()} ${resubmitForm.customer_account_number.trim()}${resubmitForm.customer_bank_name.trim() ? ` ${resubmitForm.customer_bank_name.trim()}` : ''}`
data.refund_voucher_key = resubmitForm.refund_voucher_key
} else if (resubmitForm.refund_voucher_key.length) {
data.refund_voucher_key = resubmitForm.refund_voucher_key

View File

@@ -150,7 +150,9 @@
</ElFormItem>
<ElFormItem
:label="
resubmitForm.method === RefundMethod.CUSTOMER_ACCOUNT ? '退款凭证(必填)' : '退款凭证'
resubmitForm.method === RefundMethod.CUSTOMER_ACCOUNT
? '退款凭证(必填)'
: '退款凭证'
"
prop="refund_voucher_key"
>
@@ -393,8 +395,7 @@
const resubmitFormRef = ref<FormInstance>()
const requireResubmitCustomerAccount =
(message: string) =>
(_rule: unknown, value: string, callback: (error?: Error) => void) => {
(message: string) => (_rule: unknown, value: string, callback: (error?: Error) => void) => {
if (resubmitForm.method === RefundMethod.CUSTOMER_ACCOUNT && !value?.trim()) {
callback(new Error(message))
} else {
@@ -876,13 +877,7 @@
data.method = resubmitForm.method
}
if (resubmitForm.method === RefundMethod.CUSTOMER_ACCOUNT) {
data.customer_account_info = {
account_name: resubmitForm.customer_account_name.trim(),
account_number: resubmitForm.customer_account_number.trim(),
...(resubmitForm.customer_bank_name.trim()
? { bank_name: resubmitForm.customer_bank_name.trim() }
: {})
}
data.customer_account_info = `${resubmitForm.customer_account_name.trim()} ${resubmitForm.customer_account_number.trim()}${resubmitForm.customer_bank_name.trim() ? ` ${resubmitForm.customer_bank_name.trim()}` : ''}`
data.refund_voucher_key = resubmitForm.refund_voucher_key
} else if (resubmitForm.refund_voucher_key.length) {
data.refund_voucher_key = resubmitForm.refund_voucher_key
@@ -1068,7 +1063,6 @@
refundVoucherFileKeys.value = voucherKeys
}
</script>
<style scoped lang="scss">
.refund-page {
height: 100%;