Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe
·
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
weiqingting
9 years ago
Commit
09c883366e9fd093bcbc70e9e145eaeb6bb610f0
1 parent
af686319
update
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
67 deletions
client/js/brand/index.js
client/js/brand/index.js
View file @
09c8833
...
...
@@ -56,10 +56,10 @@ require('../util/datepicker');
HtmArr
.
push
(
'<a href="/erpproduct/brands/edit/'
+
items
.
id
+
'"" class="btn btn-info btn-xs">编辑</a>'
);
}
if
(
items
.
status
===
0
)
{
HtmArr
.
push
(
'<a data-i
d="'
+
items
.
id
+
'" href="JavaScript:;" class="btn btn-warning btn-xs open-brand">开启品牌</a>'
);
HtmArr
.
push
(
'<a data-i
ndex="'
+
items
.
__index
+
'" href="JavaScript:;" class="btn btn-warning btn-xs open-brand">开启品牌</a>'
);
}
if
(
items
.
status
===
1
)
{
HtmArr
.
push
(
'<a data-i
d="'
+
items
.
id
+
'" href="JavaScript:;" class="btn btn-danger btn-xs close-brand">关闭品牌</a>'
);
HtmArr
.
push
(
'<a data-i
ndex="'
+
items
.
__index
+
'" href="JavaScript:;" class="btn btn-danger btn-xs close-brand">关闭品牌</a>'
);
}
return
HtmArr
.
join
(
''
);
}}
...
...
@@ -73,71 +73,27 @@ require('../util/datepicker');
g
.
reload
();
});
var
Bll
=
{
}
// function operateAjax(options, callback) {
// $.ajax({
// type: 'POST',
// url: options.url,
// data: {
// id: options.id,
// status: options.status
// },
// dataType: 'json'
// }).then(function(res) {
// if (res.code === 200) {
// $.gritter.add({
// title: '操作成功',
// class_name: 'growl-success',
// sticky: false,
// time: '1000',
// after_open: function() {
// callback && callback();
// }
// });
// } else {
// $.gritter.add({
// title: '操作失败',
// class_name: 'growl-danger',
// sticky: false,
// time: '1000'
// });
// }
// })
// }
// //关闭品牌操作
// $('tbody').on('click', '.close-brand', function() {
// var that = this,
// id = $(that).data('id');
// $(that).attr('disabled', true);
// operateAjax({
// url: '/brand/edit',
// id: id,
// status: 0
// }, function() {
// g.reload();
// })
// });
// //开启品牌操作
// $('tbody').on('click', '.open-brand', function() {
// var that = this,
// id = $(that).data('id');
// $(that).attr('disabled', true);
// operateAjax({
// url: '/brand/edit',
// id: id,
// status: 1
// }, function() {
// g.reload();
// })
// });
//关闭品牌操作
$
(
'tbody'
).
on
(
'click'
,
'.close-brand'
,
function
()
{
var
item
=
g
.
rows
[
$
(
this
).
data
(
"index"
)];
common
.
util
.
__ajax
({
url
:
'/brand/edit'
,
data
:{
id
:
item
.
id
,
status
:
0
}
},
function
(){
g
.
reload
();
});
});
//开启品牌操作
$
(
'tbody'
).
on
(
'click'
,
'.open-brand'
,
function
()
{
var
item
=
g
.
rows
[
$
(
this
).
data
(
"index"
)];
common
.
util
.
__ajax
({
url
:
'/brand/edit'
,
data
:{
id
:
item
.
id
,
status
:
1
}
},
function
(){
g
.
reload
();
});
});
...
...
Please
register
or
login
to post a comment