fix: 冲销明细运输类型字典翻译并加宽发票号列

This commit is contained in:
刘泉佳
2026-11-10 14:44:04 +08:00
parent 58b208201a
commit 96822cc24b
@@ -12,7 +12,7 @@
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : formatDateTime(row.completionTime) }}</template>
</el-table-column>
<el-table-column prop="transportType" label="运输类型" width="100" align="center">
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.transportType) }}</template>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : transportTypeLabel(row.transportType) }}</template>
</el-table-column>
<el-table-column prop="cargoName" label="货物名称" min-width="110" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.cargoName) }}</template>
@@ -29,7 +29,7 @@
<el-table-column prop="batchNo" label="批次号" width="100" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.manualFlag === 1 ? '-' : displayValue(row.batchNo) }}</template>
</el-table-column>
<el-table-column prop="invoiceNo" label="发票号" min-width="160" align="center" show-overflow-tooltip />
<el-table-column prop="invoiceNo" label="发票号" min-width="220" align="center" show-overflow-tooltip />
<!-- 按费用项目动态分组列头,每组三列:结算金额/未开票(收票)金额/本次开票(收票)金额,文案随业务类型切换 -->
<el-table-column v-for="group in feeItemGroups" :key="group.name" :label="group.name" align="center">
<el-table-column label="结算金额" width="110" align="center">
@@ -48,6 +48,7 @@
<script>
import request from '@/axios';
import { getDictionary } from '@/api/system/dictbiz';
/**
* 发票冲销明细公共表格(开票申请/收票登记/付款申请通用)
@@ -65,6 +66,7 @@ export default {
return {
loading: false,
rows: [],
transportTypeOptions: [],
};
},
computed: {
@@ -83,6 +85,9 @@ export default {
return names.map(name => ({ name }));
},
},
created() {
this.loadTransportTypeOptions();
},
watch: {
bizId: {
immediate: true,
@@ -92,6 +97,19 @@ export default {
},
},
methods: {
// 运输类型字典翻译(与开票申请明细表同口径 transport_type)
async loadTransportTypeOptions() {
const res = await getDictionary({ code: 'transport_type' });
const records = Array.isArray(res?.data?.data) ? res.data.data : res?.data?.data?.records || [];
this.transportTypeOptions = records.map(item => ({
label: item.dictValue || item.label || item.name,
value: item.dictKey || item.value || item.dictValue || item.name,
}));
},
transportTypeLabel(value) {
if (!value) return '-';
return this.transportTypeOptions.find(item => String(item.value) === String(value))?.label || value;
},
load() {
this.loading = true;
request({