Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
2016-07-21 20:16:06 +0800
Commit
baff9d6561d7db34cf45ad4290155ae1fc7b08cf
1 parent
e8a11c5e
退货详情页
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
270 additions
and
3 deletions
apps/me/controllers/returns.js
apps/me/models/returns-api.js
apps/me/models/returns.js
apps/me/router.js
apps/me/views/partial/refund-detail.hbs
apps/me/views/partial/returns.hbs
public/scss/me/return/_index.css
public/scss/me/return/_refund-detail.css
apps/me/controllers/returns.js
View file @
baff9d6
...
...
@@ -35,7 +35,6 @@ const refund = (req, res, next) => {
let
uid
=
req
.
user
.
uid
||
'8050560'
;
let
code
=
parseInt
(
req
.
params
.
orderCode
,
10
)
||
'160192757'
;
code
=
'160192757'
;
if
(
!
uid
||
!
code
)
{
return
next
();
}
...
...
@@ -67,6 +66,22 @@ const refundApply = (req, res, next) => {
};
const
refundDetail
=
(
req
,
res
,
next
)
=>
{
let
applyId
=
parseInt
(
req
.
params
.
applyId
,
10
)
||
'1606228980'
,
uid
=
req
.
user
.
uid
||
'8050560'
;
if
(
!
uid
||
!
applyId
)
{
return
next
();
}
returns
.
getRefundDetailData
(
applyId
,
uid
).
then
(
result
=>
{
res
.
display
(
'index'
,
{
page
:
'returns-refund'
,
content
:
result
});
}).
catch
(
next
);
};
const
exchange
=
(
req
,
res
,
next
)
=>
{
next
();
};
...
...
@@ -76,5 +91,6 @@ module.exports = {
detail
,
refund
,
refundApply
,
refundDetail
,
exchange
};
...
...
apps/me/models/returns-api.js
View file @
baff9d6
...
...
@@ -24,6 +24,14 @@ const getRefundGoodsAsync = (orderCode, uid) => {
},
{
code
:
200
});
};
const
getRefundDetailAsync
=
(
applyId
,
uid
)
=>
{
return
api
.
get
(
''
,
{
method
:
'app.refund.detail'
,
id
:
applyId
,
uid
:
uid
},
{
code
:
200
});
};
const
refundSubmitAsync
=
(
orderCode
,
uid
,
goods
,
payment
)
=>
{
return
api
.
get
(
''
,
{
method
:
'app.refund.submit'
,
...
...
@@ -37,6 +45,7 @@ const refundSubmitAsync = (orderCode, uid, goods, payment) => {
module
.
exports
=
{
getOrderInfoAsync
,
getRefundGoodsAsync
,
getRefundDetailAsync
,
refundSubmitAsync
};
...
...
apps/me/models/returns.js
View file @
baff9d6
...
...
@@ -124,12 +124,35 @@ const getRefundGoodsData = (orderCode, uid) => {
});
};
const
getRefundDetailData
=
(
applyId
,
uid
)
=>
{
return
returnsAPI
.
getRefundDetailAsync
(
applyId
,
uid
).
then
(
result
=>
{
let
resData
=
{};
Object
.
assign
(
resData
,
_setSideMenu
(
'我的退/换货'
));
resData
.
returns
=
{
title
:
'退货申请'
,
refundDetail
:
{}
};
if
(
result
.
data
)
{
console
.
log
(
result
.
data
);
}
return
resData
;
});
};
const
saveRefund
=
(
orderCode
,
uid
,
goods
,
payment
)
=>
{
return
returnsAPI
.
getOrderInfoAsync
(
orderCode
,
uid
,
''
).
then
(
result
=>
{
if
(
!
_
.
isEmpty
(
result
))
{
return
returnsAPI
.
refundSubmitAsync
(
orderCode
,
uid
,
goods
,
payment
).
then
(
subRes
=>
{
if
(
subRes
&&
subRes
.
data
)
{
return
{
code
:
200
,
data
:
{
refer
:
subRes
.
data
.
apply_id
}};
return
{
code
:
200
,
data
:
{
refer
:
helpers
.
urlFormat
(
`
/
return
/refund/
detail
/
$
{
subRes
.
data
.
apply_id
}
`
)
}
};
}
return
{
code
:
400
,
message
:
'申请失败'
};
});
...
...
@@ -142,5 +165,6 @@ const saveRefund = (orderCode, uid, goods, payment) => {
module
.
exports
=
{
getUserReturn
,
getRefundGoodsData
,
getRefundDetailData
,
saveRefund
};
...
...
apps/me/router.js
View file @
baff9d6
...
...
@@ -30,6 +30,7 @@ router.get('/editOrder', order.editOrder);
router
.
get
(
'/return'
,
returns
.
index
);
router
.
get
(
'/return/refund/:orderCode'
,
returns
.
refund
);
router
.
get
(
'/return/exchange/:orderCode'
,
returns
.
exchange
);
router
.
get
(
'/return/refund/detail/:applyId'
,
returns
.
refundDetail
);
router
.
get
(
'/return/:returnId'
,
returns
.
detail
);
router
.
post
(
'/return/refund/apply'
,
returns
.
refundApply
);
...
...
apps/me/views/partial/refund-detail.hbs
0 → 100644
View file @
baff9d6
{{#
refundDetail
}}
<div
class=
"refund-datail-wrap"
>
<div
class=
"review-tip top-tip"
>
<p
class=
"tip-status"
>
<span
class=
"iconfont blue"
>

</span>
<span
class=
"blue"
>
退货申请审核中
</span>
</p>
<p
class=
"tip-text"
>
请将商品连同吊牌、包装、发货单(如无发货单,您可找张白纸上注明订单编号,收货人姓名及手机号码)、发票(如有)、 赠品(如有)一并寄回,如有 遗漏将影响您的退换货进度,敬请谅解
<br>
非我司原因的退换货,寄回运费由您承担。商品客观问题的退换货,请您先行垫付运费,邮费会在退款中补贴给您,
<b>
我们不接受平邮和到付
</b>
,感谢您的理解与支持
</p>
<p>
如果您不想退货了,您可以
<span
class=
"cancel-btn btn"
>
取消申请
</span>
</p>
</div>
<div
class=
"storage-tip top-tip"
>
<p
class=
"tip-status"
>
<span
class=
"iconfont blue"
>

</span>
<span
class=
"blue"
>
您寄回的商品已收到
</span>
</p>
<p>
我们会在入库后的1-3个工作日内处理您的退款,如有疑问,请联系
<span>
在线客服
</span>
</p>
</div>
<div
class=
"success-tip top-tip"
>
<p
class=
"tip-status"
>
<span
class=
"iconfont blue"
>

</span>
<span
class=
"blue"
>
退款完成
</span>
</p>
<p>
退款方式:
<em>
由于银行内部处理流程的差异,储蓄卡需要3-7个工作日到账,信用卡需要7-15个工作日到账
</em></p>
<p
class=
"tip-pad-top"
>
退款账户:
</p>
<p
class=
"tip-pad-top"
>
金额:
</p>
<p
class=
"tip-pad-top"
>
有货币:
</p>
</div>
<div
class=
"return-express"
>
<h4
class=
"third-title"
>
填写物流
</h4>
<p>
请您在
<span
class=
"blue"
>
7月30日24:00
</span>
前将商品寄回并填写物流,逾期将自动取消申请
</p>
<dl
class=
"express-wrap"
>
<dd>
物流公司:
<select>
<option>
顺丰
</option>
<option>
申通
</option>
</select>
</dd>
<dd>
快递单号:
<input
type=
"text"
>
</dd>
<dd>
<span
class=
"submit-express btn"
>
提交
</span>
</dd>
</dl>
</div>
<div
class=
"return-address"
>
<h4
class=
"third-title"
>
寄回地址
</h4>
<p>
地址:
</p>
<p>
收件人:
</p>
<p>
邮编:
</p>
<p>
联系电话:
</p>
</div>
<div
class=
"refund-detail-goods"
>
<ul
class=
"goods-header"
>
<li
class=
"info"
>
商品信息
</li>
<li>
退货原因
</li>
<li>
退货数量
</li>
</ul>
<div
class=
"goods-item clearfix"
>
<div
class=
"img"
>
<img
class=
"lazy"
data-original=
"
{{
image
img
70
90
}}
"
>
</div>
<div
class=
"info"
>
<p>
{{
name
}}
</p>
<p>
颜色:
{{
color
}}
尺码:
{{
size
}}
</p>
<p>
×
{{
num
}}
</p>
</div>
<div
class=
"reason"
>
dsa
{{
reason
}}
</div>
<div
class=
"num"
>
dasd
{{
num
}}
</div>
<dl
class=
"special-info"
>
<dd>
问题描述:
</dd>
<dd>
照片凭证:
</dd>
</dl>
</div>
</div>
</div>
{{/
refundDetail
}}
\ No newline at end of file
...
...
apps/me/views/partial/returns.hbs
View file @
baff9d6
...
...
@@ -3,6 +3,8 @@
{{>
common
/
subtitle
}}
{{>
refund
}}
{{>
refund-detail
}}
{{/
returns
}}
</div>
</div>
...
...
public/scss/me/return/_index.css
View file @
baff9d6
@import
"list"
@import
"list"
;
@import
"refund-detail"
;
...
...
public/scss/me/return/_refund-detail.css
0 → 100644
View file @
baff9d6
.refund-datail-wrap
{
font-size
:
14px
;
.top-tip
{
padding
:
40px
0
20px
;
border-bottom
:
1px
solid
#eee
;
.blue
{
font-size
:
16px
;
line-height
:
16px
;
}
.tip-status
{
padding-bottom
:
20px
;
.iconfont
{
position
:
relative
;
top
:
-1px
;
}
}
.tip-text
{
line-height
:
2
;
padding
:
0
20px
20px
0
;
}
.tip-pad-top
{
padding-top
:
15px
;
}
b
{
font-weight
:
700
;
}
em
{
color
:
#9a9a9a
;
}
.cancel-btn
{
display
:
inline-block
;
}
}
.return-express
{
padding
:
40px
0
20px
;
border-bottom
:
1px
solid
#eee
;
.express-wrap
{
padding-top
:
10px
;
>
dd
{
padding-top
:
12px
;
}
}
.submit-express
{
margin-left
:
74px
;
}
}
.return-address
{
padding
:
40px
0
20px
;
border-bottom
:
1px
solid
#eee
;
>
p
{
padding-top
:
10px
;
}
>
p
:first-child
{
padding-top
:
0
;
}
}
.refund-detail-goods
{
.goods-header
{
height
:
40px
;
line-height
:
40px
;
background-color
:
#f5f5f5
;
border
:
1px
solid
#f1f1f1
;
>
*
{
float
:
left
;
width
:
270px
;
text-align
:
center
;
}
.info
{
width
:
384px
;
padding-left
:
20px
;
text-align
:
left
;
}
}
.goods-item
{
padding
:
30px
0
;
border
:
1px
solid
#f1f1f1
;
border-top
:
0
;
>
*
{
width
:
270px
;
height
:
90px
;
float
:
left
;
text-align
:
center
;
}
.img
{
width
:
100px
;
}
.info
{
width
:
284px
;
text-align
:
left
;
}
.special-info
{
width
:
100%
;
height
:
auto
;
padding-top
:
30px
;
text-align
:
left
;
}
}
}
}
...
...
Please
register
or
login
to post a comment