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
77c2f401
Commit
77c2f401
authored
May 06, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门bug
parent
e8e7f779
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
32 deletions
+55
-32
Addrow.vue
pages/basicData/department/Addrow.vue
+27
-12
add.vue
pages/basicData/department/add.vue
+27
-20
edit.vue
pages/basicData/department/edit.vue
+1
-0
No files found.
pages/basicData/department/Addrow.vue
View file @
77c2f401
...
...
@@ -35,7 +35,7 @@
<Radio
label=
"1"
>
是
</Radio>
<Radio
label=
"0"
>
否
</Radio>
</RadioGroup>
-->
<CheckboxGroup
v-model=
"
entity.
property"
>
<CheckboxGroup
v-model=
"property"
>
<Checkbox
label=
"1"
>
生产班组
</Checkbox>
<Checkbox
label=
"2"
>
排产资源
</Checkbox>
<Checkbox
label=
"3"
>
车间
</Checkbox>
...
...
@@ -68,9 +68,14 @@ export default {
disabled
:
false
,
citys
:
citys
(),
entity
:
{
id
:
0
,
title02
:
""
,
organization_Id
:
0
,
organization_Type
:
""
organization_Type
:
""
,
departcode
:
""
},
property
:
[],
location
:
[],
rules
:
{
title02
:
[
{
required
:
true
,
message
:
"库位名不能为空"
,
trigger
:
"blur"
}
...
...
@@ -95,24 +100,34 @@ export default {
handleSubmit
()
{
this
.
$refs
[
"form"
].
validate
(
value
=>
{
if
(
value
)
{
if
(
this
.
entity
.
property
[
0
]
==
1
||
this
.
entity
.
property
[
1
]
==
1
||
this
.
entity
.
property
[
2
]
==
1
)
{
this
.
entity
.
isProduction
=
1
;
let
isProduction
=
0
;
let
property
=
[];
if
(
this
.
property
.
length
>
0
)
{
if
(
this
.
property
[
0
]
==
1
||
this
.
property
[
1
]
==
1
||
this
.
property
[
2
]
==
1
)
{
isProduction
=
1
;
}
else
{
isProduction
=
0
;
}
property
=
this
.
property
;
}
else
{
this
.
entity
.
isProduction
=
0
;
property
=
[];
isProduction
=
0
;
}
let
location
=
this
.
location
;
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
.
join
(
),
//省市县
isProduction
:
this
.
entity
.
isProduction
,
//是否生产班组:1是,0否
property
:
this
.
entity
.
property
.
join
(
)
//属性
location
:
location
.
join
(
","
),
//省市县
isProduction
:
isProduction
,
//是否生产班组:1是,0否
property
:
property
.
join
(
","
)
//属性
};
alert
(
paramsdata
);
Api
.
create
(
paramsdata
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
...
...
pages/basicData/department/add.vue
View file @
77c2f401
...
...
@@ -25,7 +25,7 @@
<Radio
label=
"1"
>
是
</Radio>
<Radio
label=
"0"
>
否
</Radio>
</RadioGroup>
-->
<CheckboxGroup
v-model=
"
entity.
property"
>
<CheckboxGroup
v-model=
"property"
>
<Checkbox
label=
"1"
>
生产班组
</Checkbox>
<Checkbox
label=
"2"
>
排产资源
</Checkbox>
<Checkbox
label=
"3"
>
车间
</Checkbox>
...
...
@@ -34,7 +34,7 @@
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('cityName')"
>
<Cascader
:data=
"citys"
v-model=
"
entity.
location"
></Cascader>
<Cascader
:data=
"citys"
v-model=
"location"
></Cascader>
</FormItem>
</Col>
</Row>
...
...
@@ -47,7 +47,7 @@
:show
.
sync=
"showTree"
:value
.
sync=
"entity.organization_Id"
:text
.
sync=
"entity.organizationType"
/>
-->
/>
-->
</Form>
</
template
>
<
script
>
...
...
@@ -63,9 +63,13 @@ export default {
disabled
:
false
,
citys
:
citys
(),
entity
:
{
//
organization_Id: 0,
organization_Id
:
0
,
// organizationType: ""
departcode
:
""
,
title02
:
""
},
property
:
[],
location
:
[],
rules
:
{
title02
:
[
{
required
:
true
,
message
:
"库位名不能为空"
,
trigger
:
"blur"
}
...
...
@@ -85,29 +89,32 @@ export default {
handleSubmit
()
{
this
.
$refs
[
"form"
].
validate
(
value
=>
{
if
(
value
)
{
if
(
this
.
entity
.
property
[
0
]
==
1
||
this
.
entity
.
property
[
1
]
==
1
||
this
.
entity
.
property
[
2
]
==
1
)
{
this
.
entity
.
isProduction
=
1
;
let
isProduction
=
0
;
let
property
=
[];
if
(
this
.
property
.
length
>
0
)
{
if
(
this
.
property
[
0
]
==
1
||
this
.
property
[
1
]
==
1
||
this
.
property
[
2
]
==
1
)
{
isProduction
=
1
;
}
else
{
isProduction
=
0
;
}
property
=
this
.
property
;
}
else
{
this
.
entity
.
isProduction
=
0
;
}
let
location
;
if
(
this
.
entity
.
location
)
{
location
=
this
.
entity
.
location
.
join
(
","
);
}
else
{
location
=
""
;
property
=
[];
isProduction
=
0
;
}
let
location
=
this
.
location
;
let
paramsdata
=
{
name
:
this
.
entity
.
title02
,
//部门名称
parent_Id
:
0
,
//上级部门 [id]
code
:
this
.
entity
.
departcode
,
//部门编号
organization_Id
:
this
.
entity
.
organization_Id
,
//组织类型 [id]
location
:
location
,
//省市县
isProduction
:
this
.
entity
.
isProduction
,
//是否生产班组:1是,0否
property
:
this
.
entity
.
property
.
join
(
)
//属性
location
:
location
.
join
(
","
)
,
//省市县
isProduction
:
isProduction
,
//是否生产班组:1是,0否
property
:
property
.
join
(
","
)
//属性
};
Api
.
create
(
paramsdata
)
.
then
(
r
=>
{
...
...
pages/basicData/department/edit.vue
View file @
77c2f401
...
...
@@ -144,6 +144,7 @@ export default {
watch
:
{
"row.id"
(
v
)
{
console
.
log
(
this
.
row
);
this
.
city_level
=
[];
let
model
=
{
name
:
this
.
row
.
name
,
parent_Id
:
this
.
row
.
parent_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