...
|
...
|
@@ -68,7 +68,15 @@ var Bll={ |
|
|
var ag=new common.grid({
|
|
|
el:"#attributeTable",
|
|
|
columns:[
|
|
|
{display:"名称",name:"attributeName"},
|
|
|
{display:"名称",name:"attributeName",render:function(item){
|
|
|
item.required=item.isMust=="Y"?"required":"";
|
|
|
var arr=[];
|
|
|
arr.push(item.attributeName);
|
|
|
if(item.required){
|
|
|
arr.push("<span class='red'>*</span>");
|
|
|
}
|
|
|
return arr.join('');
|
|
|
}},
|
|
|
{display:"属性",render:function(item){
|
|
|
item.required=item.isMust=="Y"?"required":"";
|
|
|
// item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){
|
...
|
...
|
@@ -403,14 +411,15 @@ e.on("validate",function(){ |
|
|
return "请选择完整的分类目录";
|
|
|
});
|
|
|
e.on("validate",function(){
|
|
|
console.log(g.__gsm);
|
|
|
if(g.__rows.length==0){
|
|
|
return "请添加销售属性";
|
|
|
}
|
|
|
var map={},map2={},_count=0,_count1=0;
|
|
|
var map={},map2={},map3=[],_count=0,_count1=0;
|
|
|
if(g.__rows.length>0){
|
|
|
$.each(g.__rows,function(index,item){
|
|
|
var gname= item.factoryGoodsName;
|
|
|
$.each(item.goodsSizeList,function(index,item1){
|
|
|
$.each(item.goodsSizeList,function(index1,item1){
|
|
|
var key=gname+"_"+item1.sizeId;
|
|
|
if(map.hasOwnProperty(key)){
|
|
|
_count++;
|
...
|
...
|
@@ -421,6 +430,10 @@ e.on("validate",function(){ |
|
|
_count1++;
|
|
|
}
|
|
|
map2[item1.barCode]="";
|
|
|
if(g.__gsm[index]&&index1<g.__gsm[index]){
|
|
|
return;
|
|
|
}
|
|
|
map3.push(item1.barCode);
|
|
|
});
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -429,6 +442,20 @@ e.on("validate",function(){ |
|
|
}
|
|
|
if(_count1>0){
|
|
|
return "商品条码不能重复";
|
|
|
}else{
|
|
|
if(map3.length>0){
|
|
|
var ispass=true;
|
|
|
common.util.__ajax2({
|
|
|
url:'/goods/base/checkSkuBarCodeExist',
|
|
|
async:false,
|
|
|
data:{barCode:map3.join(',')}
|
|
|
},function(res){
|
|
|
if(res.data.length){
|
|
|
ispass="商品条码"+res.data.join(',')+"已经存在";
|
|
|
}
|
|
|
},true);
|
|
|
return ispass;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
e.on("validate",function(){
|
...
|
...
|
|