多规格属性同步改为同步当前行下面所有行
This commit is contained in:
@@ -650,17 +650,20 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
blur(index,row) {
|
||||
//将下一行的内容进行同步
|
||||
// this.manyFormValidate.forEach(item=>{
|
||||
console.log('index',index,this.manyFormValidate.length)
|
||||
//将当前行后面每行的内容进行同步
|
||||
// console.log('index',index,this.manyFormValidate.length)
|
||||
if (index+1<this.manyFormValidate.length){ //最后一行没有下一行
|
||||
for (const ele in row){
|
||||
//图片/售价/成本价/原价/库存/重量/体积/所需积分
|
||||
if (ele=="pic"||ele=="price"||ele=="cost"||ele=="ot_price"||ele=="stock"||ele=="weight"||ele=="volume"||ele=="integral"){
|
||||
this.manyFormValidate[index+1][ele]=row[ele];
|
||||
this.manyFormValidate.forEach((item,itemIndex)=>{
|
||||
if (itemIndex>index){//对比当前行和item的索引
|
||||
for (const ele in row){
|
||||
//图片/售价/成本价/原价/库存/重量/体积/所需积分
|
||||
if (ele=="pic"||ele=="price"||ele=="cost"||ele=="ot_price"||ele=="stock"||ele=="weight"||ele=="volume"||ele=="integral"){
|
||||
item[ele]=row[ele];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)}
|
||||
// })
|
||||
},
|
||||
handleTabsEdit(targetName, action) {
|
||||
|
||||
@@ -116,7 +116,8 @@ export default {
|
||||
delLoading: false,
|
||||
visible: false,
|
||||
queryTypeOptions: [
|
||||
{ key: 'storeName', display_name: '商品名称' }
|
||||
{ key: 'storeName', display_name: '商品名称' },
|
||||
{ key: 'id', display_name: '商品id' }
|
||||
],
|
||||
isAttr: false,
|
||||
cateId: null,
|
||||
|
||||
Reference in New Issue
Block a user