feat: 收票登记查询明细底部弹窗展示金蝶发票全量信息与全部明细行
This commit is contained in:
@@ -129,7 +129,7 @@
|
|||||||
|
|
||||||
<section-card title="发票明细">
|
<section-card title="发票明细">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<el-button size="small" type="primary" :loading="invoiceDetailLoading" :disabled="!form.invoiceNo" @click="reloadInvoiceDetail">
|
<el-button size="small" type="primary" :loading="invoiceDetailLoading" :disabled="!form.invoiceNo" @click="openInvoiceDetailPanel">
|
||||||
查询明细
|
查询明细
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -157,6 +157,84 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</section-card>
|
</section-card>
|
||||||
|
|
||||||
|
<bottom-detail-panel v-model="invoiceDetailPanelVisible" title="发票信息">
|
||||||
|
<el-descriptions v-loading="invoiceDetailLoading" :column="3" border size="small">
|
||||||
|
<el-descriptions-item label="发票号码">{{
|
||||||
|
displayValue(invoicePoolDetail?.invoiceNo)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="开票日期">{{
|
||||||
|
displayValue(invoicePoolDetail?.invoiceDate)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="发票类型">{{
|
||||||
|
displayValue(invoicePoolDetail?.invoiceType)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="税率">
|
||||||
|
{{ invoicePoolDetail?.taxRate != null ? `${invoicePoolDetail.taxRate}%` : '-' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="发票金额(价税合计)">{{
|
||||||
|
formatMoney(invoicePoolDetail?.invoiceAmount)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="税额">{{
|
||||||
|
formatMoney(invoicePoolDetail?.taxAmount)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="受票单位(购方)">{{
|
||||||
|
displayValue(invoicePoolDetail?.receiverName)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="购方税号">{{
|
||||||
|
displayValue(invoicePoolDetail?.buyerTaxNo)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="开票单位(销方)">{{
|
||||||
|
displayValue(invoicePoolDetail?.issuerName)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="销方税号">{{
|
||||||
|
displayValue(invoicePoolDetail?.salerTaxNo)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="销方开户行">{{
|
||||||
|
displayValue(invoicePoolDetail?.bankName)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="销方银行账号">{{
|
||||||
|
displayValue(invoicePoolDetail?.bankAccount)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="销方电话">{{
|
||||||
|
displayValue(invoicePoolDetail?.phone)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="查验状态">{{
|
||||||
|
checkStatusText(invoicePoolDetail?.checkStatus)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="金蝶单据号">{{
|
||||||
|
displayValue(invoicePoolDetail?.kingdeeBillNo)
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<div class="receipt-form-page__invoice-items-title">发票明细行</div>
|
||||||
|
<el-table v-loading="invoiceDetailLoading" :data="invoiceItems" border empty-text="暂无发票明细行">
|
||||||
|
<el-table-column prop="seq" label="分录行号" width="90" align="center" />
|
||||||
|
<el-table-column prop="goodsName" label="货物名称" min-width="160" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="specModel" label="规格型号" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="unit" label="单位" min-width="80" align="center" />
|
||||||
|
<el-table-column label="数量" min-width="100" align="right">
|
||||||
|
<template #default="{ row }">{{ formatQuantity(row.num) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="单价" min-width="110" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.unitPrice) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="金额" min-width="120" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.detailAmount) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="税率" min-width="90" align="center">
|
||||||
|
<template #default="{ row }">{{ formatRateText(row.taxRate) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="税额" min-width="110" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.taxAmount) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="goodsCode" label="税收分类编码" min-width="140" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="discountType" label="折扣类型" min-width="100" align="center" />
|
||||||
|
<el-table-column prop="preferentialPolicy" label="优惠政策" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="vatException" label="增值税特殊事项" min-width="130" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="zeroTaxRateFlag" label="零税率标识" min-width="100" align="center" />
|
||||||
|
<el-table-column prop="versionNo" label="版本号" min-width="90" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</bottom-detail-panel>
|
||||||
|
|
||||||
<section-card title="结算信息">
|
<section-card title="结算信息">
|
||||||
<el-table :data="form.settlements" border empty-text="暂无认领数据(认领关系由付款结算单侧维护)">
|
<el-table :data="form.settlements" border empty-text="暂无认领数据(认领关系由付款结算单侧维护)">
|
||||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||||
@@ -286,6 +364,7 @@ import { getList as getContractList } from '@/api/business/contract-manage';
|
|||||||
import KingdeeInvoicePoolDialog from '@/components/kingdee-invoice-pool-dialog/main.vue';
|
import KingdeeInvoicePoolDialog from '@/components/kingdee-invoice-pool-dialog/main.vue';
|
||||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||||
import InvoiceWriteOffTable from '@/components/invoice-write-off-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 { getMkPublicDetail } from '@/api/mk-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
|
||||||
@@ -326,6 +405,7 @@ export default {
|
|||||||
KingdeeInvoicePoolDialog,
|
KingdeeInvoicePoolDialog,
|
||||||
VehicleAttachmentTable,
|
VehicleAttachmentTable,
|
||||||
InvoiceWriteOffTable,
|
InvoiceWriteOffTable,
|
||||||
|
BottomDetailPanel,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -335,6 +415,8 @@ export default {
|
|||||||
departmentEmailOptions: [],
|
departmentEmailOptions: [],
|
||||||
invoiceItems: [],
|
invoiceItems: [],
|
||||||
invoiceDetailLoading: false,
|
invoiceDetailLoading: false,
|
||||||
|
invoiceDetailPanelVisible: false,
|
||||||
|
invoicePoolDetail: null,
|
||||||
contractDialog: {
|
contractDialog: {
|
||||||
visible: false,
|
visible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -516,18 +598,37 @@ export default {
|
|||||||
this.invoiceItems = [];
|
this.invoiceItems = [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 手动按发票号查询金蝶发票明细(历史单据无缓存明细时点击刷新)
|
// 查询明细:底部弹窗展示金蝶发票全量信息(头部票池镜像 + 全部明细行),历史单据无缓存时回源金蝶
|
||||||
async reloadInvoiceDetail() {
|
async openInvoiceDetailPanel() {
|
||||||
|
if (!this.form.invoiceNo) return;
|
||||||
|
this.invoiceDetailPanelVisible = true;
|
||||||
this.invoiceDetailLoading = true;
|
this.invoiceDetailLoading = true;
|
||||||
try {
|
try {
|
||||||
this.invoiceItems = this.unwrapData(await api.invoiceDetailQuery(this.form.invoiceNo)) || [];
|
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('未查询到该发票的明细行');
|
if (!this.invoiceItems.length) this.$message.info('未查询到该发票的明细行');
|
||||||
} catch {
|
} else {
|
||||||
this.$message.error('查询金蝶发票明细失败');
|
this.$message.error('查询金蝶发票明细失败');
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.invoiceDetailLoading = false;
|
this.invoiceDetailLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
checkStatusText(value) {
|
||||||
|
const map = { 0: '未查验', 1: '查验通过', 2: '查验不通过' };
|
||||||
|
return map[value] ?? this.displayValue(value);
|
||||||
|
},
|
||||||
// 所属合同=承运商合同:选择后带出承办部门(结算组织=承办部门对应平台公司金蝶编码,后端派生)
|
// 所属合同=承运商合同:选择后带出承办部门(结算组织=承办部门对应平台公司金蝶编码,后端派生)
|
||||||
openContractDialog() {
|
openContractDialog() {
|
||||||
this.contractDialog.visible = true;
|
this.contractDialog.visible = true;
|
||||||
@@ -649,6 +750,9 @@ export default {
|
|||||||
goBack() {
|
goBack() {
|
||||||
this.$router.push('/payment/invoice-receipt');
|
this.$router.push('/payment/invoice-receipt');
|
||||||
},
|
},
|
||||||
|
displayValue(value) {
|
||||||
|
return value === null || value === undefined || value === '' ? '-' : value;
|
||||||
|
},
|
||||||
formatMoney(value) {
|
formatMoney(value) {
|
||||||
return Number(value || 0).toFixed(2);
|
return Number(value || 0).toFixed(2);
|
||||||
},
|
},
|
||||||
@@ -684,6 +788,11 @@ export default {
|
|||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
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) {
|
.receipt-form-page__remark :deep(.el-form-item__content) {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user