...
|
...
|
@@ -30,7 +30,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
dblClickToEdit: false,
|
|
|
columns: [
|
|
|
[
|
|
|
//{checkbox: true},
|
|
|
{checkbox: true},
|
|
|
{field: 'id', title: __('Id')},
|
|
|
{field: 'name', title: __('Name')},
|
|
|
{field: 'address', title: __('Address')},
|
...
|
...
|
@@ -60,7 +60,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
Table.api.bindevent(table);
|
|
|
|
|
|
//上架
|
|
|
$(document).on("click",".btn-btn-change1All",function (e) {
|
|
|
$(document).on("click",".btn-change1All",function (e) {
|
|
|
var temp=table.bootstrapTable('getSelections');
|
|
|
var arr = [];
|
|
|
$.each(temp, function(key, value){
|
...
|
...
|
@@ -86,7 +86,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
});
|
|
|
|
|
|
//下架
|
|
|
$(document).on("click",".btn-btn-changeAll",function (e) {
|
|
|
$(document).on("click",".btn-changeAll",function (e) {
|
|
|
var temp=table.bootstrapTable('getSelections');
|
|
|
var arr = [];
|
|
|
$.each(temp, function(key, value){
|
...
|
...
|
@@ -110,6 +110,32 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
//下架
|
|
|
$(document).on("click",".btn-deleteAll",function (e) {
|
|
|
var temp=table.bootstrapTable('getSelections');
|
|
|
var arr = [];
|
|
|
$.each(temp, function(key, value){
|
|
|
arr.push(value.id);
|
|
|
});
|
|
|
$.ajax({
|
|
|
type : "POST",
|
|
|
url : "store/deleteAll",
|
|
|
data : {
|
|
|
arr : arr,
|
|
|
},
|
|
|
dataType: "json",
|
|
|
success : function (data) {
|
|
|
if (data.code === 1) {
|
|
|
Layer.msg('删除成功');
|
|
|
Layer.closeAll();
|
|
|
$('.btn-refresh').trigger('click')
|
|
|
} else {
|
|
|
Layer.msg('删除失败');
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
add: function () {
|
|
|
Controller.api.bindevent();
|
...
|
...
|
|