Merge branch 'yohobuy-shop-dev-4.6-20160606'
Showing
1 changed file
with
8 additions
and
2 deletions
@@ -437,9 +437,15 @@ e.on("validate",function(){ | @@ -437,9 +437,15 @@ e.on("validate",function(){ | ||
437 | map3=map3.filter(function(item){ | 437 | map3=map3.filter(function(item){ |
438 | return $.trim(item.factoryCode)?true:false; | 438 | return $.trim(item.factoryCode)?true:false; |
439 | }); | 439 | }); |
440 | + var __m={}; | ||
441 | + map3.forEach(function(item){ | ||
442 | + if(!__m.hasOwnProperty(item.factoryCode)){ | ||
443 | + __m[item.factoryCode]=true; | ||
444 | + } | ||
445 | + }); | ||
440 | 446 | ||
441 | var ispass=true; | 447 | var ispass=true; |
442 | - if(len==map3.length){ | 448 | + if(len==map3.length&&len==Object.keys(__m).length){ |
443 | common.util.__ajax2({ | 449 | common.util.__ajax2({ |
444 | url:'/product/checkSkuBarCodeExist', | 450 | url:'/product/checkSkuBarCodeExist', |
445 | async:false, | 451 | async:false, |
@@ -450,7 +456,7 @@ e.on("validate",function(){ | @@ -450,7 +456,7 @@ e.on("validate",function(){ | ||
450 | } | 456 | } |
451 | },true); | 457 | },true); |
452 | }else{ | 458 | }else{ |
453 | - ispass="商品条码不可为空"; | 459 | + ispass="商品条码不可为空或者条码重复"; |
454 | } | 460 | } |
455 | 461 | ||
456 | return ispass; | 462 | return ispass; |
-
Please register or login to post a comment