...
|
...
|
@@ -154,6 +154,7 @@ $('#basicTable').on('click', '.modify-btn', function() { |
|
|
|
|
|
}
|
|
|
|
|
|
vipPrice();
|
|
|
$select.on('change', function() {
|
|
|
vipPrice();
|
|
|
});
|
...
|
...
|
@@ -212,8 +213,18 @@ $("#filter-btn").click(function(){ |
|
|
g.reload(1);
|
|
|
});
|
|
|
|
|
|
//回车筛选
|
|
|
$('#skn').on('keyup', function(event) {
|
|
|
if (event.keyCode == 13) {
|
|
|
$("#filter-btn").trigger('click');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//批量导入按钮点击事件
|
|
|
$('#import-btn').on('click', function() {
|
|
|
if ($('#basicTable').css('display') == 'none') {
|
|
|
g.reload();
|
|
|
}
|
|
|
$('#basicTable, .bulk-import').toggle();
|
|
|
});
|
|
|
|
...
|
...
|
@@ -259,25 +270,64 @@ var p = new common.grid({ |
|
|
{display: '吊牌价', render: function(item) {
|
|
|
return item.newProductPriceBo.retail_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.retail_price + '</p>';
|
|
|
}},
|
|
|
{display: '销售价', render: function(item) {
|
|
|
var newPrice = item.newProductPriceBo,
|
|
|
newPriceHtml = newPrice.sales_price;
|
|
|
|
|
|
if (newPrice.sales_price < (newPrice.retail_price / 2)) {
|
|
|
newPriceHtml = '<p style="color: red">' + newPrice.sales_price + '</p>';
|
|
|
}
|
|
|
|
|
|
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.sales_price + '</p>';
|
|
|
}},
|
|
|
{display: 'VIP折扣类型', render: function(item) {
|
|
|
return ENUM.vipType[item.newProductPriceBo.vip_discount_type] +
|
|
|
'<p style="color: #ccc;">' + ENUM.vipType[item.oldProductPriceBo.vip_discount_type] + '</p>';
|
|
|
}},
|
|
|
{display: 'VIP价', render: function(item) {
|
|
|
var newPrice = '-';
|
|
|
if (item.newProductPriceBo.vip_price) {
|
|
|
newPrice = item.newProductPriceBo.vip_price;
|
|
|
var newPrice = item.newProductPriceBo,
|
|
|
newPriceHtml = '';
|
|
|
|
|
|
if (newPrice.vip_price) {
|
|
|
newPriceHtml = newPrice.vip_price;
|
|
|
|
|
|
if (newPrice.vip_price < (newPrice.retail_price / 2)) {
|
|
|
newPriceHtml = '<p style="color: red">' + newPrice.vip_price + '</p>';
|
|
|
}
|
|
|
} else {
|
|
|
newPriceHtml = '-'
|
|
|
}
|
|
|
return newPrice + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip_price + '</p>';
|
|
|
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip_price + '</p>';
|
|
|
}},
|
|
|
{display: '白金价', render: function(item) {
|
|
|
return item.newProductPriceBo.vip3_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip3_price + '</p>';
|
|
|
var newPrice = item.newProductPriceBo,
|
|
|
newPriceHtml = newPrice.vip3_price;
|
|
|
|
|
|
if (newPrice.vip3_price < (newPrice.retail_price / 2)) {
|
|
|
newPriceHtml = '<p style="color: red">' + newPrice.vip3_price + '</p>';
|
|
|
}
|
|
|
|
|
|
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip3_price + '</p>';
|
|
|
}},
|
|
|
{display: '金卡价', render: function(item) {
|
|
|
return item.newProductPriceBo.vip2_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip2_price + '</p>';
|
|
|
var newPrice = item.newProductPriceBo,
|
|
|
newPriceHtml = newPrice.vip2_price;
|
|
|
|
|
|
if (newPrice.vip2_price < (newPrice.retail_price / 2)) {
|
|
|
newPriceHtml = '<p style="color: red">' + newPrice.vip2_price + '</p>';
|
|
|
}
|
|
|
|
|
|
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip2_price + '</p>';
|
|
|
}},
|
|
|
{display: '银卡价', render: function(item) {
|
|
|
return item.newProductPriceBo.vip1_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip1_price + '</p>';
|
|
|
var newPrice = item.newProductPriceBo,
|
|
|
newPriceHtml = newPrice.vip1_price;
|
|
|
|
|
|
if (newPrice.vip1_price < (newPrice.retail_price / 2)) {
|
|
|
newPriceHtml = '<p style="color: red">' + newPrice.vip1_price + '</p>';
|
|
|
}
|
|
|
|
|
|
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip2_price + '</p>';
|
|
|
}},
|
|
|
{display: '返币金额', render: function(item) {
|
|
|
return item.newProductPriceBo.return_coin + '<p style="color: #ccc;">' + item.oldProductPriceBo.return_coin + '</p>';
|
...
|
...
|
|