登记收款附件bug修改

This commit is contained in:
luojiaquan
2026-09-15 18:06:40 +08:00
parent 73e425b12f
commit 662a09bf16
7 changed files with 50 additions and 13 deletions
@@ -667,9 +667,8 @@ const uploadFileUrl = ref(baseUrl + '/common/upload')
const uploadHeaders = ref({ Authorization: 'Bearer ' + getToken() })
const attachmentTypeOptions = ref([
{ value: '0', label: '附件资料' },
{ value: '1', label: '客户Logo' },
{ value: '2', label: '合同文件' },
{ value: '3', label: '其他' }
{ value: '1', label: '合同文件' },
{ value: '2', label: '其他' }
])
const ATTACHMENT_SIZE_LIMIT = 50
const ATTACHMENT_EXTENSIONS = ['pdf', 'jpg', 'jpeg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'zip', 'rar']
@@ -711,6 +710,7 @@ function handleAttachmentUploadSuccess(res, file) {
form.value.attachmentList.push({
attachmentId: null,
customerId: form.value.customerId || null,
bizType: 'customer',
fileName: file.name,
filePath: res.fileName,
fileSize: file.size,
@@ -332,7 +332,7 @@
</template>
</el-table-column>
</el-table>
<div class="upload-tip">附件分类挂在「其他」类型下,支持 PDF/图片/Office/压缩包,单个不超过 50MB</div>
<div class="upload-tip">收款水单单独归档,不会显示在客户档案的附件资料中;支持 PDF/图片/Office/压缩包,单个不超过 50MB</div>
</el-form-item>
</el-col>
</el-row>
@@ -372,7 +372,11 @@
<div class="attach-title">收款凭证附件</div>
<el-table :data="viewDialog.attachments" border size="small" max-height="240" v-loading="viewDialog.loading">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="文件名称" prop="fileName" align="center" show-overflow-tooltip min-width="200" />
<el-table-column label="文件名称" prop="fileName" align="center" show-overflow-tooltip min-width="200">
<template #default="scope">
<el-button link type="primary" @click="handleDownload(scope.row)">{{ scope.row.fileName }}</el-button>
</template>
</el-table-column>
<el-table-column label="大小" align="center" width="100">
<template #default="scope">{{ formatFileSize(scope.row.fileSize) }}</template>
</el-table-column>
@@ -786,13 +790,14 @@ function handleUploadSuccess(res, file) {
receiptDialog.form.attachmentList.push({
attachmentId: null,
customerId: route.query.customerId || null,
bizType: "customer_receipt",
bizId: null,
fileName: file.name,
filePath: res.fileName,
fileSize: file.size,
fileType: file.type || '',
fileExtension: (file.name.split('.').pop() || "").toLowerCase(),
attachmentType: "3",
attachmentType: "0",
isLogo: "0",
sortOrder: receiptDialog.form.attachmentList.length,
remark: "",