Authored by xuhongyun

build

... ... @@ -8,7 +8,7 @@ webpackJsonp([99],[
////只能开启的入口
//var OPEN_ONLY_ENTRANCE = ['设置', '二维码', '站内信','订单-待收货','订单-待发货','订单-待评价','订单-退换货','首页','分类','逛','购物车','我的'];
//可以编辑、关闭的入口
var CAN_EDIT_CLOSE_ENTRANCE = ['地址管理','我的晒单','分享购','生日券','有货分期','学生认证','红包','服务与反馈'];
var CAN_EDIT_CLOSE_ENTRANCE = ['地址管理','我的晒单','分享购','生日券','有货分期','学生认证','红包','服务与反馈','生日帽','专享折扣','购物返币','生日礼包','升级礼包','免邮服务','优享客服','7天退换货','极速发货'];
//只能关闭的入口
var CLOSE_ONLY_ENTRANCE = ['Yoho!Family','潮流口令'];
var ENUM = {
... ...
... ... @@ -6,6 +6,7 @@ webpackJsonp([182],[
var $ = __webpack_require__(1), common = __webpack_require__(2);
var importConfig = { "bizType" : "vipBatch" };
var importConfig1 = { "bizType" : "vipReturnCoinBatch" };
$('input[type="file"]').after('<div class="file-name btn btn-default">请选择文件</div>');
var loadModal = null;
... ... @@ -41,6 +42,8 @@ webpackJsonp([182],[
common.edit.ajaxfileupload('#importProductBatch', batchImport('#sort-file', importConfig.bizType));
common.edit.ajaxfileupload('#importReturnCoinBatch', batchImport('#sort-file', importConfig1.bizType));
/***/ }
... ...
... ... @@ -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;
/***/ }
... ...
... ... @@ -45,6 +45,12 @@ module.exports = function (app) {
//批量修改商品VIP状态
app.post("/vip/batchChangeStatus", "vip_batchChangeStatus");
//修改商品VIP反币状态
app.post("/vip/changeReturnCoinStatus", "vip_changeReturnCoinStatus");
//批量修改商品VIP反币状态
app.post("/vip/batchChangeReturnCoinStatus", "vip_batchChangeReturnCoinStatus");
//获取商品VIP列表
app.post("/vip/queryProductVipList", "vip_queryProductVipList");
... ...
... ... @@ -15,6 +15,7 @@ module.exports = {
shopId: {type: Number},
brandId: {type: Number},
vipDiscountType: {type: Number},
vipReturnCoinStatus: {type: Number},
page: {type: Number}
}
},
... ... @@ -41,6 +42,22 @@ module.exports = {
{ name: 'shopsIds', type: 'String'},
{ name: 'vipStatus', type: 'Number'}
]
},
changeReturnCoinStatus: {
title: "修改商品VIP状态",
url: '/vip/changeReturnCoinStatus',
params: {
productSkn: {type: Number},
vipReturnCoinStatus: {type: Number}
}
},
batchChangeReturnCoinStatus: {
title: "修改商品VIP状态",
url: '/vip/batchChangeReturnCoinStatus',
params: {
sknList: {type: String},
vipReturnCoinStatus: {type: Number}
}
}
}
};
... ...
... ... @@ -60,7 +60,7 @@
<input type="text" value="[[displayName]]" name="displayName" id="displayName" placeholder="前端展示名称" required="required" class="form-control">
</div>
</div>
[[if categoryName !='ToolBar']]
[[if categoryName !='ToolBar'&&categoryName !='会员权益图标']]
<div class="form-group">
<label class="col-sm-2 control-label">图标:</label>
<div class="col-sm-8" id="colorUrlBox">
... ... @@ -80,7 +80,7 @@
</div>
</div>
[[/if]]
[[if categoryName=='ToolBar']]
[[if categoryName=='ToolBar'||categoryName=='会员权益图标']]
<div class="form-group">
<label class="col-sm-2 control-label">未选中:</label>
<div class="col-sm-8">
... ...
... ... @@ -1459,6 +1459,7 @@
<select class="observe" name="platformType" value="[[contentData.data.platformType]]" data-field="platformType">
<option value="0">有货</option>
<option value="1">blk(无大数据推荐数据)</option>
<option value="2">yohoApp首页</option>
</select>
</div>
</div>
... ...
... ... @@ -6,7 +6,7 @@
<div class="panel-body">
<table class="table table-bordered">
<tr>
<td rowspan="2">商品VIP设置</td>
<td rowspan="2" style="width:250px">商品VIP设置</td>
<td>上传EXCEL:</td>
<td style="position: relative;">
<input id="importProductBatch" name="file" data-type="" type="file" style="border:1px solid red; cursor: pointer; height: 37px; top: 8px;">
... ... @@ -26,6 +26,28 @@
</table>
</div>
<div class="panel-body">
<table class="table table-bordered">
<tr>
<td rowspan="2" style="width:250px">商品VIP返币设置</td>
<td>上传EXCEL:</td>
<td style="position: relative;">
<input id="importReturnCoinBatch" name="file" data-type="" type="file" style="border:1px solid red; cursor: pointer; height: 37px; top: 8px;">
<a class="btn btn-default" href="/vip/index">返回</a>
</td>
</tr>
<tr>
<td>说明:</td>
<td colspan="2">
1、上传文件必须是 .xlsx 文件<br>
2、第一行标题栏:SKN、商品VIP返币状态<br>
<span style="color: red;">3、商品VIP返币状态:1表示开启,0表示关闭;</span><br>
4、请上传自己权限内的商品SKN,一次上传数量不可超过1W条<br/>
5、<a href="/ajax/link/vipProduct">下载样例</a>
</td>
</tr>
</table>
</div>
<div class="panel-body">
<div class="col-md-12">
<div id="message"></div>
</div>
... ...
... ... @@ -47,6 +47,14 @@
</select>
</div>
<div class="panel-col2" style="width: 100px;">
<select id="vipReturnCoinStatus" class="form-control">
<option value="-1">返币状态</option>
<option value="1">开启</option>
<option value="0">关闭</option>
</select>
</div>
<div class="panel-col">
<a id="searchFilter" href="javascript:;" class="btn btn-info">筛选</a>
</div>
... ... @@ -58,11 +66,10 @@
</div>
<div style="margin-left:10px;margin-bottom: 10px">
<label><input name="all" id="all" type="checkbox" onclick="DoCheck()" value=""/>选中当前页</label>
<a onclick="batchChangeStatus(1)" href="javascript:;" class="btn btn-info">开启</a>
<a onclick="batchChangeStatus(2)" href="javascript:;" class="btn btn-danger">关闭</a>
<div style="float:right;margin-right:10px;margin-top:20px;">
<label style="color:#FF0000">*只有正价商品才能开启VIP价格 VIP折扣固定为白金:88折 金卡:9折 银卡:95折</label>
</div>
<a onclick="batchChangeStatus(1)" href="javascript:;" class="btn btn-info">开启VIP价</a>
<a onclick="batchChangeStatus(2)" href="javascript:;" class="btn btn-danger">关闭VIP价</a>
<a onclick="batchChangeReturnCoinStatus(1)" href="javascript:;" class="btn btn-info">开启VIP返币</a>
<a onclick="batchChangeReturnCoinStatus(0)" href="javascript:;" class="btn btn-danger">关闭VIP返币</a>
</div>
<div class="panel panel-primary-head">
<div class="dataTab_wrapper" id="productVipTable" ></div>
... ...