This commit is contained in:
2026-08-11 09:31:42 +08:00
parent 9391c4db09
commit 0a5b3b2cab
21 changed files with 409 additions and 108 deletions
+20 -6
View File
@@ -78,7 +78,7 @@
>
{{ operation.label }}
</el-link>
<el-link type="primary" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
</template>
</avue-crud>
@@ -481,7 +481,13 @@
show-icon
:title="`缺少必需材料:${missingRequiredAttachmentTypes.join('、')}`"
/>
<el-table :data="attachmentRows" border class="project-apply-form__material-table">
<el-table
:data="attachmentRows"
border
class="project-apply-form__material-table"
@selection-change="handleAttachmentSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="80" align="center" />
<el-table-column label="附件类型" min-width="160" align="center">
<template #default="{ row }">
@@ -515,7 +521,7 @@
<el-table-column label="操作" width="110" align="center">
<template #default="{ row, $index }">
<el-link type="primary" @click="downloadAttachment(row)">下载</el-link>
<el-link v-if="!dialogReadonly" type="primary" @click="removeAttachment($index)"
<el-link v-if="!dialogReadonly" type="danger" @click="removeAttachment($index)"
>删除</el-link
>
</template>
@@ -910,11 +916,9 @@ export default {
},
],
changeContent: [
{ required: true, message: '请输入变更内容', trigger: 'blur' },
{ max: 2000, message: '变更内容不能超过2000个字符', trigger: 'blur' },
],
changeReason: [
{ required: true, message: '请输入变更原因', trigger: 'blur' },
{ max: 2000, message: '变更原因不能超过2000个字符', trigger: 'blur' },
],
},
@@ -937,6 +941,7 @@ export default {
customerRows: [],
carrierRows: [],
attachmentRows: [],
selectedAttachmentRows: [],
attachmentFileTypes: [
'pdf',
'bmp',
@@ -1285,6 +1290,7 @@ export default {
this.customerRows = [];
this.carrierRows = [];
this.attachmentRows = [];
this.selectedAttachmentRows = [];
this.changeRows = [];
this.selectedCustomerId = [];
this.selectedCarrierIds = [];
@@ -1324,6 +1330,7 @@ export default {
this.customerRows = customerRows;
this.carrierRows = carrierRows;
this.attachmentRows = this.parseJsonArray(displayRow.attachmentsJson);
this.selectedAttachmentRows = [];
this.changeRows = this.buildChangeRows(displayRow);
this.selectedCustomerId = this.customerRows
.map(item => this.getCustomerRowId(item))
@@ -1791,6 +1798,10 @@ export default {
uploadUserName: item.uploadUserName || userName,
uploadTime: item.uploadTime || uploadTime,
}));
this.selectedAttachmentRows = [];
},
handleAttachmentSelectionChange(rows) {
this.selectedAttachmentRows = rows || [];
},
removeAttachment(index) {
this.attachmentRows.splice(index, 1);
@@ -1811,7 +1822,10 @@ export default {
downloadFileByUrl(url, row.originalName || row.name || '附件');
},
handleBatchDownload() {
this.attachmentRows.forEach(row => this.downloadAttachment(row));
const rows = this.selectedAttachmentRows.length
? this.selectedAttachmentRows
: this.attachmentRows;
rows.forEach(row => this.downloadAttachment(row));
},
handleChangeRecordAction() {
this.$message.info('变更记录详情由后端明细能力生成后展示');