Authored by weiqingting

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

... ... @@ -24,10 +24,15 @@ var g = new common.grid({
columns:[
{display: 'ID', name: 'brandId'},
{display: '品牌', name:'brandName'},
{display: '合作模式', render: function(item) {
return ENUM.cooperateTypeId[item.cooperateTypeId];
{display: '合作模式', name: 'cooperateTypeName'},
{display: '是否设置', render: function(item) {
if (item.cooperateTypeId == 0) {
return '未设置';
} else {
return '已设置';
}
}},
{display: '是否设置', name: 'cooperateTypeName'},
{display: '操作信息', render: function(item) {
var html = '';
if (item.addUserName) {
... ... @@ -78,13 +83,24 @@ $('#basicTable').on('click', '.cooperate-type', function() {
g.reload();
});
});
//筛选
$("#filter-btn").click(function(){
g.reload(1);
});
//回车筛选
$('#brand').on('keyup', function(event) {
if (event.keyCode == 13) {
$("#filter-btn").trigger('click');
}
});
//批量导入按钮点击事件
$('#import-btn').on('click', function() {
if ($('#basicTable').css('display') == 'none') {
g.reload();
}
$('#basicTable, .bulk-import').toggle();
});
... ...
... ... @@ -154,6 +154,7 @@ $('#basicTable').on('click', '.modify-btn', function() {
}
vipPrice();
$select.on('change', function() {
vipPrice();
});
... ... @@ -212,8 +213,18 @@ $("#filter-btn").click(function(){
g.reload(1);
});
//回车筛选
$('#skn').on('keyup', function(event) {
if (event.keyCode == 13) {
$("#filter-btn").trigger('click');
}
});
//批量导入按钮点击事件
$('#import-btn').on('click', function() {
if ($('#basicTable').css('display') == 'none') {
g.reload();
}
$('#basicTable, .bulk-import').toggle();
});
... ... @@ -259,25 +270,64 @@ var p = new common.grid({
{display: '吊牌价', render: function(item) {
return item.newProductPriceBo.retail_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.retail_price + '</p>';
}},
{display: '销售价', render: function(item) {
var newPrice = item.newProductPriceBo,
newPriceHtml = newPrice.sales_price;
if (newPrice.sales_price < (newPrice.retail_price / 2)) {
newPriceHtml = '<p style="color: red">' + newPrice.sales_price + '</p>';
}
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.sales_price + '</p>';
}},
{display: 'VIP折扣类型', render: function(item) {
return ENUM.vipType[item.newProductPriceBo.vip_discount_type] +
'<p style="color: #ccc;">' + ENUM.vipType[item.oldProductPriceBo.vip_discount_type] + '</p>';
}},
{display: 'VIP价', render: function(item) {
var newPrice = '-';
if (item.newProductPriceBo.vip_price) {
newPrice = item.newProductPriceBo.vip_price;
var newPrice = item.newProductPriceBo,
newPriceHtml = '';
if (newPrice.vip_price) {
newPriceHtml = newPrice.vip_price;
if (newPrice.vip_price < (newPrice.retail_price / 2)) {
newPriceHtml = '<p style="color: red">' + newPrice.vip_price + '</p>';
}
} else {
newPriceHtml = '-'
}
return newPrice + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip_price + '</p>';
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip_price + '</p>';
}},
{display: '白金价', render: function(item) {
return item.newProductPriceBo.vip3_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip3_price + '</p>';
var newPrice = item.newProductPriceBo,
newPriceHtml = newPrice.vip3_price;
if (newPrice.vip3_price < (newPrice.retail_price / 2)) {
newPriceHtml = '<p style="color: red">' + newPrice.vip3_price + '</p>';
}
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip3_price + '</p>';
}},
{display: '金卡价', render: function(item) {
return item.newProductPriceBo.vip2_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip2_price + '</p>';
var newPrice = item.newProductPriceBo,
newPriceHtml = newPrice.vip2_price;
if (newPrice.vip2_price < (newPrice.retail_price / 2)) {
newPriceHtml = '<p style="color: red">' + newPrice.vip2_price + '</p>';
}
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip2_price + '</p>';
}},
{display: '银卡价', render: function(item) {
return item.newProductPriceBo.vip1_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip1_price + '</p>';
var newPrice = item.newProductPriceBo,
newPriceHtml = newPrice.vip1_price;
if (newPrice.vip1_price < (newPrice.retail_price / 2)) {
newPriceHtml = '<p style="color: red">' + newPrice.vip1_price + '</p>';
}
return newPriceHtml + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip2_price + '</p>';
}},
{display: '返币金额', render: function(item) {
return item.newProductPriceBo.return_coin + '<p style="color: #ccc;">' + item.oldProductPriceBo.return_coin + '</p>';
... ...
... ... @@ -60,7 +60,7 @@ var edit=require('../common/edit');
if ($(this).is($department1)) {
departmentArr.length = 0;
departmentArr[0] = $(this).val();
if ($(this).val() === "零售运营部") {
if ($(this).val() === "零售部") {
$department2.show();
departmentArr[1] = $department2.val();
} else {
... ...
... ... @@ -36,7 +36,7 @@ if (type == 'edit') {
if ($(this).is($department1)) {
departmentArr.length = 0;
departmentArr[0] = $(this).val();
if ($(this).val() === "零售运营部") {
if ($(this).val() === "零售部") {
$department2.show();
departmentArr[1] = $department2.val();
} else {
... ...
... ... @@ -41,8 +41,8 @@ var g = new common.grid({
{display:"基本信息",render:function(item){
var arr=[];
arr.push("<p>名称:"+item.name+"</p>");
arr.push("<p>次数:"+item.limitTimes+"</p>");
arr.push("<p>数量:"+item.userUseLimit+"</p>");
arr.push("<p>数量:"+item.limitTimes+"</p>");
arr.push("<p>次数:"+item.userUseLimit+"</p>");
arr.push("<p>部门:"+item.reqDepartment+"</p>");
return arr.join('');
}},
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.227:8083/yohobuy-platform-web'; //变价
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://192.168.102.218:8088/platform'; //变价
//exports.domain = 'http://172.16.6.162:8088/platform'; //品牌合作
//商品管理路由配置
... ...
... ... @@ -108,7 +108,7 @@ exports.res = [
type:"add",
data:{
limitTimes: "0",
reqDepartment: "零售运营部/平台运营",
reqDepartment: "零售部/营销策划",
userSourceLimit: "1",
userTypeLimit: "1",
userUseLimit:"1",
... ... @@ -245,7 +245,7 @@ exports.res = [
action:"/market/limitCode/addLimitCode",
type:"add",
data:{
reqDepartment: "零售运营部/平台运营",
reqDepartment: "零售部/营销策划",
limitTimes: 1,
userUseLimit: 1,
userTypeLimit: '新注册|注册未购买|普通会员|银卡会员|金卡会员|白金会员'
... ...
... ... @@ -131,7 +131,6 @@
<div class="panel-col">
<select name="brandCooperation" id="brandCooperation" tabindex="-1" title="" class="form-control">
<option value="-1">合作模式</option>
<option value="0">未设置</option>
<option value="1">代销</option>
<option value="2">经销</option>
<option value="3">自主</option>
... ...
... ... @@ -36,19 +36,16 @@
<label class="col-sm-2 control-label">店铺类型</label>
<div class="col-sm-3">
<select id="department1" class="form-control">
<option value="零售运营部">零售运营部</option>
<option value="商品部">商品部</option>
<option value="零售部">零售部</option>
<option value="市场部">市场部</option>
<option value="会员部">会员部</option>
<option value="品牌合作部">品牌合作部</option>
<option value="零售业务部">零售业务部</option>
<option value="潮流资源部">潮流资源部</option>
<option value="其他">其他</option>
</select>
</div>
<div class="col-sm-3">
<select id="department2" class="form-control">
<option value="平台运营">平台运营</option>
<option value="营销策划">营销策划</option>
<option value="类目运营">类目运营</option>
<option value="店铺运营">店铺运营</option>
... ...