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
0af018b8
Commit
0af018b8
authored
Apr 08, 2020
by
康振飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间段校验
parent
a596ac1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
edit.vue
pages/basicData/calendar/class/edit.vue
+18
-2
edit.vue
pages/basicData/calendar/holiday/edit.vue
+1
-1
No files found.
pages/basicData/calendar/class/edit.vue
View file @
0af018b8
...
...
@@ -44,6 +44,16 @@ export default {
rules
:
{
shiftWorkSchedCode
:
[{
required
:
true
,
message
:
"请填写班次编号"
,
trigger
:
"blur"
}],
shiftName
:
[{
required
:
true
,
message
:
"请填写班次名称"
,
trigger
:
"blur"
}],
shiftStart
:
[{
required
:
true
,
message
:
"请选择开始时间"
,
trigger
:
"change"
}],
shiftEnd
:
[{
required
:
true
,
message
:
"请选择结束时间"
,
trigger
:
"change"
}],
}
};
},
...
...
@@ -62,8 +72,13 @@ export default {
if
(
v
)
{
this
.
disabled
=
true
;
var
data
=
this
.
entity
data
.
shiftStartEnd
=
this
.
entity
.
shiftStart
+
'-'
+
this
.
entity
.
shiftEnd
//.slice()
console
.
log
(
data
)
let
startime
=
data
.
shiftStart
let
endtime
=
data
.
shiftEnd
if
(
startime
>
endtime
){
alert
(
"结束时间不能小于开始时间!"
);
this
.
disabled
=
false
;
return
;
}
else
{
Api
.
update
(
data
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
...
...
@@ -79,6 +94,7 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
});
},
...
...
pages/basicData/calendar/holiday/edit.vue
View file @
0af018b8
...
...
@@ -71,7 +71,7 @@ export default {
let
startime
=
this
.
entity
.
holidayStart
let
endtime
=
this
.
entity
.
holidayEnd
if
(
startime
.
getTime
()
>
endtime
.
getTime
()){
alert
(
"结束时间不能
大
于开始时间!"
);
alert
(
"结束时间不能
小
于开始时间!"
);
this
.
disabled
=
false
;
return
;
}
else
{
...
...
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