...
|
...
|
@@ -21,7 +21,8 @@ webpackJsonp([183],[ |
|
|
productSkn: common.util.__input('productSkn'),
|
|
|
shopId: common.util.__input('shopId'),
|
|
|
brandId: common.util.__input('brandId'),
|
|
|
vipDiscountType: common.util.__input('vipDiscountType')
|
|
|
vipDiscountType: common.util.__input('vipDiscountType'),
|
|
|
vipReturnCoinStatus: common.util.__input('vipReturnCoinStatus')
|
|
|
};
|
|
|
},
|
|
|
columns: [
|
...
|
...
|
@@ -47,8 +48,11 @@ webpackJsonp([183],[ |
|
|
display: "价格",
|
|
|
name: "price"
|
|
|
},{
|
|
|
display: "VIP价格",
|
|
|
display: "VIP价格<a title='*只有正价商品才能开启VIP价格 VIP折扣固定为白金:88折 金卡:9折 银卡:95折' id='tip1' href='#' ><img src='/static/assets/images/help.png'/></a>",
|
|
|
name: "vipPrice"
|
|
|
},{
|
|
|
display: "返币数量<a title='*按商品成交支付金额及对应会员等级进行返币。返币金额 白金:1% 金卡:0.7% 银卡:0.5% 返币数=返币金额*100,即100有货币=1元' id='tip2' href='#' ><img src='/static/assets/images/help.png'/></a>",
|
|
|
name: "vipCoin"
|
|
|
}, {
|
|
|
display: "VIP状态",
|
|
|
render: function (item) {
|
...
|
...
|
@@ -61,13 +65,29 @@ webpackJsonp([183],[ |
|
|
return HtmArr.join('');
|
|
|
}
|
|
|
}, {
|
|
|
display: "VIP返币状态",
|
|
|
render: function (item) {
|
|
|
var HtmArr = [];
|
|
|
if(item.vipReturnCoinStatus == 0){
|
|
|
HtmArr.push('<label>关闭</label>');
|
|
|
}else{
|
|
|
HtmArr.push('<label>开启</label>');
|
|
|
}
|
|
|
return HtmArr.join('');
|
|
|
}
|
|
|
}, {
|
|
|
display: '操作',
|
|
|
render: function (item) {
|
|
|
var HtmArr = [];
|
|
|
if(item.vipDiscountType == 3){
|
|
|
HtmArr.push('<a onclick="changeStatus('+item.productSKN+',1)" href="javascript:;" class="btn btn-info">开启</a>');
|
|
|
HtmArr.push('<a onclick="changeStatus('+item.productSKN+',1)" href="javascript:;" class="btn btn-info">开启VIP价</a>');
|
|
|
}else{
|
|
|
HtmArr.push('<a onclick="changeStatus('+item.productSKN+',2)" href="javascript:;" class="btn btn-danger">关闭</a>');
|
|
|
HtmArr.push('<a onclick="changeStatus('+item.productSKN+',2)" href="javascript:;" class="btn btn-danger">关闭VIP价</a>');
|
|
|
}
|
|
|
if(item.vipReturnCoinStatus == 0){
|
|
|
HtmArr.push('<a onclick="changeReturnCoinStatus('+item.productSKN+',1)" href="javascript:;" class="btn btn-info">开启VIP返币</a>');
|
|
|
}else{
|
|
|
HtmArr.push('<a onclick="changeReturnCoinStatus('+item.productSKN+',0)" href="javascript:;" class="btn btn-danger">关闭VIP返币</a>');
|
|
|
}
|
|
|
return HtmArr.join('');
|
|
|
}
|
...
|
...
|
@@ -105,6 +125,37 @@ webpackJsonp([183],[ |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 批量修改商品VIP返币状态
|
|
|
* @param status
|
|
|
*/
|
|
|
function batchChangeReturnCoinStatus(status) {
|
|
|
console.log(status);
|
|
|
var chk_value =[];
|
|
|
$('input[name="choose"]:checked').each(function(){
|
|
|
chk_value.push($(this).val());
|
|
|
});
|
|
|
if(chk_value.length==0) {
|
|
|
alert("你还没有选择任何SKN!");
|
|
|
return;
|
|
|
}
|
|
|
var params= {
|
|
|
sknList: chk_value.toString(),
|
|
|
vipReturnCoinStatus: status
|
|
|
};
|
|
|
common.dialog.confirm("警告",
|
|
|
"确认批量修改商品VIP返币状态?",
|
|
|
function () {
|
|
|
common.util.__ajax({
|
|
|
url: '/vip/batchChangeReturnCoinStatus',
|
|
|
data: params
|
|
|
}, function(res) {
|
|
|
g.reload();
|
|
|
$("[name='all']").removeAttr("checked");
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 搜索商品VIP
|
|
|
*/
|
|
|
$("#searchFilter").click(function() {
|
...
|
...
|
@@ -136,6 +187,31 @@ webpackJsonp([183],[ |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 单个修改商品VIP返币状态
|
|
|
* @param productSkn
|
|
|
* @param status
|
|
|
*/
|
|
|
function changeReturnCoinStatus(productSkn,status) {
|
|
|
console.log(status);
|
|
|
var param = {
|
|
|
productSkn: productSkn,
|
|
|
vipReturnCoinStatus: status
|
|
|
};
|
|
|
console.log(param);
|
|
|
common.dialog.confirm("警告",
|
|
|
"确认修改商品VIP返币状态?",
|
|
|
function () {
|
|
|
common.util.__ajax({
|
|
|
url: '/vip/changeReturnCoinStatus',
|
|
|
data: param
|
|
|
}, function(res) {
|
|
|
g.reload();
|
|
|
$("[name='all']").removeAttr("checked");
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 全选、反选
|
|
|
* @constructor
|
|
|
*/
|
...
|
...
|
@@ -172,6 +248,8 @@ webpackJsonp([183],[ |
|
|
}
|
|
|
window.changeTab = changeTab;
|
|
|
window.batchChangeStatus = batchChangeStatus;
|
|
|
window.changeReturnCoinStatus = changeReturnCoinStatus;
|
|
|
window.batchChangeReturnCoinStatus = batchChangeReturnCoinStatus;
|
|
|
|
|
|
|
|
|
/***/ }
|
...
|
...
|
|