From da616f83c5a4917f359a6759c81c965ca0a772a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com> Date: Tue, 10 Nov 2026 14:20:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=B6=E7=A5=A8=E7=99=BB=E8=AE=B0?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=98=8E=E7=BB=86=E5=BA=95=E9=83=A8=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E5=B1=95=E7=A4=BA=E9=87=91=E8=9D=B6=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E5=85=A8=E9=87=8F=E4=BF=A1=E6=81=AF=E4=B8=8E=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/payment/invoice-receipt-form.vue | 123 +++++++++++++++++++-- 1 file changed, 116 insertions(+), 7 deletions(-) diff --git a/src/views/payment/invoice-receipt-form.vue b/src/views/payment/invoice-receipt-form.vue index 98ab28e..532d7e1 100644 --- a/src/views/payment/invoice-receipt-form.vue +++ b/src/views/payment/invoice-receipt-form.vue @@ -129,7 +129,7 @@ @@ -157,6 +157,84 @@ + + + {{ + displayValue(invoicePoolDetail?.invoiceNo) + }} + {{ + displayValue(invoicePoolDetail?.invoiceDate) + }} + {{ + displayValue(invoicePoolDetail?.invoiceType) + }} + + {{ invoicePoolDetail?.taxRate != null ? `${invoicePoolDetail.taxRate}%` : '-' }} + + {{ + formatMoney(invoicePoolDetail?.invoiceAmount) + }} + {{ + formatMoney(invoicePoolDetail?.taxAmount) + }} + {{ + displayValue(invoicePoolDetail?.receiverName) + }} + {{ + displayValue(invoicePoolDetail?.buyerTaxNo) + }} + {{ + displayValue(invoicePoolDetail?.issuerName) + }} + {{ + displayValue(invoicePoolDetail?.salerTaxNo) + }} + {{ + displayValue(invoicePoolDetail?.bankName) + }} + {{ + displayValue(invoicePoolDetail?.bankAccount) + }} + {{ + displayValue(invoicePoolDetail?.phone) + }} + {{ + checkStatusText(invoicePoolDetail?.checkStatus) + }} + {{ + displayValue(invoicePoolDetail?.kingdeeBillNo) + }} + +
发票明细行
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ @@ -286,6 +364,7 @@ import { getList as getContractList } from '@/api/business/contract-manage'; import KingdeeInvoicePoolDialog from '@/components/kingdee-invoice-pool-dialog/main.vue'; import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue'; import InvoiceWriteOffTable from '@/components/invoice-write-off-table/main.vue'; +import BottomDetailPanel from '@/components/bottom-detail-panel/main.vue'; import { getMkPublicDetail } from '@/api/mk-process'; import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval'; @@ -326,6 +405,7 @@ export default { KingdeeInvoicePoolDialog, VehicleAttachmentTable, InvoiceWriteOffTable, + BottomDetailPanel, }, data() { return { @@ -335,6 +415,8 @@ export default { departmentEmailOptions: [], invoiceItems: [], invoiceDetailLoading: false, + invoiceDetailPanelVisible: false, + invoicePoolDetail: null, contractDialog: { visible: false, loading: false, @@ -516,18 +598,37 @@ export default { this.invoiceItems = []; } }, - // 手动按发票号查询金蝶发票明细(历史单据无缓存明细时点击刷新) - async reloadInvoiceDetail() { + // 查询明细:底部弹窗展示金蝶发票全量信息(头部票池镜像 + 全部明细行),历史单据无缓存时回源金蝶 + async openInvoiceDetailPanel() { + if (!this.form.invoiceNo) return; + this.invoiceDetailPanelVisible = true; this.invoiceDetailLoading = true; try { - this.invoiceItems = this.unwrapData(await api.invoiceDetailQuery(this.form.invoiceNo)) || []; - if (!this.invoiceItems.length) this.$message.info('未查询到该发票的明细行'); - } catch { - this.$message.error('查询金蝶发票明细失败'); + const [poolResult, itemsResult] = await Promise.allSettled([ + api.queryInvoicePool({ current: 1, size: 1, invoiceNo: this.form.invoiceNo }), + api.invoiceDetailQuery(this.form.invoiceNo), + ]); + if (poolResult.status === 'fulfilled') { + const records = this.unwrapData(poolResult.value)?.records || []; + this.invoicePoolDetail = + records.find(item => item.invoiceNo === this.form.invoiceNo) || records[0] || null; + } else { + this.invoicePoolDetail = null; + } + if (itemsResult.status === 'fulfilled') { + this.invoiceItems = this.unwrapData(itemsResult.value) || []; + if (!this.invoiceItems.length) this.$message.info('未查询到该发票的明细行'); + } else { + this.$message.error('查询金蝶发票明细失败'); + } } finally { this.invoiceDetailLoading = false; } }, + checkStatusText(value) { + const map = { 0: '未查验', 1: '查验通过', 2: '查验不通过' }; + return map[value] ?? this.displayValue(value); + }, // 所属合同=承运商合同:选择后带出承办部门(结算组织=承办部门对应平台公司金蝶编码,后端派生) openContractDialog() { this.contractDialog.visible = true; @@ -649,6 +750,9 @@ export default { goBack() { this.$router.push('/payment/invoice-receipt'); }, + displayValue(value) { + return value === null || value === undefined || value === '' ? '-' : value; + }, formatMoney(value) { return Number(value || 0).toFixed(2); }, @@ -684,6 +788,11 @@ export default { display: block; width: 100%; } +.receipt-form-page__invoice-items-title { + margin: 16px 0 8px; + font-size: 14px; + font-weight: 600; +} .receipt-form-page__remark :deep(.el-form-item__content) { margin-left: 0 !important; }