|
@@ -379,7 +379,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
//当最后规格的规格值循环到最后后添加行数据
|
|
|
else{
|
|
|
//判断表格行数据是否已经存在,存在直接添加不创建新行
|
|
|
- let row = this.form.sku.find((r)=>{return r.specValues===specValues});
|
|
|
+ let row = this.form.sku.find((r)=>{
|
|
|
+ return r.specValues.split(',').sort().toString()===specValues.split(',').sort().toString()
|
|
|
+ });
|
|
|
+ console.log('old',row)
|
|
|
if(row){
|
|
|
newList.push({...row})
|
|
|
}
|
|
@@ -409,8 +412,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
this.setTableList()
|
|
|
},
|
|
|
delSize(spec,idx){
|
|
|
- this.$delete(spec.names,idx)
|
|
|
+ //this.$delete(spec.names,idx)
|
|
|
+ spec.names.splice(idx,1)
|
|
|
this.setTableList()
|
|
|
+ console.log(this.form.sku)
|
|
|
},
|
|
|
addLadder(ladder){
|
|
|
ladder.push({min:null,max:null,amount:null})
|