Showing
5 changed files
with
31 additions
and
11 deletions
@@ -84,6 +84,9 @@ var SORTDATA={ | @@ -84,6 +84,9 @@ var SORTDATA={ | ||
84 | {id:RESPONSEDATA.smallSortId,sortName:RESPONSEDATA.smallSortName}, | 84 | {id:RESPONSEDATA.smallSortId,sortName:RESPONSEDATA.smallSortName}, |
85 | {id:RESPONSEDATA.sortId,sortName:RESPONSEDATA.sortName} | 85 | {id:RESPONSEDATA.sortId,sortName:RESPONSEDATA.sortName} |
86 | ], | 86 | ], |
87 | + otherParam:function(){ | ||
88 | + return {brandId:928} | ||
89 | + }, | ||
87 | complete:function(data){ | 90 | complete:function(data){ |
88 | if(data.length>2){ | 91 | if(data.length>2){ |
89 | Bll.productNameArr[2]=data[data.length-1].sortName; | 92 | Bll.productNameArr[2]=data[data.length-1].sortName; |
@@ -94,7 +97,7 @@ var SORTDATA={ | @@ -94,7 +97,7 @@ var SORTDATA={ | ||
94 | common.util.__ajax({ | 97 | common.util.__ajax({ |
95 | url:'/base/goods/queryAllProductAttr', | 98 | url:'/base/goods/queryAllProductAttr', |
96 | data:{ | 99 | data:{ |
97 | - categoryId:sorid, | 100 | + categoryId:$("#brandId").val(), |
98 | displayPosition:1 | 101 | displayPosition:1 |
99 | } | 102 | } |
100 | },function(res){ | 103 | },function(res){ |
@@ -110,7 +113,8 @@ var SORTDATA={ | @@ -110,7 +113,8 @@ var SORTDATA={ | ||
110 | 113 | ||
111 | 114 | ||
112 | var tabTree=new common.tabTree("#tree",SORTDATA); | 115 | var tabTree=new common.tabTree("#tree",SORTDATA); |
113 | -tabTree.init(); | 116 | + |
117 | +// tabTree.isfeeze=true; | ||
114 | 118 | ||
115 | var ENUM={ | 119 | var ENUM={ |
116 | /* | 120 | /* |
@@ -138,7 +142,7 @@ e.init(); | @@ -138,7 +142,7 @@ e.init(); | ||
138 | 142 | ||
139 | if(RESPONSEDATA.isAuditing!=200){ | 143 | if(RESPONSEDATA.isAuditing!=200){ |
140 | 144 | ||
141 | - new common.dropDown({el:"#brandId",ajax:"queryBrand"}); | 145 | + new common.dropDown({el:"#brandId",ajax:"brand"}); |
142 | 146 | ||
143 | new common.dropDown({el:"#shopId",ajax:"sortbybrand",params:function(){ | 147 | new common.dropDown({el:"#shopId",ajax:"sortbybrand",params:function(){ |
144 | return {brandId:$("#brandId").val()} | 148 | return {brandId:$("#brandId").val()} |
@@ -148,7 +152,9 @@ if(RESPONSEDATA.isAuditing!=200){ | @@ -148,7 +152,9 @@ if(RESPONSEDATA.isAuditing!=200){ | ||
148 | return {brandId:$("#brandId").val()} | 152 | return {brandId:$("#brandId").val()} |
149 | }}); | 153 | }}); |
150 | }else{ | 154 | }else{ |
151 | - tabTree.isfeeze=true; | 155 | + if(tabTree){ |
156 | + tabTree.isfeeze=true; | ||
157 | + } | ||
152 | } | 158 | } |
153 | 159 | ||
154 | //attributeTable | 160 | //attributeTable |
@@ -253,6 +259,7 @@ $(document).on("click",".sortadd",function(){ | @@ -253,6 +259,7 @@ $(document).on("click",".sortadd",function(){ | ||
253 | // g.__e.init(); | 259 | // g.__e.init(); |
254 | } | 260 | } |
255 | }); | 261 | }); |
262 | + | ||
256 | $(document).on("keydown","#productName",function(){ | 263 | $(document).on("keydown","#productName",function(){ |
257 | Bll.IsEnter=true; | 264 | Bll.IsEnter=true; |
258 | }); | 265 | }); |
@@ -260,6 +267,7 @@ $(document).on("change","#brandId",function(){ | @@ -260,6 +267,7 @@ $(document).on("change","#brandId",function(){ | ||
260 | var id=$(this).val(); | 267 | var id=$(this).val(); |
261 | Bll.productNameArr[0]=$(this).find("option[value='"+id+"']").text(); | 268 | Bll.productNameArr[0]=$(this).find("option[value='"+id+"']").text(); |
262 | Bll.setProductName(); | 269 | Bll.setProductName(); |
270 | + tabTree.init(); | ||
263 | }); | 271 | }); |
264 | $(document).on("change",":radio[name=gender]",function(){ | 272 | $(document).on("change",":radio[name=gender]",function(){ |
265 | Bll.productNameArr[1]=["男","女","通用"][+$(this).val()-1]; | 273 | Bll.productNameArr[1]=["男","女","通用"][+$(this).val()-1]; |
@@ -18,6 +18,7 @@ var urlObj = { | @@ -18,6 +18,7 @@ var urlObj = { | ||
18 | 'sortsize2':'/erpproduct/sortsize/ajax/querySizeListBySortId4Html',//尺码 | 18 | 'sortsize2':'/erpproduct/sortsize/ajax/querySizeListBySortId4Html',//尺码 |
19 | 'sortbybrand':'/goods/query/queryShopsByBrandId', | 19 | 'sortbybrand':'/goods/query/queryShopsByBrandId', |
20 | 'getjitSup':'/goods/query/getJitSupplierByBrandld', | 20 | 'getjitSup':'/goods/query/getJitSupplierByBrandld', |
21 | + // 'getsort':'/goods/query/querySortBySmallSort', | ||
21 | 22 | ||
22 | 'sortlist': '/product/class/queryAllProductSortList', | 23 | 'sortlist': '/product/class/queryAllProductSortList', |
23 | 'productPool': '/runManage/subjectManage/queryBaseProductPoolListByName', | 24 | 'productPool': '/runManage/subjectManage/queryBaseProductPoolListByName', |
@@ -54,6 +54,7 @@ tabTree.prototype= { | @@ -54,6 +54,7 @@ tabTree.prototype= { | ||
54 | init: function(datas) { | 54 | init: function(datas) { |
55 | var g = this, | 55 | var g = this, |
56 | p = this.options; | 56 | p = this.options; |
57 | + // g.element.html(''); | ||
57 | g.element.addClass("citySelect"); | 58 | g.element.addClass("citySelect"); |
58 | g.dom = g.dom || g._dom(); | 59 | g.dom = g.dom || g._dom(); |
59 | g.selected = [], g.records = [], g.rows = []; | 60 | g.selected = [], g.records = [], g.rows = []; |
@@ -153,7 +154,8 @@ tabTree.prototype= { | @@ -153,7 +154,8 @@ tabTree.prototype= { | ||
153 | $("p", g.dom["chooseArea"]).eq(i).addClass("disable") | 154 | $("p", g.dom["chooseArea"]).eq(i).addClass("disable") |
154 | } | 155 | } |
155 | } | 156 | } |
156 | - _param.param=_param.selectId; | 157 | + _param.param=_param.sortId; |
158 | + console.log(_param.param); | ||
157 | g.getAjax(_param) | 159 | g.getAjax(_param) |
158 | }, | 160 | }, |
159 | getAjax: function(param) { | 161 | getAjax: function(param) { |
@@ -161,7 +163,7 @@ tabTree.prototype= { | @@ -161,7 +163,7 @@ tabTree.prototype= { | ||
161 | p = this.options; | 163 | p = this.options; |
162 | var ajaxOptions = { | 164 | var ajaxOptions = { |
163 | type: "POST", | 165 | type: "POST", |
164 | - url: param.state=="prov"?"/product/class/queryAllProductSortList":"/product/class/queryProductSortList", | 166 | + url: "/goods/query/querySortBySmallSort", |
165 | data: param, | 167 | data: param, |
166 | dataType: 'json', | 168 | dataType: 'json', |
167 | beforeSend: function(msg) { | 169 | beforeSend: function(msg) { |
@@ -299,7 +301,8 @@ tabTree.prototype= { | @@ -299,7 +301,8 @@ tabTree.prototype= { | ||
299 | p = this.options; | 301 | p = this.options; |
300 | var defaults = { | 302 | var defaults = { |
301 | state: p.columns[rp].state, | 303 | state: p.columns[rp].state, |
302 | - selectId: rp - 1 > -1 ? g.selected[rp - 1].id : 0 | 304 | + // brandId:928, |
305 | + sortId: rp - 1 > -1 ? g.selected[rp - 1].id : "" | ||
303 | }; | 306 | }; |
304 | var setting = {}; | 307 | var setting = {}; |
305 | if (p.otherParam) { | 308 | if (p.otherParam) { |
1 | // exports.domain =require('../config/common.js').domain; | 1 | // exports.domain =require('../config/common.js').domain; |
2 | -exports.domain="http://172.16.6.240:8088/platform"; | 2 | +// exports.domain="http://172.16.6.240:8088/platform"; |
3 | +exports.domain = "http://172.16.6.227:8088/platform"; | ||
3 | exports.res = [ | 4 | exports.res = [ |
4 | {//基础商品列表 | 5 | {//基础商品列表 |
5 | route:'/supplier/baseproduct/index', | 6 | route:'/supplier/baseproduct/index', |
@@ -276,5 +277,13 @@ exports.res = [ | @@ -276,5 +277,13 @@ exports.res = [ | ||
276 | // 1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数 | 277 | // 1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数 |
277 | {name:'displayPosition',type:'Number'} | 278 | {name:'displayPosition',type:'Number'} |
278 | ] | 279 | ] |
279 | - } | 280 | + },{ |
281 | + route:'/goods/query/querySortBySmallSort', | ||
282 | + method:'POST', | ||
283 | + url:'/product/querySortBySmallSort', | ||
284 | + params:[ | ||
285 | + {name:"brandId",type:"Number"}, | ||
286 | + {name:"sortId",type:"Number"} | ||
287 | + ] | ||
288 | + } | ||
280 | ]; | 289 | ]; |
-
Please register or login to post a comment