...
|
...
|
@@ -382,8 +382,18 @@ 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(type=="5"){
|
|
|
data.advanceBeginTime=$("#advanceBeginTime").val();
|
|
|
data.advanceEndTime=$("#advanceEndTime").val();
|
|
|
if(!(data.advanceEndTime&&data.advanceEndTime)){
|
|
|
isValidate=true;
|
|
|
e.$tip("请填写预售时间");
|
|
|
return;
|
|
|
}
|
|
|
data.type=5;
|
|
|
}else{
|
|
|
if($("#shelveTime").val()){
|
|
|
if(type=="1"){
|
|
|
data.shelveTime=$("#shelveTime").val();
|
...
|
...
|
@@ -396,26 +406,18 @@ function shelveModal(title, html) { |
|
|
}else{
|
|
|
data.type=type;
|
|
|
}
|
|
|
}
|
|
|
if(!isValidate){
|
|
|
common.util.__ajax({
|
|
|
url:'/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);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
//批量skn上架
|
|
|
$('#onshelve').on('click', function() {
|
...
|
...
|
|