Browse Source

多规格属性同步改为同步当前行下面所有行

master
sj 2 years ago
parent
commit
5f1aa2d11f
  1. 17
      src/views/bxg/shop/goods/form.vue
  2. 3
      src/views/bxg/shop/goods/index.vue

17
src/views/bxg/shop/goods/form.vue

@ -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) {

3
src/views/bxg/shop/goods/index.vue

@ -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,

Loading…
Cancel
Save