提交
This commit is contained in:
1 parent
817dfff43c
commit
8ff159c251
41 files changed
+482
-567
No files matched your search
@@ -199,7 +199,13 @@
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form label-position="top" class="biz-dialog-form">
|
||||
<el-form
|
||||
ref="receiptFormRef"
|
||||
:model="receiptForm"
|
||||
:rules="receiptFormRules"
|
||||
label-position="top"
|
||||
class="biz-dialog-form"
|
||||
>
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="申请单号">
|
||||
<span class="view-field-text">{{ receiptPreviewRow?.applicationNo || '—' }}</span>
|
||||
@@ -216,6 +222,18 @@
|
||||
formatAmount(receiptPreviewRow?.paymentAmount ?? receiptPreviewRow?.amount)
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="转账方式" prop="transferType">
|
||||
<el-select
|
||||
v-model="receiptForm.transferType"
|
||||
placeholder="请选择转账方式"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option label="微信转账" value="wxzz" />
|
||||
<el-option label="支付宝转账" value="zzbzz" />
|
||||
<el-option label="银行卡转账" value="yhkzz" />
|
||||
<el-option label="现金" value="xj" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" class="form-col-span-2">
|
||||
<el-input
|
||||
v-model="receiptForm.remark"
|
||||
@@ -558,7 +576,9 @@
|
||||
const receiptSubmitLoading = ref(false)
|
||||
const receiptTargetIds = ref<string[]>([])
|
||||
const receiptPreviewRow = ref<Record<string, unknown> | null>(null)
|
||||
const receiptFormRef = ref<FormInstance>()
|
||||
const receiptForm = reactive({
|
||||
transferType: '',
|
||||
remark: '',
|
||||
attachments: [] as Array<{
|
||||
id: string
|
||||
@@ -567,6 +587,9 @@
|
||||
_uploading?: boolean
|
||||
}>
|
||||
})
|
||||
const receiptFormRules: FormRules = {
|
||||
transferType: [{ required: true, message: '请选择转账方式', trigger: 'change' }]
|
||||
}
|
||||
|
||||
const refundDialogVisible = ref(false)
|
||||
const refundSubmitLoading = ref(false)
|
||||
@@ -733,9 +756,11 @@
|
||||
loadColumn(key)
|
||||
}
|
||||
|
||||
function resetReceiptForm() {
|
||||
function resetReceiptForm(transferType = '') {
|
||||
receiptForm.transferType = transferType
|
||||
receiptForm.remark = ''
|
||||
receiptForm.attachments = []
|
||||
receiptFormRef.value?.clearValidate()
|
||||
}
|
||||
|
||||
function openReceiptDialog(row: Record<string, unknown>) {
|
||||
@@ -743,7 +768,7 @@
|
||||
if (!id) return
|
||||
receiptTargetIds.value = [id]
|
||||
receiptPreviewRow.value = row
|
||||
resetReceiptForm()
|
||||
resetReceiptForm(String(row.transferType || ''))
|
||||
receiptDialogVisible.value = true
|
||||
}
|
||||
|
||||
@@ -788,11 +813,14 @@
|
||||
|
||||
async function submitReceipt() {
|
||||
if (!receiptTargetIds.value.length) return
|
||||
const valid = await receiptFormRef.value?.validate().catch(() => false)
|
||||
if (!valid) return
|
||||
if (receiptForm.attachments.some((f) => f._uploading)) {
|
||||
ElMessage.warning('附件上传中,请稍候')
|
||||
return
|
||||
}
|
||||
const payload = {
|
||||
transferType: receiptForm.transferType,
|
||||
remark: receiptForm.remark.trim() || undefined,
|
||||
transferAttachments: receiptAttachmentsToUrls() || undefined
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user