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,7 +97,11 @@ @@ -97,7 +97,11 @@
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 - <span class="op-item supply-invoice" data-id="{{orderNum}}">申请补开</span> 100 + {{#if invoiceSupplying}}
  101 + <span class="op-item on-invoice" data-id="{{orderNum}}">开票中</span>
  102 + {{^}}
  103 + <span class="op-item supply-invoice" data-id="{{orderNum}}">申请补开</span>
  104 + {{/if}}
101 {{/if}} 105 {{/if}}
102 </div> 106 </div>
103 </div> 107 </div>
@@ -7,15 +7,21 @@ @@ -7,15 +7,21 @@
7 margin-bottom: 10px; 7 margin-bottom: 10px;
8 } 8 }
9 9
10 - .operation > .supply-invoice {  
11 - display: inline-block;  
12 - box-sizing: border-box;  
13 - width: 68px;  
14 - height: 18px;  
15 - border-radius: 5px;  
16 - text-align: center;  
17 - color: #000;  
18 - border: 1px solid #000; 10 + .operation {
  11 + > .on-invoice {
  12 + color: #999;
  13 + }
  14 +
  15 + > .supply-invoice {
  16 + display: inline-block;
  17 + box-sizing: border-box;
  18 + width: 68px;
  19 + height: 18px;
  20 + border-radius: 5px;
  21 + text-align: center;
  22 + color: #000;
  23 + border: 1px solid #000;
  24 + }
19 } 25 }
20 26
21 &.invoice-detail-dialog { 27 &.invoice-detail-dialog {