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

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