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