Authored by Aiden Xu

分期订单

@@ -368,6 +368,12 @@ const orderDetail = (req, res, next) => { @@ -368,6 +368,12 @@ const orderDetail = (req, res, next) => {
368 368
369 return options.inverse(this); 369 return options.inverse(this);
370 }, 370 },
  371 + isRepaymentAllCompleted: function(status, options) {
  372 + if (status === 2) { // 已结清/已取消
  373 + return options.fn(this);
  374 + }
  375 + return options.inverse(this);
  376 + },
371 greaterThanZero: function(value, options) { 377 greaterThanZero: function(value, options) {
372 if (value && parseFloat(value) > 0) { 378 if (value && parseFloat(value) > 0) {
373 return options.fn(this); 379 return options.fn(this);
@@ -83,8 +83,12 @@ @@ -83,8 +83,12 @@
83 83
84 {{> installment/repayment-bottom}} 84 {{> installment/repayment-bottom}}
85 85
86 - {{#isRefundedAll status}}  
87 - <div class="refunded-all">已退款</div> 86 + {{#isRefundedAll order.status}}
  87 + <div class="all-completed">已退款</div>
88 {{/isRefundedAll}} 88 {{/isRefundedAll}}
  89 +
  90 + {{#isRepaymentAllCompleted order.status}}
  91 + <div class="all-completed">已结清</div>
  92 + {{/isRepaymentAllCompleted}}
89 </div> 93 </div>
90 94
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 background: #f0f0f0; 2 background: #f0f0f0;
3 font-weight: 300; 3 font-weight: 300;
4 4
5 - .refunded-all { 5 + .all-completed {
6 text-align: center; 6 text-align: center;
7 bottom: 0; 7 bottom: 0;
8 position: fixed; 8 position: fixed;