Authored by 郝肖肖

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

@@ -68,8 +68,8 @@ const btnMap = { @@ -68,8 +68,8 @@ const btnMap = {
68 }; 68 };
69 69
70 const invoiceText = { 70 const invoiceText = {
71 - 1: '纸质',  
72 - 2: '电子' 71 + 1: '纸质发票',
  72 + 2: '电子发票'
73 }; 73 };
74 74
75 75
@@ -525,7 +525,7 @@ const getOrderDetail = (uid, code) => { @@ -525,7 +525,7 @@ const getOrderDetail = (uid, code) => {
525 _.forEach(detail.btns, btn => { 525 _.forEach(detail.btns, btn => {
526 if (btn.isPayBtn) { 526 if (btn.isPayBtn) {
527 btn.payUrl = helpers.urlFormat('/shopping/pay/online', { 527 btn.payUrl = helpers.urlFormat('/shopping/pay/online', {
528 - code: detail.orderCode 528 + code: detail.order_code
529 }); 529 });
530 } 530 }
531 }); 531 });
@@ -548,6 +548,7 @@ const getOrderDetail = (uid, code) => { @@ -548,6 +548,7 @@ const getOrderDetail = (uid, code) => {
548 548
549 if (detail.invoice) { 549 if (detail.invoice) {
550 detail.invoice.typeText = invoiceText[detail.invoice.type]; 550 detail.invoice.typeText = invoiceText[detail.invoice.type];
  551 + detail.invoice.pdfUrl = detail.invoice.showInvoice && detail.invoice.pdfUrl ? detail.invoice.pdfUrl : '';
551 } else { 552 } else {
552 detail.invoice = false; 553 detail.invoice = false;
553 } 554 }
@@ -19,7 +19,12 @@ @@ -19,7 +19,12 @@
19 <h4 class="status-title">发票信息</h4> 19 <h4 class="status-title">发票信息</h4>
20 {{# invoice}} 20 {{# invoice}}
21 {{#if typeText}} 21 {{#if typeText}}
22 - <p class="text">发票类型:{{typeText}}</p> 22 + <p class="text">
  23 + 发票类型:{{typeText}}
  24 + {{#if pdfUrl}}
  25 + <a class="btn white invoice-down" href="{{pdfUrl}}">电子发票下载</a>
  26 + {{/if}}
  27 + </p>
23 {{/if}} 28 {{/if}}
24 {{#if title}} 29 {{#if title}}
25 <p class="text">发票抬头:{{title}}</p> 30 <p class="text">发票抬头:{{title}}</p>
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
5 line-height: 40px; 5 line-height: 40px;
6 text-align: center; 6 text-align: center;
7 background: #f4fbff; 7 background: #f4fbff;
8 -  
9 margin-bottom: $space; 8 margin-bottom: $space;
10 border: 1px solid $borderColor; 9 border: 1px solid $borderColor;
11 10
@@ -67,6 +66,7 @@ @@ -67,6 +66,7 @@
67 66
68 .order-status { 67 .order-status {
69 $basicHeight: 90px; 68 $basicHeight: 90px;
  69 +
70 border-top: 1px solid $borderColor; 70 border-top: 1px solid $borderColor;
71 border-bottom: 1px solid $borderColor; 71 border-bottom: 1px solid $borderColor;
72 position: relative; 72 position: relative;
@@ -191,6 +191,7 @@ @@ -191,6 +191,7 @@
191 width: $normalWidth; 191 width: $normalWidth;
192 text-align: center; 192 text-align: center;
193 } 193 }
  194 +
194 .first { 195 .first {
195 width: calc($goodImgWidth + 2 * $space + $w - $normalWidth + $space / 2); 196 width: calc($goodImgWidth + 2 * $space + $w - $normalWidth + $space / 2);
196 text-align: left; 197 text-align: left;
@@ -203,7 +204,6 @@ @@ -203,7 +204,6 @@
203 } 204 }
204 205
205 .goods-container { 206 .goods-container {
206 -  
207 width: calc($w + 3 * $normalWidth); 207 width: calc($w + 3 * $normalWidth);
208 208
209 .special-column { 209 .special-column {
@@ -272,6 +272,17 @@ @@ -272,6 +272,17 @@
272 min-width: 100px; 272 min-width: 100px;
273 } 273 }
274 } 274 }
  275 +
  276 + .invoice-down {
  277 + color: #d0021b;
  278 + width: 90px;
  279 + margin-top: -24px;
  280 + margin-left: 170px;
  281 + position: absolute;
  282 + font-size: 12px;
  283 + font-weight: 700;
  284 + border: 1px solid #e0e0e0;
  285 + }
275 } 286 }
276 287
277 .status-title { 288 .status-title {
@@ -285,7 +296,6 @@ @@ -285,7 +296,6 @@
285 296
286 .header { 297 .header {
287 padding-right: $space; 298 padding-right: $space;
288 -  
289 } 299 }
290 300
291 .table-body { 301 .table-body {
@@ -317,12 +327,13 @@ @@ -317,12 +327,13 @@
317 &.time { 327 &.time {
318 width: 30% !important; 328 width: 30% !important;
319 } 329 }
  330 +
320 &.city { 331 &.city {
321 width: 30% !important; 332 width: 30% !important;
322 } 333 }
  334 +
323 &.action { 335 &.action {
324 width: 40% !important; 336 width: 40% !important;
325 } 337 }
326 } 338 }
327 -  
328 } 339 }