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
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
cb791309176bcdf3a5ce897be8af8b07322aa312
2 parents
4576784a
7c358e56
Merge branch 'fix/issue' into 'develop'
结算时如有库存不足的商品,显示库存不足商品种类数量 See merge request !79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
static/js/cart/cart.js
static/js/cart/cart.js
View file @
cb79130
...
...
@@ -26,6 +26,8 @@ var navHammer,
var
isRefreshByDelete
=
window
.
cookie
(
'_yoho-cart-refreshByDelete'
)
===
'true'
?
true
:
false
;
var
lowStockCount
=
0
;
loading
.
showLoadingMask
();
...
...
@@ -93,8 +95,8 @@ function shouldLowStocks() {
$lowStocks
.
each
(
function
(
idx
,
item
)
{
if
(
$
(
item
).
parent
().
parent
().
parent
().
siblings
(
'.checkbox'
).
hasClass
(
'icon-cb-checked'
))
{
lowStockCount
+=
1
;
result
=
true
;
return
false
;
}
});
...
...
@@ -185,8 +187,9 @@ if ($('.freebie').length > 0) {
}
$
(
'.btn-balance'
).
on
(
'touchend'
,
function
()
{
lowStockCount
=
0
;
if
(
shouldLowStocks
())
{
tip
.
show
(
'所选商品中
含有
库存不足的商品'
);
tip
.
show
(
'所选商品中
有'
+
lowStockCount
+
'种
库存不足的商品'
);
return
false
;
}
...
...
Please
register
or
login
to post a comment