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
biao
9 years ago
Commit
a0eeafbb2b4528b92ff9b481a7db33fc0aea65e8
1 parent
cb610ab7
update for status when payleft is 0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
8 deletions
apps/me/models/order.js
apps/me/views/partial/order/detail/order-status.hbs
apps/me/views/partial/order/table-body.hbs
public/js/me/order/countdown.js
apps/me/models/order.js
View file @
a0eeafb
...
...
@@ -264,6 +264,7 @@ const _getUserOrder = (uid, type, page) => {
orderList
.
forEach
(
item
=>
{
const
ot
=
parseInt
(
item
.
orderType
,
10
);
const
st
=
parseInt
(
item
.
status
,
10
);
const
payleftTime
=
parseInt
(
item
.
payLefttime
,
10
);
let
hasRefund
=
false
;
let
canRefund
=
false
;
...
...
@@ -293,7 +294,7 @@ const _getUserOrder = (uid, type, page) => {
// 没有取消订单并且状态为0的时候显示付款按钮
if
(
item
.
isCancel
===
'N'
&&
st
===
0
)
{
st
===
0
&&
payleftTime
!==
0
)
{
item
.
showPayButton
=
true
;
}
...
...
@@ -315,6 +316,10 @@ const _getUserOrder = (uid, type, page) => {
if
(
item
.
isCancel
===
'Y'
)
{
item
.
showBuyBtn
=
true
;
item
.
statusStr
=
'已取消'
;
}
else
if
(
payleftTime
===
0
)
{
item
.
showBuyBtn
=
true
;
item
.
showPayButton
=
false
;
item
.
statusStr
=
'已取消'
;
}
else
if
(
item
.
isOnlinePaid
)
{
item
.
statusStr
=
statusMap
[
st
].
valueStr
;
}
...
...
@@ -541,6 +546,14 @@ const getOrderDetail = (uid, code) => {
detail
.
invoice
=
false
;
}
if
(
detail
.
payLefttime
===
'0'
)
{
detail
.
showLeftTime
=
false
;
detail
.
statusStr
=
'已取消'
;
detail
.
steps
=
false
;
detail
.
btns
=
false
;
}
detail
.
paymentTypeStr
=
paymentTypeStr
[
detail
.
paymentType
];
detail
.
allAddress
=
detail
.
area
+
detail
.
address
;
...
...
apps/me/views/partial/order/detail/order-status.hbs
View file @
a0eeafb
...
...
@@ -2,7 +2,7 @@
<div
class=
"basic"
>
<p>
订单号:
{{
orderCode
}}
</p>
<p>
订单状态:
{{
statusStr
}}
</p>
<div
class=
"edit-btns"
>
<div
class=
"edit-btns
hide-when-invalid
"
>
<ul>
{{#
btns
}}
<li>
...
...
@@ -22,9 +22,9 @@
{{#if
showLeftTime
}}
<div
class=
"time"
>
<span>
剩余支付时间:
</span>
<span
class=
"iconfont"
>

</span>
<span
class=
"iconfont
hide-when-invalid
"
>

</span>
<p
class=
"left-time"
data-left=
{{
payLefttime
}}
>
</p
>
<span
class=
"tip"
>
(逾期订单将自动取消)
</span>
<span
class=
"tip
hide-when-invalid
"
>
(逾期订单将自动取消)
</span>
</div>
{{/if}}
...
...
apps/me/views/partial/order/table-body.hbs
View file @
a0eeafb
...
...
@@ -22,12 +22,12 @@
{{#if
showPayButton
}}
<div
class=
"pay-operation"
>
{{#if
isOnlinePaid
}}
<span
class=
"iconfont"
>

</span><p
class=
"left-time"
data-left=
"
{{
payLefttime
}}
"
></p>
<span
class=
"iconfont
hide-when-invalid
"
>

</span><p
class=
"left-time"
data-left=
"
{{
payLefttime
}}
"
></p>
<a
href=
"
{{
payUrl
}}
"
>
<span
class=
"btn red"
>
立即付款
</span>
</a>
<span
class=
"btn red hide-when-invalid"
>
立即付款
</span>
</a>
{{/if}}
<p
class=
"subtext cancel"
>
取消订单
</p>
<p
class=
"subtext cancel
hide-when-invalid
"
>
取消订单
</p>
</div>
{{/if}}
{{#if
showEditOption
}}
...
...
public/js/me/order/countdown.js
View file @
a0eeafb
...
...
@@ -31,6 +31,7 @@ module.exports = {
if
(
src
<=
0
)
{
timeStr
=
'已失效'
;
$
(
'.hide-when-invalid'
).
hide
();
return
timeStr
;
}
...
...
Please
register
or
login
to post a comment