Authored by liuyue

代销变价

... ... @@ -11,15 +11,15 @@ var ENUM={
new common.dropDown({
el:'#shop',
ajax:'queryShop'
ajax:'shopsRest'
});
new common.dropDown({
el:'#supplier',
ajax:'querySupplier'
ajax:'supplier'
});
new common.dropDown({
el:'#brand',
ajax:'queryBrand'
ajax:'brand'
});
new common.dropDown({
el:'#cate',
... ... @@ -61,9 +61,9 @@ var g = new common.grid({
return ENUM.vipType[item.vip_discount_type];
}},
{display: 'VIP价', name: 'vip_price'},
{display: '自定义白金', name: 'vip3_price'},
{display: '自定义金卡', name: 'vip2_price'},
{display: '自定义银卡', name: 'vip1_price'},
{display: '白金', name: 'vip3_price'},
{display: '金卡', name: 'vip2_price'},
{display: '银卡', name: 'vip1_price'},
{display: '返币金额', name: 'return_coin'},
{display: '操作信息', name: 'operateInfo', render: function(item) {
var html = '';
... ... @@ -264,7 +264,11 @@ var p = new common.grid({
'<p style="color: #ccc;">' + ENUM.vipType[item.oldProductPriceBo.vip_discount_type] + '</p>';
}},
{display: 'VIP价', render: function(item) {
return item.newProductPriceBo.vip_price + '<p style="color: #ccc;">' + item.oldProductPriceBo.vip_price + '</p>';
var newPrice = '-';
if (item.newProductPriceBo.vip_price) {
newPrice = item.newProductPriceBo.vip_price;
}
return newPrice + '<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>';
... ... @@ -305,12 +309,17 @@ $('#sure-change').on('click', function() {
var arr = [],
data = '';
if (!successList || successList.length == 0) {
alert('请上传批量变价文件');
return;
}
$.each(successList, function(i, value) {
arr.push(value.newProductPriceBo);
});
/*var data = arr.join('');*/
data = JSON.stringify(arr);
console.log(data);
common.util.__ajax({
url:'/goods/batchUpdatePrice',
data:{
... ...
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://172.16.6.227:8083/yohobuy-platform-web'; //变价
//exports.domain = 'http://172.16.6.162:8088/platform'; //品牌合作
//商品管理路由配置
... ... @@ -95,25 +95,45 @@ exports.res = [
route: '/goods/query/shop',
method: 'POST',
url: '/ShopsRest/queryAllShops',
params: []
params: [
{
name: 'idName',
type: 'String'
}
]
}, {
//查询品牌列表接口
route: '/goods/query/brand',
method: 'POST',
url: '/erpproduct/brands/queryAllBrands',
params: []
params: [
{
name: 'idName',
type: 'String'
}
]
}, {
//查询供应商列表接口
route: '/goods/query/supplier',
method: 'POST',
url: '/supplier/supplier/queryAllSupplier',
params: []
params: [
{
name: 'idName',
type: 'String'
}
]
}, {
//查询一级类目列表接口
route: '/goods/query/maxSort',
method: 'POST',
url: '/product/queryAllMaxSortList',
params: []
url: '/product/queryMaxSortByName',
params: [
{
name: 'idName',
type: 'String'
}
]
}, {
//单个变价接口
route: '/goods/updatePrice',
... ...
... ... @@ -149,7 +149,7 @@
</div>
{{/ brandCooperationSet}}
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="javascript:;" class="btn btn-info">全部</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
</div>
{{/ filter}}
... ...