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
a48ff697
Commit
a48ff697
authored
Jun 18, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ok
parent
793d06df
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
56 deletions
+47
-56
add.vue
pages/materiel/classification/add.vue
+1
-1
edit.vue
pages/materiel/classification/edit.vue
+36
-54
masterData.vue
pages/materiel/masterData/masterData.vue
+10
-1
No files found.
pages/materiel/classification/add.vue
View file @
a48ff697
...
@@ -249,7 +249,7 @@ export default {
...
@@ -249,7 +249,7 @@ export default {
field
:
"c"
+
maxId
,
field
:
"c"
+
maxId
,
title
:
""
,
title
:
""
,
note
:
""
,
note
:
""
,
dataType
:
""
,
dataType
:
0
,
required
:
false
,
required
:
false
,
isunique
:
false
,
isunique
:
false
,
fieldType
:
3
,
fieldType
:
3
,
...
...
pages/materiel/classification/edit.vue
View file @
a48ff697
...
@@ -29,42 +29,22 @@
...
@@ -29,42 +29,22 @@
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<h4>
属性配置
</h4>
<h4>
扩展属性
</h4>
</Col>
<Table
border
:columns=
"columns"
:data=
"checkList"
>
<Col
:span=
"24"
style=
"padding:20px 0 0px 10px;margin-bottom:10px;"
class=
"table-solt"
>
<!--fieldType 1.固有,2.默认,3自定义; -->
<Table
border
:columns=
"columns"
:data=
"checkList"
class=
"tableCommon"
height=
"450"
>
<template
slot-scope=
"
{ row, index }" slot="title">
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-else
v-model=
"row.title"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
<Input
v-if=
"row.fieldType==3"
v-model=
"row.title"
placeholder=
"请输入名称"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<div
v-if=
"row.fieldType==1"
>
{{
row
.
note
}}
</div>
<!--
<Input
v-if=
"row.dataType==3"
v-model=
"row.note"
placeholder=
"请输入字典编码"
@
on-blur=
"setRow(row,index)"
/>
-->
<Input
v-model=
"row.note"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
v-else
/>
<Select
</
template
>
v-if=
"row.dataType==3"
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
v-model=
"row.note"
<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
clearable
transfer
transfer
v-else
v-else
...
@@ -76,22 +56,27 @@
...
@@ -76,22 +56,27 @@
:key=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
>
{{
item
.
name
}}
</Option>
</Select>
</Select>
</Col>
<span
v-else
>
{{
row
.
note
}}
</span>
</Row>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Dictionary
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</
template
>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<state
v-if=
"row.fieldType==1"
code=
"material.main.unitName"
:value=
"row.unitName"
type=
"text"
></state>
<Dictionary
<Dictionary
v-
else
v-
if=
"row.dataType==1||row.dataType==2"
@
on-change=
"setRow(row,index)"
@
on-change=
"setRow(row,index)"
v-model=
"row.unitName"
v-model=
"row.unitName"
code=
"material.main.unitName"
code=
"material.main.unitName"
type=
"select"
type=
"select"
placeholder=
"请选择单位"
:value=
"row.unitName"
:value=
"row.unitName"
:key=
"row.unitName"
:key=
"row.unitName"
></Dictionary>
></Dictionary>
...
@@ -102,18 +87,16 @@
...
@@ -102,18 +87,16 @@
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
</
template
>
<
template
<
template
slot-scope=
"{ row, index }"
slot-scope=
"{ row, index }"
slot=
"action"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3
||!row.notEditDelete
"
v-if=
"row.fieldType==2||row.fieldType==3"
>
>
<!-- notEditDelete=true,删除不显示 -->
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</
template
>
</Table>
</Table>
</Col>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
<Col
:span=
"24"
style=
"margin-bottom:20px;"
>
<Button
type=
"primary"
long
@
click=
"addNew"
class=
"mt10"
>
添加
</Button>
</Col>
</Col>
<Col
:span=
"24"
class=
"tr mt10"
>
<Col
:span=
"24"
class=
"tr mt10"
>
<FormItem>
<FormItem>
...
@@ -161,13 +144,7 @@ export default {
...
@@ -161,13 +144,7 @@ export default {
title
:
"备注"
,
title
:
"备注"
,
key
:
"note"
,
key
:
"note"
,
slot
:
"note"
slot
:
"note"
},
},
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
},
{
{
title
:
"单位"
,
title
:
"单位"
,
key
:
"unitName"
,
key
:
"unitName"
,
...
@@ -234,6 +211,11 @@ export default {
...
@@ -234,6 +211,11 @@ export default {
this
.
checkList
=
r
.
result
;
this
.
checkList
=
r
.
result
;
}
}
});
});
Api
.
getChildren
({
id
:
582
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
codeList
=
r
.
result
;
}
});
},
},
remove
(
index
,
row
)
{
remove
(
index
,
row
)
{
if
(
row
.
add
==
0
)
{
if
(
row
.
add
==
0
)
{
...
@@ -260,7 +242,7 @@ export default {
...
@@ -260,7 +242,7 @@ export default {
field
:
"c"
+
maxId
,
field
:
"c"
+
maxId
,
title
:
""
,
title
:
""
,
note
:
""
,
note
:
""
,
dataType
:
""
,
dataType
:
"
0
"
,
required
:
false
,
required
:
false
,
isunique
:
false
,
isunique
:
false
,
fieldType
:
3
,
fieldType
:
3
,
...
...
pages/materiel/masterData/masterData.vue
View file @
a48ff697
...
@@ -256,6 +256,15 @@ export default {
...
@@ -256,6 +256,15 @@ export default {
if
(
u
.
dataType
==
3
)
{
if
(
u
.
dataType
==
3
)
{
col
.
code
=
u
.
note
;
col
.
code
=
u
.
note
;
}
}
if
(
u
.
unitName
){
var
units
=
this
.
$store
.
getters
.
dictionaryByKey
(
"material.main.unitName"
);
let
item
=
units
.
filter
(
p
=>
{
return
p
.
code
==
u
.
unitName
;
})
console
.
log
(
units
,
item
)
col
.
title
+=
"("
+
item
[
0
].
name
+
")"
;
}
return
col
;
return
col
;
});
});
this
.
cols
=
this
.
cols
.
concat
(
extra
);
this
.
cols
=
this
.
cols
.
concat
(
extra
);
...
@@ -263,7 +272,7 @@ export default {
...
@@ -263,7 +272,7 @@ export default {
this
.
cols
.
push
(
this
.
columns
[
this
.
columns
.
length
-
1
]);
this
.
cols
.
push
(
this
.
columns
[
this
.
columns
.
length
-
1
]);
}
}
});
});
},
},
add
()
{
add
()
{
this
.
fullscreen
=
false
;
this
.
fullscreen
=
false
;
this
.
curId
=
0
;
this
.
curId
=
0
;
...
...
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