Authored by ZhongW

学生价字段

... ... @@ -13,7 +13,7 @@ module.exports=function(app) {
gridurl: '/product/queryProductPriceList',
domain: exports.domain,
download: '/ajax/link/batchUpdatePrice'
};
};
});
app.get("/goods/brandCooperation/index", "goods.price.Brand-cooperation", function (req, res){
... ...
... ... @@ -34,16 +34,28 @@ module.exports={
updateProductPrice:{
title: "单个变价接口",
url: '/product/updateProductPrice',
params: [
{name: 'product_skn',type: 'number'},
{name: 'sales_price',type: 'number'},
{name: 'vip_discount_type',type: 'number'},
{name: 'return_coin',type: 'number'},
{name: 'vip_price',type: 'number'},
{name: 'vip1_price',type: 'number'},
{name: 'vip2_price',type: 'number'},
{name: 'vip3_price',type: 'number'}
]
params: {
product_skn:{type:Number},
sales_price:{type:Number},
student_price:{type:Number},
vip_discount_type:{type:Number},
return_coin:{type:Number},
vip_price:{type:Number},
vip1_price:{type:Number},
vip2_price:{type:Number},
vip3_price:{type:Number}
}
// [
// {name: 'product_skn',type: 'number'},
// {name: 'sales_price',type: 'number'},
// {name: 'student_price',type: 'number'},
// {name: 'vip_discount_type',type: 'number'},
// {name: 'return_coin',type: 'number'},
// {name: 'vip_price',type: 'number'},
// {name: 'vip1_price',type: 'number'},
// {name: 'vip2_price',type: 'number'},
// {name: 'vip3_price',type: 'number'}
// ]
},
queryProductPriceListBySkn:{
title:'变价记录',
... ...
... ... @@ -95,7 +95,7 @@
<td width="120px"><b>说明:</b></td>
<td>
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、Excel表头为:<span style="color: #67D267;">SKN、吊牌价、销售价、VIP折扣类型、VIP价、白金价、金卡价、银卡价</span><br>
2、Excel表头为:<span style="color: #67D267;">SKN、吊牌价、销售价、学生价、VIP折扣类型、VIP价、白金价、金卡价、银卡价</span><br>
3、第一行为表头内容,第二行开始为正式内容<br>
4、每个文件控制在2500行以内<br>
5、<a href="/ajax/link/batchUpdatePrice" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
... ... @@ -144,6 +144,7 @@
<table class="table table-striped table-bordered" style="margin: 0;border: 0">
<tr>
<th style="border-top: 0; border-left: 0">销售价</th>
<th style="border-top: 0;">学生价</th>
<th style="border-top: 0">VIP折扣类型</th>
<th style="border-top: 0">VIP</th>
<th style="border-top: 0">白金价</th>
... ... @@ -159,6 +160,9 @@
<td style="border-bottom: 0; border-left: 0">
<input class="sale-price form-control" type="text" value="{sales_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</td>
<td style="border-bottom: 0; border-left: 0">
<input class="student-price form-control" type="text" value="{student_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</td>
<td style="border-bottom: 0">
<select class="discount-select form-control" style="width: 110px">
<option value="1">正常折扣</option>
... ... @@ -227,6 +231,7 @@
<tr>
<th>吊牌价</th>
<th>销售价</th>
<th>学生价</th>
<th>价格生效-<font color="green">开始时间</font></th>
<th>价格生效-<font color="red">结束时间</font></th>
<th>变价时间</th>
... ... @@ -240,6 +245,7 @@
<tr>
<td>[[item.retailPrice]]</td>
<td>[[item.salesPrice]]</td>
<td>[[item.studentPrice]]</td>
<td>[[item.effectiveTime]]</td>
<td>[[item.changePriceEndTime]]</td>
<td>[[item.createTime]]</td>
... ...
... ... @@ -93,6 +93,7 @@ var g = new common.grid({
}},
{display: '吊牌价', name: 'retail_price'},
{display: '销售价', name: 'sales_price'},
{display: '学生价', name: 'student_price'},
{display: 'VIP折扣类型', render: function(item) {
return ENUM.vipType[item.vip_discount_type];
}},
... ... @@ -165,6 +166,7 @@ $(document).on('click', '.modify-btn', function() {
var $wrap = parentTr.next('.product-detail'),
$price = $wrap.find('.sale-price'),
$student_price = $wrap.find('.student-price'),
$select = $wrap.find('.discount-select'),
$vipPrice = $wrap.find('.vip-price'),
$vip3Price = $wrap.find('.vip3-price'),
... ... @@ -185,6 +187,7 @@ $(document).on('click', '.modify-btn', function() {
$price.on('blur', function() {
vipPrice($wrap);
});
$submitBtn.on('click', function() {
if($price.val() != 0){
common.util.__ajax({
... ... @@ -192,6 +195,7 @@ $(document).on('click', '.modify-btn', function() {
data: {
product_skn: skn,
sales_price: $price.val(),
student_price: $student_price.val(),
vip_discount_type: $select.val(),
vip_price: $vipPrice.val(),
vip1_price: $vip1Price.val(),
... ... @@ -316,6 +320,28 @@ var p = new common.grid({
}
return newPriceHtml + '<div style="color: #999;">' + item.oldProductPriceBo.sales_price + '</div>';
}},
{display: '学生价', render: function(item) {
var newPrice = item.newProductPriceBo,
newPriceHtml = '';
if (newPrice.student_price) {
if (newPrice.student_price < (newPrice.retail_price / 2)) {
newPriceHtml = '<p style="color: red">' + newPrice.student_price + '</p>';
}else{
newPriceHtml = '<p>'+newPrice.student_price+'</p>';
}
} else {
newPriceHtml = '<p>-</p>'
}
if(item.oldProductPriceBo.student_price){
newPriceHtml += '<div style="color: #999;">' + item.oldProductPriceBo.student_price + '</div>';
}else{
newPriceHtml += '<div>-</div>';
}
return newPriceHtml;
}},
{display: 'VIP折扣类型', render: function(item) {
return '<p>'+ENUM.vipType[item.newProductPriceBo.vip_discount_type] + '</p>'+
'<div style="color: #999;">' + ENUM.vipType[item.oldProductPriceBo.vip_discount_type] + '</div>';
... ...