Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
mingdan.ge
8 years ago
Commit
7c8b506226dce2e23263bfc3714ff6074babce14
1 parent
9663c051
update
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
73 deletions
dist/yohobuy-portal-fe/5.0.2/jquery/category.Index.js
dist/yohobuy-portal-fe/5.0.2/jquery/operations.salecategory.Index.js
dist/yohobuy-portal-fe/5.0.2/jquery/category.Index.js
View file @
7c8b506
...
...
@@ -81,6 +81,27 @@ webpackJsonp([23],[
}
}
});
//删除物理类目
$
(
document
).
on
(
'click'
,
'.del-class-btn'
,
function
()
{
var
sortId
=
$
(
this
).
parent
().
data
(
'id'
),
sortName
=
$
(
this
).
parent
().
data
(
'name'
);
common
.
dialog
.
confirm
(
"温馨提示"
,
"确定  <b><font color='#ff0000'>删除 </font>【"
+
sortName
+
"】</b> 分类吗?"
,
function
()
{
common
.
util
.
__ajax2
({
url
:
'/erpproduct/sorter/del'
,
data
:
{
param
:
sortId
}
},
function
(
res
){
if
(
res
.
code
==
200
)
{
// g.reload();
$
(
"#filter-btn"
).
click
();
common
.
util
.
__tip
(
"删除成功!"
,
"success"
);
}
})
});
event
.
preventDefault
();
});
$
(
document
).
on
(
'click'
,
'.open-close-btn'
,
function
()
{
...
...
@@ -112,7 +133,8 @@ webpackJsonp([23],[
}
else
{
common
.
util
.
__tip
(
"开启成功!"
,
'success'
);
}
g
.
reload
();
// g.reload();
$
(
"#filter-btn"
).
click
();
}
});
...
...
@@ -120,70 +142,5 @@ webpackJsonp([23],[
}
);
var
$toggleTd
=
$
(
'.toggle-td'
);
;
//列表编辑
var
$table
=
$
(
'.toggle-table'
);
$table
.
click
(
function
(
event
)
{
var
$target
=
$
(
event
.
target
),
id
;
//编辑
if
(
$target
.
hasClass
(
'edit-class-btn'
))
{
}
else
if
(
$target
.
hasClass
(
'open-close-btn'
))
{
var
status
;
if
(
$target
.
attr
(
'data-status'
)
===
'1'
)
{
status
=
0
;
}
else
if
(
$target
.
attr
(
'data-status'
)
===
'0'
)
{
status
=
1
;
}
console
.
log
(
status
);
$
.
ajax
({
type
:
'POST'
,
dataType
:
'json'
,
url
:
status
?
"/erpproduct/sorter/open"
:
"/erpproduct/sorter/close"
,
data
:
{
param
:
$target
.
closest
(
'td'
).
attr
(
'data-id'
)
}
}).
then
(
function
(
data
)
{
console
.
log
(
data
);
if
(
data
.
code
===
200
)
{
$target
.
attr
(
'data-status'
,
status
);
if
(
$target
.
hasClass
(
'btn-danger'
))
{
$target
.
text
(
'开启'
);
$target
.
removeClass
(
'btn-danger'
)
.
addClass
(
'btn-success'
).
closest
(
'td'
).
prev
(
'td'
).
text
(
'关闭'
);
common
.
util
.
__tip
(
"关闭成功!"
,
'success'
);
}
else
{
$target
.
text
(
'关闭'
);
$target
.
removeClass
(
'btn-success'
)
.
addClass
(
'btn-danger'
).
closest
(
'td'
).
prev
(
'td'
).
text
(
'开启'
);
common
.
util
.
__tip
(
"开启成功!"
,
'success'
);
}
}
});
event
.
preventDefault
();
}
});
/***/
}
]);
\ No newline at end of file
...
...
dist/yohobuy-portal-fe/5.0.2/jquery/operations.salecategory.Index.js
View file @
7c8b506
...
...
@@ -409,8 +409,10 @@ webpackJsonp([117],[
}
},
function
(
res
){
if
(
res
.
code
==
200
)
{
$
(
"#category_id_"
+
categoryId
).
find
(
".status"
).
html
(
"<b style='color: #d9534f'>关闭</b>"
);
$
(
"#category_id_"
+
categoryId
).
find
(
".openAndClose"
).
html
(
"<a class='btn btn-warning btn-xs open-category' href='javascript:;'>开启</a>"
);
// $("#category_id_" + categoryId).find(".status").html("<b style='color: #d9534f'>关闭</b>");
// $("#category_id_" + categoryId).find(".openAndClose").html("<a class='btn btn-warning btn-xs open-category' href='javascript:;'>开启</a>");
// g.reload();
$
(
"#filter-btn"
).
click
();
common
.
util
.
__tip
(
"关闭成功!"
,
"success"
);
}
else
{
common
.
util
.
__tip
(
res
.
data
.
message
);
...
...
@@ -425,19 +427,18 @@ webpackJsonp([117],[
categoryName
=
$
(
this
).
parent
().
data
(
'name'
);
common
.
dialog
.
confirm
(
"温馨提示"
,
"确定  <b><font color='#ff0000'>删除 </font>【"
+
categoryName
+
"】</b> 分类吗?"
,
function
()
{
common
.
util
.
__ajax
({
common
.
util
.
__ajax
2
({
url
:
'/sale/salesCategory/delSC'
,
data
:
{
categoryId
:
categoryId
}
},
function
(
res
){
if
(
res
.
code
==
200
)
{
g
.
reload
();
// g.reload();
$
(
"#filter-btn"
).
click
();
common
.
util
.
__tip
(
"删除成功!"
,
"success"
);
}
else
{
common
.
util
.
__tip
(
res
.
data
.
message
);
}
}
,
true
)
})
});
})
...
...
Please
register
or
login
to post a comment