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
f3a3e462
Commit
f3a3e462
authored
Jul 25, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP相关_退库管理功能开发及配置(台账退库)
parent
b85cd758
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
17 deletions
+47
-17
index.vue
...mes/src/privateComponents/components/AoNoSelect/index.vue
+9
-0
ERPAddInStorageBackItemDialog.vue
...rageBackItem/components/ERPAddInStorageBackItemDialog.vue
+33
-12
index.vue
...eComponents/components/ERP_AddInStorageBackItem/index.vue
+5
-5
No files found.
applications/dee-mes/src/privateComponents/components/AoNoSelect/index.vue
View file @
f3a3e462
...
...
@@ -59,6 +59,8 @@ export default {
if
(
!
this
.
basicData
.
id
)
{
if
(
this
.
form
.
subTypeName
===
'MatchStockBackRequest'
||
this
.
form
.
subTypeName
===
'InternalStockBackRequest'
)
{
this
.
$set
(
this
.
form
,
'extProcessPlan'
,
null
)
}
else
if
(
this
.
form
.
subTypeName
===
'InventoryStockBackRequest'
)
{
this
.
$set
(
this
.
form
,
'assembleCode'
,
null
)
}
else
{
this
.
$set
(
this
.
form
,
'aoNo'
,
''
)
}
...
...
@@ -115,6 +117,13 @@ export default {
'value'
:
id
})
}
if
(
this
.
form
.
subTypeName
===
'InventoryStockBackRequest'
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'subTypeName'
,
'operator'
:
'EQ'
,
'value'
:
'ExtProcessPlanAssemblyUnit'
})
}
this
.
loading
=
true
this
.
options
=
[]
this
.
$api
.
searchApi
(
requestUrl
,
params
).
then
(
res
=>
{
...
...
applications/dee-mes/src/privateComponents/components/ERP_AddInStorageBackItem/components/ERPAddInStorageBackItemDialog.vue
View file @
f3a3e462
...
...
@@ -62,6 +62,16 @@ export default {
}
},
watch
:
{
'basicData.subTypeName'
:
{
immediate
:
true
,
handler
(
val
)
{
if
(
val
===
'InventoryStockBackRequest'
)
{
this
.
cmpOptions
=
{
typeName
:
'ErpInventory'
,
layKey
:
'InventoryBackAddItemLs'
}
}
else
if
(
val
===
'MatchStockBackRequest'
||
val
===
'InternalStockBackRequest'
)
{
this
.
cmpOptions
=
{
typeName
:
'JobResponseSorting'
,
layKey
:
'add_MatchStockBackRequestItem'
}
}
}
}
},
created
()
{
},
...
...
@@ -77,33 +87,44 @@ export default {
submitEvent
(
addContinue
)
{
this
.
$refs
[
'applyForm'
].
validate
((
valid
)
=>
{
let
scrapCount
=
0
let
maxAmount
=
0
let
inventoryData
=
null
let
aoNo
=
''
if
(
valid
&&
this
.
selection
)
{
let
responseName
=
''
// 历史配套数据
if
(
this
.
selection
.
subTypeName
===
'JobResponseOutStorageMatch'
)
{
responseName
=
'oldOutStorage'
scrapCount
=
-
(
this
.
selection
.
scrapCount
)
}
else
{
responseName
=
'jobResponseSorting'
if
(
this
.
hasTop
)
{
// 库内退库/配套退库
maxAmount
=
this
.
$utils
.
subNum
(
this
.
selection
.
outsideAmount
,
-
this
.
selection
.
backedAmount
,
-
this
.
selection
.
backAmount
,
scrapCount
)
aoNo
=
(
typeof
this
.
basicData
.
extProcessPlan
===
'string'
&&
this
.
basicData
.
extProcessPlan
.
includes
(
'+'
)
?
this
.
basicData
.
extProcessPlan
.
split
(
'+'
)[
0
]
:
this
.
basicData
.
extProcessPlan
.
serialNumber
)
||
this
.
basicData
.
aoPlan
inventoryData
=
this
.
selection
.
erpInventory
if
(
this
.
selection
.
subTypeName
===
'JobResponseOutStorageMatch'
)
{
// 历史配套数据(配套退库使用)
responseName
=
'oldOutStorage'
scrapCount
=
-
(
this
.
selection
.
scrapCount
)
}
else
{
responseName
=
'jobResponseSorting'
}
}
else
if
(
this
.
basicData
.
subTypeName
===
'InventoryStockBackRequest'
)
{
// 台账退库
maxAmount
=
this
.
selection
.
usableAmount
inventoryData
=
this
.
selection
responseName
=
'erpInventory'
}
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
=
[{
'subTypeName'
:
`
${
this
.
basicData
.
subTypeName
}
Item`
,
'material'
:
inventoryData
.
extMaterial
,
'materialId'
:
inventoryData
.
extMaterialId
,
'testNo'
:
inventoryData
.
testNo
,
'batchNo'
:
inventoryData
.
batchNumber
,
'serialNo'
:
inventoryData
.
serialNo
,
'
jobRespons
eId'
:
this
.
selection
.
id
,
'batchNo'
:
this
.
selection
.
batchNumber
,
'serialNo'
:
this
.
selection
.
serialNo
,
'
uniqu
eId'
:
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
,
'unit'
:
this
.
selection
.
unit
,
'reqNo'
:
this
.
selection
.
reqNo
||
''
'reqNo'
:
this
.
selection
.
reqNo
||
''
,
'aoPlan'
:
aoNo
,
'mdsItemCode'
:
inventoryData
.
extMaterial
.
resCode
}]
data
[
0
][
responseName
]
=
this
.
selection
this
.
$emit
(
'submitEvent'
,
{
formData
:
data
,
addContinue
})
...
...
applications/dee-mes/src/privateComponents/components/ERP_AddInStorageBackItem/index.vue
View file @
f3a3e462
...
...
@@ -118,7 +118,7 @@ export default {
item
.
scrapCount
=
null
item
.
unit
=
item
.
jobResponseSorting
.
erpInventory
&&
item
.
jobResponseSorting
.
erpInventory
.
unit
item
.
testNo
=
item
.
jobResponseSorting
.
erpInventory
&&
item
.
jobResponseSorting
.
erpInventory
.
testNo
item
.
jobRespons
eId
=
item
.
jobResponseSorting
.
id
item
.
uniqu
eId
=
item
.
jobResponseSorting
.
id
}
}
if
(
item
.
oldOutStorage
)
{
...
...
@@ -131,7 +131,7 @@ export default {
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
.
jobRespons
eId
=
item
.
oldOutStorage
.
id
item
.
uniqu
eId
=
item
.
oldOutStorage
.
id
}
}
return
item
...
...
@@ -208,12 +208,12 @@ export default {
})
},
filterCurData
()
{
this
.
tableData
=
this
.
tableData
.
filter
(
item
=>
!
this
.
selectionRows
.
map
(
item
=>
item
.
jobResponseId
).
includes
(
item
.
jobRespons
eId
))
this
.
tableData
=
this
.
tableData
.
filter
(
item
=>
!
this
.
selectionRows
.
map
(
item
=>
item
.
uniqueId
).
includes
(
item
.
uniqu
eId
))
},
submitEvent
({
formData
,
addContinue
})
{
const
onlyFlag
=
this
.
tableData
.
find
(
item
=>
!
item
.
reqNo
.
includes
(
formData
[
0
].
reqNo
)
&&
!
formData
[
0
].
reqNo
.
includes
(
item
.
reqNo
))
const
onlyFlag
=
this
.
tableData
.
find
(
item
=>
item
.
reqNo
&&
!
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
.
jobResponseId
).
includes
(
formData
[
0
].
jobRespons
eId
)
const
extMaterialIds
=
this
.
tableData
.
map
(
item
=>
item
.
uniqueId
).
includes
(
formData
[
0
].
uniqu
eId
)
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