Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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-ui
Commits
d11aeedd
Commit
d11aeedd
authored
Oct 19, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工艺bom新增的物料获取
parent
82596033
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
19 deletions
+101
-19
materiel.vue
components/page/materiel.vue
+1
-0
add.vue
pages/technology/details/routingsupporting/add.vue
+94
-19
api.js
pages/technology/details/routingsupporting/api.js
+6
-0
No files found.
components/page/materiel.vue
View file @
d11aeedd
...
...
@@ -217,6 +217,7 @@ export default {
Id
:
this
.
bId
,
})
.
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
.
success
)
{
this
.
ids
=
res
.
result
;
let
arr
=
[...
this
.
data
].
filter
((
x
)
=>
...
...
pages/technology/details/routingsupporting/add.vue
View file @
d11aeedd
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
9
0"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
12
0"
>
<Row>
<!--
<Col
:span=
"12"
>
...
...
@@ -38,10 +38,11 @@
<FormItem
:label=
"l('routingDetailName')"
prop=
"routingDetailId"
>
<Select
v-model=
"entity.routingDetailId"
>
<Option
v-for=
"(item,index) in routingDetailList"
v-for=
"(item,
index) in routingDetailList"
:value=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</Option>
>
{{
item
.
label
}}
</Option
>
</Select>
</FormItem>
</Col>
...
...
@@ -58,12 +59,31 @@
<Materiel
:bomId=
"productBomId"
v-model=
"entity.materialId"
@
on-change=
"change"
></Materiel>
</FormItem>
-->
<FormItem
:label=
"l('nameMaterial')"
prop=
"materialId"
>
<Materiel
<Select
v-model=
"entity.materialId"
placeholder=
"请选择"
style=
"width: 300px"
>
<Option
v-for=
"(item, index) in listData"
:key=
"index"
:value=
"item.value"
:label=
"item.label"
style=
"display: none"
></Option>
<Tree
key=
"mytree"
:data=
"dataTree"
ref=
"mytree"
:render=
"renderContent"
></Tree>
</Select>
<!--
<Materiel
v-model=
"entity.materialId"
@
on-change=
"change"
:codeRuleType=
"1"
:setType=
"true"
></Materiel>
></Materiel>
-->
</FormItem>
</Col>
<!--
<Col
:span=
"8"
v-if=
"false"
>
...
...
@@ -73,19 +93,22 @@
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('quantity')"
prop=
"quantity"
>
<InputNumber
v-model=
"entity.quantity"
style=
"width:100%"
></InputNumber>
<InputNumber
v-model=
"entity.quantity"
style=
"width: 100%"
></InputNumber>
</FormItem>
</Col>
<Divider
orientation=
"left"
>
物料属性
</Divider>
<Row>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"名称:"
>
<span>
{{
entity
.
nameMaterial
}}
</span>
<span>
{{
entity
.
nameMaterial
}}
</span>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"编码:"
>
<span>
{{
entity
.
materialNumber
}}
</span>
<span>
{{
entity
.
materialNumber
}}
</span>
</FormItem>
</Col>
</Row>
...
...
@@ -140,6 +163,8 @@ export default {
data
()
{
return
{
forItem
:
{},
listData
:
[],
dataTree
:
[],
entity
:
{
routingHeaderId
:
null
,
routingDetailId
:
null
,
...
...
@@ -200,11 +225,59 @@ export default {
},
mounted
()
{
this
.
loadDetails
();
this
.
getData
();
},
methods
:
{
// onValue(filed, v) {
// this.$set(this.entity, filed, v);
// },
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
"span"
,
{
style
:
{
cursor
:
"pointer"
,
},
on
:
{
click
:
()
=>
{
this
.
handleSelect
(
data
);
//手动选择树节点
},
},
},
data
.
title
);
},
handleSelect
(
data
)
{
console
.
log
(
data
);
let
obj
=
{
label
:
data
.
title
,
value
:
data
.
materialId
,
};
this
.
listData
=
[];
this
.
listData
.
push
(
obj
);
this
.
entity
.
materialId
=
this
.
listData
[
0
].
value
;
this
.
entity
.
nameMaterial
=
this
.
listData
[
0
].
label
;
this
.
entity
.
nameMaterial
=
data
.
name
;
this
.
entity
.
materialId
=
data
.
materialId
;
this
.
entity
.
materialNumber
=
data
.
mmcode
;
this
.
entity
.
json
.
nameMaterial
=
data
.
name
;
this
.
entity
.
json
.
materialNumber
=
data
.
mmcode
;
Api
.
getMaterial
({
id
:
data
.
materialId
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
this
.
forItem
=
r
.
result
;
}
});
},
getData
()
{
Api
.
alltree
({
id
:
this
.
productBomId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
dataTree
=
r
.
result
;
// this.$Message.success("获取物料成功");
}
else
{
this
.
$Message
.
error
(
"获取物料失败"
);
}
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
...
...
@@ -228,15 +301,17 @@ export default {
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
change
(
e
,
v
)
{
this
.
entity
.
nameMaterial
=
e
.
name
;
this
.
entity
.
materialId
=
e
.
materialId
;
this
.
entity
.
materialNumber
=
e
.
mmcode
;
// change(e, v) {
// console.log(e);
// console.log(v);
// this.entity.nameMaterial = e.name;
// this.entity.materialId = e.materialId;
// this.entity.materialNumber = e.mmcode;
this
.
entity
.
json
.
nameMaterial
=
e
.
name
;
this
.
entity
.
json
.
materialNumber
=
e
.
mmcode
;
this
.
forItem
=
v
;
},
//
this.entity.json.nameMaterial = e.name;
//
this.entity.json.materialNumber = e.mmcode;
//
this.forItem = v;
//
},
loadDetails
()
{
//获取工序列表
let
parms
=
{
...
...
pages/technology/details/routingsupporting/api.js
View file @
d11aeedd
...
...
@@ -37,4 +37,10 @@ export default {
materiallist
(
params
){
return
Api
.
post
(
`
${
material
}
/material/materiallist`
,
params
);
},
alltree
(
params
){
return
Api
.
post
(
`
${
technologyUrl
}
productinfo/alltree`
,
params
);
//bom树
},
getMaterial
(
params
){
return
Api
.
get
(
`
${
material
}
/material/get`
,
params
);
//bom树
},
}
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