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
be668cdb
Commit
be668cdb
authored
Sep 13, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退库入库修改
parent
049502f0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
7 deletions
+70
-7
util.js
applications/architecture-dee/src/utils/util.js
+12
-1
AddInStorageBackItemDialog.vue
...StorageBackItem/components/AddInStorageBackItemDialog.vue
+3
-2
index.vue
...ivateComponents/components/AddInStorageBackItem/index.vue
+8
-3
index.vue
.../src/privateComponents/components/EditReqAmount/index.vue
+1
-1
index.vue
...nts/components/OutStorageUseApprovedObjectApply/index.vue
+46
-0
No files found.
applications/architecture-dee/src/utils/util.js
View file @
be668cdb
...
@@ -1574,6 +1574,16 @@ export function sumArray(array, key) {
...
@@ -1574,6 +1574,16 @@ export function sumArray(array, key) {
}
}
return sum / baseNum
return sum / baseNum
}
}
// 计算一些列数据的和或者差值
export function subNum(firstArg, ...restArgs) {
const baseNum = 1000 // 解决js计算精度丢失问题
let sum = firstArg* baseNum
for (let i = 0; i < restArgs.length; i++) {
sum += Number(restArgs[i]) * baseNum
}
return sum / baseNum
}
export default {
export default {
treeFindBackArray,
treeFindBackArray,
throttle,
throttle,
...
@@ -1657,5 +1667,6 @@ export default {
...
@@ -1657,5 +1667,6 @@ export default {
deepClone,
deepClone,
fileByIdDownload,
fileByIdDownload,
findForm,
findForm,
sumArray
sumArray,
subNum
}
}
applications/dee-mes/src/privateComponents/components/AddInStorageBackItem/components/AddInStorageBackItemDialog.vue
View file @
be668cdb
...
@@ -86,7 +86,7 @@ export default {
...
@@ -86,7 +86,7 @@ export default {
submitEvent
(
addContinue
)
{
submitEvent
(
addContinue
)
{
this
.
$refs
[
'applyForm'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'applyForm'
].
validate
((
valid
)
=>
{
if
(
valid
&&
this
.
selection
)
{
if
(
valid
&&
this
.
selection
)
{
const
maxAmount
=
this
.
selection
.
outsideAmount
-
this
.
selection
.
backedAmount
-
this
.
selection
.
backAmount
-
this
.
selection
.
scrapCount
const
maxAmount
=
this
.
$utils
.
subNum
(
this
.
selection
.
outsideAmount
,
-
this
.
selection
.
backedAmount
,
-
this
.
selection
.
backAmount
,
-
this
.
selection
.
scrapCount
)
if
(
this
.
applyForm
.
reqAmount
>
maxAmount
)
return
this
.
$utils
.
showMessageWarning
(
`当前选中物料的退库数量不足!`
)
if
(
this
.
applyForm
.
reqAmount
>
maxAmount
)
return
this
.
$utils
.
showMessageWarning
(
`当前选中物料的退库数量不足!`
)
const
inventoryData
=
this
.
selection
.
inventory
const
inventoryData
=
this
.
selection
.
inventory
const
data
=
[{
const
data
=
[{
...
@@ -101,7 +101,8 @@ export default {
...
@@ -101,7 +101,8 @@ export default {
'backedAmount'
:
this
.
selection
.
backedAmount
||
0
,
'backedAmount'
:
this
.
selection
.
backedAmount
||
0
,
'scrapCount'
:
this
.
selection
.
scrapCount
||
0
,
'scrapCount'
:
this
.
selection
.
scrapCount
||
0
,
'outsideAmount'
:
this
.
selection
.
outsideAmount
||
0
,
'outsideAmount'
:
this
.
selection
.
outsideAmount
||
0
,
'reqAmount'
:
this
.
applyForm
.
reqAmount
'reqAmount'
:
this
.
applyForm
.
reqAmount
,
'reqNo'
:
this
.
selection
.
jobOrder
&&
this
.
selection
.
jobOrder
.
outStorageRequest
&&
this
.
selection
.
jobOrder
.
outStorageRequest
.
reqNo
||
''
}]
}]
this
.
$emit
(
'submitEvent'
,
{
formData
:
data
,
addContinue
})
this
.
$emit
(
'submitEvent'
,
{
formData
:
data
,
addContinue
})
addContinue
&&
this
.
cleanAddForm
()
addContinue
&&
this
.
cleanAddForm
()
...
...
applications/dee-mes/src/privateComponents/components/AddInStorageBackItem/index.vue
View file @
be668cdb
...
@@ -118,6 +118,9 @@ export default {
...
@@ -118,6 +118,9 @@ export default {
item
.
testNo
=
item
.
backItem
.
inventory
.
testNo
item
.
testNo
=
item
.
backItem
.
inventory
.
testNo
item
.
suppname
=
item
.
backItem
.
inventory
.
suppname
item
.
suppname
=
item
.
backItem
.
inventory
.
suppname
}
}
if
(
item
.
backItem
.
jobOrder
&&
item
.
backItem
.
jobOrder
.
outStorageRequest
)
{
item
.
reqNo
=
item
.
backItem
.
jobOrder
.
outStorageRequest
.
reqNo
||
''
}
}
}
return
item
return
item
})
})
...
@@ -175,7 +178,7 @@ export default {
...
@@ -175,7 +178,7 @@ export default {
type
:
'success'
,
type
:
'success'
,
message
:
'删除成功!'
message
:
'删除成功!'
})
})
this
.
tableData
=
this
.
tableData
.
filter
(
item
=>
!
this
.
selectionRows
.
map
(
item
=>
item
.
extMaterialId
).
includes
(
item
.
extMaterial
Id
))
this
.
tableData
=
this
.
tableData
.
filter
(
item
=>
!
this
.
selectionRows
.
map
(
item
=>
item
.
backItemId
).
includes
(
item
.
backItem
Id
))
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
})
})
...
@@ -187,8 +190,10 @@ export default {
...
@@ -187,8 +190,10 @@ export default {
})
})
},
},
submitEvent
({
formData
,
addContinue
})
{
submitEvent
({
formData
,
addContinue
})
{
const
extMaterialIds
=
this
.
tableData
.
map
(
item
=>
item
.
extMaterialId
).
includes
(
formData
[
0
].
extMaterialId
)
const
onlyFlag
=
this
.
tableData
.
find
(
item
=>
item
.
reqNo
!==
formData
[
0
].
reqNo
)
if
(
extMaterialIds
)
return
this
.
$utils
.
showMessageWarning
(
'相同物料不能重复添加,请重新选择!'
)
if
(
onlyFlag
)
return
this
.
$utils
.
showMessageWarning
(
'只能添加同一单据下的数据,请重新选择!'
)
const
extMaterialIds
=
this
.
tableData
.
map
(
item
=>
item
.
backItemId
).
includes
(
formData
[
0
].
backItemId
)
if
(
extMaterialIds
)
return
this
.
$utils
.
showMessageWarning
(
'相同数据不能重复添加,请重新选择!'
)
this
.
tableData
.
push
(...
formData
)
this
.
tableData
.
push
(...
formData
)
this
.
dialogShow
=
addContinue
||
false
this
.
dialogShow
=
addContinue
||
false
}
}
...
...
applications/dee-mes/src/privateComponents/components/EditReqAmount/index.vue
View file @
be668cdb
...
@@ -64,7 +64,7 @@ export default {
...
@@ -64,7 +64,7 @@ export default {
if
(
this
.
parentType_Inject
===
'scrapUse'
&&
this
.
form
.
extSupportingItemVO
&&
this
.
reqAmount
>
this
.
form
.
extSupportingItemVO
.
reqAmount
)
{
if
(
this
.
parentType_Inject
===
'scrapUse'
&&
this
.
form
.
extSupportingItemVO
&&
this
.
reqAmount
>
this
.
form
.
extSupportingItemVO
.
reqAmount
)
{
this
.
maxNum
=
this
.
form
.
extSupportingItemVO
.
reqAmount
this
.
maxNum
=
this
.
form
.
extSupportingItemVO
.
reqAmount
}
}
const
maxAmount
=
this
.
form
.
outsideAmount
-
this
.
form
.
backedAmount
-
this
.
form
.
backAmount
-
this
.
form
.
scrapCount
const
maxAmount
=
this
.
$utils
.
subNum
(
this
.
form
.
outsideAmount
,
-
this
.
form
.
backedAmount
,
-
this
.
form
.
backAmount
,
-
this
.
form
.
scrapCount
)
if
(
this
.
parentType_Inject
===
'退库入库'
&&
this
.
form
.
reqAmount
>
maxAmount
)
{
if
(
this
.
parentType_Inject
===
'退库入库'
&&
this
.
form
.
reqAmount
>
maxAmount
)
{
this
.
maxNum
=
maxAmount
this
.
maxNum
=
maxAmount
}
}
...
...
applications/dee-mes/src/privateComponents/components/OutStorageUseApprovedObjectApply/index.vue
0 → 100644
View file @
be668cdb
<!--
* @Author: gjn
* @Date: 2023-09-08 16:22:41
* @Description:领用出库签审对象_申请环节
-->
<
template
>
<div
class=
"OutStorageUseApprovedObject"
>
<dee-as-com
style=
"border:none;"
model-name=
"OutStorageUse"
:lay-config=
"cmpOptions"
:basic-data=
"basicData"
/>
</div>
</
template
>
<
script
>
export
default
{
name
:
'OutStorageUseApprovedObject'
,
components
:
{},
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
null
}
},
data
()
{
return
{
cmpOptions
:
{
typeName
:
'OutStorageUseItem'
,
layKey
:
'OutStorageUseApprovedObject_apply'
}
}
},
computed
:
{},
watch
:
{},
created
()
{},
mounted
()
{},
// 组件方法
methods
:
{}
}
</
script
>
<
style
lang=
'scss'
>
</
style
>
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