修复业务模块bug
This commit is contained in:
@@ -564,9 +564,9 @@
|
||||
|
||||
<section-card title="客商材料">
|
||||
<template #extra>
|
||||
<div v-if="!readonly" class="section-actions">
|
||||
<div class="section-actions">
|
||||
<el-button icon="el-icon-download" @click="downloadAttachments">批量下载</el-button>
|
||||
<el-button type="primary" icon="el-icon-upload" @click="addAttachment">
|
||||
<el-button v-if="!readonly" type="primary" icon="el-icon-upload" @click="addAttachment">
|
||||
OCR上传识别
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -1860,7 +1860,7 @@ export default {
|
||||
const page = this.changeRecordPage;
|
||||
getChangeRecordList(this.archiveForm.id, page.currentPage, page.pageSize).then(res => {
|
||||
const data = res.data.data || {};
|
||||
page.records = data.records || [];
|
||||
page.records = this.replaceNegativeOneWithBlank(data.records || []);
|
||||
page.total = Number(data.total || 0);
|
||||
page.currentPage = Number(data.current || page.currentPage);
|
||||
});
|
||||
@@ -1883,10 +1883,11 @@ export default {
|
||||
return (this.changeRecordPage.currentPage - 1) * this.changeRecordPage.pageSize + index + 1;
|
||||
},
|
||||
formatChangeData(row, column, value) {
|
||||
if (!value) return '-';
|
||||
if (!value || value === '-1') return '';
|
||||
try {
|
||||
return Object.entries(JSON.parse(value))
|
||||
.map(([field, fieldValue]) => `${field}:${fieldValue ?? '-'}`)
|
||||
const data = this.replaceNegativeOneWithBlank(JSON.parse(value));
|
||||
return Object.entries(data)
|
||||
.map(([field, fieldValue]) => `${field}:${fieldValue ?? ''}`)
|
||||
.join(';');
|
||||
} catch (error) {
|
||||
return value;
|
||||
@@ -2866,6 +2867,19 @@ export default {
|
||||
handleQualificationSelectionChange(rows) {
|
||||
this.selectedQualificationFiles = rows || [];
|
||||
},
|
||||
replaceNegativeOneWithBlank(value) {
|
||||
if (value === -1 || value === '-1') return '';
|
||||
if (Array.isArray(value)) {
|
||||
return value.map(item => this.replaceNegativeOneWithBlank(item));
|
||||
}
|
||||
if (value && typeof value === 'object') {
|
||||
return Object.keys(value).reduce((result, key) => {
|
||||
result[key] = this.replaceNegativeOneWithBlank(value[key]);
|
||||
return result;
|
||||
}, {});
|
||||
}
|
||||
return value;
|
||||
},
|
||||
normalizeDetail(detail) {
|
||||
const businessScope = this.splitValue(detail.businessScope);
|
||||
const registeredDetailAddress =
|
||||
@@ -2970,12 +2984,15 @@ export default {
|
||||
this.resetChangeRecordPage();
|
||||
if (row && row.id) {
|
||||
getDetail(row.id).then(res => {
|
||||
this.archiveForm = this.normalizeDetail(res.data.data);
|
||||
const archive = this.normalizeDetail(res.data.data);
|
||||
this.archiveForm = readonly ? this.replaceNegativeOneWithBlank(archive) : archive;
|
||||
this.originalAccessType = this.archiveForm.accessType || '';
|
||||
this.qualificationFiles = this.parseAttachments(
|
||||
this.archiveForm.qualificationAttachments
|
||||
);
|
||||
const qualificationFiles = this.parseAttachments(this.archiveForm.qualificationAttachments);
|
||||
this.qualificationFiles = readonly
|
||||
? this.replaceNegativeOneWithBlank(qualificationFiles)
|
||||
: qualificationFiles;
|
||||
this.qualificationUploadFiles = [];
|
||||
this.selectedQualificationFiles = [];
|
||||
this.archiveBox = true;
|
||||
this.loadChangeRecords();
|
||||
});
|
||||
@@ -3516,7 +3533,9 @@ export default {
|
||||
this.handleScoreCurrentChange(1);
|
||||
},
|
||||
formatScoreValue(value) {
|
||||
return value === undefined || value === null || value === '' ? '' : value;
|
||||
return value === undefined || value === null || value === '' || value === -1 || value === '-1'
|
||||
? ''
|
||||
: value;
|
||||
},
|
||||
rowDel(row) {
|
||||
this.$confirm('仅草稿状态客商可删除,确定删除该数据?', {
|
||||
|
||||
Reference in New Issue
Block a user