This commit is contained in:
zlwu committed 2026-07-01 16:37:33 +08:00
1 parent 28f233c922
commit 038a60b09e
478 files changed
+67530 -51951

No files matched your search

@@ -51,6 +51,7 @@
<el-option label="生效中" value="sxz" />
<el-option label="已过期" value="ygq" />
<el-option label="已作废" value="yzf" />
<el-option label="属地废弃" value="sdfq" />
<el-option label="转科研" value="zky" />
</el-select>
</el-form-item>
@@ -92,7 +93,11 @@
</div>
<div class="form-grid form-grid--attachment">
<el-form-item label="协议附件">
<div class="attachment-upload">
<div
class="attachment-upload"
:class="{ 'is-dragover': isProtocolAttachDragover }"
v-bind="protocolAttachDropHandlers"
>
<div class="attachment-list">
<el-upload
ref="attachmentUploadRef"
@@ -159,7 +164,9 @@
</div>
</div>
</div>
<span class="upload-hint">支持图片、视频、PDF、Word、Excel等文件</span>
<span class="upload-hint"
>支持拖拽或点击上传图片、视频、PDF、Word、Excel等文件,单文件不超过 20MB</span
>
</div>
</el-form-item>
</div>
@@ -740,7 +747,11 @@
</div>
<!-- 每条明细的附件上传区 -->
<div v-if="!isPayDetailLocked(detail)" class="payment-detail-card__attachments">
<div class="attachment-upload">
<div
class="attachment-upload"
:class="{ 'is-dragover': isPaymentDetailDragover(dIdx) }"
v-bind="paymentDetailDropHandlers(dIdx)"
>
<div class="attachment-list">
<el-upload
:auto-upload="false"
@@ -808,7 +819,10 @@
</div>
</div>
</div>
<span class="upload-hint">支持图片、视频、PDF、Word、Excel等文件</span>
<span class="upload-hint"
>支持拖拽或点击上传图片、视频、PDF、Word、Excel等文件,单文件不超过
20MB</span
>
</div>
</div>
</div>
@@ -887,6 +901,10 @@
} from '@/api/collection-protocol'
import { fetchUploadAttachment } from '@/api/business'
import { downloadAttachmentFile } from '@/utils/download-attachment'
import {
useAttachmentDropZone,
useIndexedAttachmentDropZone
} from '@/composables/useAttachmentDropZone'
import { formatDatetimeToMinute } from '@/utils/chinese-datetime-parse'
import {
fetchCustomerList,
@@ -1600,6 +1618,7 @@
isEdit.value = false
dialogTitle.value = '新增协议单'
resetForm()
formData.protocolStatus = 'sxz'
formData.motherEthnic = DEFAULT_MOTHER_ETHNIC
formData.registerDate = new Date().toISOString().slice(0, 10).replace(/-/g, '')
void loadEthnicOptions()
@@ -2702,6 +2721,28 @@
formData.attachments.splice(index, 1)
}
const { isDragover: isProtocolAttachDragover, dropZoneHandlers: protocolAttachDropHandlers } =
useAttachmentDropZone({
onFiles: (files) => {
for (const file of files) {
void handleAttachmentChange({ raw: file })
}
}
})
const { isDragover: isPaymentDetailDragover, handlersFor: paymentDetailDropHandlers } =
useIndexedAttachmentDropZone({
onFiles: (detailIndex, files) => {
for (const file of files) {
void handleDetailAttachmentChange(detailIndex, { raw: file })
}
},
disabled: (detailIndex) => {
const detail = formData.paymentDetails[detailIndex]
return !detail || isPayDetailLocked(detail)
}
})
/* ====== 缴费明细附件上传 ====== */
async function handleDetailAttachmentChange(detailIndex: number, uploadFile: any) {
const file = uploadFile.raw || uploadFile