Merge branch 'feature/installment' of git.yoho.cn:fe/yohobuywap-node into feature/installment
Showing
4 changed files
with
30 additions
and
5 deletions
@@ -354,6 +354,13 @@ const orderDetail = (req, res, next) => { | @@ -354,6 +354,13 @@ const orderDetail = (req, res, next) => { | ||
354 | 354 | ||
355 | return options.inverse(this); | 355 | return options.inverse(this); |
356 | }, | 356 | }, |
357 | + isRefundedAll: function(status, options) { | ||
358 | + if (status === 5) { // 已退款 | ||
359 | + return options.fn(this); | ||
360 | + } | ||
361 | + | ||
362 | + return options.inverse(this); | ||
363 | + }, | ||
357 | greaterThanZero: function(value, options) { | 364 | greaterThanZero: function(value, options) { |
358 | if (value && parseFloat(value) > 0) { | 365 | if (value && parseFloat(value) > 0) { |
359 | return options.fn(this); | 366 | return options.fn(this); |
@@ -45,6 +45,7 @@ | @@ -45,6 +45,7 @@ | ||
45 | <input id="sort-{{@index}}" type="checkbox" | 45 | <input id="sort-{{@index}}" type="checkbox" |
46 | class="installment-check-btn installment-term" | 46 | class="installment-check-btn installment-term" |
47 | data-order-code="{{../orderCode}}" | 47 | data-order-code="{{../orderCode}}" |
48 | + data-curr-amt="{{currAmt}}" | ||
48 | data-sort-id="{{sortId}}" | 49 | data-sort-id="{{sortId}}" |
49 | data-fee="{{currFeeAmt}}" | 50 | data-fee="{{currFeeAmt}}" |
50 | data-delay-fee="{{currDealyFeeAmt}}" | 51 | data-delay-fee="{{currDealyFeeAmt}}" |
@@ -79,6 +80,9 @@ | @@ -79,6 +80,9 @@ | ||
79 | </ul> | 80 | </ul> |
80 | </div> | 81 | </div> |
81 | {{/order}} | 82 | {{/order}} |
82 | - {{> installment/repayment-bottom}} | 83 | + |
84 | + {{#isRefundedAll status}} | ||
85 | + <div class="refunded-all">已退款</div> | ||
86 | + {{/isRefundedAll}} | ||
83 | </div> | 87 | </div> |
84 | 88 |
@@ -13,7 +13,7 @@ var repayment = new Repayment({ | @@ -13,7 +13,7 @@ var repayment = new Repayment({ | ||
13 | index: input.data('sortId'), | 13 | index: input.data('sortId'), |
14 | orderCode: input.data('orderCode'), | 14 | orderCode: input.data('orderCode'), |
15 | termNo: input.data('sortId'), | 15 | termNo: input.data('sortId'), |
16 | - amount: parseFloat(input.data('amount')), | 16 | + amount: parseFloat(input.data('currAmt')), |
17 | fee: parseFloat(input.data('delayFee')) | 17 | fee: parseFloat(input.data('delayFee')) |
18 | }; | 18 | }; |
19 | 19 | ||
@@ -46,7 +46,7 @@ repayment.setFee(0); | @@ -46,7 +46,7 @@ repayment.setFee(0); | ||
46 | */ | 46 | */ |
47 | $('.status').each(function() { | 47 | $('.status').each(function() { |
48 | var text = $(this).text().trim(); | 48 | var text = $(this).text().trim(); |
49 | - var fade = text.match(/已退货|结清|已取消/) || []; | 49 | + var fade = text.match(/已退款|已结清|已取消/) || []; |
50 | var expire = text.match(/已逾期/) || []; | 50 | var expire = text.match(/已逾期/) || []; |
51 | 51 | ||
52 | if (fade.length > 0) { | 52 | if (fade.length > 0) { |
@@ -65,10 +65,12 @@ $(CHECKBOX_SELECTOR + ':checkbox').click(function() { | @@ -65,10 +65,12 @@ $(CHECKBOX_SELECTOR + ':checkbox').click(function() { | ||
65 | var self = this; | 65 | var self = this; |
66 | 66 | ||
67 | selection.forEach(function(sel) { | 67 | selection.forEach(function(sel) { |
68 | - if (sel.index - lastIndex > 1) { | 68 | + var index = sel.index + 1; |
69 | + | ||
70 | + if (index - lastIndex > 1) { | ||
69 | isSkipped = true; | 71 | isSkipped = true; |
70 | } else { | 72 | } else { |
71 | - lastIndex = sel.index; | 73 | + lastIndex = index; |
72 | } | 74 | } |
73 | }); | 75 | }); |
74 | 76 |
@@ -2,6 +2,18 @@ | @@ -2,6 +2,18 @@ | ||
2 | background: #f0f0f0; | 2 | background: #f0f0f0; |
3 | font-weight: 300; | 3 | font-weight: 300; |
4 | 4 | ||
5 | + .refunded-all { | ||
6 | + text-align: center; | ||
7 | + bottom: 0; | ||
8 | + position: fixed; | ||
9 | + height: 114px; | ||
10 | + font-size: 34px; | ||
11 | + line-height: 114px; | ||
12 | + background: #fff; | ||
13 | + width: 100%; | ||
14 | + border-top: 1px solid #e1e1e1; | ||
15 | + } | ||
16 | + | ||
5 | .order-info { | 17 | .order-info { |
6 | position: fixed; | 18 | position: fixed; |
7 | width: 100%; | 19 | width: 100%; |
-
Please register or login to post a comment