...
|
...
|
@@ -36,8 +36,9 @@ var ENUM = { |
|
|
'all': 0
|
|
|
},
|
|
|
isVIP: {
|
|
|
'N': '否',
|
|
|
'Y': '是'
|
|
|
"Y": "是",
|
|
|
"N": "否",
|
|
|
"B": "品牌设置"
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
@@ -162,7 +163,7 @@ var g = new common.grid({ |
|
|
|
|
|
}
|
|
|
}, {
|
|
|
display: '商品信息',
|
|
|
display: '商品信息',width:'30%',
|
|
|
render: function(item) {
|
|
|
var productName = item.productName ? item.productName : '',
|
|
|
brandName = item.brandName ? item.brandName : '',
|
...
|
...
|
@@ -397,37 +398,16 @@ var shelveTable = new common.grid({ |
|
|
display: 'SKC上架操作(状态)',
|
|
|
render: function(item) {
|
|
|
if (item.status == 0) {
|
|
|
return '<a class="btn btn-success" data-type="1" data-skc="' + item.productSkc + '" href="javascript:;">点击上架</a>';
|
|
|
return '<a class="btn btn-success" data-type="1" data-index="'+item.__index+'" data-skc="' + item.productSkc + '" href="javascript:;">点击上架</a>';
|
|
|
} else {
|
|
|
return '<a class="btn btn-danger" data-type="0" data-skc="' + item.productSkc + '" href="javascript:;">点击下架</a>';
|
|
|
return '<a class="btn btn-danger" data-type="0" data-index="'+item.__index+'" data-skc="' + item.productSkc + '" href="javascript:;">点击下架</a>';
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
display: 'SKU',
|
|
|
name: 'productSku'
|
|
|
}, {
|
|
|
display: '尺码',
|
|
|
name: 'sizeName'
|
|
|
}, {
|
|
|
display: '库存',
|
|
|
name: 'stock'
|
|
|
}, {
|
|
|
display: 'SKU上架操作',
|
|
|
render: function(item) {
|
|
|
if (item.status == 0) {
|
|
|
return '下架';
|
|
|
} else {
|
|
|
return '上架';
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
display: 'SKU上架操作',
|
|
|
render: function(item) {
|
|
|
if (item.status == 0) {
|
|
|
return '<a class="btn btn-success" data-type="1" data-sku="' + item.productSku + '" href="javascript:;">上架</a>';
|
|
|
} else {
|
|
|
return '<a class="btn btn-danger" data-type="0" data-sku="' + item.productSku + '" href="javascript:;">下架</a>';
|
|
|
}
|
|
|
display: '<div class="subhhead"><span>SKU</span><span>尺码</span><span>库存</span><span>SKU上架操作</span><span>SKU上架操作</span></div>',
|
|
|
render: function(item){
|
|
|
console.log(item);
|
|
|
return "<div class='subhhead'><i>xxx</i><i>尺码</i><i>库存</i><i>SKU上架操作</i><i>SKU上架操作</i></div>";
|
|
|
}
|
|
|
}]
|
|
|
});
|
...
|
...
|
@@ -456,9 +436,10 @@ $('#basicTable').on('click', '.shelve-btn', function() { |
|
|
|
|
|
$(that).removeClass('disabled');
|
|
|
|
|
|
shelveTable.init(res.data.goodsList, 'goodsSizeList');
|
|
|
shelveTable.init(res.data.goodsList);
|
|
|
|
|
|
$('#shelve-table').on('click', '.btn', function() {
|
|
|
var item=res.data.goodsList[$(this).data("index")];
|
|
|
var param = {},
|
|
|
reqUrl = '';
|
|
|
if ($(this).data('skc')) {
|
...
|
...
|
@@ -475,6 +456,9 @@ $('#basicTable').on('click', '.shelve-btn', function() { |
|
|
data: param
|
|
|
}, function(res) {
|
|
|
if (res.code == 200) {
|
|
|
// console.log("res.data.goodsList",res.data.goodsList);
|
|
|
// console.log(res.data);
|
|
|
item.status=(item.status)?0:1;
|
|
|
shelveTable.reload();
|
|
|
//shelveLayer.close();
|
|
|
}
|
...
|
...
|
|