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
90f57519
Commit
90f57519
authored
Sep 01, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料入库加库类型
parent
6b41fe09
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
23 deletions
+42
-23
index.vue
pages/materiel/classification/index.vue
+10
-4
add.vue
pages/materiel/masterData/add.vue
+15
-14
index.vue
pages/materiel/masterData/index.vue
+17
-5
No files found.
pages/materiel/classification/index.vue
View file @
90f57519
...
@@ -25,7 +25,11 @@
...
@@ -25,7 +25,11 @@
@
click=
"toggle"
@
click=
"toggle"
title=
"展开/合并"
title=
"展开/合并"
></Button>
></Button>
<Button
icon=
"md-refresh"
title=
"刷新"
@
click=
"loadTree(model8)"
></Button>
<Button
icon=
"md-refresh"
title=
"刷新"
@
click=
"loadTree(model8,nodeInfo.codeRuleType)"
></Button>
<Button
icon=
"md-rewind"
title=
"收起"
@
click=
"hide"
></Button>
<Button
icon=
"md-rewind"
title=
"收起"
@
click=
"hide"
></Button>
</ButtonGroup>
</ButtonGroup>
</div>
</div>
...
@@ -125,7 +129,7 @@ export default {
...
@@ -125,7 +129,7 @@ export default {
console
.
log
(
val
);
console
.
log
(
val
);
this
.
nodeInfo
.
codeRuleId
=
val
;
this
.
nodeInfo
.
codeRuleId
=
val
;
this
.
model8
=
val
;
this
.
model8
=
val
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
this
.
cityList
.
forEach
((
e
)
=>
{
this
.
cityList
.
forEach
((
e
)
=>
{
if
(
val
==
e
.
id
)
{
if
(
val
==
e
.
id
)
{
this
.
downName
=
e
.
name
;
this
.
downName
=
e
.
name
;
...
@@ -133,6 +137,7 @@ export default {
...
@@ -133,6 +137,7 @@ export default {
}
}
});
});
this
.
model8
=
val
;
this
.
model8
=
val
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
,
this
.
nodeInfo
.
codeRuleType
);
},
},
listSlecet
()
{
listSlecet
()
{
let
data
=
{
let
data
=
{
...
@@ -145,7 +150,8 @@ export default {
...
@@ -145,7 +150,8 @@ export default {
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
nodeInfo
.
codeRuleId
=
this
.
cityList
[
0
].
id
;
this
.
nodeInfo
.
codeRuleId
=
this
.
cityList
[
0
].
id
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
this
.
nodeInfo
.
codeRuleType
=
this
.
cityList
[
0
].
type
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
,
this
.
nodeInfo
.
codeRuleType
);
});
});
},
},
...
@@ -154,7 +160,7 @@ export default {
...
@@ -154,7 +160,7 @@ export default {
this
.
showMenu
=
true
;
this
.
showMenu
=
true
;
},
},
ok
(
row
)
{
ok
(
row
)
{
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
,
this
.
nodeInfo
.
codeRuleType
);
this
.
modal
=
false
;
this
.
modal
=
false
;
this
.
curId
=
0
;
this
.
curId
=
0
;
// if (row) {
// if (row) {
...
...
pages/materiel/masterData/add.vue
View file @
90f57519
...
@@ -91,14 +91,15 @@ export default {
...
@@ -91,14 +91,15 @@ export default {
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
//左侧树点击的数据的最顶层id
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
,
//左侧树点击的数据的最顶层id
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
,
},
},
disabled
:
false
,
disabled
:
false
,
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
},
},
fileds
:
[]
//扩展属性
fileds
:
[]
,
//扩展属性
};
};
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
...
@@ -113,17 +114,17 @@ export default {
...
@@ -113,17 +114,17 @@ export default {
{
{
conditionalType
:
"Equal"
,
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
,
}
}
,
];
];
Api
.
listTable
({
Api
.
listTable
({
conditions
:
conditions
,
conditions
:
conditions
,
sortBy
:
"id"
,
sortBy
:
"id"
,
isDesc
:
false
isDesc
:
false
,
}).
then
(
r
=>
{
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
item
.
span
=
24
;
...
@@ -131,7 +132,7 @@ export default {
...
@@ -131,7 +132,7 @@ export default {
delete
item
[
"id"
];
delete
item
[
"id"
];
return
item
.
fieldType
!=
1
;
return
item
.
fieldType
!=
1
;
});
});
this
.
fileds
.
map
(
u
=>
{
this
.
fileds
.
map
(
(
u
)
=>
{
let
v
=
""
;
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
v
=
0
;
...
@@ -158,12 +159,12 @@ export default {
...
@@ -158,12 +159,12 @@ export default {
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
// let categoryDto = this.entity;
// let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr);
// let pro = this.checkList.concat(this.arr);
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -171,7 +172,7 @@ export default {
...
@@ -171,7 +172,7 @@ export default {
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
});
});
...
@@ -180,7 +181,7 @@ export default {
...
@@ -180,7 +181,7 @@ export default {
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"on-close"
);
this
.
$emit
(
"on-close"
);
}
}
,
}
}
,
};
};
</
script
>
</
script
>
pages/materiel/masterData/index.vue
View file @
90f57519
...
@@ -24,7 +24,11 @@
...
@@ -24,7 +24,11 @@
@
click=
"toggle"
@
click=
"toggle"
title=
"展开/合并"
title=
"展开/合并"
></Button>
></Button>
<Button
icon=
"md-refresh"
title=
"刷新"
@
click=
"loadTree(model8)"
></Button>
<Button
icon=
"md-refresh"
title=
"刷新"
@
click=
"loadTree(model8,nodeInfo.codeRuleType)"
></Button>
<Button
icon=
"md-rewind"
title=
"收起"
@
click=
"hide"
></Button>
<Button
icon=
"md-rewind"
title=
"收起"
@
click=
"hide"
></Button>
</ButtonGroup>
</ButtonGroup>
</div>
</div>
...
@@ -73,6 +77,7 @@ export default {
...
@@ -73,6 +77,7 @@ export default {
ids
:
[],
ids
:
[],
addChange
:
true
,
addChange
:
true
,
codeRuleId
:
0
,
codeRuleId
:
0
,
codeRuleType
:
""
,
},
},
downName
:
"请选择类型"
,
downName
:
"请选择类型"
,
modal
:
false
,
modal
:
false
,
...
@@ -96,12 +101,13 @@ export default {
...
@@ -96,12 +101,13 @@ export default {
this
.
codeRuleId
=
val
;
this
.
codeRuleId
=
val
;
this
.
nodeInfo
.
codeRuleId
=
val
;
this
.
nodeInfo
.
codeRuleId
=
val
;
this
.
model8
=
val
;
this
.
model8
=
val
;
this
.
loadTree
(
this
.
codeRuleId
);
this
.
cityList
.
forEach
((
e
)
=>
{
this
.
cityList
.
forEach
((
e
)
=>
{
if
(
val
==
e
.
id
)
{
if
(
val
==
e
.
id
)
{
this
.
downName
=
e
.
name
;
this
.
downName
=
e
.
name
;
this
.
nodeInfo
.
codeRuleType
=
e
.
type
;
}
}
});
});
this
.
loadTree
(
this
.
codeRuleId
,
this
.
nodeInfo
.
codeRuleType
);
},
},
listSlecet
()
{
listSlecet
()
{
let
data
=
{
let
data
=
{
...
@@ -114,7 +120,8 @@ export default {
...
@@ -114,7 +120,8 @@ export default {
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
nodeInfo
.
codeRuleId
=
this
.
cityList
[
0
].
id
;
this
.
nodeInfo
.
codeRuleId
=
this
.
cityList
[
0
].
id
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
this
.
nodeInfo
.
codeRuleType
=
this
.
cityList
[
0
].
type
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
,
this
.
nodeInfo
.
codeRuleType
);
});
});
},
},
...
@@ -123,7 +130,7 @@ export default {
...
@@ -123,7 +130,7 @@ export default {
this
.
showMenu
=
true
;
this
.
showMenu
=
true
;
},
},
ok
(
row
)
{
ok
(
row
)
{
this
.
loadTree
(
this
.
codeRuleId
);
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
,
this
.
nodeInfo
.
codeRuleType
);
// this.modal = false;
// this.modal = false;
// this.curId = 0;
// this.curId = 0;
// if (row) {
// if (row) {
...
@@ -180,10 +187,15 @@ export default {
...
@@ -180,10 +187,15 @@ export default {
this
.
nodeInfo
.
rootCategoryId
=
pid
;
this
.
nodeInfo
.
rootCategoryId
=
pid
;
}
}
},
},
loadTree
(
id
)
{
loadTree
(
id
,
codeRuleType
)
{
let
data
=
{
let
data
=
{
conditions
:
[
conditions
:
[
{
fieldName
:
"codeRuleId"
,
fieldValue
:
id
,
conditionalType
:
"Equal"
},
{
fieldName
:
"codeRuleId"
,
fieldValue
:
id
,
conditionalType
:
"Equal"
},
{
fieldName
:
"codeRuleType"
,
fieldValue
:
codeRuleType
,
conditionalType
:
"Equal"
,
},
],
],
sortBy
:
"code"
,
sortBy
:
"code"
,
isDesc
:
false
,
isDesc
:
false
,
...
...
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