Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
金民
weiqiao-vue
Commits
a585a1cb
Commit
a585a1cb
authored
Mar 04, 2026
by
sunhaiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产任务初始化的时候设置物料清单数量
parent
8f19fea9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
xjrsoft-vue3/src/views/scgl/scrw/components/Form.vue
+21
-9
No files found.
xjrsoft-vue3/src/views/scgl/scrw/components/Form.vue
View file @
a585a1cb
...
...
@@ -68,8 +68,24 @@ import { log } from 'node:console';
try
{
const
apiUrl
=
import
.
meta
.
env
.
VITE_GLOB_API_URL
||
''
;
const
response
=
await
axios
.
get
(
apiUrl
+
'/magic-api/jcxx/wlxList'
,
{
params
:
{
bomId
:
newBomId
}
});
state
.
formModel
.
mesWarehouseMaterialList
=
[]
// Process API response data and assign to material list
state
.
formModel
.
mesWarehouseMaterialList
=
[];
//铸造量的值
let
sl
=
state
.
formModel
.
sl
;
if
(
sl
&&
sl
>
0
)
{
let
data
=
response
.
data
.
data
;
data
.
forEach
((
item
)
=>
{
//bom数量
let
bomsl
=
item
.
bomsl
;
if
(
bomsl
&&
bomsl
>
0
)
{
//用铸造量除以bom数量并保留2位小数
let
result
=
Number
((
sl
/
bomsl
).
toFixed
(
2
));
//物料数量等于原数量*倍数
if
(
item
.
wlsl
&&
item
.
wlsl
>
0
)
{
item
.
wlsl
=
Number
((
item
.
wlsl
*
result
).
toFixed
(
2
));
}
}
})
}
state
.
formModel
.
mesWarehouseMaterialList
=
response
.
data
.
data
.
map
(
item
=>
({
wlbh
:
item
.
wlbh
,
wlmc
:
item
.
wlmc
,
...
...
@@ -78,12 +94,9 @@ import { log } from 'node:console';
khbz
:
item
.
khbz
,
nkbz
:
item
.
nkbz
,
sftl
:
item
.
sftl
,
bomsl
:
item
.
bomsl
,
wlId
:
item
.
id
}
)
);
// state.formModel.mesWarehouseMaterialList = materialList;
}));
}
catch
(
error
)
{
notification
.
error
({
message
:
'获取物料清单失败'
});
}
...
...
@@ -275,4 +288,4 @@ import { log } from 'node:console';
getFieldsValue
,
sendMessageForAllIframe
});
</
script
>
\ No newline at end of file
</
script
>
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