...
|
...
|
@@ -353,7 +353,7 @@ var g = new common.grid({ |
|
|
}else{
|
|
|
intValue=item.productSearch.intValue;
|
|
|
}
|
|
|
HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
|
|
|
HtmArr.push('<br><br><input type="text" style="width:100px" id="brandSortId" name="brandSort" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
|
|
|
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>');
|
|
|
|
|
|
if(typeof(item.shopsSearchSort) == "undefined"){
|
...
|
...
|
@@ -361,7 +361,7 @@ var g = new common.grid({ |
|
|
}else{
|
|
|
intVal_shopsSearchSort = item.shopsSearchSort.intValue;
|
|
|
}
|
|
|
HtmArr.push('<br><br><input type="text" style="width:100px" name="shopsSort" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>');
|
|
|
HtmArr.push('<br><br><input type="text" style="width:100px" id="shopsSortId" name="shopsSort" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>');
|
|
|
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shopsSort-btn" data-index="' + item.__index + '" >店铺排序</a>');
|
|
|
|
|
|
return HtmArr.join('');
|
...
|
...
|
@@ -405,20 +405,23 @@ function shelveModal(title, html) { |
|
|
var selectedArr = g.selected,
|
|
|
len = selectedArr.length,
|
|
|
productSknList = [],
|
|
|
shelveLayer = null;
|
|
|
shelveLayer = null,
|
|
|
shelveData = {};
|
|
|
|
|
|
if (len <= 0) {
|
|
|
common.util.__tip('请选择要' + title + '的商品', 'warning');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$.each(selectedArr, function(i, value) {
|
|
|
shelveData.num=selectedArr.length;
|
|
|
|
|
|
$.each(selectedArr, function(i, value) {
|
|
|
productSknList.push(value['productSkn']);
|
|
|
});
|
|
|
|
|
|
shelveLayer = common.dialog.open({
|
|
|
title: title,
|
|
|
content: html
|
|
|
content: common.util.__template(html, shelveData),
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
@@ -434,7 +437,14 @@ function shelveModal(title, html) { |
|
|
var e = new common.edit('.shelve-form');
|
|
|
e.init();
|
|
|
|
|
|
$('.shelve-form').on('click', '.btn', function() {
|
|
|
//取消
|
|
|
var nocancel=true;
|
|
|
$('#cancelShelve').on('click', function () {
|
|
|
nocancel=false;
|
|
|
});
|
|
|
|
|
|
|
|
|
$('.shelve-form').on('click', '.btn', function() {
|
|
|
var type = $(this).data('type');
|
|
|
$(this).closest('.form-group').find('input').attr('required', true)
|
|
|
.end().siblings('.form-group').find('input').attr('required', false);
|
...
|
...
|
@@ -463,7 +473,7 @@ function shelveModal(title, html) { |
|
|
data.type=type;
|
|
|
}
|
|
|
}
|
|
|
if(!isValidate){
|
|
|
if(!isValidate&&nocancel){
|
|
|
common.util.__ajax({
|
|
|
url:'/product/updateProductSknTimingInfo',
|
|
|
data:data
|
...
|
...
|
@@ -477,7 +487,17 @@ function shelveModal(title, html) { |
|
|
}
|
|
|
//批量skn上架
|
|
|
$('#onshelve').on('click', function() {
|
|
|
shelveModal('上架', $('#onshelve-template').html());
|
|
|
var selectedArr = g.selected;
|
|
|
if (selectedArr.length == 0) {
|
|
|
common.util.__tip("未选中任何SKN, 请核实!", 'warning');
|
|
|
return false;
|
|
|
} else {
|
|
|
if (selectedArr[0].isAdvance === 'N') {
|
|
|
shelveModal('普通商品上架', $('#common-onshelve-template').html());
|
|
|
} else {
|
|
|
shelveModal('预售商品上架', $('#presell-onshelve-template').html());
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
//批量skn下架
|
|
|
$('#offshelve').on('click', function() {
|
...
|
...
|
@@ -694,6 +714,12 @@ $(document).on("click", ".chima-btn", function () { |
|
|
/**
|
|
|
*品牌排序
|
|
|
*/
|
|
|
/*验证 hack*/
|
|
|
$(document).on('keyup', '#brandSortId', function() {
|
|
|
$(this).val($(this).val().replace(/\D/g, ''));
|
|
|
});
|
|
|
|
|
|
|
|
|
$(document).on("click", ".brandSort-btn", function () {
|
|
|
var item = g.rows[$(this).data("index")];
|
|
|
var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
|
...
|
...
|
@@ -717,6 +743,12 @@ $(document).on("click", ".brandSort-btn", function () { |
|
|
/**
|
|
|
*店铺商品排序
|
|
|
*/
|
|
|
/*验证 hack*/
|
|
|
$(document).on('keyup', '#shopsSortId', function() {
|
|
|
$(this).val($(this).val().replace(/\D/g, ''));
|
|
|
});
|
|
|
|
|
|
|
|
|
$(document).on("click", ".shopsSort-btn", function () {
|
|
|
var item = g.rows[$(this).data("index")];
|
|
|
var num = $("input:text[name='shopsSort']").eq($(this).data("index")).val();
|
...
|
...
|
|