Merge branch 'develop' of git.dev.yoho.cn:platform/yohobuy-portal-fe into develop
Showing
9 changed files
with
177 additions
and
36 deletions
@@ -3,27 +3,27 @@ var $ = require('jquery'), | @@ -3,27 +3,27 @@ var $ = require('jquery'), | ||
3 | common=require('../../common/common'); | 3 | common=require('../../common/common'); |
4 | 4 | ||
5 | var ENUM={ | 5 | var ENUM={ |
6 | - //1待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过。 | 6 | + //0已下架,1待上架,2待审核,3驳回,4通过,1已上架,5再上架待审核,6再上架驳回,7再上架通过。 |
7 | status: { | 7 | status: { |
8 | - '-1': '待上架', | 8 | + '0': '已下架', |
9 | + '1': '已上架', | ||
9 | '2': '待审核', | 10 | '2': '待审核', |
10 | '3': '驳回', | 11 | '3': '驳回', |
11 | '4': '通过', | 12 | '4': '通过', |
12 | - '1': '已上架', | ||
13 | - '0': '已下架', | ||
14 | '5': '再上架待审核', | 13 | '5': '再上架待审核', |
15 | '6': '再上架驳回', | 14 | '6': '再上架驳回', |
16 | - '7': '再上架通过' | 15 | + '7': '再上架通过', |
16 | + '8': '待上架' | ||
17 | }, | 17 | }, |
18 | //tips:{"0":0,"1":0,"2":0,"3":0,"4":0,"all":0} | 18 | //tips:{"0":0,"1":0,"2":0,"3":0,"4":0,"all":0} |
19 | 19 | ||
20 | enum:{ | 20 | enum:{ |
21 | - 2:'待审核', | ||
22 | - 3:'驳回', | ||
23 | - 4:'通过', | 21 | + 1:'待审核', |
22 | + 2:'驳回', | ||
23 | + 3:'通过', | ||
24 | all:"全部商品" | 24 | all:"全部商品" |
25 | }, | 25 | }, |
26 | - tips:{"2":0,"3":0,"4":0,"all":0} | 26 | + tips:{"1":0,"2":0,"3":0,"all":0} |
27 | } | 27 | } |
28 | 28 | ||
29 | // 审核状态枚举 | 29 | // 审核状态枚举 |
@@ -79,13 +79,69 @@ tabTree.init(); | @@ -79,13 +79,69 @@ tabTree.init(); | ||
79 | var t = new common.tab({ | 79 | var t = new common.tab({ |
80 | el:"#basicTab", | 80 | el:"#basicTab", |
81 | click:function(){ | 81 | click:function(){ |
82 | - g.reload(1); | 82 | + |
83 | + var columnname = $(this).find('a').attr('columnname'); | ||
84 | + console.log("columnname = " + columnname); | ||
85 | + | ||
86 | + // 选择【全部商品】 | ||
87 | + if (columnname == "all") { | ||
88 | + g.options.columns[10].hidden = false; //显示【审核状态】 | ||
89 | + g.options.columns[12].hidden = true; // | ||
90 | + } else { | ||
91 | + g.options.columns[10].hidden = true; | ||
92 | + | ||
93 | + if (columnname == 2) { | ||
94 | + g.options.columns[12].hidden = false;// 显示【驳回原因】 | ||
95 | + } else | ||
96 | + | ||
97 | + | ||
98 | + switch (columnname) { | ||
99 | + | ||
100 | + case 1: | ||
101 | + case 3: { // 待审核, 通过 | ||
102 | + g.options.columns[10].hidden = true; | ||
103 | + g.options.columns[12].hidden = true; | ||
104 | + } | ||
105 | + break; | ||
106 | + | ||
107 | + case 2: { // 驳回 | ||
108 | + g.options.columns[10].hidden = true; | ||
109 | + g.options.columns[12].hidden = false; | ||
110 | + } | ||
111 | + break; | ||
112 | + | ||
113 | + default : { | ||
114 | + g.options.columns[10].hidden = true; | ||
115 | + g.options.columns[12].hidden = true; | ||
116 | + } | ||
117 | + | ||
118 | + } | ||
119 | + | ||
120 | + } | ||
121 | + | ||
122 | + g.init('/supplier/baseproduct/ajax/index'); | ||
83 | }, | 123 | }, |
84 | columns:[ | 124 | columns:[ |
85 | - {name:"2",display:"待审核({2})"}, | ||
86 | - {name:"3",display:"驳回({3})"}, | ||
87 | - {name:"4",display:"通过({4})"}, | ||
88 | - {name:"all",display:"全部商品({all})"} | 125 | + { |
126 | + name:"1", | ||
127 | + display:"待审核({1})", | ||
128 | + value:'2,5' | ||
129 | + }, | ||
130 | + { | ||
131 | + name:"2", | ||
132 | + display:"驳回({2})", | ||
133 | + value:'3,6' | ||
134 | + }, | ||
135 | + { | ||
136 | + name:"3", | ||
137 | + display:"通过({3})", | ||
138 | + value:'4,7' | ||
139 | + }, | ||
140 | + { | ||
141 | + name:"all", | ||
142 | + display:"全部商品", | ||
143 | + value:'2,3,4,5,6,7' | ||
144 | + } | ||
89 | ] | 145 | ] |
90 | }).init(ENUM.tips); | 146 | }).init(ENUM.tips); |
91 | 147 | ||
@@ -106,7 +162,7 @@ var g = new common.grid({ | @@ -106,7 +162,7 @@ var g = new common.grid({ | ||
106 | middleSortId: tabTree.selected.length>1?tabTree.selected[1].id:"", // 二级类目 | 162 | middleSortId: tabTree.selected.length>1?tabTree.selected[1].id:"", // 二级类目 |
107 | smallSortId: tabTree.selected.length>2?tabTree.selected[2].id:"", // 三级类目 | 163 | smallSortId: tabTree.selected.length>2?tabTree.selected[2].id:"", // 三级类目 |
108 | size: common.util.__input("size"), | 164 | size: common.util.__input("size"), |
109 | - productStatus:t.active | 165 | + productStatusStr:t.value?t.value: '2,3,4,5,6,7' |
110 | 166 | ||
111 | }; | 167 | }; |
112 | }, | 168 | }, |
@@ -121,7 +177,7 @@ var g = new common.grid({ | @@ -121,7 +177,7 @@ var g = new common.grid({ | ||
121 | display: '图片', | 177 | display: '图片', |
122 | name: 'picImgUrl', | 178 | name: 'picImgUrl', |
123 | render: function(item) { | 179 | render: function(item) { |
124 | - return '<img src="' + item.picImgUrl + '">'; | 180 | + return '<img src="' + item.picImgUrl + '" style="width:200px; height:100px">'; |
125 | } | 181 | } |
126 | }, | 182 | }, |
127 | 183 | ||
@@ -188,6 +244,20 @@ var g = new common.grid({ | @@ -188,6 +244,20 @@ var g = new common.grid({ | ||
188 | return "<p>"+type+"</p>" | 244 | return "<p>"+type+"</p>" |
189 | }}, | 245 | }}, |
190 | 246 | ||
247 | + // 审核状态(全部商品是显示) 10 | ||
248 | + {display:"审核状态",render:function(item){ | ||
249 | + var html=[]; | ||
250 | + html.push("<p>"+ENUM.status[item.status]+"</p>"); | ||
251 | + | ||
252 | + if (item.status == 3 || item.status == 6) { | ||
253 | + html.push("<p style='color:red;'>"+item.rejectReason+"</p>"); | ||
254 | + } | ||
255 | + | ||
256 | + | ||
257 | + | ||
258 | + return html.join(''); | ||
259 | + }}, | ||
260 | + | ||
191 | {display:"操作信息",render:function(item){ | 261 | {display:"操作信息",render:function(item){ |
192 | var html=[]; | 262 | var html=[]; |
193 | html.push("<p>"+item.founderName+"</p>"); | 263 | html.push("<p>"+item.founderName+"</p>"); |
@@ -196,35 +266,47 @@ var g = new common.grid({ | @@ -196,35 +266,47 @@ var g = new common.grid({ | ||
196 | return html.join(''); | 266 | return html.join(''); |
197 | }}, | 267 | }}, |
198 | { | 268 | { |
269 | + // 12 | ||
199 | display: '驳回原因', | 270 | display: '驳回原因', |
200 | - name: 'status', // -1待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过。 | 271 | + hidden: true, |
272 | + name: 'status', // 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过 | ||
201 | render: function(item) { | 273 | render: function(item) { |
202 | var html = ''; | 274 | var html = ''; |
203 | html += ENUM.status[item.status]; | 275 | html += ENUM.status[item.status]; |
204 | if (item.status == 3 || item.status == 6) { | 276 | if (item.status == 3 || item.status == 6) { |
205 | - html += '<p style="color:red;">(' + item.rejectReason + ')</p>' | 277 | + html += '<p style="color:red;">' + item.rejectReason + '</p>' |
206 | } | 278 | } |
207 | return html; | 279 | return html; |
208 | } | 280 | } |
209 | }, | 281 | }, |
210 | {display:"操作",render:function(item){ | 282 | {display:"操作",render:function(item){ |
211 | var html=[]; | 283 | var html=[]; |
284 | + | ||
285 | + | ||
212 | html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn" id="btn-item-info">查看</a>'); | 286 | html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn" id="btn-item-info">查看</a>'); |
213 | - html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn" id="btn-item-pass">通过</a>'); | ||
214 | - html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn" id="btn-item-reject">驳回</a>'); | 287 | + |
288 | + //if (item.status == 3 || item.status == 6) { // 驳回 | ||
289 | + // html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass">通过</a>'); | ||
290 | + //} | ||
291 | + | ||
292 | + if (item.status == 2 || item.status == 5) { // 待审核 | ||
293 | + html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass">通过</a>'); | ||
294 | + html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn operation btn-danger btn-xs edit-class-btn" id="btn-item-reject">驳回</a>'); | ||
295 | + } | ||
296 | + | ||
215 | 297 | ||
216 | return html.join(''); | 298 | return html.join(''); |
217 | }}, | 299 | }}, |
218 | ] | 300 | ] |
219 | }); | 301 | }); |
220 | -g.init('/goods/netsale/getList'); | 302 | +g.init('/supplier/baseproduct/ajax/index'); |
221 | 303 | ||
222 | // tab初始化 | 304 | // tab初始化 |
223 | var loadTab = function () { | 305 | var loadTab = function () { |
224 | t.active = undefined; | 306 | t.active = undefined; |
225 | setTimeout(function () { | 307 | setTimeout(function () { |
226 | common.util.__ajax({ | 308 | common.util.__ajax({ |
227 | - url:"/goods/product/queryTabProductNum", | 309 | + url:"/supplier/baseproduct/auditCount", |
228 | data:g.options.parms() | 310 | data:g.options.parms() |
229 | }, function (res) { | 311 | }, function (res) { |
230 | var __dt=$.extend({},ENUM.tips,res.data); | 312 | var __dt=$.extend({},ENUM.tips,res.data); |
@@ -248,6 +330,7 @@ var Bll={ | @@ -248,6 +330,7 @@ var Bll={ | ||
248 | data:fn() | 330 | data:fn() |
249 | },function(){ | 331 | },function(){ |
250 | g.reload(); | 332 | g.reload(); |
333 | + loadTab(); | ||
251 | }); | 334 | }); |
252 | }); | 335 | }); |
253 | } | 336 | } |
@@ -4,6 +4,7 @@ var $ = require('jquery'); | @@ -4,6 +4,7 @@ var $ = require('jquery'); | ||
4 | 4 | ||
5 | var g = new common.grid({ | 5 | var g = new common.grid({ |
6 | el: '#help_list', | 6 | el: '#help_list', |
7 | + hash: false, | ||
7 | columns: [ | 8 | columns: [ |
8 | {display: "编号", name: "id"}, | 9 | {display: "编号", name: "id"}, |
9 | {display: "分类名称", name: "categoryName"}, | 10 | {display: "分类名称", name: "categoryName"}, |
@@ -10,6 +10,7 @@ var $ = require('jquery'), | @@ -10,6 +10,7 @@ var $ = require('jquery'), | ||
10 | 10 | ||
11 | var g = new common.grid({ | 11 | var g = new common.grid({ |
12 | el: "#content-list", | 12 | el: "#content-list", |
13 | + hash: false, | ||
13 | parms: function () { | 14 | parms: function () { |
14 | return { | 15 | return { |
15 | categoryId: common.util.__input('help-categoryId'), | 16 | categoryId: common.util.__input('help-categoryId'), |
@@ -3,6 +3,7 @@ var $ = require('jquery'), | @@ -3,6 +3,7 @@ var $ = require('jquery'), | ||
3 | 3 | ||
4 | var g = new common.grid({ | 4 | var g = new common.grid({ |
5 | el: "#product-pool", | 5 | el: "#product-pool", |
6 | + hash: false, | ||
6 | parms: function () { | 7 | parms: function () { |
7 | return { | 8 | return { |
8 | id: common.util.__input('search-id'), | 9 | id: common.util.__input('search-id'), |
@@ -92,6 +93,7 @@ var $ = require('jquery'), | @@ -92,6 +93,7 @@ var $ = require('jquery'), | ||
92 | }); | 93 | }); |
93 | var grid = new common.grid({ | 94 | var grid = new common.grid({ |
94 | el:"#faGrid", | 95 | el:"#faGrid", |
96 | + hash: false, | ||
95 | parms: function() { | 97 | parms: function() { |
96 | return {id: obj.id}; | 98 | return {id: obj.id}; |
97 | }, | 99 | }, |
@@ -5,6 +5,7 @@ var $ = require('jquery'), | @@ -5,6 +5,7 @@ var $ = require('jquery'), | ||
5 | 5 | ||
6 | var g = new common.grid({ | 6 | var g = new common.grid({ |
7 | el: "#notice-list", | 7 | el: "#notice-list", |
8 | + hash: false, | ||
8 | parms: function () { | 9 | parms: function () { |
9 | return { | 10 | return { |
10 | title: common.util.__input('notice-title'), | 11 | title: common.util.__input('notice-title'), |
@@ -84,7 +84,7 @@ var g = new common.grid({ | @@ -84,7 +84,7 @@ var g = new common.grid({ | ||
84 | }, { | 84 | }, { |
85 | display: 'banner图片', | 85 | display: 'banner图片', |
86 | render: function(item) { | 86 | render: function(item) { |
87 | - return '<img src="' + item.picImgUrl + '">'; | 87 | + return '<img src="' + item.bannarImg + '" style="width:200px; height:100px">'; |
88 | } | 88 | } |
89 | 89 | ||
90 | }, { | 90 | }, { |
@@ -98,6 +98,11 @@ exports.res = [ | @@ -98,6 +98,11 @@ exports.res = [ | ||
98 | type: 'Number', | 98 | type: 'Number', |
99 | }, | 99 | }, |
100 | 100 | ||
101 | + { | ||
102 | + name: 'bannarImg', | ||
103 | + type: 'String', | ||
104 | + }, | ||
105 | + | ||
101 | 106 | ||
102 | ], | 107 | ], |
103 | src:'/product/brandModels' | 108 | src:'/product/brandModels' |
@@ -138,6 +143,12 @@ exports.res = [ | @@ -138,6 +143,12 @@ exports.res = [ | ||
138 | type: 'Number', | 143 | type: 'Number', |
139 | }, | 144 | }, |
140 | 145 | ||
146 | + { | ||
147 | + name: 'bannarImg', | ||
148 | + type: 'String', | ||
149 | + }, | ||
150 | + | ||
151 | + | ||
141 | 152 | ||
142 | ], | 153 | ], |
143 | src:'/product/brandModels' | 154 | src:'/product/brandModels' |
@@ -16,19 +16,60 @@ exports.res = [ | @@ -16,19 +16,60 @@ exports.res = [ | ||
16 | } | 16 | } |
17 | }, | 17 | }, |
18 | 18 | ||
19 | - {//驳回操作 | ||
20 | - route:'/supplier/baseproduct/auditReject', | 19 | + { |
20 | + // 列表头部各个审核状态的数量 | ||
21 | + route:'/supplier/baseproduct/auditCount', | ||
21 | method:'POST', | 22 | method:'POST', |
22 | - url:'/product/updateProductSknStatus', | 23 | + url:'/product/queryTabCheck', |
23 | params:[ | 24 | params:[ |
24 | - {name: 'productSknList',type: 'String'}, | ||
25 | - {name: 'targetStatus',type: 'Number'}, | ||
26 | - {name: 'rejectReason',type:'String'}, | 25 | + {name: 'productSkn',type: 'Number'}, |
26 | + {name: 'productSkc',type: 'Number'}, | ||
27 | + {name: 'productSku',type: 'Number'}, | ||
28 | + {name: 'productName',type: 'String'}, | ||
29 | + {name: 'shopId',type: 'Number'}, | ||
30 | + {name: 'brandId',type: 'Number'}, | ||
31 | + {name: 'isOutLets',type:'String'}, | ||
32 | + {name: 'isAdvance',type:'String'}, | ||
33 | + {name: 'gender',type:'String'}, | ||
34 | + {name: 'isJit',type:'String'}, | ||
35 | + {name: 'maxSortId',type:'Number'}, | ||
36 | + {name: 'middleSortId',type: 'Number'}, | ||
37 | + {name: 'smallSortId',type: 'Number'}, | ||
38 | + {name: 'page',type: 'Number'}, | ||
39 | + {name: 'size',type: 'Number'}, | ||
40 | + | ||
41 | + ] | ||
42 | + }, | ||
43 | + | ||
44 | + {//ajax列表数据 | ||
45 | + route:'/supplier/baseproduct/ajax/index', | ||
46 | + method:'POST', | ||
47 | + url:'/product/queryNetSaleInforList', | ||
48 | + params:[ | ||
49 | + | ||
50 | + {name: 'productSkn',type: 'Number'}, | ||
51 | + {name: 'productSkc',type: 'Number'}, | ||
52 | + {name: 'productSku',type: 'Number'}, | ||
53 | + {name: 'productName',type: 'String'}, | ||
54 | + {name: 'shopId',type: 'Number'}, | ||
55 | + {name: 'brandId',type: 'Number'}, | ||
56 | + {name: 'isOutLets',type:'String'}, | ||
57 | + {name: 'isAdvance',type:'String'}, | ||
58 | + {name: 'gender',type:'String'}, | ||
59 | + {name: 'isJit',type:'String'}, | ||
60 | + {name: 'maxSortId',type:'Number'}, | ||
61 | + {name: 'middleSortId',type: 'Number'}, | ||
62 | + {name: 'smallSortId',type: 'Number'}, | ||
63 | + {name: 'page',type: 'Number'}, | ||
64 | + {name: 'size',type: 'Number'}, | ||
65 | + {name: 'productStatusStr',type: 'String'}, | ||
66 | + | ||
27 | ] | 67 | ] |
28 | }, | 68 | }, |
29 | 69 | ||
30 | - {//获取各审核状态下商品的数量 | ||
31 | - route:'/supplier/baseproduct/auditGoodsCount', | 70 | + |
71 | + {//驳回操作 | ||
72 | + route:'/supplier/baseproduct/auditReject', | ||
32 | method:'POST', | 73 | method:'POST', |
33 | url:'/product/updateProductSknStatus', | 74 | url:'/product/updateProductSknStatus', |
34 | params:[ | 75 | params:[ |
@@ -39,6 +80,7 @@ exports.res = [ | @@ -39,6 +80,7 @@ exports.res = [ | ||
39 | }, | 80 | }, |
40 | 81 | ||
41 | 82 | ||
83 | + | ||
42 | //{//添加页面 | 84 | //{//添加页面 |
43 | // route:'/base/goods/add', | 85 | // route:'/base/goods/add', |
44 | // method:'GET', | 86 | // method:'GET', |
@@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
84 | </label> | 84 | </label> |
85 | 85 | ||
86 | <div class="col-md-6"> | 86 | <div class="col-md-6"> |
87 | - <select name="shop" id="shopsId" value="[[shopsId]]" tabindex="-1" title="" class="form-control height40"> | 87 | + <select name="shop" id="shopsId" value="[[shopsId]]" tabindex="-1" title="" required="required" class="form-control height40"> |
88 | <option value="[[shopsId||'-1']]">[[shopsName||"请选择店铺"]]</option> | 88 | <option value="[[shopsId||'-1']]">[[shopsName||"请选择店铺"]]</option> |
89 | </select> | 89 | </select> |
90 | </div> | 90 | </div> |
@@ -96,7 +96,7 @@ | @@ -96,7 +96,7 @@ | ||
96 | </label> | 96 | </label> |
97 | 97 | ||
98 | <div class="col-md-6"> | 98 | <div class="col-md-6"> |
99 | - <select name="shop" id="brandId" value="[[brandId]]" tabindex="-1" title="" class="form-control height40"> | 99 | + <select name="shop" id="brandId" value="[[brandId]]" tabindex="-1" required="required" title="" class="form-control height40"> |
100 | <option value="[[brandId||'-1']]">[[brandName||"请选择品牌"]]</option> | 100 | <option value="[[brandId||'-1']]">[[brandName||"请选择品牌"]]</option> |
101 | </select> | 101 | </select> |
102 | </div> | 102 | </div> |
@@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
108 | </label> | 108 | </label> |
109 | 109 | ||
110 | <div class="panel-col"> | 110 | <div class="panel-col"> |
111 | - <select name="type" id="type" value="[[type]]" tabindex="-1" title="" class="form-control height40"> | 111 | + <select name="type" id="type" value="[[type]]" tabindex="-1" required="required" title="" class="form-control height40"> |
112 | <option value="-1">类型</option> | 112 | <option value="-1">类型</option> |
113 | <option value="1">品牌款型</option> | 113 | <option value="1">品牌款型</option> |
114 | <option value="2">品牌系列</option> | 114 | <option value="2">品牌系列</option> |
@@ -123,7 +123,7 @@ | @@ -123,7 +123,7 @@ | ||
123 | </label> | 123 | </label> |
124 | 124 | ||
125 | <div class="col-md-6"> | 125 | <div class="col-md-6"> |
126 | - <input id="seriesName" value="[[seriesName]]" class="form-control width300" type="text" placeholder="款型系列名称"> | 126 | + <input id="seriesName" value="[[seriesName]]" class="form-control width300" type="text" required="required" placeholder="款型系列名称"> |
127 | </div> | 127 | </div> |
128 | </div> | 128 | </div> |
129 | 129 | ||
@@ -142,7 +142,7 @@ | @@ -142,7 +142,7 @@ | ||
142 | </label> | 142 | </label> |
143 | 143 | ||
144 | <div class="col-md-6"> | 144 | <div class="col-md-6"> |
145 | - <input id="orderBy" value="[[orderBy]]" class="form-control width300" type="text" placeholder="排序"> | 145 | + <input id="orderBy" value="[[orderBy]]" class="form-control width300" type="text" required="required" placeholder="排序"> |
146 | </div> | 146 | </div> |
147 | </div> | 147 | </div> |
148 | 148 |
-
Please register or login to post a comment