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
fb97b867
Commit
fb97b867
authored
Apr 28, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门
parent
90488a30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
58 deletions
+41
-58
Addrow.vue
pages/basicData/department/Addrow.vue
+22
-32
add.vue
pages/basicData/department/add.vue
+19
-26
No files found.
pages/basicData/department/Addrow.vue
View file @
fb97b867
...
...
@@ -11,13 +11,13 @@
<Input
v-model=
"entity.departcode"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<
!--
<
FormItem
:label=
"l('organizationType')"
prop=
"organizationType"
>
<
!--
<
Col
:span=
"12"
>
<FormItem
:label=
"l('organizationType')"
prop=
"organizationType"
>
<Input
v-model=
"entity.organization_Type"
readonly
placeholder=
"请选择..."
>
<Button
slot=
"append"
@
click=
"selectDepart"
>
选择
</Button>
</Input>
</FormItem>
-->
</Col>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('upMent')"
>
<b>
{{
entity
.
name
}}
</b>
...
...
@@ -26,7 +26,7 @@
<Col
:span=
"24"
>
<FormItem
:label=
"l('cityName')"
>
<Cascader
:data=
"citys"
v-model=
"entity.
description02
"
></Cascader>
<Cascader
:data=
"citys"
v-model=
"entity.
location
"
></Cascader>
</FormItem>
</Col>
<Col
:span=
"12"
>
...
...
@@ -64,14 +64,12 @@ export default {
// components: { OrganizType },
data
()
{
return
{
showTree
:
false
,
//组织类型
//
showTree: false, //组织类型
disabled
:
false
,
citys
:
citys
(),
entity
:
{
name
:
""
,
// organization_Id: 0,
// organization_Type: "",
property
:
[]
organization_Id
:
0
,
organization_Type
:
""
},
rules
:
{
title02
:
[
...
...
@@ -97,32 +95,23 @@ export default {
handleSubmit
()
{
this
.
$refs
[
"form"
].
validate
(
value
=>
{
if
(
value
)
{
// let property = "";
if
(
this
.
entity
.
property
)
{
if
(
this
.
entity
.
property
[
0
]
==
1
||
this
.
entity
.
property
[
1
]
==
1
||
this
.
entity
.
property
[
2
]
==
1
)
{
this
.
entity
.
isProduction
=
1
;
}
else
{
this
.
entity
.
isProduction
=
0
;
}
alert
(
this
.
entity
.
property
);
// property = this.entity.property.join;
if
(
this
.
entity
.
property
[
0
]
==
1
||
this
.
entity
.
property
[
1
]
==
1
||
this
.
entity
.
property
[
2
]
==
1
)
{
this
.
entity
.
isProduction
=
1
;
}
else
{
this
.
entity
.
isProduction
=
""
;
// property = "";
this
.
entity
.
isProduction
=
0
;
}
let
paramsdata
=
{
name
:
this
.
entity
.
title02
,
//部门名称
parent_Id
:
this
.
entity
.
id
,
//上级部门 [id]
code
:
this
.
entity
.
departcode
,
//部门编号
// organization_Id: this.entity.organization_Id, //组织类型 [id]
location
:
this
.
entity
.
location
,
//省市县
location
:
this
.
entity
.
location
.
join
()
,
//省市县
isProduction
:
this
.
entity
.
isProduction
,
//是否生产班组:1是,0否
property
:
this
.
entity
.
property
,
//属性
parentTitle
:
this
.
entity
.
name
//上级名称
property
:
this
.
entity
.
property
.
join
()
//属性
};
Api
.
create
(
paramsdata
)
.
then
(
r
=>
{
...
...
@@ -141,9 +130,9 @@ export default {
}
});
},
//
selectDepart() {
//
this.showTree = true;
//
},
selectDepart
()
{
this
.
showTree
=
true
;
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
...
...
@@ -154,9 +143,10 @@ export default {
},
watch
:
{
val
(
v
)
{
console
.
log
(
v
);
this
.
entity
=
{};
this
.
entity
.
name
=
v
.
name
;
this
.
entity
.
id
=
v
.
parent_I
d
;
this
.
entity
.
id
=
v
.
i
d
;
}
}
};
...
...
pages/basicData/department/add.vue
View file @
fb97b867
...
...
@@ -47,7 +47,7 @@
:show
.
sync=
"showTree"
:value
.
sync=
"entity.organization_Id"
:text
.
sync=
"entity.organizationType"
/>
-->
/>
-->
</Form>
</
template
>
<
script
>
...
...
@@ -59,7 +59,7 @@ export default {
// components: { OrganizType },
data
()
{
return
{
showTree
:
false
,
//组织类型
//
showTree: false, //组织类型
disabled
:
false
,
citys
:
citys
(),
entity
:
{
...
...
@@ -69,15 +69,15 @@ export default {
rules
:
{
title02
:
[
{
required
:
true
,
message
:
"库位名不能为空"
,
trigger
:
"blur"
}
],
organizationType
:
[
{
// type: 'array',
required
:
true
,
message
:
"组织类型不能为空"
,
trigger
:
"blur"
}
]
// organizationType: [
// {
// // type: 'array',
// required: true,
// message: "组织类型不能为空",
// trigger: "blur"
// }
// ]
}
};
},
...
...
@@ -85,21 +85,15 @@ export default {
handleSubmit
()
{
this
.
$refs
[
"form"
].
validate
(
value
=>
{
if
(
value
)
{
// var property = "";
if
(
this
.
entity
.
property
)
{
if
(
this
.
entity
.
property
[
0
]
==
1
||
this
.
entity
.
property
[
1
]
==
1
||
this
.
entity
.
property
[
2
]
==
1
)
{
this
.
entity
.
isProduction
=
1
;
}
else
{
this
.
entity
.
isProduction
=
0
;
}
if
(
this
.
entity
.
property
[
0
]
==
1
||
this
.
entity
.
property
[
1
]
==
1
||
this
.
entity
.
property
[
2
]
==
1
)
{
this
.
entity
.
isProduction
=
1
;
}
else
{
this
.
entity
.
isProduction
=
""
;
this
.
entity
.
isProduction
=
0
;
}
alert
(
this
.
entity
.
property
);
let
location
;
if
(
this
.
entity
.
location
)
{
location
=
this
.
entity
.
location
.
join
(
","
);
...
...
@@ -110,11 +104,10 @@ export default {
name
:
this
.
entity
.
title02
,
//部门名称
parent_Id
:
0
,
//上级部门 [id]
code
:
this
.
entity
.
departcode
,
//部门编号
//
organization_Id: this.entity.organization_Id, //组织类型 [id]
organization_Id
:
this
.
entity
.
organization_Id
,
//组织类型 [id]
location
:
location
,
//省市县
isProduction
:
this
.
entity
.
isProduction
,
//是否生产班组:1是,0否
property
:
this
.
entity
.
property
,
//属性
parentTitle
:
""
property
:
this
.
entity
.
property
.
join
()
//属性
};
Api
.
create
(
paramsdata
)
.
then
(
r
=>
{
...
...
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