...
|
...
|
@@ -148,21 +148,40 @@ var g = new common.grid({ |
|
|
display: '图片',
|
|
|
name: 'picImgUrl',
|
|
|
render: function(item) {
|
|
|
return '<img src="' + item.picImgUrl + '">';
|
|
|
if (item.picImgUrl) {
|
|
|
return '<img src="' + item.picImgUrl + '" width="100" height="60">';
|
|
|
} else {
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
display: '商品信息',
|
|
|
render: function(item) {
|
|
|
return '<p><strong>名称:</strong>' + item.productName + '</p>' +
|
|
|
'<p><strong>品牌:</strong>' + item.brandName + '</p>' +
|
|
|
'<p><strong>类目:</strong>' + item.maxSortName + '/' + item.middleSortName + '</p>';
|
|
|
var productName = item.productName ? item.productName : '',
|
|
|
brandName = item.brandName ? item.brandName : '',
|
|
|
maxSortName = item.maxSortName ? item.maxSortName : '',
|
|
|
middleSortName = item.middleSortName ? item.middleSortName : '',
|
|
|
html = '';
|
|
|
|
|
|
html += '<p><strong>名称:</strong>' + productName + '</p>';
|
|
|
html += '<p><strong>品牌:</strong>' + brandName + '</p>';
|
|
|
html += '<p><strong>类目:</strong>' + maxSortName;
|
|
|
if (middleSortName) {
|
|
|
html += '/' + middleSortName;
|
|
|
}
|
|
|
|
|
|
return html + '</p>';
|
|
|
}
|
|
|
}, {
|
|
|
display: '售价',
|
|
|
render: function(item) {
|
|
|
return '<p><strong>吊牌价:</strong>' + item.retailPrice + '</p>' +
|
|
|
'<p><strong>销售价:</strong>' + item.salesPrice + '</p>' +
|
|
|
'<p><strong>是否VIP:</strong>' + item.isVIP + '</p>';
|
|
|
var vip = item.isVIP ? item.isVIP : '',
|
|
|
retailPrice = item.retailPrice ? item.retailPrice : '',
|
|
|
salesPrice = item.salesPrice ? item.salesPrice : '';
|
|
|
return '<p><strong>吊牌价:</strong>' + retailPrice + '</p>' +
|
|
|
'<p><strong>销售价:</strong>' + salesPrice + '</p>' +
|
|
|
'<p><strong>是否VIP:</strong>' + vip + '</p>';
|
|
|
/*'<p style="color: #ccc;"><strong>yoho币:</strong>' + item.returnCoin + '</p>';*/
|
|
|
}
|
|
|
}, {
|
...
|
...
|
@@ -170,24 +189,43 @@ var g = new common.grid({ |
|
|
name: 'stock'
|
|
|
}, {
|
|
|
display: '年龄层/性别',
|
|
|
name: 'vip_discount_type',
|
|
|
render: function(item) {
|
|
|
return ENUM.ageLevel[item.ageLevel] + '/' + ENUM.gender[item.gender];
|
|
|
var html = '';
|
|
|
|
|
|
if (item.ageLevel) {
|
|
|
html += ENUM.ageLevel[item.ageLevel];
|
|
|
if (item.gender) {
|
|
|
html += '/';
|
|
|
}
|
|
|
}
|
|
|
if (item.gender) {
|
|
|
html += ENUM.gender[item.gender]
|
|
|
}
|
|
|
return html;
|
|
|
}
|
|
|
}, {
|
|
|
display: '商品类别',
|
|
|
name: 'attribute', //商品属性(1普通、2赠品等) 商品类别
|
|
|
render: function(item) {
|
|
|
return ENUM.attribute[item.attribute];
|
|
|
if (item.attribute) {
|
|
|
return ENUM.attribute[item.attribute];
|
|
|
} else {
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
display: '搜索/标签',
|
|
|
hidden: true,
|
|
|
render: function(item) {
|
|
|
return '关键词:' + item.searchAndLabel + '<br>' +
|
|
|
'风格:' + item.style + '<br>' +
|
|
|
'纹理:' + item.pattern + '<br>' +
|
|
|
'工艺:' + item.makeCrafts + '<br>';
|
|
|
var searchAndLabel = item.searchAndLabel ? item.searchAndLabel : '',
|
|
|
style = item.style ? item.style : '',
|
|
|
pattern = item.pattern ? item.pattern : '',
|
|
|
makeCrafts = item.makeCrafts ? item.makeCrafts : '';
|
|
|
return '关键词:' + searchAndLabel + '<br>' +
|
|
|
'风格:' + style + '<br>' +
|
|
|
'纹理:' + pattern + '<br>' +
|
|
|
'工艺:' + makeCrafts + '<br>';
|
|
|
}
|
|
|
}, {
|
|
|
display: '操作信息',
|
...
|
...
|
@@ -208,7 +246,9 @@ var g = new common.grid({ |
|
|
name: 'status', // -1待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过。
|
|
|
render: function(item) {
|
|
|
var html = '';
|
|
|
html += ENUM.status[item.status];
|
|
|
if (ENUM.status[item.status]) {
|
|
|
html += ENUM.status[item.status];
|
|
|
}
|
|
|
if (item.shelveTime) {
|
|
|
html += '<br>上架时间:' + item.shelveTime;
|
|
|
}
|
...
|
...
|
|