Showing
1 changed file
with
19 additions
and
15 deletions
@@ -492,22 +492,26 @@ e.on("validate",function(){ | @@ -492,22 +492,26 @@ e.on("validate",function(){ | ||
492 | __m[item.factoryCode]=true; | 492 | __m[item.factoryCode]=true; |
493 | } | 493 | } |
494 | }); | 494 | }); |
495 | - | ||
496 | var ispass=true; | 495 | var ispass=true; |
497 | - if(len==map3.length&&len==Object.keys(__m).length){ | ||
498 | - common.util.__ajax2({ | ||
499 | - url:'/product/checkSkuBarCodeExist', | ||
500 | - async:false, | ||
501 | - data:{barCode: JSON.stringify(map3)} | ||
502 | - },function(res){ | ||
503 | - if(res.data.length){ | ||
504 | - ispass="商品条码"+res.data.join(',')+"已经存在"; | ||
505 | - } | ||
506 | - },true); | ||
507 | - }else{ | ||
508 | - ispass="商品条码不可为空或者条码重复"; | ||
509 | - } | ||
510 | - | 496 | + if(common.util.__input("supplierId")){ |
497 | + if(len==map3.length&&len==Object.keys(__m).length){ | ||
498 | + common.util.__ajax2({ | ||
499 | + url:'/product/checkSkuBarCodeExist', | ||
500 | + async:false, | ||
501 | + data:{barCode: JSON.stringify(map3)} | ||
502 | + },function(res){ | ||
503 | + if(res.data.length){ | ||
504 | + ispass="商品条码"+res.data.join(',')+"已经存在"; | ||
505 | + } | ||
506 | + },true); | ||
507 | + }else{ | ||
508 | + ispass="商品条码不可为空或者条码重复"; | ||
509 | + } | ||
510 | + }else { | ||
511 | + if(!(len==map3.length&&len==Object.keys(__m).length)){ | ||
512 | + ispass="商品条码不可为空"; | ||
513 | + } | ||
514 | + } | ||
511 | return ispass; | 515 | return ispass; |
512 | } | 516 | } |
513 | }); | 517 | }); |
-
Please register or login to post a comment