Authored by ZhongW

变价

... ... @@ -144,7 +144,8 @@ module.exports={
params: [
{name: "brandId", type: "Number"},
{name: "sortId", type: "Number"},
{name: "supplierId", type: "Number"}
{name: "supplierId", type: "Number"},
{name: "shopId", type: "Number"}
]
},
queryAllMaxSortList:{
... ...
... ... @@ -227,7 +227,7 @@
<td style="border-bottom: 0"></td>
<td style="border-bottom: 0; border-right: 0;width:5%">
<a href="javascript:;" class="btn btn-success btn-xs sure-modify" style="margin-bottom:10px;">提交</a>
<a href="javascript:;" class="btn btn-success btn-xs sure-modify">取消</a>
<a href="javascript:;" class="btn btn-success btn-xs cancel-modify" >取消</a>
</td>
</tr>
</table>
... ...
... ... @@ -270,6 +270,9 @@ var g = new common.grid({
return html;
}},
{display: '库存成本价', name: ''},
{display: '状态', render: function(item) {
return ENUM.vipType[item.vip_discount_type];
}},
{display: '操作信息', render: function(item) {
var html = '';
if (item.founder_name) {html += '<p>' + item.founder_name + '</p>';}
... ... @@ -307,16 +310,17 @@ function getHistoryList(skn) {
//单个变价修改
$(document).on('click', '.modify-btn', function() {
if($(this).hasClass('open')){
return false;
}
var skn = $(this).data('skn'),
parentTr = $(this).parent().parent(),
sknTd = parentTr.find('td').eq(0);
$(this).addClass('open');
$(this).text('修改');
if(parentTr.next().hasClass('product-detail')){
return false;
}
parentTr.after('<tr class="product-detail"><td colspan="15">加载中...若长时间加载不出来,请重新刷新页面!</td>' +
'</tr><tr class="extraTr"></tr>');
... ... @@ -375,7 +379,9 @@ $(document).on('click', '.modify-btn', function() {
}
});
},true);
}
function vipPrice($wrap) {
var $price = $wrap.find('.sale-price'),
... ... @@ -406,6 +412,13 @@ $(document).on('click', '.modify-btn', function() {
}
}
});
//关闭变价框
$(document).on('click', '.cancel-modify', function () {
$(this).parents(".product-detail").remove();
$(this).parents(".extraTr").remove();
})
//变价记录
$(document).on('click', '.history-btn', function () {
var skn = $(this).data('skn');
... ...