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
6a1dcdb6
Commit
6a1dcdb6
authored
Apr 08, 2020
by
康振飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picker
parent
eca6b1ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
28 deletions
+73
-28
zh-CN.js
i18n/locale/zh-CN.js
+1
-0
add.vue
pages/basicData/calendar/class/add.vue
+3
-3
add.vue
pages/basicData/calendar/holiday/add.vue
+69
-25
No files found.
i18n/locale/zh-CN.js
View file @
6a1dcdb6
...
...
@@ -751,6 +751,7 @@ export default {
calendar_holiday
:
{
holidayId
:
"节假日编号"
,
holidayName
:
"节假日名称"
,
holidayTimeslot
:
"节假日时间段"
,
holidayStart
:
"节假日开始时间"
,
holidayEnd
:
"节假日结束时间"
,
creationTime
:
"创建时间"
,
...
...
pages/basicData/calendar/class/add.vue
View file @
6a1dcdb6
...
...
@@ -3,17 +3,17 @@
<Row>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftWorkSchedCode')"
prop=
"shiftWorkSchedCode"
>
<Input
v-model=
"entity.shiftWorkSchedCode"
style=
"width: 90%"
></Input>
<Input
v-model=
"entity.shiftWorkSchedCode"
placeholder=
"请填写班次编号"
style=
"width: 90%"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftName')"
prop=
"shiftName"
>
<Input
v-model=
"entity.shiftName"
style=
"width: 90%"
></Input>
<Input
v-model=
"entity.shiftName"
placeholder=
"请填写班次名称"
style=
"width: 90%"
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStartEnd')"
prop=
"shiftStartEnd"
>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStartEnd"
type=
"timerange"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStartEnd"
type=
"timerange"
placeholder=
"
请
选择时间段"
style=
"width: 130px"
></TimePicker>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
...
...
pages/basicData/calendar/holiday/add.vue
View file @
6a1dcdb6
...
...
@@ -11,6 +11,17 @@
<Input
v-model=
"entity.holidayName"
style=
"width: 90%"
></Input>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
<FormItem
:label=
"l('holidayTimeslot')"
prop=
"holidayTimeslot"
>
<DatePicker
type=
"daterange"
v-model=
"entity.holidayTimeslot"
placement=
"bottom-end"
placeholder=
"选择时间段"
style=
"width: 200px"
></DatePicker>
</FormItem>
</Col>
-->
<Col
:span=
"24"
>
<FormItem
:label=
"l('holidayStart')"
prop=
"holidayStart"
>
<DatePicker
type=
"date"
v-model=
"entity.holidayStart"
></DatePicker>
...
...
@@ -29,60 +40,93 @@
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
rules
:
{
holidayId
:
[{
required
:
true
,
message
:
'请填写节假日编号'
,
trigger
:
'blur'
}],
holidayName
:
[{
required
:
true
,
message
:
'请填写节假日名称'
,
trigger
:
'blur'
}],
// holidayStart: [
// { required: true, type: 'array', min: 1, message: '请选择关联班次', trigger: 'change' },
holidayId
:
[
{
required
:
true
,
message
:
"请填写节假日编号"
,
trigger
:
"blur"
}
],
holidayName
:
[
{
required
:
true
,
message
:
"请填写节假日名称"
,
trigger
:
"blur"
}
],
holidayStart
:
[{
required
:
true
,
type
:
"date"
,
message
:
"请选择开始时间"
,
trigger
:
"change"
}],
holidayEnd
:
[{
required
:
true
,
type
:
"date"
,
message
:
"请选择结束时间"
,
trigger
:
"change"
}],
// holidayTimeslot: [
// {
// required: true,
// type: 'array',
// message: "请选择时间段",
// trigger: 'blur',
// fields: {
// 0: {type: "date", required: true, message: "请选择班次时间段"},
// 1: {type: "date", required: true, message: "请选择班次时间段"}
// }
// }
// ]
}
}
}
;
},
props
:
{
v
:
Object
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
this
.
disabled
=
true
this
.
disabled
=
true
;
var
data
=
this
.
$u
.
clone
(
this
.
entity
)
// let startime = this.entity.holidayTimeslot[0]
// let endtime = this.entity.holidayTimeslot[1]
// console.log(startime)
// console.log(endtime)
// data.holidayStart = startime.slice(0,10)
// data.holidayEnd = endtime.slice(0,10)
Api
.
create
(
this
.
entity
)
.
then
(
(
r
)
=>
{
this
.
disabled
=
false
.
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_holiday'
+
'.'
+
key
return
this
.
$t
(
key
)
key
=
"calendar_holiday"
+
"."
+
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
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