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 {
...
@@ -123,13 +123,11 @@ export default {
formData
.
append
(
'file'
,
this
.
file
.
raw
)
formData
.
append
(
'file'
,
this
.
file
.
raw
)
this
.
$api
.
apiUploadFile
(
`/InStorageRequestItem/importByExcel?id=
${
id
}
`
,
formData
).
then
(
res
=>
{
// 调用接口
this
.
$api
.
apiUploadFile
(
`/InStorageRequestItem/importByExcel?id=
${
id
}
`
,
formData
).
then
(
res
=>
{
// 调用接口
this
.
uploading
=
false
this
.
uploading
=
false
if
(
res
.
code
===
'0'
)
{
this
.
$utils
.
showMessageSuccess
(
res
.
data
.
message
)
this
.
$utils
.
showMessageSuccess
(
res
.
message
)
this
.
$emit
(
'refreshTable'
)
this
.
close
()
this
.
close
()
}
else
{
this
.
$utils
.
showMessageError
(
res
.
message
)
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
uploading
=
false
// this.$utils.showMessageError(err)
// this.$utils.showMessageError(err)
console
.
log
(
'err'
,
err
)
console
.
log
(
'err'
,
err
)
})
})
...
...
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/index.vue
View file @
957ffc87
...
@@ -35,11 +35,11 @@
...
@@ -35,11 +35,11 @@
<el-button
type=
"primary"
class=
"searchBtn"
@
click=
"cancel"
>
取消
</el-button>
<el-button
type=
"primary"
class=
"searchBtn"
@
click=
"cancel"
>
取消
</el-button>
</span>
</span>
<storage-details
ref=
"storageDetailsCreatOrEdit"
:basic-data=
"detailsPropData"
@
addTableData=
"addTableData"
/>
<storage-details
ref=
"storageDetailsCreatOrEdit"
:basic-data=
"detailsPropData"
@
addTableData=
"addTableData"
/>
<import-file
ref=
"importFile"
:param=
"importParam"
/>
<import-file
ref=
"importFile"
:param=
"importParam"
@
refreshTable=
"searchInStorageRequestItem"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
post
,
del
,
get
}
from
'@/utils/http'
import
{
post
,
get
}
from
'@/utils/http'
import
StorageDetails
from
'./component/storageDetailsCreateCom'
import
StorageDetails
from
'./component/storageDetailsCreateCom'
import
ImportFile
from
'./component/importFile'
import
ImportFile
from
'./component/importFile'
import
{
downloadFile
}
from
'@/utils/http'
import
{
downloadFile
}
from
'@/utils/http'
...
@@ -328,31 +328,29 @@ export default {
...
@@ -328,31 +328,29 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
const
id
=
row
.
id
//
const id = row.id
if
(
row
.
id
)
{
if
(
row
.
id
)
{
del
(
`InStorageRequestItem/batch/
${
id
}
`
).
then
(
res
=>
{
// del(`InStorageRequestItem/batch/${id}`).then(res => {
for
(
const
item
of
this
.
tableData
)
{
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
)
{
if
(
item
.
rowId
===
row
.
rowId
)
{
this
.
tableData
.
splice
(
this
.
tableData
.
indexOf
(
item
),
1
)
this
.
tableData
.
splice
(
this
.
tableData
.
indexOf
(
item
),
1
)
break
this
.
submitData
[
index
].
operator
=
'REMOVE'
}
}
// 子类修改
// 子类修改
for
(
const
child
of
item
.
children
)
{
for
(
const
child
of
item
.
children
)
{
if
(
child
.
rowId
===
row
.
rowId
)
{
if
(
child
.
rowId
===
row
.
rowId
)
{
this
.
tableData
[
this
.
tableData
.
indexOf
(
item
)].
children
.
splice
(
item
.
children
.
indexOf
(
child
),
1
)
const
childIndex
=
this
.
submitData
[
index
].
children
.
findIndex
(
elChild
=>
elChild
.
rowId
===
row
.
rowId
)
break
this
.
tableData
[
this
.
tableData
.
indexOf
(
item
)].
children
.
splice
(
item
.
children
.
indexOf
(
child
),
1
)
}
this
.
submitData
[
index
].
children
[
childIndex
].
operator
=
'REMOVE'
}
}
}
}
this
.
$message
({
}
type
:
'success'
,
this
.
treeTableNoArrange
(
this
.
tableData
,
'remove'
)
message
:
'删除成功!'
// }).catch((err) => {
})
// console.log(err)
this
.
treeTableNoArrange
(
this
.
tableData
)
// })
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
else
{
}
else
{
for
(
const
item
of
this
.
tableData
)
{
for
(
const
item
of
this
.
tableData
)
{
// 父类修改
// 父类修改
...
@@ -434,7 +432,7 @@ export default {
...
@@ -434,7 +432,7 @@ export default {
{
title
:
'含税单价'
,
key
:
'taxUnitPrice'
,
headerAlign
:
'center'
},
{
title
:
'含税单价'
,
key
:
'taxUnitPrice'
,
headerAlign
:
'center'
},
{
title
:
'含税金额'
,
key
:
'taxPrice'
,
headerAlign
:
'center'
},
{
title
:
'含税金额'
,
key
:
'taxPrice'
,
headerAlign
:
'center'
},
{
title
:
'税率'
,
key
:
'taxRate'
,
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
)
=>
{
title
:
'接受仓库'
,
key
:
'extname'
,
headerAlign
:
'center'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
const
value
=
row
.
storageZone
?
row
.
storageZone
.
extname
:
row
.
storageZoneName
const
value
=
row
.
storageZone
?
row
.
storageZone
.
extname
:
row
.
storageZoneName
...
@@ -461,6 +459,7 @@ export default {
...
@@ -461,6 +459,7 @@ export default {
{
title
:
'创建时间'
,
key
:
'createTime'
,
headerAlign
:
'center'
}
{
title
:
'创建时间'
,
key
:
'createTime'
,
headerAlign
:
'center'
}
],
],
tableData
:
[],
tableData
:
[],
submitData
:
[],
tableParam
:
[],
tableParam
:
[],
operator
:
null
,
operator
:
null
,
addData
:
{},
addData
:
{},
...
@@ -754,7 +753,7 @@ export default {
...
@@ -754,7 +753,7 @@ export default {
},
},
// 组装表格数据
// 组装表格数据
addTableData
(
formData
)
{
addTableData
(
formData
)
{
const
tableData
=
Array
.
from
(
this
.
table
Data
)
const
tableData
=
Array
.
from
(
this
.
submit
Data
)
this
.
tableData
=
[]
this
.
tableData
=
[]
this
.
addData
=
formData
this
.
addData
=
formData
const
tableDataItem
=
{
const
tableDataItem
=
{
...
@@ -794,7 +793,7 @@ export default {
...
@@ -794,7 +793,7 @@ export default {
this
.
treeTableNoArrange
(
tableData
)
this
.
treeTableNoArrange
(
tableData
)
},
},
submit
()
{
submit
()
{
const
tableData
=
this
.
table
Data
.
slice
()
const
tableData
=
this
.
submit
Data
.
slice
()
tableData
.
forEach
((
obj
,
i
)
=>
{
tableData
.
forEach
((
obj
,
i
)
=>
{
for
(
const
key
in
obj
)
{
for
(
const
key
in
obj
)
{
if
(
key
===
'storageZone'
)
{
if
(
key
===
'storageZone'
)
{
...
@@ -811,7 +810,7 @@ export default {
...
@@ -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
(
'父件为虚拟件时,必须添加子件!'
)
if
(
isVirtualHasChild
)
return
this
.
$utils
.
showMessageWarning
(
'父件为虚拟件时,必须添加子件!'
)
const
param
=
{
const
param
=
{
'operator'
:
this
.
operator
,
'operator'
:
this
.
operator
,
...
@@ -837,8 +836,12 @@ export default {
...
@@ -837,8 +836,12 @@ export default {
console
.
log
(
err
)
console
.
log
(
err
)
})
})
},
},
treeTableNoArrange
(
tableData
)
{
treeTableNoArrange
(
tableData
,
type
)
{
tableData
.
forEach
((
item
,
i
)
=>
{
if
(
type
!==
'remove'
)
{
this
.
submitData
=
this
.
$utils
.
deepClone
(
tableData
)
this
.
tableData
=
this
.
$utils
.
deepClone
(
tableData
)
}
this
.
tableData
.
forEach
((
item
,
i
)
=>
{
item
.
parentIndex
=
i
+
1
item
.
parentIndex
=
i
+
1
if
(
item
.
children
)
{
if
(
item
.
children
)
{
item
.
children
.
forEach
((
child
,
j
)
=>
{
item
.
children
.
forEach
((
child
,
j
)
=>
{
...
@@ -847,7 +850,6 @@ export default {
...
@@ -847,7 +850,6 @@ export default {
})
})
}
}
})
})
this
.
tableData
=
tableData
},
},
changePageSize
(
pageSize
)
{
changePageSize
(
pageSize
)
{
this
.
pagination
.
pageSize
=
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