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
5eb5fe2a
Commit
5eb5fe2a
authored
Jun 18, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
a48ff697
2e82c336
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
273 additions
and
125 deletions
+273
-125
add.vue
pages/materiel/classification/add.vue
+12
-12
edit.vue
pages/materiel/classification/edit.vue
+21
-17
index.vue
pages/materiel/classification/index.vue
+13
-7
masterData.vue
pages/materiel/classification/masterData.vue
+0
-1
details.vue
pages/materiel/masterData/details.vue
+43
-23
edit.vue
pages/materiel/masterData/edit.vue
+54
-36
index.vue
pages/materiel/masterData/index.vue
+21
-9
masterData.vue
pages/materiel/masterData/masterData.vue
+24
-13
submit.vue
pages/materiel/masterData/submit.vue
+85
-7
No files found.
pages/materiel/classification/add.vue
View file @
5eb5fe2a
...
...
@@ -135,7 +135,7 @@ export default {
key
:
"title"
,
slot
:
"title"
},
{
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
...
...
@@ -160,14 +160,14 @@ export default {
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
width
:
80
},
{
title
:
"唯一"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
width
:
80
},
{
width
:
80
,
...
...
@@ -211,7 +211,7 @@ export default {
if
(
r
.
result
)
{
var
arr
=
r
.
result
;
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
item
.
mid
=
item
.
id
;
item
.
mid
=
item
.
id
;
delete
item
[
"id"
];
//删除属性id
return
item
.
fieldType
>
1
;
});
...
...
@@ -238,15 +238,15 @@ export default {
this
.
$set
(
this
.
checkList
,
index
,
row
);
},
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
}
})
})
;
let
obj
=
{
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
""
,
note
:
""
,
dataType
:
0
,
...
...
@@ -257,7 +257,7 @@ export default {
action
:
1
,
add
:
0
//新增标识
};
this
.
checkList
.
push
(
obj
);
this
.
checkList
.
unshift
(
obj
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
pages/materiel/classification/edit.vue
View file @
5eb5fe2a
...
...
@@ -133,12 +133,12 @@ export default {
key
:
"title"
,
slot
:
"title"
},
{
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
150
width
:
150
},
{
title
:
"备注"
,
...
...
@@ -156,14 +156,14 @@ export default {
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
width
:
80
},
{
title
:
"唯一"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
width
:
80
},
{
title
:
"操作"
,
...
...
@@ -202,12 +202,16 @@ export default {
fieldValue
:
this
.
nodeInfo
.
id
}
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
'id'
,
isDesc
:
false
}).
then
(
r
=>
{
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
console
.
log
(
r
);
r
.
result
.
map
(
u
=>
{
u
.
mid
=
u
.
id
;
})
r
.
result
.
map
(
u
=>
{
u
.
mid
=
u
.
id
;
})
;
this
.
checkList
=
r
.
result
;
}
});
...
...
@@ -230,16 +234,16 @@ export default {
setRow
(
row
,
index
)
{
this
.
$set
(
this
.
checkList
,
index
,
row
);
},
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
}
})
})
;
let
obj
=
{
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
""
,
note
:
""
,
dataType
:
"0"
,
...
...
@@ -250,7 +254,7 @@ export default {
action
:
1
,
add
:
0
//新增标识
};
this
.
checkList
.
push
(
obj
);
this
.
checkList
.
unshift
(
obj
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
pages/materiel/classification/index.vue
View file @
5eb5fe2a
...
...
@@ -133,12 +133,14 @@ export default {
},
listSlecet
()
{
let
data
=
{
conditions
:
[],
sortBy
:
'id'
,
isDesc
:
false
conditions
:
[],
sortBy
:
"id"
,
isDesc
:
false
};
Api
.
pagedSlecet
(
data
).
then
(
r
=>
{
this
.
cityList
=
r
.
result
.
items
;
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
nodeInfo
.
codeRuleId
=
this
.
cityList
[
0
].
id
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
});
...
...
@@ -271,10 +273,14 @@ export default {
// }
},
loadTree
(
id
)
{
let
conditions
=
[
{
fieldName
:
"codeRuleId"
,
fieldValue
:
id
,
conditionalType
:
"Equal"
}
];
Api
.
list
({
conditions
:
conditions
}).
then
(
r
=>
{
let
data
=
{
conditions
:
[
{
fieldName
:
"codeRuleId"
,
fieldValue
:
id
,
conditionalType
:
"Equal"
}
],
sortBy
:
"code"
,
isDesc
:
false
};
Api
.
list
(
data
).
then
(
r
=>
{
var
data
=
this
.
$u
.
toTree
(
r
.
result
,
0
,
...
...
pages/materiel/classification/masterData.vue
View file @
5eb5fe2a
...
...
@@ -121,7 +121,6 @@ export default {
remove
(
id
)
{
Api
.
delete
(
id
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$emit
(
"on-ok"
);
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
this
.
$Message
.
success
(
"删除成功"
);
}
...
...
pages/materiel/masterData/details.vue
View file @
5eb5fe2a
...
...
@@ -22,35 +22,23 @@
<Filed
:span=
"8"
name=
"状态:"
>
<State
code=
"materail.category.status"
:value=
"parseInt(entity.status)"
/>
</Filed>
<Filed
:span=
"8"
name=
"版本:"
>
{{
entity
.
version
}}
</Filed>
<Filed
:span=
"8"
name=
"描述:
:
"
>
{{
entity
.
description
}}
</Filed>
<Filed
:span=
"8"
name=
"描述:"
>
{{
entity
.
description
}}
</Filed>
</Row>
<!--
<Divider
/>
<div
class=
"title-h4"
>
engineering
</div>
<Divider
orientation=
"left"
>
扩展属性
</Divider>
<Row>
<Filed
:span=
"8"
:name=
"l('routingHeaderName')+':'"
>
HHJK就开始上课
</Filed>
<Filed
:span=
"8"
:name=
"l('routingDetailName')+':'"
>
HHJK就开始上课
</Filed>
<Filed
:span=
"8"
:name=
"l('standard')+':'"
>
HHJK就开始上课uioiweiwuuu你和环境
</Filed>
<Filed
:span=
"8"
:name=
"l('routingHeaderName')+':'"
>
HHJK就开始上课
</Filed>
<Filed
:span=
"8"
:name=
"l('routingDetailName')+':'"
>
HHJK就开始上课uioiweiwuuu你和环境
</Filed>
<Filed
:span=
"8"
:name=
"l('standard')+':'"
>
HHJK就开始上课
</Filed>
<Filed
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
:name=
"li.title+':'"
>
<State
v-if=
"li.dataType==3"
:code=
"li.note"
:value=
"entity[li.field]"
/>
<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>
</Filed>
</Row>
<Divider
/>
<div
class=
"title-h4"
>
engineering
</div>
<Row>
<Filed
:span=
"8"
:name=
"l('routingHeaderName')+':'"
>
HHJK就开始上课
</Filed>
<Filed
:span=
"8"
:name=
"l('routingDetailName')+':'"
>
HHJK就开始上课
</Filed>
<Filed
:span=
"8"
:name=
"l('standard')+':'"
>
HHJK就开始上课
</Filed>
<Filed
:span=
"8"
:name=
"l('routingHeaderName')+':'"
>
HHJK就开始上课uioiweiwuuu你和环境
</Filed>
<Filed
:span=
"8"
:name=
"l('routingDetailName')+':'"
>
HHJK就开始上课
</Filed>
<Filed
:span=
"8"
:name=
"l('standard')+':'"
>
HHJK就开始上课
</Filed>
</Row>
-->
</div>
</div>
<div
v-show=
"showTable"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:tool=
"false"
:height=
"750"
></DataGrid>
<!--
<Table
border
:columns=
"columns"
:data=
"data1"
:height=
"800"
></Table>
-->
</div>
</Content>
</Layout>
...
...
@@ -59,7 +47,7 @@
<
script
>
import
Api
from
"./api"
;
export
default
{
props
:
[
"eid"
],
props
:
[
"eid"
,
"rootCategoryId"
],
data
()
{
return
{
data1
:
[],
...
...
@@ -67,6 +55,7 @@ export default {
isactive
:
0
,
showFrom
:
true
,
showTable
:
false
,
fileds
:
[],
rowId
:
this
.
eid
,
entity
:
{},
easySearch
:
{
...
...
@@ -74,7 +63,7 @@ export default {
tableTitle
:
{
op
:
"Equal"
,
value
:
"material"
},
tId
:
{
op
:
"Equal"
,
value
:
this
.
$route
.
query
.
id
value
:
this
.
e
id
}
},
listData
:
[
...
...
@@ -101,12 +90,43 @@ export default {
},
mounted
()
{
this
.
load
(
this
.
eid
);
this
.
initFiled
();
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
entity
=
r
.
result
;
let
conditions
=
[
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
rootCategoryId
}
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
8
;
if
(
item
.
dataType
==
8
||
item
.
dataType
==
5
)
{
item
.
span
=
24
;
}
return
item
.
fieldType
!=
1
;
});
this
.
fileds
.
map
(
u
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
});
}
});
},
...
...
pages/materiel/masterData/edit.vue
View file @
5eb5fe2a
...
...
@@ -13,8 +13,13 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
v-if=
"entity.status==3||entity.status==2"
>
<Dictionary
<FormItem
label=
"状态"
prop=
"status"
placeholder=
"请选择"
v-if=
"entity.status==3||entity.status==2"
>
<Dictionary
code=
"material.main.status"
v-model=
"entity.status"
type=
"select"
...
...
@@ -32,34 +37,43 @@
<FormItem
label=
"描述"
prop=
"description"
>
<Input
v-model=
"entity.description"
type=
"textarea"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
</Col>
</Row>
<div>
<
h4>
扩展属性
</h4
>
<div>
<
Divider
orientation=
"left"
>
扩展属性
</Divider
>
</div>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
<Input
v-if=
"li.dataType==0"
v-model=
"entity[li.field]"
></Input>
<InputNumber
v-if=
"li.dataType==1||li.dataType==2"
v-model=
"entity[li.field]"
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>
<DatePicker
v-if=
"li.dataType==5"
v-model=
"entity[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity[li.field]"
></InputFile>
<!--
<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>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
<Input
v-if=
"li.dataType==0"
v-model=
"entity[li.field]"
></Input>
<InputNumber
v-if=
"li.dataType==1||li.dataType==2"
v-model=
"entity[li.field]"
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>
<DatePicker
v-if=
"li.dataType==5"
v-model=
"entity[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity[li.field]"
></InputFile>
<!--
<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>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
<div
v-html=
"entity"
></div>
</Col>
-->
</Col>
-->
<Col
:span=
"24"
style=
"text-align: right;"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Col>
</Col>
</Row>
</Form>
</div>
...
...
@@ -78,7 +92,8 @@ export default {
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
//左侧树点击的数据的最顶层id
},
checkList
:
[],
fileds
:
[],
checkList
:
[],
disabled
:
false
,
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
...
...
@@ -89,13 +104,13 @@ export default {
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
created
()
{
this
.
initFiled
();
this
.
initFiled
();
},
mounted
()
{
this
.
get
();
},
methods
:
{
initFiled
()
{
initFiled
()
{
let
conditions
=
[
{
conditionalType
:
"Equal"
,
...
...
@@ -103,25 +118,28 @@ export default {
fieldValue
:
this
.
nodeInfo
.
rootCategoryId
}
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
'id'
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
}
delete
item
[
"id"
];
return
item
.
fieldType
!=
1
;
return
item
.
fieldType
!=
1
;
});
this
.
fileds
.
map
(
u
=>
{
let
v
=
''
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
this
.
fileds
.
map
(
u
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
// this.$set(this.entity.customProperties,u.filed,v)
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
)
})
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
})
;
}
});
},
...
...
@@ -132,7 +150,7 @@ export default {
}
});
},
tableData
()
{
tableData
()
{
let
conditions
=
[
{
conditionalType
:
"In"
,
...
...
@@ -154,7 +172,7 @@ export default {
if
(
r
.
result
)
{
var
arr
=
r
.
result
;
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
item
.
mid
=
item
.
id
;
item
.
mid
=
item
.
id
;
delete
item
[
"id"
];
//删除属性id
return
item
;
});
...
...
pages/materiel/masterData/index.vue
View file @
5eb5fe2a
...
...
@@ -75,7 +75,8 @@ export default {
nodeInfo
:
{
categoryId
:
0
,
rootCategoryId
:
0
,
ids
:
[]
ids
:
[],
addChange
:
true
},
downName
:
"请选择类型"
,
modal
:
false
,
...
...
@@ -105,14 +106,16 @@ export default {
}
});
},
listSlecet
()
{
listSlecet
()
{
let
data
=
{
conditions
:
[],
sortBy
:
'id'
,
isDesc
:
false
conditions
:
[],
sortBy
:
"id"
,
isDesc
:
false
};
Api
.
pagedSlecet
(
data
).
then
(
r
=>
{
this
.
cityList
=
r
.
result
.
items
;
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
downName
=
this
.
cityList
[
0
].
name
;
this
.
model8
=
this
.
cityList
[
0
].
id
;
this
.
nodeInfo
.
codeRuleId
=
this
.
cityList
[
0
].
id
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
});
...
...
@@ -184,10 +187,14 @@ export default {
}
},
loadTree
(
id
)
{
let
conditions
=
[
{
fieldName
:
"codeRuleId"
,
fieldValue
:
id
,
conditionalType
:
"Equal"
}
];
Api
.
list
({
conditions
:
conditions
}).
then
(
r
=>
{
let
data
=
{
conditions
:
[
{
fieldName
:
"codeRuleId"
,
fieldValue
:
id
,
conditionalType
:
"Equal"
}
],
sortBy
:
"code"
,
isDesc
:
false
};
Api
.
list
(
data
).
then
(
r
=>
{
var
data
=
this
.
$u
.
toTree
(
r
.
result
,
0
,
...
...
@@ -209,6 +216,11 @@ export default {
}
},
change
(
v
,
b
)
{
if
(
b
.
level
<
b
.
ruleLevel
&&
b
.
children
.
length
>
0
)
{
this
.
nodeInfo
.
addChange
=
false
;
}
else
{
this
.
nodeInfo
.
addChange
=
true
;
}
let
ids
=
[];
ids
.
push
(
b
.
value
);
if
(
b
.
children
)
{
...
...
pages/materiel/masterData/masterData.vue
View file @
5eb5fe2a
...
...
@@ -44,6 +44,7 @@
<component
:is=
"detail"
:eid=
"curId"
:rootCategoryId=
"rootCategoryId"
:rowsTable=
"rowsTable"
:nodeInfo=
"nodeInfo"
@
on-close=
"cancel"
...
...
@@ -70,6 +71,7 @@ export default {
modal
:
false
,
title
:
"新增"
,
curId
:
0
,
rootCategoryId
:
0
,
selectRows
:
[],
rowsTable
:
[],
fullscreen
:
false
,
...
...
@@ -101,10 +103,10 @@ export default {
{
props
:
{},
on
:
{
click
:
()
=>
this
.
details
(
params
.
row
.
id
)
click
:
()
=>
this
.
details
(
params
.
row
)
}
},
params
.
row
.
code
!
params
.
row
.
code
?
"未分配"
:
params
.
row
.
code
);
}
},
...
...
@@ -140,14 +142,14 @@ export default {
{
key
:
"creationTime"
,
title
:
"创建时间"
,
hide
:
fals
e
,
hide
:
tru
e
,
align
:
"left"
,
type
:
"date"
},
{
key
:
"creatorUserId"
,
title
:
"创建人"
,
hide
:
fals
e
,
hide
:
tru
e
,
align
:
"left"
,
type
:
"user"
},
...
...
@@ -212,6 +214,7 @@ export default {
methods
:
{
onSelect
(
a
,
b
)
{
//批量选择
this
.
rootCategoryId
=
a
[
0
].
rootCategoryId
;
this
.
selectRows
=
a
;
},
modalSchedule
()
{
...
...
@@ -274,11 +277,19 @@ export default {
});
},
add
()
{
this
.
fullscreen
=
false
;
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
if
(
this
.
nodeInfo
.
categoryId
)
{
if
(
this
.
nodeInfo
.
addChange
==
true
)
{
this
.
fullscreen
=
false
;
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
}
else
{
this
.
$Message
.
error
(
"请在设置的分类层级数下添加物料"
);
}
}
else
{
this
.
$Message
.
error
(
"请先选择分类"
);
}
},
edit
(
row
)
{
this
.
fullscreen
=
false
;
...
...
@@ -288,18 +299,17 @@ export default {
this
.
modal
=
true
;
},
remove
(
id
)
{
alert
(
id
);
Api
.
delete
(
id
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$emit
(
"on-ok"
);
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
details
(
id
)
{
details
(
row
)
{
this
.
fullscreen
=
true
;
this
.
curId
=
id
;
this
.
curId
=
row
.
id
;
this
.
rootCategoryId
=
row
.
rootCategoryId
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./details"
);
this
.
rowsTable
=
[];
...
...
@@ -308,6 +318,7 @@ export default {
send
(
row
)
{
this
.
fullscreen
=
true
;
this
.
curId
=
row
.
id
;
this
.
rootCategoryId
=
row
.
rootCategoryId
;
this
.
title
=
"物料送审"
;
this
.
detail
=
()
=>
import
(
"./submit"
);
this
.
rowsTable
=
[];
...
...
pages/materiel/masterData/submit.vue
View file @
5eb5fe2a
...
...
@@ -3,20 +3,29 @@
<div
class=
"body-procee"
>
<div
class=
"new-detail"
v-if=
"osrOneList1"
>
<Row>
<Filed
:span=
"8"
name=
"编码:"
>
{{
entity
.
code
}}
</Filed>
<Filed
:span=
"8"
name=
"编码:"
>
{{
!
entity
.
code
?
'未分配'
:
entity
.
code
}}
</Filed>
<Filed
:span=
"8"
name=
"名称:"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"8"
name=
"状态:"
>
<State
code=
"materail.category.status"
:value=
"parseInt(entity.status)"
/>
</Filed>
<Filed
:span=
"8"
name=
"版本:"
>
{{
entity
.
version
}}
</Filed>
<Filed
:span=
"8"
name=
"描述:"
>
{{
entity
.
description
}}
</Filed>
</Row>
<Divider
orientation=
"left"
>
扩展属性
</Divider>
<Row>
<Filed
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
:name=
"li.title+':'"
>
<State
v-if=
"li.dataType==3"
:code=
"li.note"
:value=
"entity[li.field]"
/>
<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>
</Filed>
</Row>
</div>
<Table
:loading=
"loading"
border
:columns=
"col
umn
s"
:columns=
"cols"
:data=
"dataList"
class=
"tableCommon"
v-if=
"osrOneList2"
...
...
@@ -53,7 +62,7 @@ export default {
components
:
{
Process
},
props
:
[
"eid"
,
"rowsTable"
],
props
:
[
"eid"
,
"ro
otCategoryId"
,
"ro
wsTable"
],
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
...
...
@@ -81,6 +90,7 @@ export default {
codeList
:
[],
//合格证编号List
operatorIdList
:
[]
//操作员id
},
//确定后返回数据
cols
:
[],
columns
:
[
{
key
:
"code"
,
...
...
@@ -141,6 +151,7 @@ export default {
}
else
{
this
.
osrOneList1
=
false
;
this
.
osrOneList2
=
true
;
this
.
getTable
();
this
.
dataList
=
this
.
rowsTable
;
}
},
...
...
@@ -158,10 +169,77 @@ export default {
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
entity
=
r
.
result
;
let
conditions
=
[
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
rootCategoryId
}
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
8
;
if
(
item
.
dataType
==
8
||
item
.
dataType
==
5
)
{
item
.
span
=
24
;
}
return
item
.
fieldType
!=
1
;
});
this
.
fileds
.
map
(
u
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
});
}
});
},
getTable
()
{
let
conditions
=
[
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
rootCategoryId
}
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
var
items
=
r
.
result
.
filter
(
u
=>
{
return
(
!
this
.
columns
.
some
(
p
=>
{
return
p
.
key
==
u
.
field
;
})
&&
u
.
dataType
!=
5
);
});
this
.
cols
=
this
.
$u
.
clone
(
this
.
columns
);
let
extra
=
items
.
map
(
u
=>
{
var
col
=
{
key
:
u
.
field
,
title
:
u
.
title
};
if
(
u
.
dataType
==
3
)
{
col
.
code
=
u
.
note
;
}
return
col
;
});
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
]);
}
});
},
returnDataList
()
{
let
ues
=
this
.
$refs
.
userProcess
;
this
.
dataListRetrunNew
.
operatorIdList
=
ues
.
immutData
;
...
...
@@ -171,12 +249,12 @@ export default {
},
upSave
()
{
this
.
dataListRetrunNew
.
idList
=
[];
this
.
dataListRetrunNew
.
codeList
=
[];
let
codeList
=
[];
let
idList
=
[];
idList
.
push
(
this
.
rowId
);
codeList
.
push
(
this
.
entity
.
code
);
if
(
this
.
eid
!==
0
)
{
idList
.
push
(
this
.
rowI
d
);
idList
.
push
(
this
.
ei
d
);
codeList
.
push
(
this
.
entity
.
code
);
}
else
{
this
.
rowsTable
.
forEach
(
e
=>
{
...
...
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