Authored by 马力

Merge branch 'hotfix_预上架时间修复' into grey

... ... @@ -6,7 +6,7 @@ var $ = require('jquery'),
window.batchOperateShelve = [];
// 存储批量上下架中,选中的商品详情
window.batchShelveProduct = [];
window.batchShelveProduct = [];
var ENUM = {
gender: {
... ... @@ -72,14 +72,14 @@ var t = new common.tab2({
active: 4,
click: function () {
var columnname = t.options.columns[t.options.active].name;
g.options.columns[11].hidden = true;
g.options.columns[8].hidden = true;
g.options.columns[12].hidden = true;
g.options.columns[9].hidden = true;
if (columnname == 3) {
isInfoMiss = 'Y';
g.options.columns[11].hidden = false;
g.options.columns[12].hidden = false;
} else {
isInfoMiss = '';
g.options.columns[8].hidden = false;
g.options.columns[9].hidden = false;
}
if (columnname == 1 || columnname == 2 || columnname == 3) {
... ... @@ -151,22 +151,22 @@ var g = new common.grid({
};
},
columns: [{
display: '',
display: '',
type: 'checkbox',
render: function (item) {
var htmlContent = "";
var htmlContent = "";
if(batchOperateShelve.length == 0 ){
htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>";
}else{
htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>";
}else{
$.each(batchOperateShelve,function(n,value) {
if(item.productSkn == value){
htmlContent = "<input type='checkbox' checked='checked' class='wqt_checkbox' data-index='"+item.__index+"'>";
return false
}else{
htmlContent = "<input type='checkbox' class='wqt_checkbox'data-index='"+item.__index+"'>";
htmlContent = "<input type='checkbox' class='wqt_checkbox'data-index='"+item.__index+"'>";
}
})
}
}
return htmlContent;
}
}, {
... ... @@ -322,22 +322,22 @@ var g = new common.grid({
if (item.status == 3 || item.status == 6 ||item.status == 9) {
html += '<p style="color:red;">(' + item.rejectReason + ')</p>'
}
if (item.isAdvance == "Y") {
if (item.advanceBeginTime) {
html += '<br>预售开始时间' + item.advanceBeginTime;
}
if (item.advanceEndTime) {
html += '<br>预售结束时间' + item.advanceEndTime;
}
} else {
if (item.shelveTime&&item.status==1) {
html += '<br>上架时间' + item.shelveTime;
} else if(item.preShelveTime&&(item.status==4||item.status==7)){
html += '<br>预上架时间' + item.preShelveTime;
}
if (item.isAdvance == "Y") {
if (item.advanceBeginTime) {
html += '<br>预售开始时间' + item.advanceBeginTime;
}
//商品为预售商品,上架状态为通过,在【上架状态】列表栏,显示上架时间(为设置的【预售开始时间】)、下架时间(为设置的【预售结束时间】)
//2) 商品为预上架商品,上架状态为通过,在【上架状态】列表栏,显示上架时间(为设置的【预上架时间】)
if (item.advanceEndTime) {
html += '<br>预售结束时间' + item.advanceEndTime;
}
} else {
if (item.shelveTime&&item.status==1) {
html += '<br>上架时间' + item.shelveTime;
} else if(item.preShelveTime&&(item.status==4||item.status==7)){
html += '<br>预上架时间' + item.preShelveTime;
}
}
//商品为预售商品,上架状态为通过,在【上架状态】列表栏,显示上架时间(为设置的【预售开始时间】)、下架时间(为设置的【预售结束时间】)
//2) 商品为预上架商品,上架状态为通过,在【上架状态】列表栏,显示上架时间(为设置的【预上架时间】)
return html;
}
}, {
... ... @@ -379,7 +379,7 @@ var g = new common.grid({
}
HtmArr.push('<br><br><input type="text" style="width:100px" 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"){
intVal_shopsSearchSort = 0;
}else{
... ... @@ -390,7 +390,7 @@ var g = new common.grid({
return HtmArr.join('');
}
}],
complete:function(){
complete:function(){
//渲染表头是否勾选
$.each(pageSkn, function (i, pageItem) {
if($.inArray(pageItem, batchOperateShelve) == -1 ) {
... ... @@ -399,7 +399,7 @@ var g = new common.grid({
return false;
}
$(".wqt_all").prop("checked", true);
$(".wqt_all").prop("checked", true);
});
pageSkn = [];
... ... @@ -440,9 +440,9 @@ function shelveModal(title, html) {
var selectedArr = g.selected,
len = selectedArr.length,
productSknList = [],
shelveLayer = null;
shelveLayer = null;
// $.each(selectedArr, function (i, value) {
// $.each(selectedArr, function (i, value) {
// // productSknList.push(value['productSkn']);
// });
... ... @@ -516,11 +516,11 @@ function shelveModal(title, html) {
url: '/goods/product/updateProductSknTimingInfo',
data: data
}, function (res) {
batchOperateShelve = [] ;
batchShelveProduct = [];
shelveLayer.close();
loadtab();
g.reload();
batchOperateShelve = [] ;
batchShelveProduct = [];
shelveLayer.close();
loadtab();
g.reload();
});
}
});
... ... @@ -531,7 +531,7 @@ function shelveModal(title, html) {
$('#onshelve').on('click', function () {
var htmlContent = "",
sknWarnLayer = null,
skns = "";
skns = "";
if(batchOperateShelve.length == 0 ){
htmlContent = "<div class=\"alert alert-danger\">未选中任何SKN, Please check !</div>"
}else{
... ... @@ -545,19 +545,19 @@ $('#onshelve').on('click', function () {
htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:100% \">"+skns.substr(0,skns.length-1)+"</div>"
}
htmlContent +="<div class=\"form-group\" style=\"float:right \">"+
"<div style=\"margin-right:10% \" class=\"col-sm-1\"><a id = \"confirmSkn\" class=\"btn btn-info\" href=\"javascript:;\">确定</a></div>"
"</div>"
"<div style=\"margin-right:10% \" class=\"col-sm-1\"><a id = \"confirmSkn\" class=\"btn btn-info\" href=\"javascript:;\">确定</a></div>"
"</div>"
sknWarnLayer = common.dialog.open({
title: "待上架SKN",
content: htmlContent
});
$('#confirmSkn').on('click', function () {
$('#confirmSkn').on('click', function () {
sknWarnLayer.close();
shelveModal('上架', $('#onshelve-template').html())
});
});
... ... @@ -766,11 +766,11 @@ $(document).on("click", ".chima-btn", function () {
}, true);
});
/**
*品牌排序
*/
*品牌排序
*/
$(document).on("click", ".brandSort-btn", function () {
var item = g.rows[$(this).data("index")];
var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
var searchSortList = [];
for (var i = 0; i < 1; i++) {
searchSortList[i] = {
... ... @@ -781,37 +781,37 @@ $(document).on("click", ".brandSort-btn", function () {
};
}
common.util.__ajax({
url: '/netSale/saveSearchSort',
data: {
searchSortList: JSON.stringify(searchSortList)
}
url: '/netSale/saveSearchSort',
data: {
searchSortList: JSON.stringify(searchSortList)
}
}
);
});
);
});
/**
*店铺商品排序
*/
*店铺商品排序
*/
$(document).on("click", ".shopsSort-btn", function () {
var item = g.rows[$(this).data("index")];
var num = $("input:text[name='shopsSort']").eq($(this).data("index")).val();
var num = $("input:text[name='shopsSort']").eq($(this).data("index")).val();
var searchSortList = [];
searchSortList.push({
productSkn: item.productSkn,
modelId: 1,
projectId: 5,
intValue: num
});
common.util.__ajax({
url: '/netSale/saveShopsSearchSort',
data: {
searchSortList: JSON.stringify(searchSortList)
}
url: '/netSale/saveShopsSearchSort',
data: {
searchSortList: JSON.stringify(searchSortList)
}
}
);
});
);
});
//当点击“无需测量”,该列输入框不可编辑
common.sizeInfo.check();
\ No newline at end of file
... ...