Authored by 陶雨

factorycode

... ... @@ -42,7 +42,7 @@ $("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA
/*类目配置*/
var ENUM={
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"barCode":"","isSuppled":"N","presaleStorageNum":""}
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"N","presaleStorageNum":""}
}
/*公共模块*/
... ... @@ -205,7 +205,7 @@ var g=new common.grid({
g.__gsm[item.__index]=item.goodsSizeList.length;
}
var html=[];
html.push("<div class='form-group'><div class='col-sm-11 red'><input type=text value='"+item.modelCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' /></div></div>");
html.push("<div class='form-group'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' /></div></div>");
html.push('<div class="rows" id="rows__'+item.__index+'">');
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
var ISXIANGO=(common.util.__input("isAdvance")=="Y"&&+RESPONSEDATA.isAuditing==200)?true:false;
... ... @@ -279,7 +279,7 @@ $(document).on("click",".sortadd",function(){
var goodsSizeList=$.extend({},ENUM.goodsSizeList);
goodsSizeList.salePrice=$("#salesPriceStr").val();
g.__rows.push({
"modelCode": "",
"factoryCode": "",
"goodsColorImage": "",
goodsName: $(this).text(),
colorId: (+$(this).data("id")),
... ... @@ -341,7 +341,7 @@ $(document).on("click",".sortdelete",function(){
});
$(document).on("change",".modelCode",function(){
var item=g.__rows[$(this).data("index")];
item.modelCode=$(this).val();
item.factoryCode=$(this).val();
});
$(document).on("click",".btn-sort-add",function(){
var item=g.__rows[$(this).data("index")];
... ... @@ -375,7 +375,7 @@ $(document).on("change",".btn-sort-tiaoma",function(){
var _index=$(this).data("index");
var _eq=$(this).data("eq");
var item=g.__rows[_index].goodsSizeList[_eq];
item.barCode=$(this).val();
item.factoryCode=$(this).val();
});
$(document).on("change",".btn-sort-kebu",function(){
var _index=$(this).data("index");
... ... @@ -455,35 +455,35 @@ e.on("validate",function(){
}
//RESPONSEDATA.productSkn
console.log("item1.barCode",item1.barCode)
console.log("item1.factoryCode",item1.factoryCode)
map[gname+"_"+item1.sizeId]="";
//修改
if(RESPONSEDATA.productSkn){
if(index1>g.__gsm[index]-1){
//大于原来的计算
if(map2.hasOwnProperty(item1.barCode)){
if(map2.hasOwnProperty(item1.factoryCode)){
_count1++;
}
map2[item1.barCode]="";
console.log("大于原来的计算",item1.barCode+":"+_count1);
map2[item1.factoryCode]="";
console.log("大于原来的计算",item1.factoryCode+":"+_count1);
}else{
//小于原来,并且有值
if(item1.barCode){
if(map2.hasOwnProperty(item1.barCode)){
if(item1.factoryCode){
if(map2.hasOwnProperty(item1.factoryCode)){
_count1++;
}
map2[item1.barCode]="";
map2[item1.factoryCode]="";
console.log("小于原来,并且有值",_count1);
}
console.log("没值",_count1);
}
}else{
//添加时候计算
if(item1.barCode){
if(map2.hasOwnProperty(item1.barCode)){
if(item1.factoryCode){
if(map2.hasOwnProperty(item1.factoryCode)){
_count1++;
}
map2[item1.barCode]="";
map2[item1.factoryCode]="";
}
console.log("添加时候计算",_count1);
}
... ... @@ -491,7 +491,7 @@ e.on("validate",function(){
if(g.__gsm[index]&&index1<g.__gsm[index]){
return;
}
map3.push(item1.barCode);
map3.push(item1.factoryCode);
});
});
}
... ...