...
|
...
|
@@ -365,7 +365,7 @@ function shelveModal(title, html) { |
|
|
// $('#shelveTime').parents('.form-group').next(".form-group").find('.btn').addClass('disabled');
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
|
g.selected.forEach(function(item){
|
|
|
if(item.isAdvance === 'N'){
|
|
|
$('#advanceBeginTime, #advanceEndTime').prop('disabled', true);
|
...
|
...
|
@@ -379,39 +379,41 @@ 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);
|
|
|
var data={};
|
|
|
var data={},isValidate=false;
|
|
|
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;
|
|
|
if(type=="5"){
|
|
|
data.advanceBeginTime=$("#advanceBeginTime").val();
|
|
|
data.advanceEndTime=$("#advanceEndTime").val();
|
|
|
if(!(data.advanceEndTime&&data.advanceEndTime)){
|
|
|
isValidate=true;
|
|
|
e.$tip("请填写预售时间");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
data.type=5;
|
|
|
}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();
|
|
|
}, 'growl-success');
|
|
|
} else {
|
|
|
//e.$tip(res.data.message);
|
|
|
var html = '';
|
|
|
$.each(res.data, function(key, value) {
|
|
|
html += key + ':' + value + '<br>';
|
|
|
});
|
|
|
e.$tip(html);
|
|
|
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;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
if(!isValidate){
|
|
|
common.util.__ajax({
|
|
|
url:'/goods/product/updateProductSknTimingInfo',
|
|
|
data:data
|
|
|
},function(res){
|
|
|
shelveLayer.close();
|
|
|
loadtab();
|
|
|
g.reload();
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//批量skn上架
|
...
|
...
|
|