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
a5d4a9ff
Commit
a5d4a9ff
authored
Jun 19, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料优化
parent
57c55ca1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
33 deletions
+49
-33
dtSpan.vue
components/page/dtSpan.vue
+18
-7
add.vue
pages/materiel/masterData/add.vue
+1
-1
edit.vue
pages/materiel/masterData/edit.vue
+8
-12
masterData.vue
pages/materiel/masterData/masterData.vue
+18
-8
submit.vue
pages/materiel/masterData/submit.vue
+4
-5
No files found.
components/page/dtSpan.vue
View file @
a5d4a9ff
<
template
>
<div>
<span
v-if=
"type=='date'"
>
<span>
<Tooltip
:content=
"value"
>
{{
value
.
substr
(
0
,
10
)
}}
{{
date
}}
</Tooltip>
</span>
<span
v-else
>
{{
value
.
substr
(
0
,
19
)
}}
</span>
</div>
</
template
>
<
script
>
export
default
{
name
:
'dtSpan'
,
data
()
{
return
{
date
:
""
}
},
props
:
{
...
...
@@ -25,10 +24,22 @@ export default {
default
:
'2001-01-01 00:00:00'
},
},
created
()
{},
created
()
{
this
.
init
()
},
methods
:
{
init
(){
if
(
this
.
value
&&
this
.
value
.
length
>=
19
){
this
.
date
=
this
.
value
.
substr
(
0
,
this
.
type
==
'date'
?
10
:
19
)
}
return
this
.
date
;
}
},
computed
:
{},
watch
:
{}
watch
:
{
value
(){
this
.
init
()
}
}
}
</
script
>
\ No newline at end of file
pages/materiel/masterData/add.vue
View file @
a5d4a9ff
...
...
@@ -58,7 +58,7 @@
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity[li.field]"
></Input>
<state
v-if=
"li.unitName
"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)
"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
...
...
pages/materiel/masterData/edit.vue
View file @
a5d4a9ff
...
...
@@ -2,23 +2,18 @@
<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"
>
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
v-if=
"entity.status==3||entity.status==4"
>
<!--
<Col
:span=
"12"
>
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
>
<Dictionary
code=
"material.main.status"
v-model=
"entity.status"
...
...
@@ -27,7 +22,7 @@
:key=
"entity.status"
></Dictionary>
</FormItem>
</Col>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"版本"
prop=
"version"
>
<Input
v-model=
"entity.version"
placeholder=
"请输入"
></Input>
...
...
@@ -52,9 +47,9 @@
class=
"w100"
></InputNumber>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity[li.field]"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType==
4"
v-model=
"entity[li.filed]"
></Input>
<Input
v-if=
"li.dataType==
5"
type=
"textarea"
v-model=
"entity[li.filed]"
></Input>
<DatePicker
v-if=
"li.dataType==
5
"
v-if=
"li.dataType==
4
"
v-model=
"entity[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
...
...
@@ -63,6 +58,7 @@
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity[li.field]"
></Input>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
...
...
pages/materiel/masterData/masterData.vue
View file @
a5d4a9ff
...
...
@@ -228,7 +228,7 @@ export default {
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
initCols
()
{
initCols
(
delay
)
{
let
conditions
=
[
{
conditionalType
:
"Equal"
,
...
...
@@ -252,6 +252,7 @@ export default {
});
this
.
cols
=
this
.
$u
.
clone
(
this
.
columns
);
let
extra
=
items
.
map
(
u
=>
{
// console.log(u);
var
col
=
{
key
:
u
.
field
,
title
:
u
.
title
...
...
@@ -259,7 +260,10 @@ export default {
if
(
u
.
dataType
==
3
)
{
col
.
code
=
u
.
note
;
}
if
(
u
.
unitName
)
{
if
(
u
.
dataType
==
4
)
{
col
.
type
=
'date'
;
}
if
(
u
.
unitName
&&
(
u
.
dataType
==
1
||
u
.
dataType
==
2
))
{
var
units
=
this
.
$store
.
getters
.
dictionaryByKey
(
"material.main.unitName"
);
...
...
@@ -267,7 +271,7 @@ export default {
let
item
=
units
.
filter
(
p
=>
{
return
p
.
code
==
u
.
unitName
;
});
console
.
log
(
units
,
item
);
//
console.log(units, item);
col
.
title
+=
"("
+
item
[
0
].
name
+
")"
;
}
return
col
;
...
...
@@ -275,6 +279,10 @@ export default {
this
.
cols
=
this
.
cols
.
concat
(
extra
);
var
action
=
this
.
cols
.
splice
(
this
.
columns
.
length
-
1
,
1
);
this
.
cols
.
push
(
this
.
columns
[
this
.
columns
.
length
-
1
]);
if
(
delay
){
delay
();
}
// console.log(this.cols)
}
});
},
...
...
@@ -341,12 +349,14 @@ export default {
handler
(
newName
,
oldName
)
{
console
.
log
(
"ovo"
,
newName
,
oldName
);
if
(
newName
.
rootCategoryId
)
{
this
.
initCols
();
this
.
initCols
(()
=>
{
if
(
newName
.
categoryId
)
{
this
.
easySearch
.
categoryId
.
value
=
newName
.
ids
;
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
}
});
}
if
(
newName
.
categoryId
)
{
this
.
easySearch
.
categoryId
.
value
=
newName
.
ids
;
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
}
else
{
if
(
!
newName
.
categoryId
)
{
this
.
easySearch
.
categoryId
.
value
=
"-1"
;
}
},
...
...
pages/materiel/masterData/submit.vue
View file @
a5d4a9ff
...
...
@@ -18,7 +18,8 @@
<div
v-else-if=
"li.dataType==8"
>
{{
entity
[
li
.
field
]
}}
</div>
<div
v-else-if=
"li.dataType==5"
v-html=
"entity[li.field]"
></div>
<span
v-else
>
{{
entity
[
li
.
field
]
}}
</span>
<span
v-if=
"li.unitName"
v-text=
"li.unitName"
class=
"ml10"
></span>
<State
v-if=
"li.unitName"
:code=
"li.note"
:value=
"entity[li.field]"
/>
<!--
<span
v-if=
"li.unitName"
v-text=
"li.unitName"
class=
"ml10"
></span>
-->
</Filed>
</Row>
</div>
...
...
@@ -257,8 +258,7 @@ export default {
if
(
this
.
entity
.
code
)
{
codeList
.
push
(
this
.
entity
.
code
);
}
else
{
codeList
.
push
(
this
.
eid
);
codeList
.
push
(
this
.
eid
);
}
idList
.
push
(
this
.
eid
);
}
else
{
...
...
@@ -267,8 +267,7 @@ export default {
if
(
e
.
code
)
{
codeList
.
push
(
e
.
code
);
}
else
{
codeList
.
push
(
e
.
id
);
codeList
.
push
(
e
.
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