Browse Source

多规格属性同步改为仅同步下个规格

master
sj 2 years ago
parent
commit
4103c2c107
  1. 16
      src/views/bxg/shop/goods/form.vue

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

@ -135,7 +135,7 @@
</div> </div>
<div v-else-if="scope.column.property == 'action'" align="center" > <div v-else-if="scope.column.property == 'action'" align="center" >
<el-button type="text" size="mini" @click="delAttrTable(scope.$index)" align="center">删除</el-button> <el-button type="text" size="mini" @click="delAttrTable(scope.$index)" align="center">删除</el-button>
<el-button type="text" size="mini" @click="blur(scope.row)" align="center">同步</el-button> <el-button type="text" size="mini" @click="blur(scope.$index,scope.row)" align="center">同步</el-button>
<!-- <a @click="delAttrTable(scope.$index)" align="center">删除</a>--> <!-- <a @click="delAttrTable(scope.$index)" align="center">删除</a>-->
<!-- <a @click="blur(scope.$index,scope.row,scope.column)" align="center">同步</a>--> <!-- <a @click="blur(scope.$index,scope.row,scope.column)" align="center">同步</a>-->
</div> </div>
@ -649,17 +649,19 @@ export default {
this.getInfo(); this.getInfo();
}, },
methods: { methods: {
blur(row) { blur(index,row) {
// console.log('index',row) //
// // this.manyFormValidate.forEach(item=>{
this.manyFormValidate.forEach(item=>{ console.log('index',index,this.manyFormValidate.length)
if (index+1<this.manyFormValidate.length){ //最后一行没有下一行
for (const ele in row){ for (const ele in row){
///////// /////////
if (ele=="pic"||ele=="price"||ele=="cost"||ele=="ot_price"||ele=="stock"||ele=="weight"||ele=="volume"||ele=="integral"){ if (ele=="pic"||ele=="price"||ele=="cost"||ele=="ot_price"||ele=="stock"||ele=="weight"||ele=="volume"||ele=="integral"){
item[ele]=row[ele]; this.manyFormValidate[index+1][ele]=row[ele];
} }
} }
}) }
// })
}, },
handleTabsEdit(targetName, action) { handleTabsEdit(targetName, action) {
if (action === 'add') { if (action === 'add') {

Loading…
Cancel
Save