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
957ffc87
Commit
957ffc87
authored
Sep 25, 2023
by
caolaoban
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://94.191.100.41/tfmom/tf-mom-web
into dev
parents
977e95a2
091d4de4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
importFile.vue
...s/PurchasingWarehousingNewOrEdit/component/importFile.vue
+4
-6
index.vue
...nents/components/PurchasingWarehousingNewOrEdit/index.vue
+32
-30
No files found.
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/component/importFile.vue
View file @
957ffc87
...
...
@@ -123,13 +123,11 @@ export default {
formData
.
append
(
'file'
,
this
.
file
.
raw
)
this
.
$api
.
apiUploadFile
(
`/InStorageRequestItem/importByExcel?id=
${
id
}
`
,
formData
).
then
(
res
=>
{
// 调用接口
this
.
uploading
=
false
if
(
res
.
code
===
'0'
)
{
this
.
$utils
.
showMessageSuccess
(
res
.
message
)
this
.
close
()
}
else
{
this
.
$utils
.
showMessageError
(
res
.
message
)
}
this
.
$utils
.
showMessageSuccess
(
res
.
data
.
message
)
this
.
$emit
(
'refreshTable'
)
this
.
close
()
}).
catch
(
err
=>
{
this
.
uploading
=
false
// this.$utils.showMessageError(err)
console
.
log
(
'err'
,
err
)
})
...
...
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/index.vue
View file @
957ffc87
...
...
@@ -35,11 +35,11 @@
<el-button
type=
"primary"
class=
"searchBtn"
@
click=
"cancel"
>
取消
</el-button>
</span>
<storage-details
ref=
"storageDetailsCreatOrEdit"
:basic-data=
"detailsPropData"
@
addTableData=
"addTableData"
/>
<import-file
ref=
"importFile"
:param=
"importParam"
/>
<import-file
ref=
"importFile"
:param=
"importParam"
@
refreshTable=
"searchInStorageRequestItem"
/>
</div>
</
template
>
<
script
>
import
{
post
,
del
,
get
}
from
'@/utils/http'
import
{
post
,
get
}
from
'@/utils/http'
import
StorageDetails
from
'./component/storageDetailsCreateCom'
import
ImportFile
from
'./component/importFile'
import
{
downloadFile
}
from
'@/utils/http'
...
...
@@ -328,31 +328,29 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
const
id
=
row
.
id
//
const id = row.id
if
(
row
.
id
)
{
del
(
`InStorageRequestItem/batch/
${
id
}
`
).
then
(
res
=>
{
for
(
const
item
of
this
.
tableData
)
{
// del(`InStorageRequestItem/batch/${id}`).then(res => {
for
(
const
item
of
this
.
tableData
)
{
const
index
=
this
.
submitData
.
findIndex
(
el
=>
el
.
rowId
===
row
.
rowId
||
el
.
rowId
===
row
.
parentId
)
// 父类修改
if
(
item
.
rowId
===
row
.
rowId
)
{
this
.
tableData
.
splice
(
this
.
tableData
.
indexOf
(
item
),
1
)
break
}
// 子类修改
for
(
const
child
of
item
.
children
)
{
if
(
child
.
rowId
===
row
.
rowId
)
{
this
.
tableData
[
this
.
tableData
.
indexOf
(
item
)].
children
.
splice
(
item
.
children
.
indexOf
(
child
),
1
)
break
}
if
(
item
.
rowId
===
row
.
rowId
)
{
this
.
tableData
.
splice
(
this
.
tableData
.
indexOf
(
item
),
1
)
this
.
submitData
[
index
].
operator
=
'REMOVE'
}
// 子类修改
for
(
const
child
of
item
.
children
)
{
if
(
child
.
rowId
===
row
.
rowId
)
{
const
childIndex
=
this
.
submitData
[
index
].
children
.
findIndex
(
elChild
=>
elChild
.
rowId
===
row
.
rowId
)
this
.
tableData
[
this
.
tableData
.
indexOf
(
item
)].
children
.
splice
(
item
.
children
.
indexOf
(
child
),
1
)
this
.
submitData
[
index
].
children
[
childIndex
].
operator
=
'REMOVE'
}
}
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
this
.
treeTableNoArrange
(
this
.
tableData
)
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
this
.
treeTableNoArrange
(
this
.
tableData
,
'remove'
)
// }).catch((err) => {
// console.log(err)
// })
}
else
{
for
(
const
item
of
this
.
tableData
)
{
// 父类修改
...
...
@@ -434,7 +432,7 @@ export default {
{
title
:
'含税单价'
,
key
:
'taxUnitPrice'
,
headerAlign
:
'center'
},
{
title
:
'含税金额'
,
key
:
'taxPrice'
,
headerAlign
:
'center'
},
{
title
:
'税率'
,
key
:
'taxRate'
,
headerAlign
:
'center'
},
{
title
:
'报检人'
,
key
:
'
applyU
serName'
,
headerAlign
:
'center'
},
{
title
:
'报检人'
,
key
:
'
creator.u
serName'
,
headerAlign
:
'center'
},
{
title
:
'接受仓库'
,
key
:
'extname'
,
headerAlign
:
'center'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
const
value
=
row
.
storageZone
?
row
.
storageZone
.
extname
:
row
.
storageZoneName
...
...
@@ -461,6 +459,7 @@ export default {
{
title
:
'创建时间'
,
key
:
'createTime'
,
headerAlign
:
'center'
}
],
tableData
:
[],
submitData
:
[],
tableParam
:
[],
operator
:
null
,
addData
:
{},
...
...
@@ -754,7 +753,7 @@ export default {
},
// 组装表格数据
addTableData
(
formData
)
{
const
tableData
=
Array
.
from
(
this
.
table
Data
)
const
tableData
=
Array
.
from
(
this
.
submit
Data
)
this
.
tableData
=
[]
this
.
addData
=
formData
const
tableDataItem
=
{
...
...
@@ -794,7 +793,7 @@ export default {
this
.
treeTableNoArrange
(
tableData
)
},
submit
()
{
const
tableData
=
this
.
table
Data
.
slice
()
const
tableData
=
this
.
submit
Data
.
slice
()
tableData
.
forEach
((
obj
,
i
)
=>
{
for
(
const
key
in
obj
)
{
if
(
key
===
'storageZone'
)
{
...
...
@@ -811,7 +810,7 @@ export default {
})
}
})
const
isVirtualHasChild
=
tableData
.
find
(
item
=>
item
.
isVirtual
&&
(
!
item
.
children
||
!
item
.
children
.
length
))
const
isVirtualHasChild
=
tableData
.
find
(
item
=>
item
.
isVirtual
&&
(
!
item
.
children
||
!
item
.
children
.
length
||
item
.
children
&&
!
(
item
.
children
.
find
(
child
=>
child
.
operator
!==
'REMOVE'
))
))
if
(
isVirtualHasChild
)
return
this
.
$utils
.
showMessageWarning
(
'父件为虚拟件时,必须添加子件!'
)
const
param
=
{
'operator'
:
this
.
operator
,
...
...
@@ -837,8 +836,12 @@ export default {
console
.
log
(
err
)
})
},
treeTableNoArrange
(
tableData
)
{
tableData
.
forEach
((
item
,
i
)
=>
{
treeTableNoArrange
(
tableData
,
type
)
{
if
(
type
!==
'remove'
)
{
this
.
submitData
=
this
.
$utils
.
deepClone
(
tableData
)
this
.
tableData
=
this
.
$utils
.
deepClone
(
tableData
)
}
this
.
tableData
.
forEach
((
item
,
i
)
=>
{
item
.
parentIndex
=
i
+
1
if
(
item
.
children
)
{
item
.
children
.
forEach
((
child
,
j
)
=>
{
...
...
@@ -847,7 +850,6 @@ export default {
})
}
})
this
.
tableData
=
tableData
},
changePageSize
(
pageSize
)
{
this
.
pagination
.
pageSize
=
pageSize
...
...
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