...
|
...
|
@@ -179,7 +179,6 @@ if(!param){ |
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var g=new common.grid({
|
|
|
el:"#basicTable",
|
|
|
columns:[
|
...
|
...
|
@@ -204,7 +203,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;
|
...
|
...
|
@@ -278,7 +277,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")),
|
...
|
...
|
@@ -340,7 +339,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")];
|
...
|
...
|
@@ -374,7 +373,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");
|
...
|
...
|
@@ -454,35 +453,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);
|
|
|
}
|
...
|
...
|
@@ -490,7 +489,7 @@ e.on("validate",function(){ |
|
|
if(g.__gsm[index]&&index1<g.__gsm[index]){
|
|
|
return;
|
|
|
}
|
|
|
map3.push(item1.barCode);
|
|
|
map3.push(item1.factoryCode);
|
|
|
});
|
|
|
});
|
|
|
}
|
...
|
...
|
|