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

This commit is contained in:
sexygoat
2026-04-24 11:17:39 +08:00
parent 62851342c3
commit e4ed3784e3
5 changed files with 147 additions and 67 deletions

View File

@@ -104,9 +104,22 @@
refund_reason: ''
})
const validateRefundAmount = (rule: any, value: number, callback: any) => {
if (value === undefined || value === null || value === 0) {
callback(new Error('请输入申请退款金额'))
} else if (value > formData.actual_received_amount) {
callback(new Error('申请退款金额不能大于实收金额'))
} else {
callback()
}
}
const formRules = reactive<FormRules>({
order_id: [{ required: true, message: '请选择订单', trigger: 'change' }],
requested_refund_amount: [{ required: true, message: '请输入申请退款金额', trigger: 'blur' }]
requested_refund_amount: [
{ required: true, message: '请输入申请退款金额', trigger: 'blur' },
{ validator: validateRefundAmount, trigger: 'blur' }
]
})
const hasInitialOrder = computed(() => !!props.initialOrderId || !!props.initialOrderNo)