Authored by 郝肖肖

商品详情页电子发票下载按钮

... ... @@ -68,8 +68,8 @@ const btnMap = {
};
const invoiceText = {
1: '纸质',
2: '电子'
1: '纸质发票',
2: '电子发票'
};
... ... @@ -525,7 +525,7 @@ const getOrderDetail = (uid, code) => {
_.forEach(detail.btns, btn => {
if (btn.isPayBtn) {
btn.payUrl = helpers.urlFormat('/shopping/pay/online', {
code: detail.orderCode
code: detail.order_code
});
}
});
... ... @@ -548,6 +548,7 @@ const getOrderDetail = (uid, code) => {
if (detail.invoice) {
detail.invoice.typeText = invoiceText[detail.invoice.type];
detail.invoice.pdfUrl = detail.invoice.showInvoice && detail.invoice.pdfUrl ? detail.invoice.pdfUrl : '';
} else {
detail.invoice = false;
}
... ...
... ... @@ -19,7 +19,12 @@
<h4 class="status-title">发票信息</h4>
{{# invoice}}
{{#if typeText}}
<p class="text">发票类型:{{typeText}}</p>
<p class="text">
发票类型:{{typeText}}
{{#if pdfUrl}}
<a class="btn white invoice-down" href="{{pdfUrl}}">电子发票下载</a>
{{/if}}
</p>
{{/if}}
{{#if title}}
<p class="text">发票抬头:{{title}}</p>
... ...
... ... @@ -5,7 +5,6 @@
line-height: 40px;
text-align: center;
background: #f4fbff;
margin-bottom: $space;
border: 1px solid $borderColor;
... ... @@ -67,6 +66,7 @@
.order-status {
$basicHeight: 90px;
border-top: 1px solid $borderColor;
border-bottom: 1px solid $borderColor;
position: relative;
... ... @@ -191,6 +191,7 @@
width: $normalWidth;
text-align: center;
}
.first {
width: calc($goodImgWidth + 2 * $space + $w - $normalWidth + $space / 2);
text-align: left;
... ... @@ -203,7 +204,6 @@
}
.goods-container {
width: calc($w + 3 * $normalWidth);
.special-column {
... ... @@ -272,6 +272,17 @@
min-width: 100px;
}
}
.invoice-down {
color: #d0021b;
width: 90px;
margin-top: -24px;
margin-left: 170px;
position: absolute;
font-size: 12px;
font-weight: 700;
border: 1px solid #e0e0e0;
}
}
.status-title {
... ... @@ -285,7 +296,6 @@
.header {
padding-right: $space;
}
.table-body {
... ... @@ -317,12 +327,13 @@
&.time {
width: 30% !important;
}
&.city {
width: 30% !important;
}
&.action {
width: 40% !important;
}
}
}
... ...