Authored by liuyue

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

... ... @@ -3,27 +3,27 @@ var $ = require('jquery'),
common=require('../../common/common');
var ENUM={
//1待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过。
//0已下架,1待上架,2待审核,3驳回,4通过,1已上架,5再上架待审核,6再上架驳回,7再上架通过。
status: {
'-1': '待上架',
'0': '已下架',
'1': '已上架',
'2': '待审核',
'3': '驳回',
'4': '通过',
'1': '已上架',
'0': '已下架',
'5': '再上架待审核',
'6': '再上架驳回',
'7': '再上架通过'
'7': '再上架通过',
'8': '待上架'
},
//tips:{"0":0,"1":0,"2":0,"3":0,"4":0,"all":0}
enum:{
2:'待审核',
3:'驳回',
4:'通过',
1:'待审核',
2:'驳回',
3:'通过',
all:"全部商品"
},
tips:{"2":0,"3":0,"4":0,"all":0}
tips:{"1":0,"2":0,"3":0,"all":0}
}
// 审核状态枚举
... ... @@ -79,13 +79,69 @@ tabTree.init();
var t = new common.tab({
el:"#basicTab",
click:function(){
g.reload(1);
var columnname = $(this).find('a').attr('columnname');
console.log("columnname = " + columnname);
// 选择【全部商品】
if (columnname == "all") {
g.options.columns[10].hidden = false; //显示【审核状态】
g.options.columns[12].hidden = true; //
} else {
g.options.columns[10].hidden = true;
if (columnname == 2) {
g.options.columns[12].hidden = false;// 显示【驳回原因】
} else
switch (columnname) {
case 1:
case 3: { // 待审核, 通过
g.options.columns[10].hidden = true;
g.options.columns[12].hidden = true;
}
break;
case 2: { // 驳回
g.options.columns[10].hidden = true;
g.options.columns[12].hidden = false;
}
break;
default : {
g.options.columns[10].hidden = true;
g.options.columns[12].hidden = true;
}
}
}
g.init('/supplier/baseproduct/ajax/index');
},
columns:[
{name:"2",display:"待审核({2})"},
{name:"3",display:"驳回({3})"},
{name:"4",display:"通过({4})"},
{name:"all",display:"全部商品({all})"}
{
name:"1",
display:"待审核({1})",
value:'2,5'
},
{
name:"2",
display:"驳回({2})",
value:'3,6'
},
{
name:"3",
display:"通过({3})",
value:'4,7'
},
{
name:"all",
display:"全部商品",
value:'2,3,4,5,6,7'
}
]
}).init(ENUM.tips);
... ... @@ -106,7 +162,7 @@ var g = new common.grid({
middleSortId: tabTree.selected.length>1?tabTree.selected[1].id:"", // 二级类目
smallSortId: tabTree.selected.length>2?tabTree.selected[2].id:"", // 三级类目
size: common.util.__input("size"),
productStatus:t.active
productStatusStr:t.value?t.value: '2,3,4,5,6,7'
};
},
... ... @@ -121,7 +177,7 @@ var g = new common.grid({
display: '图片',
name: 'picImgUrl',
render: function(item) {
return '<img src="' + item.picImgUrl + '">';
return '<img src="' + item.picImgUrl + '" style="width:200px; height:100px">';
}
},
... ... @@ -188,6 +244,20 @@ var g = new common.grid({
return "<p>"+type+"</p>"
}},
// 审核状态(全部商品是显示) 10
{display:"审核状态",render:function(item){
var html=[];
html.push("<p>"+ENUM.status[item.status]+"</p>");
if (item.status == 3 || item.status == 6) {
html.push("<p style='color:red;'>"+item.rejectReason+"</p>");
}
return html.join('');
}},
{display:"操作信息",render:function(item){
var html=[];
html.push("<p>"+item.founderName+"</p>");
... ... @@ -196,35 +266,47 @@ var g = new common.grid({
return html.join('');
}},
{
// 12
display: '驳回原因',
name: 'status', // -1待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过。
hidden: true,
name: 'status', // 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过
render: function(item) {
var html = '';
html += ENUM.status[item.status];
if (item.status == 3 || item.status == 6) {
html += '<p style="color:red;">(' + item.rejectReason + ')</p>'
html += '<p style="color:red;">' + item.rejectReason + '</p>'
}
return html;
}
},
{display:"操作",render:function(item){
var html=[];
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn" id="btn-item-info">查看</a>');
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn" id="btn-item-pass">通过</a>');
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn" id="btn-item-reject">驳回</a>');
//if (item.status == 3 || item.status == 6) { // 驳回
// html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass">通过</a>');
//}
if (item.status == 2 || item.status == 5) { // 待审核
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass">通过</a>');
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn operation btn-danger btn-xs edit-class-btn" id="btn-item-reject">驳回</a>');
}
return html.join('');
}},
]
});
g.init('/goods/netsale/getList');
g.init('/supplier/baseproduct/ajax/index');
// tab初始化
var loadTab = function () {
t.active = undefined;
setTimeout(function () {
common.util.__ajax({
url:"/goods/product/queryTabProductNum",
url:"/supplier/baseproduct/auditCount",
data:g.options.parms()
}, function (res) {
var __dt=$.extend({},ENUM.tips,res.data);
... ... @@ -248,6 +330,7 @@ var Bll={
data:fn()
},function(){
g.reload();
loadTab();
});
});
}
... ...
... ... @@ -4,6 +4,7 @@ var $ = require('jquery');
var g = new common.grid({
el: '#help_list',
hash: false,
columns: [
{display: "编号", name: "id"},
{display: "分类名称", name: "categoryName"},
... ...
... ... @@ -10,6 +10,7 @@ var $ = require('jquery'),
var g = new common.grid({
el: "#content-list",
hash: false,
parms: function () {
return {
categoryId: common.util.__input('help-categoryId'),
... ...
... ... @@ -3,6 +3,7 @@ var $ = require('jquery'),
var g = new common.grid({
el: "#product-pool",
hash: false,
parms: function () {
return {
id: common.util.__input('search-id'),
... ... @@ -92,6 +93,7 @@ var $ = require('jquery'),
});
var grid = new common.grid({
el:"#faGrid",
hash: false,
parms: function() {
return {id: obj.id};
},
... ...
... ... @@ -5,6 +5,7 @@ var $ = require('jquery'),
var g = new common.grid({
el: "#notice-list",
hash: false,
parms: function () {
return {
title: common.util.__input('notice-title'),
... ...
... ... @@ -84,7 +84,7 @@ var g = new common.grid({
}, {
display: 'banner图片',
render: function(item) {
return '<img src="' + item.picImgUrl + '">';
return '<img src="' + item.bannarImg + '" style="width:200px; height:100px">';
}
}, {
... ...
... ... @@ -98,6 +98,11 @@ exports.res = [
type: 'Number',
},
{
name: 'bannarImg',
type: 'String',
},
],
src:'/product/brandModels'
... ... @@ -138,6 +143,12 @@ exports.res = [
type: 'Number',
},
{
name: 'bannarImg',
type: 'String',
},
],
src:'/product/brandModels'
... ...
... ... @@ -16,19 +16,60 @@ exports.res = [
}
},
{//驳回操作
route:'/supplier/baseproduct/auditReject',
{
// 列表头部各个审核状态的数量
route:'/supplier/baseproduct/auditCount',
method:'POST',
url:'/product/updateProductSknStatus',
url:'/product/queryTabCheck',
params:[
{name: 'productSknList',type: 'String'},
{name: 'targetStatus',type: 'Number'},
{name: 'rejectReason',type:'String'},
{name: 'productSkn',type: 'Number'},
{name: 'productSkc',type: 'Number'},
{name: 'productSku',type: 'Number'},
{name: 'productName',type: 'String'},
{name: 'shopId',type: 'Number'},
{name: 'brandId',type: 'Number'},
{name: 'isOutLets',type:'String'},
{name: 'isAdvance',type:'String'},
{name: 'gender',type:'String'},
{name: 'isJit',type:'String'},
{name: 'maxSortId',type:'Number'},
{name: 'middleSortId',type: 'Number'},
{name: 'smallSortId',type: 'Number'},
{name: 'page',type: 'Number'},
{name: 'size',type: 'Number'},
]
},
{//ajax列表数据
route:'/supplier/baseproduct/ajax/index',
method:'POST',
url:'/product/queryNetSaleInforList',
params:[
{name: 'productSkn',type: 'Number'},
{name: 'productSkc',type: 'Number'},
{name: 'productSku',type: 'Number'},
{name: 'productName',type: 'String'},
{name: 'shopId',type: 'Number'},
{name: 'brandId',type: 'Number'},
{name: 'isOutLets',type:'String'},
{name: 'isAdvance',type:'String'},
{name: 'gender',type:'String'},
{name: 'isJit',type:'String'},
{name: 'maxSortId',type:'Number'},
{name: 'middleSortId',type: 'Number'},
{name: 'smallSortId',type: 'Number'},
{name: 'page',type: 'Number'},
{name: 'size',type: 'Number'},
{name: 'productStatusStr',type: 'String'},
]
},
{//获取各审核状态下商品的数量
route:'/supplier/baseproduct/auditGoodsCount',
{//驳回操作
route:'/supplier/baseproduct/auditReject',
method:'POST',
url:'/product/updateProductSknStatus',
params:[
... ... @@ -39,6 +80,7 @@ exports.res = [
},
//{//添加页面
// route:'/base/goods/add',
// method:'GET',
... ...
... ... @@ -84,7 +84,7 @@
</label>
<div class="col-md-6">
<select name="shop" id="shopsId" value="[[shopsId]]" tabindex="-1" title="" class="form-control height40">
<select name="shop" id="shopsId" value="[[shopsId]]" tabindex="-1" title="" required="required" class="form-control height40">
<option value="[[shopsId||'-1']]">[[shopsName||"请选择店铺"]]</option>
</select>
</div>
... ... @@ -96,7 +96,7 @@
</label>
<div class="col-md-6">
<select name="shop" id="brandId" value="[[brandId]]" tabindex="-1" title="" class="form-control height40">
<select name="shop" id="brandId" value="[[brandId]]" tabindex="-1" required="required" title="" class="form-control height40">
<option value="[[brandId||'-1']]">[[brandName||"请选择品牌"]]</option>
</select>
</div>
... ... @@ -108,7 +108,7 @@
</label>
<div class="panel-col">
<select name="type" id="type" value="[[type]]" tabindex="-1" title="" class="form-control height40">
<select name="type" id="type" value="[[type]]" tabindex="-1" required="required" title="" class="form-control height40">
<option value="-1">类型</option>
<option value="1">品牌款型</option>
<option value="2">品牌系列</option>
... ... @@ -123,7 +123,7 @@
</label>
<div class="col-md-6">
<input id="seriesName" value="[[seriesName]]" class="form-control width300" type="text" placeholder="款型系列名称">
<input id="seriesName" value="[[seriesName]]" class="form-control width300" type="text" required="required" placeholder="款型系列名称">
</div>
</div>
... ... @@ -142,7 +142,7 @@
</label>
<div class="col-md-6">
<input id="orderBy" value="[[orderBy]]" class="form-control width300" type="text" placeholder="排序">
<input id="orderBy" value="[[orderBy]]" class="form-control width300" type="text" required="required" placeholder="排序">
</div>
</div>
... ...