Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
mes
mes-ui
Commits
5b638eb2
Commit
5b638eb2
authored
Jan 03, 2025
by
tanjunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 解决生产工单-补单工单工艺计算bug
parent
045e75fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
proofingInfo.vue
src/views/mes/pro/workorder/proofingInfo.vue
+21
-3
No files found.
src/views/mes/pro/workorder/proofingInfo.vue
View file @
5b638eb2
...
@@ -132,7 +132,7 @@
...
@@ -132,7 +132,7 @@
placeholder=
"请输入生产数量"
placeholder=
"请输入生产数量"
type=
"number"
type=
"number"
min=
"1"
min=
"1"
@
blur
=
"handleChangeQuantity"
@
change
=
"handleChangeQuantity"
/>
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -404,6 +404,7 @@ export default {
...
@@ -404,6 +404,7 @@ export default {
optType
:
undefined
,
optType
:
undefined
,
workorderId
:
null
,
workorderId
:
null
,
bomList
:
[],
bomList
:
[],
processList
:
[],
// 表单参数
// 表单参数
form
:
{
form
:
{
workorderId
:
null
,
workorderId
:
null
,
...
@@ -529,12 +530,14 @@ export default {
...
@@ -529,12 +530,14 @@ export default {
methods
:
{
methods
:
{
handleChangeQuantity
()
{
handleChangeQuantity
()
{
// console.log(quantity);
// 计算补单的时候 数量变更修改
// 计算补单的时候 数量变更修改
if
(
this
.
mode
===
'make'
)
{
if
(
this
.
mode
===
'make'
)
{
// this.form.quantity
// this.form.quantity
this
.
bomList
=
[]
this
.
bomList
=
[]
this
.
processList
=
[]
const
bomList
=
this
.
currentData
.
bomList
.
map
((
item
,
index
)
=>
{
const
bomList
=
this
.
currentData
.
bomList
.
map
((
item
,
index
)
=>
{
// console.log(item, 'items')
// console.log(item
.quantity
, 'items')
let
quantity
=
parseInt
(
this
.
form
.
quantity
*
item
.
quantity
*
100
/
this
.
currentData
.
quantity
)
let
quantity
=
parseInt
(
this
.
form
.
quantity
*
item
.
quantity
*
100
/
this
.
currentData
.
quantity
)
// console.log(quantity, 'quantity')
// console.log(quantity, 'quantity')
return
{
return
{
...
@@ -542,8 +545,23 @@ export default {
...
@@ -542,8 +545,23 @@ export default {
quantity
:
quantity
/
100
quantity
:
quantity
/
100
}
}
})
})
const
processList
=
this
.
currentData
.
processList
.
map
((
ele
)
=>
{
return
{
...
ele
,
processItemList
:
ele
.
processItemList
.
map
((
item
)
=>
{
// console.log(item.quantity, 'items2')
let
quantity
=
parseInt
(
this
.
form
.
quantity
*
item
.
quantity
*
100
/
this
.
currentData
.
quantity
)
return
{
...
item
,
quantity
:
quantity
/
100
}
})
}
})
this
.
bomList
=
bomList
this
.
bomList
=
bomList
this
.
processList
=
processList
this
.
$refs
[
"ProogingBomRef"
].
tableData
=
bomList
this
.
$refs
[
"ProogingBomRef"
].
tableData
=
bomList
this
.
$refs
[
"ProogingProcessRef"
].
tableData
=
processList
}
}
},
},
/** 查询生产工单下拉树结构 */
/** 查询生产工单下拉树结构 */
...
@@ -650,10 +668,10 @@ export default {
...
@@ -650,10 +668,10 @@ export default {
this
.
gCode
();
this
.
gCode
();
}
}
this
.
bomList
=
data
.
bomList
;
this
.
bomList
=
data
.
bomList
;
this
.
processList
=
data
.
processList
;
// 设置组件数据
// 设置组件数据
this
.
$refs
[
"ProogingBomRef"
].
tableData
=
data
.
bomList
;
this
.
$refs
[
"ProogingBomRef"
].
tableData
=
data
.
bomList
;
console
.
log
(
'生产工单'
,
data
.
processList
)
console
.
log
(
'生产工单'
,
data
.
processList
)
this
.
$refs
[
"ProogingProcessRef"
].
tableData
=
data
.
processList
;
this
.
$refs
[
"ProogingProcessRef"
].
tableData
=
data
.
processList
;
this
.
$refs
[
"WorkOrderSaleRef"
].
tableData
=
data
.
saleDirectiveList
;
this
.
$refs
[
"WorkOrderSaleRef"
].
tableData
=
data
.
saleDirectiveList
;
this
.
$refs
[
"WorkOrderSizeRef"
].
tableData
=
data
.
sizeList
;
this
.
$refs
[
"WorkOrderSizeRef"
].
tableData
=
data
.
sizeList
;
...
...
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