...
|
...
|
@@ -347,7 +347,6 @@ function shelveModal(title, html) { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
console.log(g.selected);
|
|
|
$.each(selectedArr, function(i, value) {
|
|
|
productSknList.push(value['productSkn']);
|
|
|
});
|
...
|
...
|
@@ -369,13 +368,26 @@ function shelveModal(title, html) { |
|
|
var type = $(this).data('type');
|
|
|
$(this).closest('.form-group').find('input').attr('required', true)
|
|
|
.end().siblings('.form-group').find('input').attr('required', false);
|
|
|
|
|
|
e.submit('/goods/product/updateProductSknTimingInfo', function(option) {
|
|
|
option.data.productSknList = JSON.stringify(productSknList);
|
|
|
option.data.type = type;
|
|
|
option.success = function(res) {
|
|
|
if (res.data.code == 200) {
|
|
|
e.$tip(res.data.message, function() {
|
|
|
var data={};
|
|
|
data.productSknList = JSON.stringify(productSknList);
|
|
|
if($("#shelveTime").val()){
|
|
|
if(type=="1"){
|
|
|
data.shelveTime=$("#shelveTime").val();
|
|
|
data.type=3;
|
|
|
}else{
|
|
|
data.onNewTime=$("#shelveTime").val();
|
|
|
data.type=4;
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
data.type=type;
|
|
|
}
|
|
|
common.util.__ajax({
|
|
|
url:'/goods/product/updateProductSknTimingInfo',
|
|
|
data:data
|
|
|
},function(res){
|
|
|
if (res.code == 200) {
|
|
|
e.$tip(res.message, function() {
|
|
|
shelveLayer.close();
|
|
|
loadtab();
|
|
|
g.reload();
|
...
|
...
|
@@ -383,13 +395,32 @@ function shelveModal(title, html) { |
|
|
} else {
|
|
|
//e.$tip(res.data.message);
|
|
|
var html = '';
|
|
|
$.each(res.data.data, function(key, value) {
|
|
|
$.each(res.data, function(key, value) {
|
|
|
html += key + ':' + value + '<br>';
|
|
|
});
|
|
|
e.$tip(html);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
// e.submit('/goods/product/updateProductSknTimingInfo', function(option) {
|
|
|
// option.data.productSknList = JSON.stringify(productSknList);
|
|
|
// option.data.type = type;
|
|
|
// option.success = function(res) {
|
|
|
// if (res.data.code == 200) {
|
|
|
// e.$tip(res.data.message, function() {
|
|
|
// shelveLayer.close();
|
|
|
// loadtab();
|
|
|
// g.reload();
|
|
|
// }, 'growl-success');
|
|
|
// } else {
|
|
|
// //e.$tip(res.data.message);
|
|
|
// var html = '';
|
|
|
// $.each(res.data.data, function(key, value) {
|
|
|
// html += key + ':' + value + '<br>';
|
|
|
// });
|
|
|
// e.$tip(html);
|
|
|
// }
|
|
|
// }
|
|
|
// });
|
|
|
});
|
|
|
}
|
|
|
//批量skn上架
|
...
|
...
|
@@ -543,15 +574,28 @@ $(document).on("click", ".btnsku", function() { |
|
|
|
|
|
$(document).on("change", ".wqt_checkbox,.wqt_all", function() {
|
|
|
var _count1 = 0,
|
|
|
_count2 = 0;
|
|
|
_count2 = 0,
|
|
|
_isAdvance0=0,
|
|
|
_isAdvance1=0;
|
|
|
$.each(g.selected, function(index, item) {
|
|
|
console.log(item.isAdvance);
|
|
|
/*添加兼容逻辑*/
|
|
|
if (item.status == 8 || item.status == 3 || item.status == 2 || item.status == 0) {
|
|
|
_count1++; //上
|
|
|
} else {
|
|
|
_count2++; //下
|
|
|
}
|
|
|
if(item.isAdvance=="N"){
|
|
|
_isAdvance0++;
|
|
|
}
|
|
|
if(item.isAdvance=="Y"){
|
|
|
_isAdvance1++;
|
|
|
}
|
|
|
|
|
|
});
|
|
|
if(_isAdvance0&&_isAdvance1){
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (_count1 == g.selected.length) {
|
|
|
$('#onshelve').removeClass('disabled');
|
...
|
...
|
|