|
|
@@ -38,11 +38,11 @@
|
|
38
|
38
|
</el-button>
|
|
39
|
39
|
</div>
|
|
40
|
40
|
</div>
|
|
41
|
|
- <div v-if="combinedResult" class="combined-result">
|
|
|
41
|
+ <div v-if="combinedResult && combinedResult.length" class="combined-result">
|
|
42
|
42
|
<div class="result-title">导入结果:</div>
|
|
43
|
|
- <el-tag v-for="(msg, sheet) in combinedResult" :key="sheet"
|
|
44
|
|
- :type="msg.includes('失败') || msg.includes('错误') ? 'danger' : 'success'" class="result-tag">
|
|
45
|
|
- {{ sheet }}:{{ msg }}
|
|
|
43
|
+ <el-tag v-for="item in combinedResult" :key="item.sheetName"
|
|
|
44
|
+ :type="item.sheetResult.includes('失败') || item.sheetResult.includes('错误') ? 'danger' : 'success'" class="result-tag">
|
|
|
45
|
+ {{ item.sheetName }}:{{ item.sheetResult }}
|
|
46
|
46
|
</el-tag>
|
|
47
|
47
|
</div>
|
|
48
|
48
|
</el-card>
|
|
|
@@ -155,7 +155,7 @@ defineOptions({ name: 'LedgerImport' })
|
|
155
|
155
|
|
|
156
|
156
|
// ── 一键全量导入 ──────────────────────────────────────
|
|
157
|
157
|
const combinedLoading = ref(false)
|
|
158
|
|
-const combinedResult = ref(null)
|
|
|
158
|
+const combinedResult = ref([])
|
|
159
|
159
|
|
|
160
|
160
|
// ── 台账同步 ──────────────────────────────────────────
|
|
161
|
161
|
const syncing = ref(false)
|
|
|
@@ -230,7 +230,7 @@ async function handleCombinedChange(uploadFile) {
|
|
230
|
230
|
try {
|
|
231
|
231
|
const res = await importCombinedLedger(formData)
|
|
232
|
232
|
if (res.code === 200) {
|
|
233
|
|
- combinedResult.value = res.data || {}
|
|
|
233
|
+ combinedResult.value = res.data || []
|
|
234
|
234
|
ElMessage.success('全量导入完成,请查看各Sheet结果')
|
|
235
|
235
|
} else {
|
|
236
|
236
|
ElMessage.error(res.msg || '全量导入失败')
|
|
|
@@ -580,6 +580,7 @@ function triggerDownload(blob, fileName) {
|
|
580
|
580
|
margin-top: 14px;
|
|
581
|
581
|
padding-top: 14px;
|
|
582
|
582
|
border-top: 1px dashed #dcdfe6;
|
|
|
583
|
+ overflow-x: auto;
|
|
583
|
584
|
|
|
584
|
585
|
.result-title {
|
|
585
|
586
|
font-size: 13px;
|