Authored by 马力

商品网销相关优化

... ... @@ -121,4 +121,5 @@ module.exports=function(app) {
app.post("/basegoods/queryProductColors","basegoods_queryProductColors");
app.post("/basegoods/queryProductLabels","basegoods_queryProductLabels");
}
\ No newline at end of file
... ...
... ... @@ -219,7 +219,14 @@ module.exports={
params:[
{name: "productSkn",type:"String"}
]
}
},
queryProductLabels: {
title: '查询SKN的默认封面图',
url: '/productLabelController/queryProductLabels',
params:[
{name: "params",type:"String"}
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -53,13 +53,21 @@ var ENUM = {
"N": "非JIT"
},
APPType: {
0: "有货平台",
1: "BLK平台"
0: "非BLK",
1: "BLK"
},
isOutLets: {
'Y': "奥莱",
'N': "非奥莱",
'B':"非奥莱"
},
isLimited: {
'Y': "限量",
'N': "非限量"
},
isLimitbuy: {
'Y': "限购",
'N': "非限购"
}
};
... ... @@ -276,6 +284,7 @@ var g = new common.grid({
}, {
display: '商品页签',
//name: 'attribute', //商品属性(1普通、2赠品等) 商品类别
width: '4%',
render: function (item) {
var html = [];
if (item.attribute) {
... ... @@ -290,7 +299,13 @@ var g = new common.grid({
if (item.isOutlets) {
html.push("<p>"+ENUM.isOutLets[item.isOutlets]+"</p>");
}
return html.join('');
if (item.isLimited) {
html.push("<p>" + ENUM.isLimited[item.isLimited] + "</p>");
}
if (item.isLimitbuy) {
html.push("<p>" + ENUM.isLimitbuy[item.isLimitbuy] + "</p>");
}
return '<div id="property_'+ item.__index + '" data-skn="'+ item.productSkn + '">' + html.join('') + '</div>';
}
},{
display: "是否预售",
... ... @@ -322,6 +337,7 @@ var g = new common.grid({
}
}, {
display: '搜索/标签',
width: '10%',
hidden: false,
render: function (item) {
var searchAndLabel = item.searchAndLabel ? item.searchAndLabel : '',
... ... @@ -402,6 +418,7 @@ var g = new common.grid({
name: 'skcNum'
},{
display: '操作',
width: '10%',
render: function (item) {
var HtmArr = [];
var intValue ;
... ... @@ -460,6 +477,8 @@ var g = new common.grid({
$(".wqt_all").prop("checked", true);
});
getProductLabeldata(pageSkn); // 异步查询商品标签的填充到商品标签那一列
pageSkn = [];
}
});
... ... @@ -944,3 +963,21 @@ $(document).on("click", ".status-log-btn", function () {
}
}, true);
});
// 查询商品标签的异步请求
function getProductLabeldata(SknList) {
var dataObj = {}
dataObj.params = "[2112,8989]";//JSON.stringify(SknList);
common.util.__ajax({
url: '/basegoods/queryProductLabels',
data: dataObj
}, function (res) {
if (res.code == 200) {
$.each(res.data, function (i, value) {
//data.productSknList.push(value['productSkn']);
});
}
});
}
\ No newline at end of file
... ...