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
14cfad59
Commit
14cfad59
authored
Jun 29, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
封装物料控件
parent
8270e90f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
35 deletions
+21
-35
edit.vue
pages/technology/productMix/product/edit.vue
+14
-30
index.vue
pages/technology/productMix/product/index.vue
+7
-5
No files found.
pages/technology/productMix/product/edit.vue
View file @
14cfad59
...
...
@@ -17,9 +17,7 @@
<Col
:span=
"12"
>
<FormItem
:label=
"l('materialId')"
prop=
"materialId"
>
<!--
<Input
v-model=
"entity.mmcode"
></Input>
-->
<Select
v-model=
"entity.materialId"
filterable
clearable
@
on-change=
"change"
>
<Option
v-for=
"item in dataList"
:value=
"item.id"
:key=
"item.id"
>
{{
item
.
code
}}
</Option>
</Select>
<Materiel
v-model=
"entity.materialId"
@
on-change=
"change"
></Materiel>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
>
...
...
@@ -123,17 +121,13 @@ export default {
v
:
Object
,
eid
:
Number
,
parents
:
{
type
:
Object
,
default
:
()
=>
{
return
{
id
:
-
1
,
parentName
:
""
};
}
id
:
Number
,
parentName
:
String
,
ids
:
String
}
},
created
()
{
this
.
getMaterialList
();
//
this.getMaterialList();
},
mounted
()
{
this
.
treeCompany
();
...
...
@@ -145,23 +139,13 @@ export default {
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
change
(
val
)
{
this
.
dataList
.
forEach
(
e
=>
{
if
(
e
.
id
==
val
)
{
this
.
entity
.
name
=
e
.
name
;
this
.
entity
.
mmcode
=
e
.
code
;
this
.
entity
.
drawingNo
=
e
.
drawingNo
;
this
.
entity
.
version
=
e
.
version
;
}
});
},
getMaterialList
()
{
let
data
=
{
conditions
:
[]
};
Api
.
materiallist
(
data
).
then
(
r
=>
{
this
.
dataList
=
r
.
result
.
filter
(
item
=>
item
.
status
==
3
);
});
change
(
e
)
{
// console.log(e);
this
.
entity
.
name
=
e
.
name
;
this
.
entity
.
mmcode
=
e
.
mmcode
;
this
.
entity
.
drawingNo
=
e
.
drawingNo
;
this
.
entity
.
version
=
e
.
version
;
this
.
entity
.
materialId
=
e
.
materialId
;
},
clickData
(
data
,
liUrl
)
{
this
.
img
=
liUrl
;
...
...
@@ -189,7 +173,7 @@ export default {
});
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
,
levelId
:
this
.
parents
.
id
}).
then
(
r
=>
{
if
(
r
.
result
.
productUrlList
&&
r
.
result
.
productUrlList
!=
""
)
{
this
.
parms
.
eid
=
r
.
result
.
productUrlList
;
}
else
{
...
...
@@ -202,7 +186,7 @@ export default {
this
.
$refs
.
edit
.
dep
=
r
.
result
.
levelId
;
this
.
$refs
.
edit
.
label
=
r
.
result
.
levelTitle
;
this
.
entity
.
materialId
=
r
.
result
.
materialId
;
this
.
entity
.
levelId
=
r
.
result
.
levelId
+
''
;
this
.
entity
.
levelId
=
r
.
result
.
levelId
+
""
;
});
},
handleSubmit
()
{
...
...
pages/technology/productMix/product/index.vue
View file @
14cfad59
...
...
@@ -49,7 +49,7 @@
<a
@
click=
"bom(row)"
>
<Icon
type=
"md-git-merge"
/>
BOM
</a>
<a
@
click=
"edit(row
.id
)"
>
<a
@
click=
"edit(row)"
>
<Icon
type=
"md-create"
/>
编辑
</a>
<a
@
click=
"remove(row.id)"
>
...
...
@@ -189,7 +189,7 @@ export default {
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
click
:
()
=>
this
.
edit
(
params
.
row
)
}
},
"编辑"
...
...
@@ -279,14 +279,16 @@ export default {
// console.log(row)
this
.
curId
=
row
.
id
;
this
.
parent
.
id
=
row
.
levelId
;
this
.
parent
.
parentName
=
row
.
levelTitle
;
this
.
parent
.
parentName
=
row
.
levelTitle
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
this
.
fullscreen
=
false
;
},
edit
(
id
)
{
this
.
curId
=
id
;
edit
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
parent
.
id
=
row
.
levelId
;
this
.
parent
.
parentName
=
row
.
levelTitle
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
...
...
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