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
d9c0b093
Commit
d9c0b093
authored
Apr 20, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排产资源
parent
c99d2402
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
231 additions
and
177 deletions
+231
-177
zh-CN.js
i18n/locale/zh-CN.js
+6
-0
add.vue
pages/resourceManagement/productionResources/add.vue
+0
-76
api.js
pages/resourceManagement/productionResources/api.js
+14
-11
index.vue
pages/resourceManagement/productionResources/index.vue
+64
-90
set.vue
pages/resourceManagement/productionResources/set.vue
+147
-0
No files found.
i18n/locale/zh-CN.js
View file @
d9c0b093
...
...
@@ -1275,5 +1275,11 @@ export default {
property
:
'属性'
,
departId
:
'部门id'
,
departTitle
:
'部门'
,
calId
:
'工作日历编号'
,
holidayCalId
:
'加班日历编号'
,
calName
:
'工作日历名称'
,
holidayCalName
:
'加班日历名称'
,
isimportant
:
'关重'
,
capabilityValue
:
'能力值'
,
}
}
pages/resourceManagement/productionResources/add.vue
deleted
100644 → 0
View file @
c99d2402
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Input
v-model=
"entity.type"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('property')"
prop=
"property"
>
<InputNumber
v-model=
"entity.property"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('departId')"
prop=
"departId"
>
<InputNumber
v-model=
"entity.departId"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('departTitle')"
prop=
"departTitle"
>
<Input
v-model=
"entity.departTitle"
>
</Input>
</FormItem></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
v
:
Object
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
).
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"plan_resource"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
}
}
}
</
script
>
\ No newline at end of file
pages/resourceManagement/productionResources/api.js
View file @
d9c0b093
// import Api from '@/api/axios'
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
resourceUrl
}
planresource/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
resourceUrl
}
planresource/paged`
,
params
);
index
:
`
${
systemUrl
}
/
planresource/paged`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/planresource/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
resourceUrl
}
planresource/get`
,
params
);
get
(
params
)
{
return
Api
.
get
(
`
${
systemUrl
}
/planresource/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
resourceUrl
}
planresource/create`
,
params
);
create
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/mesdailyworksched/list`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
resourceUrl
}
planresource/update`
,
params
);
create1
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/mesholidaycal/list`
,
params
);
},
update
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/equipcalendarwork/createorupdate`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
resourceUrl
}
planresource/delete`
,{
params
:
params
});
return
Api
.
delete
(
`
${
systemUrl
}
/planresource/delete`
,
{
params
:
params
});
},
}
\ No newline at end of file
}
\ No newline at end of file
pages/resourceManagement/productionResources/index.vue
View file @
d9c0b093
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
...
...
@@ -11,15 +11,10 @@
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Set
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
...
...
@@ -29,12 +24,13 @@
</template>
<
script
>
import
Api
from
"./api"
;
import
Add
from
"./add"
;
import
Set
from
"./set"
;
export
default
{
name
:
"list"
,
components
:
{
Add
Set
},
data
()
{
return
{
...
...
@@ -43,52 +39,19 @@ export default {
keys
:
{
op
:
"title,code,type,departTitle"
,
value
:
null
}
},
editModal
:
false
,
deletelModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
hide
:
true
,
align
:
"left"
},
// {
// key: "deleterUserId",
// title: this.l("deleterUserId"),
// hide: true,
// align: "left"
// },
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
...
...
@@ -106,25 +69,54 @@ export default {
{
key
:
"type"
,
title
:
this
.
l
(
"type"
),
align
:
"left"
,
align
:
"center"
,
code
:
"aps.resource.type"
,
easy
:
true
,
high
:
true
},
// {
// key: "property",
// title: this.l("property"),
// align: "left",
// high: true
// },
// {
// key: "departId",
// title: this.l("departId"),
// align: "left",
// high: true
// },
{
key
:
"
property
"
,
title
:
this
.
l
(
"
property
"
),
key
:
"
departTitle
"
,
title
:
this
.
l
(
"
departTitle
"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"departId"
,
title
:
this
.
l
(
"departId"
),
key
:
"calId"
,
title
:
this
.
l
(
"calId"
),
align
:
"center"
,
easy
:
true
,
high
:
true
},
{
key
:
"holidayCalId"
,
title
:
this
.
l
(
"holidayCalId"
),
align
:
"center"
,
easy
:
true
,
high
:
true
},
{
key
:
"calName"
,
title
:
this
.
l
(
"calName"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"
departTitl
e"
,
title
:
this
.
l
(
"
departTitl
e"
),
key
:
"
holidayCalNam
e"
,
title
:
this
.
l
(
"
holidayCalNam
e"
),
align
:
"left"
,
easy
:
true
,
high
:
true
...
...
@@ -136,21 +128,13 @@ export default {
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
}
},
"查看"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
"
编辑
"
"
设置日历
"
),
h
(
"op"
,
...
...
@@ -175,10 +159,17 @@ export default {
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
();
this
.
addModal
=
false
;
this
.
editModal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
edit
(
id
)
{
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
remove
(
id
)
{
this
.
deletelModal
=
true
;
...
...
@@ -199,28 +190,11 @@ export default {
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
l
(
key
)
{
/*
plan_resource:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'资源名称',
code:'资源编号',
type:'资源类型',
property:'属性',
departId:'部门id',
departTitle:'部门',
}
*/
let
vkey
=
"plan_resource"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
...
...
pages/resourceManagement/productionResources/set.vue
0 → 100644
View file @
d9c0b093
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"资源名称"
prop=
"equip_name"
>
<Input
v-model=
"formItem.equip_name"
placeholder=
"请输入设备名称"
readonly
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"资源编号"
prop=
"equip_id"
>
<Input
v-model=
"formItem.equip_id"
placeholder=
"请输入设备编号"
readonly
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"工作日历"
prop=
"work"
>
<Select
v-model=
"formItem1.calendarwork_pk"
clearable
placeholder=
"请选择..."
>
<Option
v-for=
"item in workList"
:value=
"item.id"
:key=
"item.calName"
>
{{
item
.
calName
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"加班日历"
prop=
"overtime"
>
<Select
v-model=
"formItem2.calendarovertime_pk"
clearable
placeholder=
"请选择..."
>
<Option
v-for=
"item in overtimeList"
:value=
"item.id"
:key=
"item.holidayCalName"
>
{{
item
.
holidayCalName
}}
</Option>
</Select>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Edit"
,
data
()
{
return
{
disabled
:
false
,
workList
:
[],
overtimeList
:
[],
formItem
:
{
equip_name
:
""
,
equip_id
:
""
},
formItem1
:
{
id
:
0
,
equip_pk
:
0
,
calendarwork_pk
:
0
},
formItem2
:
{
id
:
0
,
equip_pk
:
0
,
calendarovertime_pk
:
0
},
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
};
},
props
:
{
eid
:
Number
},
created
()
{
this
.
laodaction
();
},
methods
:
{
laodaction
()
{
let
parmse
=
{
pageIndex
:
1
,
conditions
:
[],
pageSize
:
10
};
Api
.
create
(
parmse
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
workList
=
r
.
result
;
}
else
{
this
.
$Message
.
error
(
"获取数据失败..."
);
}
});
Api
.
create1
(
parmse
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
overtimeList
=
r
.
result
;
}
else
{
this
.
$Message
.
error
(
"获取数据失败..."
);
}
});
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
formItem
.
equip_name
=
r
.
result
.
title
;
this
.
formItem
.
equip_id
=
r
.
result
.
code
;
this
.
formItem1
.
equip_pk
=
r
.
result
.
id
;
this
.
formItem2
.
equip_pk
=
r
.
result
.
id
;
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
({
equipCalendarWork
:
this
.
formItem1
,
equipCalendarOverTime
:
this
.
formItem2
})
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"plan_resource"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
formItem1
.
calendarwork_pk
=
""
;
this
.
formItem2
.
calendarovertime_pk
=
""
;
this
.
load
(
v
);
}
}
}
};
</
script
>
\ No newline at end of file
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