Commit 56ad8dd7 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents 06d92d6e 79f26c01
...@@ -81,12 +81,12 @@ ...@@ -81,12 +81,12 @@
prop="address" prop="address"
:label="$t('操作')"> :label="$t('操作')">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing($index)">{{$t('修改')}}</el-button> <el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing(row)">{{$t('修改')}}</el-button>
<template v-else-if="orderItemList[$index] && orderItemList[$index].orderWarehouseInBackItemDoList && orderItemList[$index].orderWarehouseInBackItemDoList.length > 0"> <template v-else-if="wareItem(row.orderItemId) && wareItem(row.orderItemId).orderWarehouseInBackItemDoList && wareItem(row.orderItemId).orderWarehouseInBackItemDoList.length > 0">
<el-button size="mini" type="text" @click="handleWarehousing($index)">{{$t('追加')}}</el-button> <el-button size="mini" type="text" @click="handleWarehousing(row)">{{$t('追加')}}</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button> <el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button>
</template> </template>
<el-button v-else size="mini" type="text" @click="handleWarehousing($index)">{{$t('入仓')}}</el-button> <el-button v-else size="mini" type="text" @click="handleWarehousing(row)">{{$t('入仓')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -379,8 +379,9 @@ export default { ...@@ -379,8 +379,9 @@ export default {
} }
}) })
}, },
handleWarehousing(index) { handleWarehousing(row) {
this.warehousing = {...this.order.orderItemVOList[index], ...this.orderItemList[index]} let wareItem = this.orderItemList.find(item => item.orderItemId == row.orderItemId) || {}
this.warehousing = {...row, ...wareItem}
this.warehousingVisible = true this.warehousingVisible = true
}, },
handleWarehousingReturn(item){ handleWarehousingReturn(item){
...@@ -426,6 +427,12 @@ export default { ...@@ -426,6 +427,12 @@ export default {
}, },
computed: { computed: {
// 根据orderItemId获取入仓item
wareItem(){
return orderItemId => {
return this.orderItemList.find(item => item.orderItemId == orderItemId)
}
},
// isAdd() { // isAdd() {
// return this.$route.path === "/order/warehousing-add" // return this.$route.path === "/order/warehousing-add"
// }, // },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment