Commit 2b729934 authored by jingnan's avatar jingnan 👀

采购入库问题修改

parent 5ec31432
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
num: 1, num: 1,
childNum: 1, childNum: 1,
columns: [ columns: [
{ title: '序号', key: 'parentIndex', align: 'center', headerAlign: 'center' }, { title: '序号', minWidth: 90, key: 'parentIndex', align: 'center', headerAlign: 'center' },
{ {
title: '操作', minWidth: 120, align: 'center', component: { title: '操作', minWidth: 120, align: 'center', component: {
name: 'EditTableRow', name: 'EditTableRow',
...@@ -349,6 +349,7 @@ export default { ...@@ -349,6 +349,7 @@ export default {
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
}) })
this.treeTableNoArrange(this.tableData)
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
...@@ -743,7 +744,7 @@ export default { ...@@ -743,7 +744,7 @@ export default {
this.addData = formData this.addData = formData
const tableDataItem = { const tableDataItem = {
...formData, ...formData,
children: [] children: formData.isRoot && formData.children || []
} }
// 根据父子关系添加数据 // 根据父子关系添加数据
if (tableDataItem.operateType === 'ADD') { if (tableDataItem.operateType === 'ADD') {
...@@ -795,6 +796,8 @@ export default { ...@@ -795,6 +796,8 @@ export default {
}) })
} }
}) })
const isVirtualHasChild = tableData.find(item => item.isVirtual && (!item.children || !item.children.length))
if (isVirtualHasChild) return this.$utils.showMessageWarning('父件为虚拟件时,必须添加子件!')
const param = { const param = {
'operator': this.operator, 'operator': this.operator,
'billType': this.form.billType, 'billType': this.form.billType,
......
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