优化销毁/冲正原因默认选用户退款,减少误选

This commit is contained in:
yml2213
2026-07-15 10:41:22 +08:00
parent 3d760f987c
commit be7347e600
@@ -133,7 +133,7 @@ export default function AdminKuaishouIndustryPage() {
const [toolForm, setToolForm] = useState<AdminKuaishouIndustryVoucherToolPayload>({
eticketType: '',
consumeType: 'consume',
reason: 'SYS_ADMIN_DESTROY',
reason: 'USER_APPLY_REFUND',
})
const [refundDateRange, setRefundDateRange] = useState<DateRangeValue>(() => [
dayjs().subtract(1, 'day'),
@@ -436,7 +436,7 @@ export default function AdminKuaishouIndustryPage() {
voucherCode: row.voucherCode,
eticketType: row.eticketType || current.eticketType || '',
serialNum: row.consumeSerialNum || current.serialNum,
reason: current.reason || 'SYS_ADMIN_DESTROY',
reason: current.reason || 'USER_APPLY_REFUND',
}))
showSuccess('已填入券码操作区')
}
@@ -556,15 +556,15 @@ export default function AdminKuaishouIndustryPage() {
try {
const response = await destroyAdminKuaishouIndustryVoucher({
...buildVoucherToolPayload(),
reason: toolForm.reason || 'SYS_ADMIN_DESTROY',
reason: toolForm.reason || 'USER_APPLY_REFUND',
})
publishActionResult(
buildIndustryActionResultView('destroy', '手动销毁', response.data),
)
showSuccess(
response.data.alreadyDestroyed
? `券码已是销毁状态,销毁回调已重试(${response.data.reason || 'SYS_ADMIN_DESTROY'}`
: `券码已销毁(${response.data.reason || 'SYS_ADMIN_DESTROY'}`,
? `券码已是销毁状态,销毁回调已重试(${response.data.reason || 'USER_APPLY_REFUND'}`
: `券码已销毁(${response.data.reason || 'USER_APPLY_REFUND'}`,
)
await loadVouchers()
} catch (error) {
@@ -949,9 +949,9 @@ export default function AdminKuaishouIndustryPage() {
value={toolForm.reason || undefined}
onChange={(value) => updateToolForm({ reason: value || '' })}
options={[
{ label: 'USER_APPLY_REFUND(用户退款)', value: 'USER_APPLY_REFUND' },
{ label: 'SYS_ADMIN_DESTROY(后台作废)', value: 'SYS_ADMIN_DESTROY' },
{ label: 'SUPPLY_DESTROY(供应商作废)', value: 'SUPPLY_DESTROY' },
{ label: 'USER_APPLY_REFUND(用户退款)', value: 'USER_APPLY_REFUND' },
{ label: 'ETICKET_EXPIRED(凭证过期)', value: 'ETICKET_EXPIRED' },
]}
style={{ minWidth: 220 }}