Commit 73fd9bee authored by Marcus's avatar Marcus

入仓补充、入仓修改针对单行入仓记录增加一个删除

https://zentao.test.jdshangmen.com/bug-view-3147.html
parent d3e6cb36
......@@ -174,6 +174,19 @@
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
v-if="$index >= protectRowCount"
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
......@@ -356,6 +369,18 @@
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index, 1)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
......@@ -857,6 +882,13 @@ export default {
this.form.table.pop()
}
},
handleDeleteRow(index, val) {
if (val === 1) {
this.form1.table.splice(index, 1)
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.splice(index, 1)
}
},
handleAdd(val = 0) {
let cartonsNum = ''
if (val !== 1) { // 货物入仓
......
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