...
|
...
|
@@ -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();
|
|
|
});
|
|
|
});
|
|
|
}
|
...
|
...
|
|