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
92432624
Commit
92432624
authored
Jun 17, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料添加字典选项
parent
48a46201
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
47 deletions
+97
-47
add.vue
pages/materiel/classification/add.vue
+48
-19
api.js
pages/materiel/classification/api.js
+3
-1
edit.vue
pages/materiel/classification/edit.vue
+35
-15
sonAdd.vue
pages/materiel/classification/sonAdd.vue
+2
-2
add.vue
pages/materiel/masterData/add.vue
+5
-5
edit.vue
pages/materiel/masterData/edit.vue
+4
-5
No files found.
pages/materiel/classification/add.vue
View file @
92432624
...
...
@@ -45,21 +45,41 @@
<Input
v-model=
"row.note"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
v-else
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
<Row>
<Col
:span=
"12"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</Col>
<Col
:span=
"12"
v-if=
"row.dataType==3"
>
<div
v-if=
"row.fieldType==1"
>
'/'+
{{
row
.
dictionaryCode
}}
</div>
<Select
v-model=
"row.dictionaryCode"
clearable
transfer
v-else
@
on-change=
"setRow(row,index)"
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
</Select>
</Col>
</Row>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<state
...
...
@@ -119,6 +139,7 @@ export default {
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
},
disabled
:
false
,
codeList
:
[],
columns
:
[
{
title
:
"序号"
,
...
...
@@ -136,19 +157,22 @@ export default {
title
:
"备注"
,
key
:
"note"
,
align
:
"center"
,
slot
:
"note"
slot
:
"note"
,
width
:
"150"
},
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
slot
:
"dataType"
,
width
:
"200"
},
{
title
:
"单位"
,
key
:
"unitName"
,
align
:
"center"
,
slot
:
"unitName"
slot
:
"unitName"
,
width
:
"150"
},
{
title
:
"是否必填"
,
...
...
@@ -165,7 +189,7 @@ export default {
{
title
:
"操作"
,
slot
:
"action"
,
width
:
100
,
align
:
"center"
}
],
...
...
@@ -209,6 +233,11 @@ export default {
});
}
});
Api
.
getChildren
({
id
:
582
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
codeList
=
r
.
result
;
}
});
},
remove
(
index
,
row
)
{
if
(
row
.
add
==
0
)
{
...
...
pages/materiel/classification/api.js
View file @
92432624
...
...
@@ -26,5 +26,7 @@ export default {
delete
(
id
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/category/delete`
,{
params
:{
id
:
id
}});
},
getChildren
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/Dictionary/getChildren`
,
params
);
//字典
},
}
\ No newline at end of file
pages/materiel/classification/edit.vue
View file @
92432624
...
...
@@ -43,21 +43,41 @@
<Input
v-model=
"row.note"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
v-else
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
<Row>
<Col
:span=
"12"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</Col>
<Col
:span=
"12"
v-if=
"row.dataType==3"
>
<div
v-if=
"row.fieldType==1"
>
'/'+
{{
row
.
dictionaryCode
}}
</div>
<Select
v-model=
"row.dictionaryCode"
clearable
transfer
v-else
@
on-change=
"setRow(row,index)"
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
</Select>
</Col>
</Row>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<state
...
...
pages/materiel/classification/sonAdd.vue
View file @
92432624
...
...
@@ -7,11 +7,11 @@
<Input
v-model=
"upName"
placeholder=
"请输入"
disabled
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<
!--
<
Col
:span=
"12"
>
<FormItem
label=
"编码"
prop=
"code"
>
<Input
v-model=
"entity.code"
placeholder=
"请输入"
disabled
></Input>
</FormItem>
</Col>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"名称"
prop=
"name"
>
<Input
v-model=
"entity.name"
placeholder=
"请输入"
></Input>
...
...
pages/materiel/masterData/add.vue
View file @
92432624
...
...
@@ -2,27 +2,27 @@
<div>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<
!--
<
Col
:span=
"12"
>
<FormItem
label=
"编码"
prop=
"code"
>
<Input
v-model=
"entity.code"
placeholder=
"请输入"
disabled
></Input>
</FormItem>
</Col>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"名称"
prop=
"name"
>
<Input
v-model=
"entity.name"
placeholder=
"请输入"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<
!--
<
Col
:span=
"12"
>
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
>
<Dictionary
code=
"mater
ail.category
.status"
code=
"mater
ial.main
.status"
v-model=
"entity.status"
type=
"select"
:value=
"entity.status"
:key=
"entity.status"
></Dictionary>
</FormItem>
</Col>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"版本"
prop=
"version"
>
<Input
v-model=
"entity.version"
placeholder=
"请输入"
></Input>
...
...
pages/materiel/masterData/edit.vue
View file @
92432624
...
...
@@ -13,9 +13,9 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
>
<Dictionary
code=
"mater
ail.category
.status"
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
v-if=
"entity.status==3||entity.status==2"
>
<Dictionary
code=
"mater
ial.main
.status"
v-model=
"entity.status"
type=
"select"
:value=
"entity.status"
...
...
@@ -46,7 +46,7 @@
<
script
>
import
Api
from
"./api"
;
export
default
{
props
:
[
"nodeInfo"
,
'eid'
],
props
:
[
"nodeInfo"
,
"eid"
],
data
()
{
return
{
arr
:
[],
...
...
@@ -79,7 +79,6 @@ export default {
},
remove
(
index
,
row
)
{
// if (row.add == 0) {
// //新增的删除,直接删
// this.checkList.splice(index, 1);
...
...
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