Showing
9 changed files
with
38 additions
and
24 deletions
@@ -22,7 +22,8 @@ module.exports=function(app) { | @@ -22,7 +22,8 @@ module.exports=function(app) { | ||
22 | this.$extend={ | 22 | this.$extend={ |
23 | action: 'INFOR', | 23 | action: 'INFOR', |
24 | moduleName: "网销信息", | 24 | moduleName: "网销信息", |
25 | - pageName: "查看商品信息" | 25 | + pageName: "查看商品信息", |
26 | + shopsId:req.session.user.auth.shopId | ||
26 | }; | 27 | }; |
27 | return netsale; | 28 | return netsale; |
28 | }); | 29 | }); |
@@ -32,7 +33,8 @@ module.exports=function(app) { | @@ -32,7 +33,8 @@ module.exports=function(app) { | ||
32 | action: 'UPDATE', | 33 | action: 'UPDATE', |
33 | moduleName: "网销信息", | 34 | moduleName: "网销信息", |
34 | maintitle: "编辑商品信息", | 35 | maintitle: "编辑商品信息", |
35 | - type:"edit" | 36 | + type:"edit", |
37 | + shopsId:req.session.user.auth.shopId | ||
36 | }; | 38 | }; |
37 | return netsale; | 39 | return netsale; |
38 | }); | 40 | }); |
@@ -317,6 +317,21 @@ module.exports={ | @@ -317,6 +317,21 @@ module.exports={ | ||
317 | {name: 'productStandardRelationStr',type: 'string'}, | 317 | {name: 'productStandardRelationStr',type: 'string'}, |
318 | {name: 'productMaterial',type: 'string'} | 318 | {name: 'productMaterial',type: 'string'} |
319 | ] | 319 | ] |
320 | + }, | ||
321 | + saveNetSaleRecommend:{ | ||
322 | + title:'小编推荐', | ||
323 | + url: '/product/saveNetSaleRecommend', | ||
324 | + params: [ | ||
325 | + {name: 'productSkn', type: 'Number'}, | ||
326 | + {name: 'recommend', type: 'String'} | ||
327 | + ] | ||
328 | + }, | ||
329 | + saveSearchSort:{ | ||
330 | + title:'保存搜索顺序', | ||
331 | + url: '/product/saveSearchSort', | ||
332 | + params: [ | ||
333 | + {name: 'searchSortList', type: 'string'} | ||
334 | + ] | ||
320 | } | 335 | } |
321 | } | 336 | } |
322 | } | 337 | } |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | <div class="row"> | 40 | <div class="row"> |
41 | <div class="col-sm-8 col-sm-offset-2"> | 41 | <div class="col-sm-8 col-sm-offset-2"> |
42 | <a class="btn btn-default" href="/product/base/index">取消</a> | 42 | <a class="btn btn-default" href="/product/base/index">取消</a> |
43 | - <button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">提交审核</button> | 43 | + <button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">保存</button> |
44 | </div> | 44 | </div> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
@@ -137,13 +137,11 @@ | @@ -137,13 +137,11 @@ | ||
137 | <label class="col-sm-1 control-label">展示店铺:</label> | 137 | <label class="col-sm-1 control-label">展示店铺:</label> |
138 | <div class="col-sm-4"> | 138 | <div class="col-sm-4"> |
139 | [[each shopList as a index]] | 139 | [[each shopList as a index]] |
140 | - [[if index==0]] | ||
141 | - <input id="shopIds" value="[[shopIds||a.shopsId]]" type="hidden" for="checkbox"> | ||
142 | - [[/if]] | ||
143 | <label class="radio-inline"><input type="checkbox" name="shopIds" value="[[a.shopsId]]">[[a.shopName]]</label> | 140 | <label class="radio-inline"><input type="checkbox" name="shopIds" value="[[a.shopsId]]">[[a.shopName]]</label> |
144 | [[/each]] | 141 | [[/each]] |
145 | </div> | 142 | </div> |
146 | </div> | 143 | </div> |
147 | </div> | 144 | </div> |
145 | + <input id="shopIds" value="[[myshopsId||shopIds]]" type="hidden" for="checkbox"> | ||
148 | [[/if]] | 146 | [[/if]] |
149 | </script> | 147 | </script> |
@@ -430,8 +430,14 @@ e.on("validate",function(){ | @@ -430,8 +430,14 @@ e.on("validate",function(){ | ||
430 | } | 430 | } |
431 | 431 | ||
432 | if(map3.length>0&&common.util.__input("supplierId")){ | 432 | if(map3.length>0&&common.util.__input("supplierId")){ |
433 | + var len=map3.length; | ||
434 | + map3=map3.filter(function(item){ | ||
435 | + return $.trim(item.factoryCode)?true:false; | ||
436 | + }); | ||
437 | + | ||
433 | var ispass=true; | 438 | var ispass=true; |
434 | - common.util.__ajax2({ | 439 | + if(len==map3.length){ |
440 | + common.util.__ajax2({ | ||
435 | url:'/product/checkSkuBarCodeExist', | 441 | url:'/product/checkSkuBarCodeExist', |
436 | async:false, | 442 | async:false, |
437 | data:{barCode: JSON.stringify(map3)} | 443 | data:{barCode: JSON.stringify(map3)} |
@@ -440,6 +446,10 @@ e.on("validate",function(){ | @@ -440,6 +446,10 @@ e.on("validate",function(){ | ||
440 | ispass="商品条码"+res.data.join(',')+"已经存在"; | 446 | ispass="商品条码"+res.data.join(',')+"已经存在"; |
441 | } | 447 | } |
442 | },true); | 448 | },true); |
449 | + }else{ | ||
450 | + ispass="商品条码不可为空"; | ||
451 | + } | ||
452 | + | ||
443 | return ispass; | 453 | return ispass; |
444 | } | 454 | } |
445 | }); | 455 | }); |
@@ -9,7 +9,7 @@ var $ = require('jquery'), | @@ -9,7 +9,7 @@ var $ = require('jquery'), | ||
9 | /*获取基础商品数据*/ | 9 | /*获取基础商品数据*/ |
10 | var data=ViewModel; | 10 | var data=ViewModel; |
11 | data.data.attribute={"1":"普通商品","2":"赠品","3":"虚拟商品"}[""+data.data.attribute]; | 11 | data.data.attribute={"1":"普通商品","2":"赠品","3":"虚拟商品"}[""+data.data.attribute]; |
12 | -data.data.ageLevel=data.data.ageLevel.replace("1","成人").replace("2","大童").replace("3","小童"); | 12 | +data.data.ageLevel=common.config.__ageLevel(data.data.ageLevel); |
13 | data.data.gender={"1":"男","2":"女","3":"通用"}[""+data.data.gender]; | 13 | data.data.gender={"1":"男","2":"女","3":"通用"}[""+data.data.gender]; |
14 | data.data.grade={"0":"否","1":"是"}[""+data.data.grade]; | 14 | data.data.grade={"0":"否","1":"是"}[""+data.data.grade]; |
15 | data.data.goodsSeason={"0":"四季","1":"春","2":"夏","3":"秋","4":"冬","5":"春夏","6":"秋冬"}[""+data.data.goodsSeason]; | 15 | data.data.goodsSeason={"0":"四季","1":"春","2":"夏","3":"秋","4":"冬","5":"春夏","6":"秋冬"}[""+data.data.goodsSeason]; |
@@ -140,22 +140,7 @@ $('.floatnav').on('mouseenter', function() { | @@ -140,22 +140,7 @@ $('.floatnav').on('mouseenter', function() { | ||
140 | if (location.hash) { | 140 | if (location.hash) { |
141 | var hashPos = location.hash.substring(1); | 141 | var hashPos = location.hash.substring(1); |
142 | setTimeout(function() { | 142 | setTimeout(function() { |
143 | - $('.floatnav').find('li[name="' + hashPos + '"]').trigger('click'); | 143 | + $('.floatnav').find('li[data-pos="' + hashPos + '"]').trigger('click'); |
144 | }, 500); | 144 | }, 500); |
145 | - | ||
146 | } | 145 | } |
147 | 146 | ||
148 | -try { | ||
149 | - $(".floatnav li").each(function() { | ||
150 | - var name = $.trim($(this).data('pos')), | ||
151 | - that = this; | ||
152 | - | ||
153 | - if (name == location.hash.replace(/^#/, '')) { | ||
154 | - setTimeout(function() { | ||
155 | - $(that).click(); | ||
156 | - }, 500); | ||
157 | - } | ||
158 | - }); | ||
159 | -} catch (e) { | ||
160 | - | ||
161 | -} |
@@ -149,9 +149,11 @@ common.util.__ajax({ | @@ -149,9 +149,11 @@ common.util.__ajax({ | ||
149 | }); | 149 | }); |
150 | } | 150 | } |
151 | // | 151 | // |
152 | + productExtBo.myshopsId=$("#myshopsId").val(); | ||
152 | $('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo)); | 153 | $('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo)); |
153 | e.init(); | 154 | e.init(); |
154 | }, true); | 155 | }, true); |
156 | +productExtBo.myshopsId=$("#myshopsId").val(); | ||
155 | $('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo)); | 157 | $('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo)); |
156 | 158 | ||
157 | //如果是info页,所有input btn置灰 | 159 | //如果是info页,所有input btn置灰 |
-
Please register or login to post a comment