...
|
...
|
@@ -23,9 +23,6 @@ $('.hasDatepicker').fdatepicker({ |
|
|
format: 'yyyy-mm-dd'
|
|
|
});
|
|
|
|
|
|
var btnAuthority = JSON.parse($("#btnAuthority").val());
|
|
|
|
|
|
|
|
|
var g = new common.grid({
|
|
|
el: '#basicTable',
|
|
|
size: 10,
|
...
|
...
|
@@ -69,10 +66,8 @@ var g = new common.grid({ |
|
|
name: "status",
|
|
|
render: function(items) {
|
|
|
var HtmArr = [];
|
|
|
HtmArr.push('<a href="/erpproduct/brands/edit/' + items.id + '"" class="btn btn-info btn-xs">编辑</a>');
|
|
|
|
|
|
if (btnAuthority.edit) {
|
|
|
HtmArr.push('<a href="/erpproduct/brands/edit/' + items.id + '"" class="btn btn-info btn-xs">编辑</a>');
|
|
|
}
|
|
|
if (items.status === 0) {
|
|
|
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-warning btn-xs open-brand">开启品牌</a>');
|
|
|
}
|
...
|
...
|
@@ -83,7 +78,7 @@ var g = new common.grid({ |
|
|
}
|
|
|
}]
|
|
|
})
|
|
|
g.init($("#gridurl").val());
|
|
|
g.init('/brand/getBrandList');
|
|
|
|
|
|
$("#filter-btn").click(function() {
|
|
|
g.reload(1);
|
...
|
...
|
@@ -100,7 +95,6 @@ $('tbody').on('click', '.close-brand', function() { |
|
|
status: 0
|
|
|
}
|
|
|
}, function(res) {
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
common.util.__tip('关闭品牌成功', 'success');
|
|
|
g.reload();
|
...
|
...
|
@@ -119,7 +113,6 @@ $('tbody').on('click', '.open-brand', function() { |
|
|
status: 1
|
|
|
}
|
|
|
}, function(res) {
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
common.util.__tip('开启品牌成功', 'success');
|
|
|
g.reload();
|
...
|
...
|
|