Authored by biao

Merge branch 'feature/return' into develop

... ... @@ -80,7 +80,7 @@ const refundDetail = (req, res, next) => {
const exchange = (req, res, next) => {
const code = req.params.orderCode;
const uid = req.user.uid;
const uid = req.user.uid || 8050882;
returns.getChangeGoodsList(code, uid).then(result => {
res.display('index', {
... ...
... ... @@ -56,9 +56,13 @@ const getUserReturn = (uid, page) => {
2: '换货'
};
const data = camelCase(result.data);
let data = {};
let paginationOpts = false;
const paginationOpts = data.total > pageSize ? {
if (result && result.data) {
data = camelCase(result.data);
paginationOpts = data.total > pageSize ? {
paginationOpts: {
total: data.total,
page: data.page,
... ... @@ -77,6 +81,7 @@ const getUserReturn = (uid, page) => {
it.hidePrice = true;
});
});
}
return {
returnsList: Object.assign(data, paginationOpts, basicData)
... ...
... ... @@ -7,7 +7,7 @@
<ul class="header">
<li class="info">商品信息</li>
<li class="change-reason">换货原因</li>
<li class="change-num">换货数量</li>
<li class="change-num hide">换货数量</li>
</ul>
{{#goodsList}}
<div class="change-info-box">
... ...
... ... @@ -284,7 +284,7 @@ function bindConfirmEvent() {
changeData.consignee_name = $('#user').val();
changeData.address = $('#addr').val();
changeData.mobile = $('#mob').val();
changeData.delivery_type = $('.change-type .type.active').data('type');
changeData.delivery_tpye = $('.change-type .type.active').data('type');
submitChange(changeData);
});
... ... @@ -297,9 +297,11 @@ function initAddr() {
});
}
getProductInfo();
bindSelectEvent();
bindTypeEvent();
bindCheckboxEvent();
bindConfirmEvent();
initAddr();
$(document).on('ready', function() {
getProductInfo();
bindSelectEvent();
bindTypeEvent();
bindCheckboxEvent();
bindConfirmEvent();
initAddr();
});
... ...
... ... @@ -2,6 +2,14 @@
.change-info-box {
margin-bottom: 20px;
border: 1px solid #f1f1f1;
padding: 0 54px 20px;
.left {
&.left-title {
width: auto;
padding-left: 0;
}
}
}
&.change {
... ... @@ -13,6 +21,12 @@
}
}
.header {
.info {
width: 540px;
}
}
.box-title {
display: block;
padding: 20px 0;
... ...