Authored by 王水玲

Merge branch 'feature/installment' of git.yoho.cn:fe/yohobuywap-node into feature/installment

... ... @@ -354,6 +354,13 @@ const orderDetail = (req, res, next) => {
return options.inverse(this);
},
isRefundedAll: function(status, options) {
if (status === 5) { // 已退款
return options.fn(this);
}
return options.inverse(this);
},
greaterThanZero: function(value, options) {
if (value && parseFloat(value) > 0) {
return options.fn(this);
... ...
... ... @@ -45,6 +45,7 @@
<input id="sort-{{@index}}" type="checkbox"
class="installment-check-btn installment-term"
data-order-code="{{../orderCode}}"
data-curr-amt="{{currAmt}}"
data-sort-id="{{sortId}}"
data-fee="{{currFeeAmt}}"
data-delay-fee="{{currDealyFeeAmt}}"
... ... @@ -79,6 +80,9 @@
</ul>
</div>
{{/order}}
{{> installment/repayment-bottom}}
{{#isRefundedAll status}}
<div class="refunded-all">已退款</div>
{{/isRefundedAll}}
</div>
... ...
... ... @@ -13,7 +13,7 @@ var repayment = new Repayment({
index: input.data('sortId'),
orderCode: input.data('orderCode'),
termNo: input.data('sortId'),
amount: parseFloat(input.data('amount')),
amount: parseFloat(input.data('currAmt')),
fee: parseFloat(input.data('delayFee'))
};
... ... @@ -46,7 +46,7 @@ repayment.setFee(0);
*/
$('.status').each(function() {
var text = $(this).text().trim();
var fade = text.match(/已退货|结清|已取消/) || [];
var fade = text.match(/已退款|已结清|已取消/) || [];
var expire = text.match(/已逾期/) || [];
if (fade.length > 0) {
... ... @@ -65,10 +65,12 @@ $(CHECKBOX_SELECTOR + ':checkbox').click(function() {
var self = this;
selection.forEach(function(sel) {
if (sel.index - lastIndex > 1) {
var index = sel.index + 1;
if (index - lastIndex > 1) {
isSkipped = true;
} else {
lastIndex = sel.index;
lastIndex = index;
}
});
... ...
... ... @@ -2,6 +2,18 @@
background: #f0f0f0;
font-weight: 300;
.refunded-all {
text-align: center;
bottom: 0;
position: fixed;
height: 114px;
font-size: 34px;
line-height: 114px;
background: #fff;
width: 100%;
border-top: 1px solid #e1e1e1;
}
.order-info {
position: fixed;
width: 100%;
... ...