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
90dba637
Commit
90dba637
authored
Jul 01, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品
parent
62e7d2ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
70 deletions
+10
-70
materiel.vue
components/page/materiel.vue
+1
-1
add.vue
pages/technology/productMix/product/add.vue
+4
-26
edit.vue
pages/technology/productMix/product/edit.vue
+5
-43
No files found.
components/page/materiel.vue
View file @
90dba637
...
...
@@ -100,7 +100,7 @@ export default {
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择
人员
"
default
:
"请选择
物料
"
},
multiple
:
{
type
:
Boolean
,
...
...
pages/technology/productMix/product/add.vue
View file @
90dba637
...
...
@@ -60,15 +60,7 @@
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('madeCompany')"
prop=
"madeCompany"
>
<Select
v-model=
"entity.madeCompany"
placeholder=
"请选择"
>
<Option
v-for=
"(item,index) in componaylist"
:key=
"index"
:value=
"item.value"
style=
"display:none"
>
{{
item
.
label
}}
</Option>
<Tree
:data=
"data2"
:ref=
"`madetree`"
@
on-select-change=
"handleSelect1"
></Tree>
</Select>
<departmentSelect
v-model=
"entity.madeCompany"
:type=
"3"
@
on-change=
"handleSelect1"
></departmentSelect>
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -113,7 +105,7 @@ export default {
downUrl
:
fileUrlDown
,
componaylist
:
[],
componaylist
:
[],
data2
:
[],
//主承制单位
selectdata1
:
[],
rules
:
{
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"change"
}],
...
...
@@ -147,16 +139,10 @@ export default {
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
created
()
{
this
.
treeCompany
();
this
.
parms
.
eid
=
this
.
$u
.
guid
();
// this.entity.levelId = this.parents.id;
},
methods
:
{
treeCompany
()
{
Api
.
getdepartmentstree
().
then
(
response
=>
{
this
.
data2
=
response
.
result
;
});
},
change
(
e
)
{
// console.log(e);
this
.
entity
.
name
=
e
.
name
;
...
...
@@ -169,16 +155,8 @@ export default {
this
.
img
=
liUrl
;
this
.
entity
.
productUrl
=
liUrl
;
},
handleSelect1
(
data
)
{
console
.
log
(
data
)
if
(
data
.
length
>
0
)
{
this
.
selectdata1
=
[];
this
.
selectdata1
=
data
;
this
.
componaylist
=
[];
this
.
componaylist
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
});
this
.
entity
.
madeCompany
=
data
[
0
].
id
;
this
.
entity
.
madeCompanyTitle
=
data
[
0
].
title
;
}
handleSelect1
(
v
,
data
)
{
this
.
entity
.
madeCompanyTitle
=
data
.
name
;
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
pages/technology/productMix/product/edit.vue
View file @
90dba637
...
...
@@ -56,10 +56,7 @@
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('madeCompany')"
prop=
"madeCompany"
>
<Select
v-model=
"entity.madeCompany"
placeholder=
"请选择"
>
<Option
:value=
"value"
>
{{
label
}}
</Option>
<Tree
:data=
"data2"
:ref=
"`madetree`"
@
on-select-change=
"handleSelect1"
></Tree>
</Select>
<departmentSelect
v-model=
"entity.madeCompany"
:type=
"3"
@
on-change=
"handleSelect1"
></departmentSelect>
</FormItem>
</Col>
<Col
:span=
"24"
>
...
...
@@ -127,7 +124,6 @@ export default {
// this.getMaterialList();
},
mounted
()
{
this
.
treeCompany
();
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
...
...
@@ -148,26 +144,13 @@ export default {
this
.
img
=
liUrl
;
this
.
entity
.
productUrl
=
liUrl
;
},
handleSelect1
(
data
)
{
if
(
data
.
length
>
0
)
{
this
.
selectdata1
=
[];
this
.
selectdata1
=
data
;
// this.componaylist = [];
this
.
label
=
data
[
0
].
title
;
this
.
value
=
data
[
0
].
id
;
// this.componaylist.push({ label: data[0].title, value: data[0].id });
this
.
entity
.
madeCompany
=
data
[
0
].
id
;
this
.
entity
.
madeCompanyTitle
=
data
[
0
].
title
;
}
handleSelect1
(
v
,
data
)
{
this
.
entity
.
madeCompanyTitle
=
data
.
name
;
},
proChange
(
id
,
data
,
listName
,
roots
)
{
this
.
entity
.
levelTitle
=
listName
.
join
(
" / "
);
},
treeCompany
()
{
Api
.
getdepartmentstree
().
then
(
response
=>
{
this
.
data2
=
response
.
result
;
});
},
load
(
v
)
{
Api
.
get
({
id
:
v
,
levelId
:
this
.
parents
.
id
}).
then
(
r
=>
{
if
(
r
.
result
.
productUrlList
&&
r
.
result
.
productUrlList
!=
""
)
{
...
...
@@ -178,7 +161,7 @@ export default {
this
.
entity
=
r
.
result
;
this
.
img
=
this
.
entity
.
productUrl
;
this
.
entity
.
productUrlList
=
this
.
parms
.
eid
;
this
.
componayId
=
r
.
result
.
madeCompany
;
this
.
entity
.
componayId
=
r
.
result
.
madeCompany
;
this
.
$refs
.
edit
.
dep
=
r
.
result
.
levelId
;
this
.
$refs
.
edit
.
label
=
r
.
result
.
levelTitle
;
this
.
entity
.
materialId
=
r
.
result
.
materialId
;
...
...
@@ -221,27 +204,6 @@ export default {
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
},
componayId
(
v
)
{
if
(
v
!=
null
)
{
var
arr
=
this
.
data2
;
var
id
=
this
.
componayId
;
var
returnedItem
=
""
;
var
finds
=
function
(
arr
,
id
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
].
id
==
id
)
{
returnedItem
=
arr
[
i
].
title
;
break
;
}
else
if
(
arr
[
i
].
children
.
length
>
0
)
{
finds
(
arr
[
i
].
children
,
id
);
//递归调用
}
}
return
returnedItem
;
};
finds
(
arr
,
id
);
this
.
label
=
returnedItem
;
this
.
value
=
id
;
}
}
}
};
...
...
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