Authored by yyq

Merge branch 'feature/homeInvoice' into release/6.1

@@ -18,7 +18,7 @@ module.exports = class extends global.yoho.BaseModel { @@ -18,7 +18,7 @@ module.exports = class extends global.yoho.BaseModel {
18 */ 18 */
19 getUserOrders(uid, page, limit, type) { 19 getUserOrders(uid, page, limit, type) {
20 let options = { 20 let options = {
21 - method: 'app.SpaceOrders.get', 21 + method: 'app.SpaceOrders.list',
22 uid: uid, 22 uid: uid,
23 type: type, 23 type: type,
24 page: page, 24 page: page,
@@ -368,7 +368,11 @@ module.exports = class extends global.yoho.BaseModel { @@ -368,7 +368,11 @@ module.exports = class extends global.yoho.BaseModel {
368 newOrder.payType = _.get(order, 'payment_type'); 368 newOrder.payType = _.get(order, 'payment_type');
369 newOrder.title = _.get(order, 'order_title'); 369 newOrder.title = _.get(order, 'order_title');
370 newOrder.invoiceType = ''; 370 newOrder.invoiceType = '';
371 - newOrder.issueType = _.get(order, 'invoice.issueType', 0) === 1; 371 +
  372 + let issueType = +_.get(order, 'invoice.issueType');
  373 +
  374 + newOrder.issueType = issueType === 2;
  375 + newOrder.invoiceSupplying = issueType === 1;
372 376
373 if (newOrder.issueType) { 377 if (newOrder.issueType) {
374 newOrder.invoiceType = _.get(order, 'invoice.type', 0) === 2 ? '电子发票' : '纸质发票'; 378 newOrder.invoiceType = _.get(order, 'invoice.type', 0) === 2 ? '电子发票' : '纸质发票';
@@ -97,8 +97,12 @@ @@ -97,8 +97,12 @@
97 {{#if issueType}} 97 {{#if issueType}}
98 <span class="op-item view-invoice" data-id="{{orderNum}}">查看发票</span> 98 <span class="op-item view-invoice" data-id="{{orderNum}}">查看发票</span>
99 {{^}} 99 {{^}}
  100 + {{#if invoiceSupplying}}
  101 + <span class="op-item on-invoice" data-id="{{orderNum}}">开票中</span>
  102 + {{^}}
100 <span class="op-item supply-invoice" data-id="{{orderNum}}">申请补开</span> 103 <span class="op-item supply-invoice" data-id="{{orderNum}}">申请补开</span>
101 {{/if}} 104 {{/if}}
  105 + {{/if}}
102 </div> 106 </div>
103 </div> 107 </div>
104 </div> 108 </div>
@@ -7,7 +7,12 @@ @@ -7,7 +7,12 @@
7 margin-bottom: 10px; 7 margin-bottom: 10px;
8 } 8 }
9 9
10 - .operation > .supply-invoice { 10 + .operation {
  11 + > .on-invoice {
  12 + color: #999;
  13 + }
  14 +
  15 + > .supply-invoice {
11 display: inline-block; 16 display: inline-block;
12 box-sizing: border-box; 17 box-sizing: border-box;
13 width: 68px; 18 width: 68px;
@@ -17,6 +22,7 @@ @@ -17,6 +22,7 @@
17 color: #000; 22 color: #000;
18 border: 1px solid #000; 23 border: 1px solid #000;
19 } 24 }
  25 + }
20 26
21 &.invoice-detail-dialog { 27 &.invoice-detail-dialog {
22 background: #fff; 28 background: #fff;