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
1d0d4953
Commit
1d0d4953
authored
Apr 07, 2020
by
康振飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工厂日历new
parent
b264962d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
290 additions
and
399 deletions
+290
-399
zh-CN.js
i18n/locale/zh-CN.js
+15
-13
add.vue
pages/basicData/calendar/class/add.vue
+63
-70
api.js
pages/basicData/calendar/class/api.js
+7
-7
detail.vue
pages/basicData/calendar/class/detail.vue
+8
-5
edit.vue
pages/basicData/calendar/class/edit.vue
+44
-45
index.vue
pages/basicData/calendar/class/index.vue
+131
-246
search.vue
pages/basicData/calendar/class/search.vue
+22
-13
No files found.
i18n/locale/zh-CN.js
View file @
1d0d4953
...
...
@@ -730,20 +730,22 @@ export default {
notes
:
'备注'
,
},
// 工厂日历
calendar_class
:
{
mes_shift_work_sched
:
{
id
:
''
,
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
title
:
'班次名称'
,
startTime
:
'开始时间'
,
endTime
:
'结束时间'
,
startendTime
:
'班次时间'
,
workHours
:
'工作时长'
,
shiftWorkSchedCode
:
'班次编号'
,
shiftName
:
'班次名称'
,
shiftStart
:
'班次开始时间'
,
shiftEnd
:
'班次结束时间'
,
status
:
'状态'
,
workingLong
:
'工作时长'
,
shiftWorkSchedPk1
:
'班次id'
,
creationTime
:
''
,
creatorUserId
:
''
,
lastModificationTime
:
''
,
lastModifierUserId
:
''
,
isDeleted
:
''
,
deletionTime
:
''
,
deleterUserId
:
''
,
},
calendar_holiday
:
{
id
:
''
,
...
...
pages/basicData/calendar/class/add.vue
View file @
1d0d4953
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
9
0"
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
11
0"
>
<Row>
<Col
span=
"24"
>
<FormItem
:label=
"l('
title')"
prop=
"titl
e"
>
<Input
v-model=
"entity.
titl
e"
></Input>
<Col
:
span=
"24"
>
<FormItem
:label=
"l('
shiftWorkSchedCode')"
prop=
"shiftWorkSchedCod
e"
>
<Input
v-model=
"entity.
shiftWorkSchedCod
e"
></Input>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('startendTime')"
prop=
"startTime"
>
<TimePicker
type=
"timerange"
format=
"HH:mm"
v-model=
"entity.startendTime"
placeholder=
"请选择时间段"
></TimePicker>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftName')"
prop=
"shiftName"
>
<Input
v-model=
"entity.shiftName"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStart')"
prop=
"shiftStart"
>
<DatePicker
type=
"date"
v-model=
"entity.shiftStart"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftEnd')"
prop=
"shiftEnd"
>
<DatePicker
type=
"date"
v-model=
"entity.shiftEnd"
></DatePicker>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<InputNumber
v-model=
"entity.status"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('workingLong')"
prop=
"workingLong"
>
<Input
v-model=
"entity.workingLong"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('shiftWorkSchedPk1')"
prop=
"shiftWorkSchedPk1"
>
<InputNumber
v-model=
"entity.shiftWorkSchedPk1"
></InputNumber>
</FormItem>
</Col>
-->
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
...
...
@@ -23,84 +43,57 @@
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
rules
:
{
title
:
[{
required
:
true
,
message
:
'请填写班次名称'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
}
}
;
},
props
:
{
v
:
Object
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
// let parmes = {
// pageIndex: 1,
// pageSize: 20,
// conditions: [
// {
// fieldName: 'keys',
// fieldValue: this.entity.title,
// conditionalType: 'title'
// }
// ],
// total: 4
// }
// Api.paged(parmes).then((r) => {
// console.log(r.success)
// if(r.success){
// this.$Message.error("该班次名称已存在!")
// this.disabled = true
// return
// }else{
let
pames
=
{
title
:
this
.
entity
.
title
,
startendTime
:
this
.
entity
.
startendTime
.
join
(
'-'
)
}
Api
.
create
(
pames
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
// this.disabled = false
this
.
$Message
.
success
(
'保存成功'
)
this
.
entity
=
{}
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
// }
// })
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
.
entity
=
{}
this
.
disabled
=
true
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
'calendar_class'
+
'.'
+
key
return
this
.
$t
(
key
)
key
=
"mes_shift_work_sched"
+
"."
+
key
;
return
this
.
$t
(
key
)
;
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
;
}
}
}
</
script
>
\ No newline at end of file
};
</
script
>
pages/basicData/calendar/class/api.js
View file @
1d0d4953
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
systemUrl
}
/
calendarclass
/paged`
,
index
:
`
${
systemUrl
}
/
messhiftworksched
/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/
calendarclass
/paged`
,
params
);
return
Api
.
post
(
`
${
systemUrl
}
/
messhiftworksched
/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
systemUrl
}
/
calendarclass
/get`
,
params
);
return
Api
.
get
(
`
${
systemUrl
}
/
messhiftworksched
/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
systemUrl
}
/
calendarclass
/create`
,
params
);
return
Api
.
post
(
`
${
systemUrl
}
/
messhiftworksched
/create`
,
params
);
},
update
(
params
){
return
Api
.
p
ost
(
`
${
systemUrl
}
/calendarclass
/update`
,
params
);
return
Api
.
p
ut
(
`
${
systemUrl
}
/messhiftworksched
/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
systemUrl
}
/
calendarclass
/delete`
,{
params
:
params
});
return
Api
.
delete
(
`
${
systemUrl
}
/
messhiftworksched
/delete`
,{
params
:
params
});
},
}
\ No newline at end of file
}
\ No newline at end of file
pages/basicData/calendar/class/detail.vue
View file @
1d0d4953
...
...
@@ -2,10 +2,13 @@
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('startTime')"
>
{{
entity
.
startTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('endTime')"
>
{{
entity
.
endTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('workHours')"
>
{{
entity
.
workHours
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('shiftWorkSchedCode')"
>
{{
entity
.
shiftWorkSchedCode
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('shiftName')"
>
{{
entity
.
shiftName
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('shiftStart')"
>
{{
entity
.
shiftStart
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('shiftEnd')"
>
{{
entity
.
shiftEnd
}}
</Filed>
<!--
<Filed
:span=
"12"
:name=
"l('status')"
>
{{
entity
.
status
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('workingLong')"
>
{{
entity
.
workingLong
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('shiftWorkSchedPk1')"
>
{{
entity
.
shiftWorkSchedPk1
}}
</Filed>
-->
</Row>
</div>
...
...
@@ -37,7 +40,7 @@
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"
calendar_class
"
+
"."
+
key
;
key
=
"
mes_shift_work_sched
"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
...
...
pages/basicData/calendar/class/edit.vue
View file @
1d0d4953
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
9
0"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
11
0"
>
<Row>
<Col
span=
"24"
>
<FormItem
:label=
"l('
title')"
prop=
"titl
e"
>
<Input
v-model=
"entity.
titl
e"
></Input>
<Col
:
span=
"24"
>
<FormItem
:label=
"l('
shiftWorkSchedCode')"
prop=
"shiftWorkSchedCod
e"
>
<Input
v-model=
"entity.
shiftWorkSchedCod
e"
></Input>
</FormItem>
</Col>
<Col
span=
"24"
>
<!-- prop="startendTime" -->
<FormItem
:label=
"l('startendTime')"
>
<TimePicker
type=
"timerange"
format=
"HH:mm"
v-model=
"entity.startendTime"
placeholder=
"请选择时间段"
></TimePicker>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftName')"
prop=
"shiftName"
>
<Input
v-model=
"entity.shiftName"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStart')"
prop=
"shiftStart"
>
<DatePicker
type=
"date"
v-model=
"entity.shiftStart"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftEnd')"
prop=
"shiftEnd"
>
<DatePicker
type=
"date"
v-model=
"entity.shiftEnd"
></DatePicker>
</FormItem>
</Col>
</Row>
...
...
@@ -20,74 +29,64 @@
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
rules
:
{
title
:
[{
required
:
true
,
message
:
'请填写班次名称'
,
trigger
:
'blur'
}],
// startendTime: [{ required: true, message: '请选择时间段', trigger: 'blur' }],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
}
}
;
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
r
.
result
.
startendTime
=
r
.
result
.
startendTime
.
split
(
'-'
)
this
.
entity
=
r
.
result
this
.
$emit
(
'on-load'
)
})
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
let
startendTime
=
this
.
entity
.
startendTime
let
pames
=
{
title
:
this
.
entity
.
title
,
startendTime
:
startendTime
.
join
(
'-'
),
workHours
:
this
.
entity
.
workHours
,
creationTime
:
this
.
entity
.
creationTime
,
creatorUserId
:
this
.
entity
.
creatorUserId
,
id
:
this
.
entity
.
id
,
}
Api
.
update
(
pames
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
)
;
})
;
}
})
})
;
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
'calendar_class'
+
'.'
+
key
return
this
.
$t
(
key
)
key
=
"mes_shift_work_sched"
+
"."
+
key
;
return
this
.
$t
(
key
)
;
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
)
;
}
}
}
}
}
;
</
script
>
\ No newline at end of file
pages/basicData/calendar/class/index.vue
View file @
1d0d4953
This diff is collapsed.
Click to expand it.
pages/basicData/calendar/class/search.vue
View file @
1d0d4953
...
...
@@ -3,6 +3,20 @@
<Row>
<Col
:span=
"12"
:v-if=
"condition.id.show"
><FormItem
:label=
"l('id')"
prop=
"id"
>
<Input
v-model=
"condition.id.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.shiftWorkSchedCode.show"
><FormItem
:label=
"l('shiftWorkSchedCode')"
prop=
"shiftWorkSchedCode"
>
<Input
v-model=
"condition.shiftWorkSchedCode.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.shiftName.show"
><FormItem
:label=
"l('shiftName')"
prop=
"shiftName"
>
<Input
v-model=
"condition.shiftName.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.shiftStart.show"
><FormItem
:label=
"l('shiftStart')"
prop=
"shiftStart"
>
<DatePicker
type=
"daterange"
v-model=
"condition.shiftStart.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.shiftEnd.show"
><FormItem
:label=
"l('shiftEnd')"
prop=
"shiftEnd"
>
<DatePicker
type=
"daterange"
v-model=
"condition.shiftEnd.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.status.show"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<Input
v-model=
"condition.status.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.workingLong.show"
><FormItem
:label=
"l('workingLong')"
prop=
"workingLong"
>
<Input
v-model=
"condition.workingLong.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.shiftWorkSchedPk1.show"
><FormItem
:label=
"l('shiftWorkSchedPk1')"
prop=
"shiftWorkSchedPk1"
>
<Input
v-model=
"condition.shiftWorkSchedPk1.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.creationTime.show"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.creationTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.creatorUserId.show"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<Input
v-model=
"condition.creatorUserId.value"
>
</Input>
...
...
@@ -16,14 +30,6 @@
<Col
:span=
"12"
:v-if=
"condition.deletionTime.show"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.deletionTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.deleterUserId.show"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<Input
v-model=
"condition.deleterUserId.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.title.show"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"condition.title.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.startTime.show"
><FormItem
:label=
"l('startTime')"
prop=
"startTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.startTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.endTime.show"
><FormItem
:label=
"l('endTime')"
prop=
"endTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.endTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.workHours.show"
><FormItem
:label=
"l('workHours')"
prop=
"workHours"
>
<Input
v-model=
"condition.workHours.value"
>
</Input>
</FormItem></Col>
</Row>
</Form>
...
...
@@ -36,6 +42,13 @@
return
{
condition
:
{
id
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
shiftWorkSchedCode
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
shiftName
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
shiftStart
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
shiftEnd
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
status
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
workingLong
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
shiftWorkSchedPk1
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
creationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
creatorUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
lastModificationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
...
...
@@ -43,10 +56,6 @@ lastModifierUserId:{op:"Equal",value:null,show:false},
isDeleted
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
deletionTime
:{
op
:
"Range"
,
value
:
null
,
show
:
false
},
deleterUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
false
},
title
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
startTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
endTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
workHours
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
},
}
},
...
...
@@ -55,7 +64,7 @@ workHours:{op:"Equal",value:null,show:true},
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"
calendar_class
"
+
"."
+
key
;
key
=
"
mes_shift_work_sched
"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
}
...
...
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