...
|
...
|
@@ -233,7 +233,7 @@ webpackJsonp([33],[ |
|
|
}
|
|
|
var html=[];
|
|
|
html.push("<div class='form-group' style='padding-bottom: 0'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' required/></div></div>");
|
|
|
html.push("<div class='rows'><div class='form-group' style='padding-bottom: 0'><div class='col-sm-2'>尺码</div><div class='col-sm-2'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-1'>是否补货</div><div class='col-sm-2'>UPC条码</div><div class='col-sm-2'>支付尾款时间</div></div></div>");
|
|
|
html.push("<div class='rows'><div class='form-group' style='padding-bottom: 0'><div class='col-sm-1'>尺码</div><div class='col-sm-1'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-2'>品牌条码</div><div class='col-sm-1'>是否补货</div><div class='col-sm-2'>UPC条码</div><div class='col-sm-2'>支付尾款时间</div></div></div>");
|
|
|
html.push('<div class="rows" id="rows__'+item.__index+'">');
|
|
|
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
|
|
|
html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList}));
|
...
|
...
|
@@ -479,6 +479,12 @@ webpackJsonp([33],[ |
|
|
item.colorId=$(this).val();
|
|
|
item.goodsName=this.options[this.selectedIndex].text;
|
|
|
});
|
|
|
$(document).on("change",".btn-sort-nationalCode",function(){
|
|
|
var _index=$(this).data("index");
|
|
|
var _eq=$(this).data("eq");
|
|
|
var item=g.__rows[_index].goodsSizeList[_eq];
|
|
|
item.nationalCode=$(this).val();
|
|
|
});
|
|
|
// $(document).on("change",":checkbox[name=ageLevel]",function(){
|
|
|
// var value=$(this).val();
|
|
|
// var c=$(":checkbox[name=ageLevel]");
|
...
|
...
|
@@ -552,7 +558,6 @@ webpackJsonp([33],[ |
|
|
map[gname+"_"+item1.sizeId]="";
|
|
|
|
|
|
map3.push({'productSku': item1.productSku, 'factoryCode':item1.factoryCode});
|
|
|
|
|
|
});
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -595,6 +600,38 @@ webpackJsonp([33],[ |
|
|
return ispass;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
e.on("validate", function(){
|
|
|
if(g.__rows.length==0){
|
|
|
return "请添加销售属性";
|
|
|
}
|
|
|
var nationalCodeMap = [];
|
|
|
if(g.__rows.length>0) {
|
|
|
$.each(g.__rows,function(index,item){
|
|
|
$.each(item.goodsSizeList,function(index1,item1){
|
|
|
nationalCodeMap.push({'productSku' : item1.productSku, 'nationalCode' : item1.nationalCode});
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
// 校验品牌条码唯一性
|
|
|
if(nationalCodeMap.length>0){
|
|
|
nationalCodeMap = nationalCodeMap.filter(function(item){
|
|
|
return $.trim(item.nationalCode)?true:false;
|
|
|
});
|
|
|
var ispass=true;
|
|
|
common.util.__ajax2({
|
|
|
url:'/product/checkNationalCodeExist',
|
|
|
async:false,
|
|
|
data:{nationalCode: JSON.stringify(nationalCodeMap)}
|
|
|
},function(res){
|
|
|
if(res.data.length){
|
|
|
ispass = "品牌条码 "+res.data.join(',')+" 已存在";
|
|
|
}
|
|
|
},true);
|
|
|
return ispass;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
e.on("validate",function(){
|
|
|
if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){
|
|
|
return "销售价应该限定小于等于吊牌价";
|
...
|
...
|
|