Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王洪广
9 years ago
Commit
9e05d8c10bee3ce7f9161134d171e3c8661eec3e
1 parent
42c5357f
增加修改订单
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
66 deletions
template/www.yohobuy.com/partials/home/order-cancel-tpl.phtml
web-static/js/home/order-block.js
web-static/sass/home/_order-block.css
template/www.yohobuy.com/partials/home/order-cancel-tpl.phtml
View file @
9e05d8c
<script id="cancel-dialog-tpl" type="text/html">
<header>您取消订单的原因是:</header>
<ul>
<li>
<input id="cancel-radio-1" type="radio" name="cancel-reason" value="1">
<label for="cancel-radio-1">支付不成功</label>
</li>
<li>
<input id="cancel-radio-2" type="radio" name="cancel-reason" value="2">
<label for="cancel-radio-2">现在不想购买</label>
</li>
<li>
<input id="cancel-radio-3" type="radio" name="cancel-reason" value="3">
<label for="cancel-radio-3">订单价格有问题</label>
</li>
<li>
<input id="cancel-radio-4" type="radio" name="cancel-reason" value="4">
<label for="cancel-radio-4">修改订单信息</label>
</li>
<li>
<input id="cancel-radio-5" type="radio" name="cancel-reason" value="5">
<label for="cancel-radio-5">错误或重复下单</label>
</li>
<li>
<input id="cancel-radio-6" type="radio" name="cancel-reason" value="6">
<label for="cancel-radio-6">忘记使用优惠券或YOHO币</label>
</li>
<li>
<input id="cancel-radio-7" type="radio" name="cancel-reason" value="7">
<label for="cancel-radio-7">等待发货时间过长</label>
</li>
<li>
<input id="cancel-radio-8" type="radio" name="cancel-reason" value="8">
<label for="cancel-radio-8">商品价格较贵</label>
</li>
<li>
<input id="cancel-radio-9" type="radio" name="cancel-reason" value="9">
<label for="cancel-radio-9">运费过高</label>
</li>
<li>
<input id="cancel-radio-10" type="radio" name="cancel-reason" value="10">
<label for="cancel-radio-10">其他原因</label>
<input type="text" placeholder="50字以内">
</li>
<header>取消订单</header>
<p class="tip">您取消订单的原因是:</p>
<ul class="cancel-reason clearfix">
{{# cancelReason}}
<li {{#if @last}}style="width:100%;"{{/if}}>
<input id="cancel-radio-{{id}}" type="radio" name="cancel-reason" value="{{id}}">
<label for="cancel-radio-{{id}}">{{reason}}</label>
{{#if @last}}<input type="text" id="reason_other" placeholder="50字以内" maxlength="50">{{/if}}
</li>
{{/ cancelReason}}
</ul>
<p class="tip reminder">温馨提示:</p>
<ul class="info-prompt">
<li><i>*</i>订单成功取消后无法恢复</li>
<li><i>*</i>该订单已付金额将原路返回</li>
<li><i>*</i>取消订单后,存在促销关系的子订单及优惠可能会一并取消</li>
</ul>
<p class="cancel-tip"></p>
</script>
<script id="dialog-success" type="text/html">
</script>
\ No newline at end of file
...
...
web-static/js/home/order-block.js
View file @
9e05d8c
...
...
@@ -28,18 +28,23 @@ function cancelFactory(id) {
cb
:
function
()
{
var
$checked
=
$
(
'.cancel-dialog :checked'
);
var
$tip
=
$
(
'.cancel-dialog .cancel-tip'
);
var
text
=
''
;
if
(
$checked
.
val
()
===
'10'
)
{
text
=
$checked
.
parent
().
find
(
'#reason_other'
).
val
();
}
else
{
text
=
$checked
.
siblings
(
'label'
).
text
();
}
if
(
$checked
.
length
===
0
)
{
$tip
.
html
(
'请选择要取消订单的原因'
);
return
;
}
$
.
ajax
({
type
:
'POST'
,
url
:
'/home/orders/cancelorder'
,
data
:
{
orderCode
:
id
,
reason
:
$checked
.
val
()
reasonId
:
$checked
.
val
(),
reason
:
text
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
)
{
...
...
@@ -53,7 +58,7 @@ function cancelFactory(id) {
},
{
id
:
'cancel-no'
,
name
:
'取消'
,
name
:
'
暂不
取消'
,
btnClass
:
[
'cancel-no'
],
cb
:
function
()
{
active
.
close
();
...
...
web-static/sass/home/_order-block.css
View file @
9e05d8c
...
...
@@ -282,22 +282,32 @@
}
.cancel-dialog
{
width
:
600px
;
background
:
#fff
;
padding
:
20px
30px
35px
30px
;
header
{
font-size
:
14px
;
padding-bottom
:
10px
;
border-bottom
:
1px
dotted
#a7a7a7
;
font-size
:
18px
;
padding-bottom
:
20px
;
border-bottom
:
1px
solid
#e8e8e8
;
color
:
#000
;
text-align
:
left
;
}
ul
{
.close
{
top
:
15px
;
right
:
30px
;
.iconfont{
font-size
:
30px
;
}
}
.cancel-reason
{
text-align
:
left
;
padding
:
10px
0
0
25px
;
li
{
float
:
left
;
width
:
50%
;
height
:
28px
;
line-height
:
28px
;
font-size
:
1
2
px
;
font-size
:
1
4
px
;
}
label
{
...
...
@@ -314,35 +324,61 @@
.cancel-tip
{
margin-top
:
20px
;
color
:
#d60248
;
font-size
:
12px
;
padding-left
:
30px
;
font-size
:
14px
;
padding-left
:
17px
;
text-align
:
left
;
}
.btns
{
padding
:
15px
30px
;
text-align
:
left
;
padding
:
15px
30px
0
;
text-align
:
center
;
.btn
{
height
:
35px
;
font-size
:
1
2
px
;
font-size
:
1
5
px
;
line-height
:
35px
;
}
.cancel-sure
{
width
:
130px
;
border-radius
:
3px
;
color
:
#fff
;
background
:
#
d60248
;
background
:
#
000
;
border
:
none
;
}
.cancel-no
{
background
:
#eaeaea
;
border-radius
:
3px
;
color
:
#999
;
border-color
:
#ebebeb
;
width
:
66px
;
margin-left
:
30px
;
background
:
#fff
;
color
:
#000
;
border-color
:
#000
;
width
:
126px
;
}
}
.tip
{
margin
:
20px
0
;
font-size
:
12px
;
text-align
:
left
;
color
:
#db3d50
;
}
.reminder
{
margin
:
20px
0
10px
;
}
.info-prompt
{
ul{
margin-top
:
-10px
;
}
li
{
margin
:
10px
0
;
font-size
:
14px
;
line-height
:
16px
;
text-align
:
left
;
}
i
{
color
:
#d70400
;
font-family
:
SimSun
;
font-size
:
16px
;
margin-right
:
10px
;
vertical-align
:
-6px
;
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment