feat: 结算单详情开票回写发票合并至发票信息表格展示
This commit is contained in:
@@ -450,7 +450,7 @@
|
|||||||
>
|
>
|
||||||
<el-button v-else type="primary" @click="openInvoiceClaimDialog">认领查询</el-button>
|
<el-button v-else type="primary" @click="openInvoiceClaimDialog">认领查询</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="invoices" border>
|
<el-table :data="invoiceRows" border>
|
||||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||||
<el-table-column prop="invoiceNo" label="发票号" min-width="150" align="center" />
|
<el-table-column prop="invoiceNo" label="发票号" min-width="150" align="center" />
|
||||||
<el-table-column prop="invoiceDate" label="开票日期" min-width="130" align="center">
|
<el-table-column prop="invoiceDate" label="开票日期" min-width="130" align="center">
|
||||||
@@ -473,7 +473,9 @@
|
|||||||
min-width="180"
|
min-width="180"
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
<template #default="{ row }">{{
|
||||||
|
row.issued ? '-' : formatMoney(row.availableInvoiceAmount)
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="matchedAmount"
|
prop="matchedAmount"
|
||||||
@@ -491,7 +493,7 @@
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ formatMoney(row.matchedAmount) }}</span>
|
<span v-else>{{ row.issued ? '-' : formatMoney(row.matchedAmount) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -526,13 +528,13 @@
|
|||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="kingdeeAttachmentBusy"
|
:disabled="kingdeeAttachmentBusy"
|
||||||
@click="viewInvoiceAttachment(row)"
|
@click="viewInvoiceFile(row)"
|
||||||
>查看</el-link
|
>查看</el-link
|
||||||
>
|
>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="kingdeeAttachmentBusy"
|
:disabled="kingdeeAttachmentBusy"
|
||||||
@click="downloadInvoiceAttachment(row)"
|
@click="downloadInvoiceFile(row)"
|
||||||
>下载</el-link
|
>下载</el-link
|
||||||
>
|
>
|
||||||
<!-- 查看页重推入口:付款结算单已同步金蝶且认领票未指定应付(failed/pushed) -->
|
<!-- 查看页重推入口:付款结算单已同步金蝶且认领票未指定应付(failed/pushed) -->
|
||||||
@@ -543,35 +545,13 @@
|
|||||||
@click="repushInvoice(row)"
|
@click="repushInvoice(row)"
|
||||||
>重新推送</el-link
|
>重新推送</el-link
|
||||||
>
|
>
|
||||||
<el-link v-if="editable" type="danger" @click="removeInvoice($index)">删除</el-link>
|
<el-link v-if="editable && !row.issued" type="danger" @click="removeInvoice($index)"
|
||||||
|
>删除</el-link
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<div v-if="issuedInvoices.length" class="formal-editor__issued-invoices">
|
|
||||||
<div class="formal-editor__issued-title">
|
|
||||||
开票发票(本结算单开票申请经金蝶开票回写,文件由金蝶发票云直链提供)
|
|
||||||
</div>
|
|
||||||
<el-table :data="issuedInvoices" border>
|
|
||||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
|
||||||
<el-table-column prop="invoiceNo" label="发票号" min-width="150" align="center" />
|
|
||||||
<el-table-column prop="invoiceDate" label="开票日期" min-width="130" align="center">
|
|
||||||
<template #default="{ row }">{{ displayValue(row.invoiceDate) }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="invoiceAmount" label="价税合计" min-width="130" align="center">
|
|
||||||
<template #default="{ row }">{{ formatMoney(row.invoiceAmount) }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="160" fixed="right" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div class="formal-editor__links">
|
|
||||||
<el-link type="primary" @click="viewIssuedInvoice(row)">查看</el-link>
|
|
||||||
<el-link type="primary" @click="downloadIssuedInvoice(row)">下载</el-link>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
</section-card>
|
</section-card>
|
||||||
|
|
||||||
<kingdee-invoice-pool-dialog
|
<kingdee-invoice-pool-dialog
|
||||||
@@ -1123,6 +1103,7 @@ import {
|
|||||||
sourceColumns,
|
sourceColumns,
|
||||||
summaryColumns,
|
summaryColumns,
|
||||||
} from '@/option/settlement/formalSettlementTable';
|
} from '@/option/settlement/formalSettlementTable';
|
||||||
|
import { invoiceTypeOptions } from '@/api/payment/invoiceApplication';
|
||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
@@ -1324,6 +1305,21 @@ export default {
|
|||||||
editable() {
|
editable() {
|
||||||
return !this.readonly;
|
return !this.readonly;
|
||||||
},
|
},
|
||||||
|
// 发票信息合并展示:结算单发票行在前 + 金蝶回写开票发票行在后(issued 标记,只读不保存);
|
||||||
|
// 回写行恒在尾部,保证下方 $index 删除操作与 this.invoices 索引一致;回写行票种按开票申请字典翻译
|
||||||
|
invoiceRows() {
|
||||||
|
return [
|
||||||
|
...this.invoices,
|
||||||
|
...this.issuedInvoices.map(row => ({
|
||||||
|
...row,
|
||||||
|
issued: true,
|
||||||
|
invoiceType:
|
||||||
|
invoiceTypeOptions.find(item => item.value === row.invoiceType)?.label ||
|
||||||
|
row.invoiceType ||
|
||||||
|
'',
|
||||||
|
})),
|
||||||
|
];
|
||||||
|
},
|
||||||
// 查看页面「同步」按钮:仅已审批且未同步金蝶(含推送失败)的单据显示,口径与后端推送闸门一致
|
// 查看页面「同步」按钮:仅已审批且未同步金蝶(含推送失败)的单据显示,口径与后端推送闸门一致
|
||||||
canSync() {
|
canSync() {
|
||||||
return (
|
return (
|
||||||
@@ -2702,9 +2698,10 @@ export default {
|
|||||||
openInvoiceReceiptDialog() {
|
openInvoiceReceiptDialog() {
|
||||||
this.invoiceReceiptDialog.visible = true;
|
this.invoiceReceiptDialog.visible = true;
|
||||||
},
|
},
|
||||||
// 查看页重推入口展示条件:只读 + 付款结算单 + 审批通过 + 金蝶应付单已同步 + 该票未指定应付(failed/pushed)
|
// 查看页重推入口展示条件:只读 + 付款结算单 + 审批通过 + 金蝶应付单已同步 + 该票未指定应付(failed/pushed);金蝶回写行不参与
|
||||||
canRepushInvoice(row) {
|
canRepushInvoice(row) {
|
||||||
return (
|
return (
|
||||||
|
!row.issued &&
|
||||||
!this.editable &&
|
!this.editable &&
|
||||||
this.form.settlementType !== 'receivable' &&
|
this.form.settlementType !== 'receivable' &&
|
||||||
this.form.approvalStatus === 'approved' &&
|
this.form.approvalStatus === 'approved' &&
|
||||||
@@ -2954,6 +2951,13 @@ export default {
|
|||||||
this.kingdeeAttachmentBusy = false;
|
this.kingdeeAttachmentBusy = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 发票文件入口分流:金蝶回写开票发票走发票云直链,其余走金蝶票池/登记附件
|
||||||
|
viewInvoiceFile(row) {
|
||||||
|
return row.issued ? this.viewIssuedInvoice(row) : this.viewInvoiceAttachment(row);
|
||||||
|
},
|
||||||
|
downloadInvoiceFile(row) {
|
||||||
|
return row.issued ? this.downloadIssuedInvoice(row) : this.downloadInvoiceAttachment(row);
|
||||||
|
},
|
||||||
// 开票发票预览地址:数电PDF优先(OFD浏览器无法预览),退预览图、板式文件
|
// 开票发票预览地址:数电PDF优先(OFD浏览器无法预览),退预览图、板式文件
|
||||||
issuedInvoicePreviewUrl(row) {
|
issuedInvoicePreviewUrl(row) {
|
||||||
return row.invoicePdfFileUrl || row.invoiceImageUrl || row.invoiceFileUrl || '';
|
return row.invoicePdfFileUrl || row.invoiceImageUrl || row.invoiceFileUrl || '';
|
||||||
@@ -3591,14 +3595,6 @@ export default {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
.formal-editor__issued-invoices {
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
.formal-editor__issued-title {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
color: var(--el-text-color-secondary);
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.formal-editor__negative-amount {
|
.formal-editor__negative-amount {
|
||||||
color: var(--el-color-danger);
|
color: var(--el-color-danger);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user