Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TFMOM
TF-MOM-WEB
Commits
34a24f53
Commit
34a24f53
authored
Jul 14, 2023
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购入库新增子产品
parent
bf7a7a26
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
100 deletions
+99
-100
storageDetailsCreateCom.vue
...arehousingNewOrEdit/component/storageDetailsCreateCom.vue
+62
-56
index.vue
...nents/components/PurchasingWarehousingNewOrEdit/index.vue
+37
-44
No files found.
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/component/storageDetailsCreateCom.vue
View file @
34a24f53
This diff is collapsed.
Click to expand it.
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/index.vue
View file @
34a24f53
...
@@ -17,7 +17,14 @@
...
@@ -17,7 +17,14 @@
@
on-cancel=
"cancel"
@
on-cancel=
"cancel"
/>
/>
<div
class=
"sub-title"
>
采购入库申请明细
</div>
<div
class=
"sub-title"
>
采购入库申请明细
</div>
<dee-table
:data=
"tableData"
:columns=
"columns"
:options=
"optionsTree"
:index-row=
"
{ title: '序号', width: '70' }">
<dee-table
ref=
"treeTable"
:key=
"symbolKey"
:data=
"tableData"
:columns=
"columns"
:options=
"optionsTree"
:index-row=
"
{ title: '序号', width: '70' , align: 'center'}"
>
<div
slot=
"header"
class=
"table-title-wrap"
>
<div
slot=
"header"
class=
"table-title-wrap"
>
<dee-tools
:tools=
"tools"
mode=
"normal"
/>
<dee-tools
:tools=
"tools"
mode=
"normal"
/>
</div>
</div>
...
@@ -235,9 +242,8 @@ export default {
...
@@ -235,9 +242,8 @@ export default {
}
}
],
],
optionsTree
:
{
optionsTree
:
{
'row-key'
:
'rowId'
,
// value值需为可以标识该对象唯一的值
rowKey
:
'rowId'
,
'lazy'
:
false
,
'tree-props'
:
{
children
:
'children'
}
'tree-props'
:
{
children
:
'children'
,
hasChildren
:
'hasChildren'
}
},
},
columns
:
[
columns
:
[
{
{
...
@@ -253,7 +259,6 @@ export default {
...
@@ -253,7 +259,6 @@ export default {
},
},
icon
:
'/icons/components/new/add.png'
,
icon
:
'/icons/components/new/add.png'
,
showFun
:
(
row
)
=>
{
showFun
:
(
row
)
=>
{
console
.
log
(
'row'
,
row
)
const
value
=
row
.
extMaterial
?
row
.
extMaterial
.
resType2
.
typeName
:
''
const
value
=
row
.
extMaterial
?
row
.
extMaterial
.
resType2
.
typeName
:
''
if
(
!
row
.
isRoot
||
value
!==
'外购成品'
)
{
if
(
!
row
.
isRoot
||
value
!==
'外购成品'
)
{
return
false
return
false
...
@@ -326,7 +331,7 @@ export default {
...
@@ -326,7 +331,7 @@ export default {
},
},
{
{
title
:
'编码'
,
key
:
'typeCode'
,
headerAlign
:
'center'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
title
:
'编码'
,
key
:
'typeCode'
,
headerAlign
:
'center'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
const
value
=
row
.
extMaterial
?
row
.
extMaterial
.
resCode
:
row
.
resCode
const
value
=
row
.
resCode
?
row
.
resCode
:
row
.
extMaterial
?
row
.
extMaterial
.
resCode
:
''
return
value
return
value
}
}
},
},
...
@@ -334,7 +339,7 @@ export default {
...
@@ -334,7 +339,7 @@ export default {
{
title
:
'架次'
,
key
:
'sorties'
,
headerAlign
:
'center'
},
{
title
:
'架次'
,
key
:
'sorties'
,
headerAlign
:
'center'
},
{
{
title
:
'计量单位'
,
key
:
'unitName'
,
headerAlign
:
'center'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
title
:
'计量单位'
,
key
:
'unitName'
,
headerAlign
:
'center'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
const
value
=
row
.
extMaterial
?
row
.
extMaterial
.
extUnit
.
unitName
:
row
.
reqUnit
const
value
=
row
.
reqUnit
?
row
.
reqUnit
:
row
.
extMaterial
?
row
.
extMaterial
.
extUnit
.
unitName
:
''
return
value
return
value
}
}
},
},
...
@@ -374,7 +379,9 @@ export default {
...
@@ -374,7 +379,9 @@ export default {
],
],
tableData
:
[],
tableData
:
[],
tableParam
:
[],
tableParam
:
[],
operator
:
null
operator
:
null
,
addData
:
{},
symbolKey
:
''
}
}
},
},
computed
:
{
computed
:
{
...
@@ -597,18 +604,17 @@ export default {
...
@@ -597,18 +604,17 @@ export default {
...
item
,
...
item
,
operator
:
'NO_CHANGE'
,
operator
:
'NO_CHANGE'
,
rowId
:
item
.
id
,
rowId
:
item
.
id
,
hasChildren
:
item
.
children
.
length
>
0
,
//
hasChildren: item.children.length > 0,
children
:
item
.
children
&&
item
.
children
.
map
(
child
=>
{
children
:
item
.
children
&&
item
.
children
.
map
(
child
=>
{
return
{
return
{
...
child
,
...
child
,
operator
:
'NO_CHANGE'
,
operator
:
'NO_CHANGE'
hasChildren
:
false
//
hasChildren: false
}
}
})
})
}
}
})
})
console
.
log
(
'res.items'
,
{
...
data
[
0
]
})
console
.
log
(
'res.items'
,
data
)
if
(
data
.
length
>
0
)
{
if
(
data
.
length
>
0
)
{
this
.
formData
[
0
].
data
.
forEach
(
item
=>
{
this
.
formData
[
0
].
data
.
forEach
(
item
=>
{
item
.
component
.
disabled
=
true
item
.
component
.
disabled
=
true
...
@@ -621,65 +627,52 @@ export default {
...
@@ -621,65 +627,52 @@ export default {
},
},
// 组装表格数据
// 组装表格数据
addTableData
(
formData
)
{
addTableData
(
formData
)
{
const
tableData
=
Array
.
from
(
this
.
tableData
)
this
.
tableData
=
[]
console
.
log
(
'ffff'
,
{
...
formData
})
this
.
addData
=
formData
console
.
log
(
'formData'
,
formData
)
console
.
log
(
'formData'
,
formData
)
const
tableDataItem
=
{
const
tableDataItem
=
{
...
formData
,
...
formData
,
// subEquipment: formData.materialTypeName,
// extMaterial: {
// resType2: {
// typeCode: formData.materialTypeName,
// typeName: formData.materialTypeName
// }
// },
// purchaseUnit: { unitName: formData.reqUnit },
// extDxSipplier: {
// supplierFullName: formData.supplier
// },
// inventory: {
// applyUserName: formData.supplier
// },
// storageZone: {
// extname: formData.storageZone
// },
children
:
[]
children
:
[]
}
}
// 根据父子关系添加数据
// 根据父子关系添加数据
if
(
tableDataItem
.
operateType
===
'ADD'
)
{
if
(
tableDataItem
.
operateType
===
'ADD'
)
{
for
(
let
i
=
0
;
i
<
t
his
.
t
ableData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
tableData
.
length
;
i
++
)
{
const
item
=
t
his
.
t
ableData
[
i
]
const
item
=
tableData
[
i
]
if
(
item
.
rowId
===
tableDataItem
.
parentRowId
)
{
if
(
item
.
rowId
===
tableDataItem
.
parentRowId
)
{
if
(
!
item
.
hasChildren
)
{
// item.hasChildren = true
item
.
children
=
[]
}
tableDataItem
.
hasChildren
=
false
item
.
children
.
push
(
tableDataItem
)
item
.
children
.
push
(
tableDataItem
)
item
.
hasChildren
=
true
break
break
}
}
}
}
}
}
if
(
tableDataItem
.
operateType
===
'MODIFY'
)
{
if
(
tableDataItem
.
operateType
===
'MODIFY'
)
{
for
(
const
item
of
t
his
.
t
ableData
)
{
for
(
const
item
of
tableData
)
{
// 父类修改
// 父类修改
if
(
item
.
id
===
tableDataItem
.
id
)
{
if
(
item
.
id
===
tableDataItem
.
id
)
{
// console.log('item', tableDataItem)
// console.log('item', tableDataItem)
t
his
.
tableData
.
splice
(
this
.
tableData
.
indexOf
(
item
),
1
,
tableDataItem
)
t
ableData
.
splice
(
tableData
.
indexOf
(
item
),
1
,
tableDataItem
)
break
break
}
}
// 子类修改
// 子类修改
for
(
const
child
of
item
.
children
)
{
for
(
const
child
of
item
.
children
)
{
if
(
child
.
id
===
tableDataItem
.
id
)
{
if
(
child
.
id
===
tableDataItem
.
id
)
{
t
his
.
tableData
[
this
.
tableData
.
indexOf
(
item
)].
children
.
splice
(
item
.
children
.
indexOf
(
child
),
1
,
tableDataItem
)
t
ableData
[
tableData
.
indexOf
(
item
)].
children
.
splice
(
item
.
children
.
indexOf
(
child
),
1
,
tableDataItem
)
break
break
}
}
}
}
}
}
}
}
if
(
tableDataItem
.
operateType
===
'NEW'
)
{
if
(
tableDataItem
.
operateType
===
'NEW'
)
{
t
his
.
t
ableData
.
push
(
tableDataItem
)
tableData
.
push
(
tableDataItem
)
}
}
console
.
log
(
'tableData'
,
tableData
)
console
.
log
(
'this.tableData'
,
this
.
tableData
)
tableData
.
forEach
(
item
=>
{
this
.
tableData
.
push
(
item
)
})
this
.
symbolKey
=
Symbol
(
new
Date
().
toString
())
console
.
log
(
'this.symbolKey'
,
this
.
symbolKey
)
},
},
submit
()
{
submit
()
{
const
tableData
=
this
.
tableData
.
slice
()
const
tableData
=
this
.
tableData
.
slice
()
...
@@ -689,7 +682,7 @@ export default {
...
@@ -689,7 +682,7 @@ export default {
delete
tableData
[
i
][
key
]
delete
tableData
[
i
][
key
]
}
}
}
}
if
(
obj
.
hasChildren
)
{
if
(
obj
.
children
.
length
>
0
)
{
obj
.
children
.
forEach
((
child
,
j
)
=>
{
obj
.
children
.
forEach
((
child
,
j
)
=>
{
for
(
const
ckey
in
child
)
{
for
(
const
ckey
in
child
)
{
if
(
ckey
===
'storageZone'
)
{
if
(
ckey
===
'storageZone'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment