调整收付款问题
This commit is contained in:
@@ -164,9 +164,11 @@
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><el-form-item label="收款账号" prop="receiptAccountId"
|
||||
><span v-if="readonly">{{ form.bankAccount || '-' }}</span
|
||||
><el-select
|
||||
v-else
|
||||
v-model="form.receiptAccountId"
|
||||
:disabled="readonly || !form.payeeName"
|
||||
:disabled="!form.payeeName"
|
||||
:loading="receiptAccountLoading"
|
||||
filterable
|
||||
clearable
|
||||
@@ -343,7 +345,7 @@
|
||||
>
|
||||
<div class="payment-form-page__attachment-upload">
|
||||
<vehicle-attachment-upload
|
||||
:model-value="form.attachments"
|
||||
v-model="form.attachments"
|
||||
:readonly="readonly"
|
||||
:multiple="true"
|
||||
:limit="20"
|
||||
@@ -351,8 +353,7 @@
|
||||
:file-types="attachmentFileTypes"
|
||||
:show-file-list="false"
|
||||
button-text="上传附件"
|
||||
@update:model-value="normalizeAttachments"
|
||||
@success="handleManualAttachmentUpload"
|
||||
@change="normalizeAttachments"
|
||||
/>
|
||||
</div>
|
||||
</section-card>
|
||||
@@ -2045,6 +2046,9 @@ export default {
|
||||
},
|
||||
normalizeAttachments(files) {
|
||||
const existingAttachments = this.form.attachments || [];
|
||||
const userInfo = this.$store.getters.userInfo || {};
|
||||
const uploadUserName = userInfo.realName || userInfo.userName || '';
|
||||
const uploadTime = this.$dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
this.form.attachments = (files || []).map(file => {
|
||||
const fileUrl = this.attachmentFileUrl(file);
|
||||
const existingFile = existingAttachments.find(item => {
|
||||
@@ -2058,28 +2062,11 @@ export default {
|
||||
attachmentType:
|
||||
existingFile?.attachmentType || this.resolveAttachmentTypeByFileName(file),
|
||||
description: file.description || existingFile?.description || '',
|
||||
uploadUserName: existingFile?.uploadUserName || file.uploadUserName || uploadUserName,
|
||||
uploadTime: existingFile?.uploadTime || file.uploadTime || uploadTime,
|
||||
};
|
||||
});
|
||||
},
|
||||
handleManualAttachmentUpload(uploadedFile) {
|
||||
const uploadedUrl = this.attachmentFileUrl(uploadedFile);
|
||||
const uploadedUid = uploadedFile?.uid;
|
||||
const userInfo = this.$store.getters.userInfo || {};
|
||||
const uploadUserName = userInfo.realName || userInfo.userName || '';
|
||||
const uploadTime = this.$dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
this.form.attachments = (this.form.attachments || []).map(file => {
|
||||
const isUploadedFile =
|
||||
(uploadedUid && file.uid === uploadedUid) ||
|
||||
(uploadedUrl && this.attachmentFileUrl(file) === uploadedUrl);
|
||||
return isUploadedFile
|
||||
? {
|
||||
...file,
|
||||
uploadUserName,
|
||||
uploadTime,
|
||||
}
|
||||
: file;
|
||||
});
|
||||
},
|
||||
formatAttachmentSize(file = {}) {
|
||||
const rawSize = file.size ?? file.fileSize ?? file.attachSize;
|
||||
if (rawSize === undefined || rawSize === null || rawSize === '') return '-';
|
||||
|
||||
Reference in New Issue
Block a user