mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-05-06 23:54:40 +08:00
feat(发票管理): 新增发票详情功能和优化发票信息展示
- 在会员API中添加获取发票详情的接口 - 更新发票模态框,支持电子普通发票和增值税专用发票的详细信息展示 - 在订单详情页和支付页面优化发票信息的显示逻辑 - 增加发票信息的校验和格式化处理
This commit is contained in:
@@ -157,8 +157,11 @@
|
||||
</span></span>
|
||||
</div>
|
||||
<div class="inovice-content">
|
||||
<span>{{ invoiceData.receiptTitle }}</span>
|
||||
<span>{{ invoiceData.receiptContent }}</span>
|
||||
<template v-if="hasInvoiceInfo">
|
||||
<span>{{ invoiceDisplayTitle }}</span>
|
||||
<span>{{ invoiceData.receiptContent }}</span>
|
||||
</template>
|
||||
<span v-else>不开发票</span>
|
||||
<span @click="editInvoice">编辑</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -258,6 +261,28 @@ import { canUseCouponList } from "@/api/member.js";
|
||||
export default {
|
||||
name: "Pay",
|
||||
components: { invoiceModal, addressManage },
|
||||
computed: {
|
||||
hasInvoiceInfo() {
|
||||
const title =
|
||||
this.invoiceData.personalName ||
|
||||
this.invoiceData.companyName ||
|
||||
this.invoiceData.receiptTitle;
|
||||
const content = this.invoiceData.receiptContent;
|
||||
if (content && String(content).trim() === "不开发票") return false;
|
||||
return Boolean(
|
||||
(title && String(title).trim()) ||
|
||||
(content && String(content).trim())
|
||||
);
|
||||
},
|
||||
invoiceDisplayTitle() {
|
||||
return (
|
||||
this.invoiceData.personalName ||
|
||||
this.invoiceData.companyName ||
|
||||
this.invoiceData.receiptTitle ||
|
||||
""
|
||||
);
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedStoreAddress: 'm',
|
||||
@@ -270,8 +295,7 @@ export default {
|
||||
storeMoreAddr: false,
|
||||
invoiceData: {
|
||||
// 发票数据
|
||||
receiptTitle: "个人",
|
||||
receiptContent: "不开发票",
|
||||
//receiptContent: "不开发票",
|
||||
},
|
||||
searchForm: {
|
||||
pageNumber: 1,
|
||||
|
||||
Reference in New Issue
Block a user