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
f93f9219
Commit
f93f9219
authored
Jul 24, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP相关_退库管理功能修改
parent
ad9c66c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
14 deletions
+55
-14
ERPAddInStorageBackItemDialog.vue
...rageBackItem/components/ERPAddInStorageBackItemDialog.vue
+15
-3
index.vue
...eComponents/components/ERP_AddInStorageBackItem/index.vue
+40
-11
No files found.
applications/dee-mes/src/privateComponents/components/ERP_AddInStorageBackItem/components/ERPAddInStorageBackItemDialog.vue
View file @
f93f9219
...
...
@@ -76,24 +76,36 @@ export default {
},
submitEvent
(
addContinue
)
{
this
.
$refs
[
'applyForm'
].
validate
((
valid
)
=>
{
let
scrapCount
=
0
if
(
valid
&&
this
.
selection
)
{
const
maxAmount
=
this
.
$utils
.
subNum
(
this
.
selection
.
outsideAmount
,
-
this
.
selection
.
backedAmount
,
-
this
.
selection
.
backAmount
)
let
responseName
=
''
// 历史配套数据
if
(
this
.
selection
.
subTypeName
===
'JobResponseOutStorageMatch'
)
{
responseName
=
'oldOutStorage'
scrapCount
=
-
(
this
.
selection
.
scrapCount
)
}
else
{
responseName
=
'jobResponseSorting'
}
const
maxAmount
=
this
.
$utils
.
subNum
(
this
.
selection
.
outsideAmount
,
-
this
.
selection
.
backedAmount
,
-
this
.
selection
.
backAmount
,
scrapCount
)
if
(
this
.
applyForm
.
reqAmount
>
maxAmount
)
return
this
.
$utils
.
showMessageWarning
(
`当前选中物料的退库数量不足!`
)
const
inventoryData
=
this
.
selection
.
erpInventory
const
data
=
[{
jobResponseSorting
:
this
.
selection
,
'subTypeName'
:
`
${
this
.
basicData
.
subTypeName
}
Item`
,
'material'
:
inventoryData
.
extMaterial
,
'materialId'
:
inventoryData
.
extMaterialId
,
'testNo'
:
inventoryData
.
testNo
,
'batchNo'
:
inventoryData
.
batchNumber
,
'serialNo'
:
inventoryData
.
serialNo
,
'jobResponseId'
:
this
.
selection
.
id
,
'backAmount'
:
this
.
selection
.
backAmount
||
0
,
'scrapCount'
:
this
.
selection
.
scrapCount
||
0
,
'backedAmount'
:
this
.
selection
.
backedAmount
||
0
,
'outsideAmount'
:
this
.
selection
.
outsideAmount
||
0
,
'reqAmount'
:
this
.
applyForm
.
reqAmount
,
'reqNo'
:
this
.
selection
.
erpSortingItem
&&
this
.
selection
.
erpSortingItem
.
erpSorting
&&
this
.
selection
.
erpSortingItem
.
erpSorting
.
reqNo
||
''
'unit'
:
this
.
selection
.
unit
,
'reqNo'
:
this
.
selection
.
reqNo
||
''
}]
data
[
0
][
responseName
]
=
this
.
selection
this
.
$emit
(
'submitEvent'
,
{
formData
:
data
,
addContinue
})
addContinue
&&
this
.
cleanAddForm
()
}
else
{
...
...
applications/dee-mes/src/privateComponents/components/ERP_AddInStorageBackItem/index.vue
View file @
f93f9219
...
...
@@ -111,6 +111,27 @@ export default {
if
(
item
.
jobResponseSorting
)
{
if
(
item
.
jobResponseSorting
.
erpSortingItem
&&
item
.
jobResponseSorting
.
erpSortingItem
.
erpSorting
)
{
item
.
reqNo
=
item
.
jobResponseSorting
.
erpSortingItem
.
erpSorting
.
reqNo
||
''
item
.
outsideAmount
=
item
.
jobResponseSorting
.
outsideAmount
item
.
backedAmount
=
item
.
jobResponseSorting
.
backedAmount
item
.
backAmount
=
item
.
jobResponseSorting
.
backAmount
item
.
outsideAmount
=
item
.
jobResponseSorting
.
outsideAmount
item
.
scrapCount
=
null
item
.
unit
=
item
.
jobResponseSorting
.
erpInventory
&&
item
.
jobResponseSorting
.
erpInventory
.
unit
item
.
testNo
=
item
.
jobResponseSorting
.
erpInventory
&&
item
.
jobResponseSorting
.
erpInventory
.
testNo
item
.
jobResponseId
=
item
.
jobResponseSorting
.
id
}
}
if
(
item
.
oldOutStorage
)
{
if
(
item
.
oldOutStorage
.
jobOrder
&&
item
.
oldOutStorage
.
jobOrder
.
outStorageRequest
)
{
item
.
reqNo
=
item
.
oldOutStorage
.
jobOrder
.
outStorageRequest
.
reqNo
||
''
item
.
outsideAmount
=
item
.
oldOutStorage
.
outsideAmount
item
.
backedAmount
=
item
.
oldOutStorage
.
backedAmount
item
.
backAmount
=
item
.
oldOutStorage
.
backAmount
item
.
outsideAmount
=
item
.
oldOutStorage
.
outsideAmount
item
.
scrapCount
=
item
.
oldOutStorage
.
scrapCount
item
.
unit
=
item
.
oldOutStorage
.
inventory
&&
item
.
oldOutStorage
.
inventory
.
extUnit
&&
item
.
oldOutStorage
.
inventory
.
extUnit
.
unitName
item
.
testNo
=
item
.
oldOutStorage
.
inventory
&&
item
.
oldOutStorage
.
inventory
.
testNo
item
.
jobResponseId
=
item
.
oldOutStorage
.
id
}
}
return
item
...
...
@@ -159,21 +180,26 @@ export default {
this
.
dialogShow
=
true
},
remove
()
{
const
ids
=
this
.
selectionRows
.
map
(
item
=>
item
.
id
)
const
ids
=
this
.
selectionRows
.
filter
(
item
=>
item
.
id
).
map
(
item
=>
item
.
id
)
this
.
$confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
post
(
`/RetirementItem/batch/deleteItem?`
,
ids
).
then
(
res
=>
{
if
(
ids
&&
ids
.
length
)
{
post
(
`/RetirementItem/batch/deleteItem`
,
ids
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
this
.
tableData
=
this
.
tableData
.
filter
(
item
=>
!
this
.
selectionRows
.
map
(
item
=>
item
.
jobResponseSorting
.
id
).
includes
(
item
.
jobResponseSorting
.
id
))
this
.
filterCurData
()
this
.
$bus
.
$emit
(
'cancelUnSaveRefresh'
)
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
else
{
this
.
filterCurData
()
}
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
...
...
@@ -181,10 +207,13 @@ export default {
})
})
},
filterCurData
()
{
this
.
tableData
=
this
.
tableData
.
filter
(
item
=>
!
this
.
selectionRows
.
map
(
item
=>
item
.
jobResponseId
).
includes
(
item
.
jobResponseId
))
},
submitEvent
({
formData
,
addContinue
})
{
const
onlyFlag
=
this
.
tableData
.
find
(
item
=>
item
.
reqNo
!==
formData
[
0
].
reqNo
)
const
onlyFlag
=
this
.
tableData
.
find
(
item
=>
!
item
.
reqNo
.
includes
(
formData
[
0
].
reqNo
)
&&
!
formData
[
0
].
reqNo
.
includes
(
item
.
reqNo
)
)
if
(
onlyFlag
)
return
this
.
$utils
.
showMessageWarning
(
'只能添加同一单据下的数据,请重新选择!'
)
const
extMaterialIds
=
this
.
tableData
.
map
(
item
=>
item
.
jobResponse
Sorting
.
id
).
includes
(
formData
[
0
].
jobResponseSorting
.
i
d
)
const
extMaterialIds
=
this
.
tableData
.
map
(
item
=>
item
.
jobResponse
Id
).
includes
(
formData
[
0
].
jobResponseI
d
)
if
(
extMaterialIds
)
return
this
.
$utils
.
showMessageWarning
(
'相同数据不能重复添加,请重新选择!'
)
this
.
tableData
.
push
(...
formData
)
this
.
dialogShow
=
addContinue
||
false
...
...
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