fix
This commit is contained in:
@@ -84,10 +84,21 @@
|
||||
:key="column.prop"
|
||||
v-bind="column"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
:show-overflow-tooltip="column.prop !== 'settlementNos'"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="column.link && row[column.prop]" type="primary" @click="openView(row)">
|
||||
<div v-if="column.prop === 'settlementNos'" class="invoice-page__settlement-nos">
|
||||
<span
|
||||
v-for="settlementNo in settlementNumberList(row.settlementNos)"
|
||||
:key="settlementNo"
|
||||
class="invoice-page__settlement-no"
|
||||
@click.stop="openSettlementDetail(settlementNo)"
|
||||
>
|
||||
{{ settlementNo }}
|
||||
</span>
|
||||
<span v-if="!settlementNumberList(row.settlementNos).length">-</span>
|
||||
</div>
|
||||
<el-link v-else-if="column.link && row[column.prop]" type="primary" @click="openView(row)">
|
||||
{{ row[column.prop] }}
|
||||
</el-link>
|
||||
<el-tag v-else-if="column.status" :type="statusType(row.approvalStatus)" class="status-text">
|
||||
@@ -221,6 +232,7 @@ import { ArrowDown, ArrowUp, Refresh } from '@element-plus/icons-vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import * as XLSX from 'xlsx';
|
||||
import * as api from '@/api/payment/invoiceApplication';
|
||||
import * as formalSettlementApi from '@/api/settlement/formalSettlement';
|
||||
import { invoiceApplicationTableColumns } from '@/option/payment/invoiceApplication';
|
||||
|
||||
const emptyQuery = () => ({
|
||||
@@ -303,6 +315,34 @@ export default {
|
||||
query: { mode: 'view', id: row.id },
|
||||
});
|
||||
},
|
||||
settlementNumberList(value) {
|
||||
return String(value || '')
|
||||
.split(/[、,,]/)
|
||||
.map(item => item.trim())
|
||||
.filter(Boolean);
|
||||
},
|
||||
async openSettlementDetail(settlementNo) {
|
||||
const normalizedNo = String(settlementNo || '').trim();
|
||||
if (!normalizedNo) return;
|
||||
try {
|
||||
const data = this.unwrapData(
|
||||
await formalSettlementApi.getList(1, 10, { formalSettlementNo: normalizedNo })
|
||||
);
|
||||
const row = (data.records || []).find(
|
||||
item => String(item.formalSettlementNo || '').trim() === normalizedNo
|
||||
);
|
||||
if (!row?.id) {
|
||||
this.$message.warning('未找到对应的正式结算单');
|
||||
return;
|
||||
}
|
||||
this.$router.push({
|
||||
path: '/settlement/formal-settlement/form',
|
||||
query: { mode: 'view', id: row.id, name: '查看正式结算' },
|
||||
});
|
||||
} catch (error) {
|
||||
this.$message.error('正式结算单详情加载失败');
|
||||
}
|
||||
},
|
||||
async openFlow(row) {
|
||||
this.flowDialog.row = { ...row };
|
||||
this.flowDialog.records = [];
|
||||
@@ -454,6 +494,22 @@ export default {
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
.invoice-page__settlement-nos {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 4px 8px;
|
||||
white-space: normal;
|
||||
}
|
||||
.invoice-page__settlement-no {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
.invoice-page__settlement-no:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.invoice-page__pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
Reference in New Issue
Block a user