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

This commit is contained in:
luo
2026-09-18 10:31:14 +08:00
parent ac541b17af
commit 5e7f5eaba4
19 changed files with 463 additions and 128 deletions

View File

@@ -124,7 +124,7 @@
accept="image/*"
content-type="image/jpeg"
@uploading-change="voucherUploading = $event"
@change="createFormRef?.validateField('payment_voucher_key')"
@change="handleVoucherChange"
/>
</ElFormItem>
<ElFormItem
@@ -473,6 +473,7 @@
const paymentMethodOptionsLoading = ref(false)
const otherVoucherUploading = ref(false)
const ocrLoading = ref(false)
const recognizedVoucherKey = ref('')
// 搜索表单初始值
const initialSearchState: AgentRechargeQueryParams = {
@@ -1177,6 +1178,21 @@
// 已上传的支付凭证对象键OCR 识别取第一个)
const offlineVoucherKeys = computed(() => toVoucherKeyList(createForm.payment_voucher_key))
// 凭证变更:校验字段,并对首次上传自动识别一次(已有流水号则跳过)
const handleVoucherChange = (keys: string[] | string) => {
createFormRef.value?.validateField('payment_voucher_key')
const list = toVoucherKeyList(keys)
const firstKey = list[0] || ''
if (!firstKey) {
recognizedVoucherKey.value = ''
return
}
if (firstKey === recognizedVoucherKey.value) return
recognizedVoucherKey.value = firstKey
if (createForm.external_transaction_no?.trim()) return
void handleRecognizeVoucher()
}
// 识别付款凭证中的交易流水号:只做预填,失败不阻断人工填写
const handleRecognizeVoucher = async () => {
if (ocrLoading.value) return