Authored by xuhongyun

build

... ... @@ -488,8 +488,10 @@ webpackJsonp([51],[
if (item.currentPrice) {html += '<p>当前价:'+item.currentPrice +'</p>';}
return html;
}},
{display: 'VIP折扣类型', render: function(item) {
return ENUM.vipType[item.vip_discount_type];
{display: 'VIP折扣类型', render: function(item) {
var html = '<p>商品折扣类型:'+ENUM.vipType[item.vip_discount_type];
html += '<p>当前折扣类型:'+ENUM.vipType[item.currentVipDiscountType];
return html;
}},
{display: '会员价', render: function(item) {
var html = '<p>VIP价:';
... ... @@ -579,9 +581,11 @@ webpackJsonp([51],[
} else if (item.checkState == '300') {
html += '<a data-index="' + item.__index + '" href="javascript:;" data-planid="' + item.planId + '" class="btn btn-info btn-xs modify-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">修改</a><br>';
html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录</a>';
html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn-new" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录(新)</a>';
} else{
html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-info btn-xs modify-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">修改</a><br>';
html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录</a>';
html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn-new" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录(新)</a>';
}
return html;
}
... ... @@ -644,6 +648,27 @@ webpackJsonp([51],[
}
});
}
//获取变价记录列表并渲染
function getNewHistoryList(skn) {
$.ajax({
type: 'POST',
dataType: 'json',
url: '/goods/queryNewProductPriceListBySkn',
data: {param: skn},
success: function (rs) {
var data = rs;
$('.historyDetail').html($(common.util.__template2($("#template2_new").html(), data.data)));
if(data.code != 200){
common.util.__tip(rs.message);
}
},
error: function (rs) {
$('.historyDetail').html($(common.util.__template2($("#template2_new").html(), {})));
common.util.__tip(rs.message);
}
});
}
//修改变价时自动生成预估毛利率
$(document).on('blur', '.sale-price', function() {
... ... @@ -799,6 +824,21 @@ webpackJsonp([51],[
getHistoryList(skn);
});
//新变价记录
$(document).on('click', '.history-btn-new', function () {
var skn = $(this).data('skn');
var option = {
title:'变价记录详情',
content:"<div class='historyDetail'>加载变价记录...</div>",
width:'70%',
button:[{value:"关闭", css:"btn-primary", callback: function () {
loadTab();
}}]
};
new common.dialog(option);
getNewHistoryList(skn);
});
//删除变价记录
$(document).on('click', '.deleteHistory', function () {
var skn = $(this).data('skn');
... ...
... ... @@ -18,6 +18,9 @@ module.exports=function(app) {
/*变价记录*/
app.post("/goods/queryProductPriceListBySkn","price_queryProductPriceListBySkn");
/*变价记录(新)*/
app.post("/goods/queryNewProductPriceListBySkn","price_queryNewProductPriceListBySkn");
/*删除变价记录*/
app.post("/goods/deletePricePlan","price_deletePricePlan");
... ...
... ... @@ -62,6 +62,13 @@ module.exports={
{name: 'param', type: 'Number'}
]
},
queryNewProductPriceListBySkn:{
title:'变价记录',
url: '/product/queryNewProductPriceListBySkn',
params: [
{name: 'param', type: 'Number'}
]
},
deletePricePlan:{
title:'删除变价记录',
url: '/product/deletePricePlan',
... ...
... ... @@ -422,6 +422,211 @@
</table>
</div>
</script>
<script id="template2_new" type="text/template">
<div class="productInfo">
<table class="table table-striped table-bordered">
<thead>
<tr align="center">
<th>SKN</th>
<th>商品名称</th>
<th>品牌</th>
<th>类目</th>
<th>当前价</th>
</tr>
</thead>
<tbody>
<tr>
<td>[[productSkn]]</td>
<td>[[goodsName]]</td>
<td>[[brandName]]</td>
<td>
[[maxSortName]]
[[if midleSortName]]&nbsp;>&nbsp;[[midleSortName]][[/if]]
[[if smallSortName]]&nbsp;>&nbsp;[[smallSortName]][[/if]]
</td>
<td>[[currentPrice]]</td>
</tr>
</tbody>
</table>
</div>
<h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 商品变价记录表 ——</h2>
<div class="historyList">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>吊牌价</th>
<th>销售价</th>
<th>价格生效-<font color="green">开始时间</font></th>
<th>价格生效-<font color="red">结束时间</font></th>
<th>状态</th>
<th>变价申请时间</th>
<th>变价人</th>
<th>变价类型</th>
</tr>
</thead>
<tbody>
[[if logList.length > 0]]
[[each logList as item index]]
<tr>
<td>[[item.retailPrice]]</td>
<td>[[item.salesPrice]]</td>
<td>[[item.effectiveTime]]</td>
<td>[[item.changePriceEndTime]]</td>
<td>
[[if item.checkState == '101' ]] 待一审 [[/if]]
[[if item.checkState == '102' ]] 待二审 [[/if]]
[[if item.checkState == '103' ]] 待三审 [[/if]]
[[if item.checkState == '200' ]] 待生效 [[/if]]
[[if item.checkState == '201' ]] <font color="red">生效 [[/if]]
[[if item.checkState == '202' ]] 已失效 [[/if]]
[[if item.checkState == '300' ]] 驳回 [[/if]]
</td>
<td>[[item.applyTime]]</td>
<td>[[item.founderName]]</td>
<td>[[item.changePriceType]]</td>
</tr>
[[/each]]
[[else]]
<tr><td colspan="9">没有商品变价记录!</td></tr>
[[/if]]
</tbody>
</table>
</div>
<h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 活动变价记录表 ——</h2>
<div class="historyList">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>吊牌价</th>
<th>活动价</th>
<th>价格生效-<font color="green">开始时间</font></th>
<th>价格生效-<font color="red">结束时间</font></th>
<th>状态</th>
<th>变价申请时间</th>
<th>变价人</th>
<th>变价类型</th>
</tr>
</thead>
<tbody>
[[if list.length > 0]]
[[each list as item index]]
<tr>
<td>[[item.retailPrice]]</td>
<td>[[item.currentPrice]]</td>
<td>[[item.effectiveTime]]</td>
<td>[[item.changePriceEndTime]]</td>
<td>
[[if item.checkState == '101' ]] 待一审 [[/if]]
[[if item.checkState == '102' ]] 待二审 [[/if]]
[[if item.checkState == '103' ]] 待三审 [[/if]]
[[if item.checkState == '200' ]] 待生效 [[/if]]
[[if item.checkState == '201' ]] <font color="red">生效 [[/if]]
[[if item.checkState == '202' ]] 已失效 [[/if]]
[[if item.checkState == '300' ]] 驳回 [[/if]]
</td>
<td>[[item.applyTime]]</td>
<td>[[item.founderName]]</td>
<td>[[item.changePriceType]]</td>
</tr>
[[/each]]
[[else]]
<tr><td colspan="9">没有活动变价记录!</td></tr>
[[/if]]
</tbody>
</table>
</div>
<h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 商品变价计划表 ——</h2>
<div class="historyList">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>吊牌价</th>
<th>销售价</th>
<th>价格生效-<font color="green">开始时间</font></th>
<th>价格生效-<font color="red">结束时间</font></th>
<th>状态</th>
<th>变价申请时间</th>
<th>变价人</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[if planList.length > 0]]
[[each planList as item index]]
<tr>
<td>[[item.retailPrice]]</td>
<td>[[item.salesPrice]]</td>
<td>[[item.effectiveTime]]</td>
<td>[[item.changePriceEndTime]]</td>
<td>
[[if item.checkState == '101' ]] 待一审 [[/if]]
[[if item.checkState == '102' ]] 待二审 [[/if]]
[[if item.checkState == '103' ]] 待三审 [[/if]]
[[if item.checkState == '200' ]] 待生效 [[/if]]
[[if item.checkState == '201' ]] 生效 [[/if]]
[[if item.checkState == '202' ]] 已失效 [[/if]]
[[if item.checkState == '300' ]] 驳回 [[/if]]
</td>
<td>[[item.createTime]]</td>
<td>[[item.founderName]]</td>
<td>
[[if item.flag && item.flag == 1]]
<a data-planid="[[item.planId]]" data-skn="[[productSkn]]" href="javascript:;" class="btn btn-danger btn-xs deleteHistory">删除</a>
[[/if]]
</td>
</tr>
[[/each]]
[[else]]
<tr><td colspan="9">没有商品变价计划!</td></tr>
[[/if]]
</tbody>
</table>
</div>
<h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 活动变价计划表 ——</h2>
<div class="historyList">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>吊牌价</th>
<th>活动价</th>
<th>价格生效-<font color="green">开始时间</font></th>
<th>价格生效-<font color="red">结束时间</font></th>
<th>状态</th>
<th>变价申请时间</th>
<th>变价人</th>
</tr>
</thead>
<tbody>
[[if makePriceList.length > 0]]
[[each makePriceList as item index]]
<tr>
<td>[[item.retailPrice]]</td>
<td>[[item.salesPrice]]</td>
<td>[[item.effectiveTime]]</td>
<td>[[item.changePriceEndTime]]</td>
<td>
[[if item.checkState == '101' ]] 待一审 [[/if]]
[[if item.checkState == '102' ]] 待二审 [[/if]]
[[if item.checkState == '103' ]] 待三审 [[/if]]
[[if item.checkState == '200' ]] 待生效 [[/if]]
[[if item.checkState == '201' ]] 生效 [[/if]]
[[if item.checkState == '202' ]] 已失效 [[/if]]
[[if item.checkState == '300' ]] 驳回 [[/if]]
</td>
<td>[[item.createTime]]</td>
<td>[[item.founderName]]</td>
</tr>
[[/each]]
[[else]]
<tr><td colspan="9">没有活动变价计划!</td></tr>
[[/if]]
</tbody>
</table>
</div>
</script>
<script type="text/template" id="template3">
<div class="rows" style="height: 100px;">
... ...