Authored by zhaoqing

Merge branch 'dev_详情页选择隐藏尺码' into test6.5.5

... ... @@ -452,9 +452,9 @@ var g = new common.grid({
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shelve-btn" data-index="' + item.__index + '">上/下架</a>');
HtmArr.push('<a target="_blank" href="/goods/netsale/info/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs info-btn">查看</a>');
if(item.showSize == 0){
HtmArr.push('<a href="javascript:;" onclick="changeShowSize(1,item.productSkn)" class="btn btn-danger btn-xs" data-index="' + item.__index + '">隐藏尺码</a>')
HtmArr.push('<a href="javascript:;" class="btn btn-danger btn-xs closeStatus" data-index="' + item.__index + '">隐藏尺码</a>')
}else if(item.showSize == 1){
HtmArr.push('<a href="javascript:;" onclick="changeShowSize(2,item.productSkn)" class="btn btn-success btn-xs" data-index="' + item.__index + '">展示尺码</a>')
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs openStatus" data-index="' + item.__index + '">展示尺码</a>')
}
HtmArr.push('<br><a href="javascript:;" class="btn btn-success btn-xs chima-btn" data-index="' + item.__index + '">尺码</a>');
// HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs status-log-btn" data-value="' + item.productSkn + '">操作日志</a>');
... ... @@ -987,13 +987,34 @@ $(document).on("click", ".status-log-btn", function () {
}
}, true);
});
function changeShowSize(status,skn) {
alert(status);
$(document).on("click", ".closeStatus", function () {
var item = g.rows[$(this).data("index")];
var productSkn = item.productSkn;
alert(productSkn);
return;
common.util.__ajax({
url: '/goods/product/changeProductShowSize',
data: {
productSkn : productSkn,
showSize: 1
}
}, function (res) {
if (res.code == 200) {
common.util.__tip(res.message,"success");
}else {
common.util.__tip(res.message,"success");
}
}, true);
}
$(document).on("click", ".openStatus", function () {
var item = g.rows[$(this).data("index")];
var productSkn = item.productSkn;
common.util.__ajax({
url: '/goods/product/changeProductShowSize',
data: {
productSkn : skn,
showSize: status
productSkn : productSkn,
showSize: 0
}
}, function (res) {
if (res.code == 200) {
... ...