Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zentao-view
Project
Project
Details
Activity
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
zentao
zentao-view
Commits
ae5a2706
Commit
ae5a2706
authored
Mar 04, 2021
by
menglingjun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
e7f430aa
d1d56537
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
HolidaysDetail.vue
src/views/holidays/HolidaysDetail.vue
+16
-11
No files found.
src/views/holidays/HolidaysDetail.vue
View file @
ae5a2706
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
class=
"cust-modal"
class=
"cust-modal"
okText=
"保存"
okText=
"保存"
>
>
<a-form>
<a-form
:form=
"form"
>
<a-row>
<a-row>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-item
label=
'假期名称'
:labelCol=
"
{ span: 5 }" :wrapperCol="{ span: 17 }">
<a-form-item
label=
'假期名称'
:labelCol=
"
{ span: 5 }" :wrapperCol="{ span: 17 }"
>
<a-input
v-model=
"detailInfo.name"
placeholder=
"双休日请输入星期六或星期日"
/>
<a-input
v-model=
"detailInfo.name"
v-decorator=
"['假期名称',
{initialValue: detailInfo.name,rules: [{ required: true, message: '请输入假期名称' }]}]"
placeholder="双休日请输入星期六或星期日" />
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
</a-form-item>
</a-form-item>
<a-form-item
v-else
label=
'假期范围'
:labelCol=
"
{ span: 5 }" :wrapperCol="{ span: 17 }">
<a-form-item
v-else
label=
'假期范围'
:labelCol=
"
{ span: 5 }" :wrapperCol="{ span: 17 }">
<a-range-picker
:disabled-date=
"disabledDate"
v-if=
"isEdit"
v-model=
"dateRange"
@
change=
"onChange"
/>
<a-range-picker
v-decorator=
"['假期范围',
{ initialValue: dateRange,rules: [{ required: true, message: '请选择假期范围' }]}]"
:disabled-date="disabledDate" v-if="isEdit" v-model="dateRange" @change="onChange" />
<a-range-picker
:disabled-date=
"disabledDate"
v-else
@
change=
"onChange"
/>
<a-range-picker
v-decorator=
"['假期范围',
{rules: [{ required: true, message: '请选择假期范围' }]}]"
:disabled-date="disabledDate" v-else @change="onChange" />
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
...
@@ -65,7 +65,8 @@ export default {
...
@@ -65,7 +65,8 @@ export default {
durationInput
:
this
.
detailData
.
dayCode
===
SYS_CONST
.
HOLIDAY_TYPE
.
WEEKEND
,
durationInput
:
this
.
detailData
.
dayCode
===
SYS_CONST
.
HOLIDAY_TYPE
.
WEEKEND
,
detailInfo
:
this
.
detailData
,
detailInfo
:
this
.
detailData
,
dateRange
:
[
moment
(
this
.
detailData
.
startDate
),
moment
(
this
.
detailData
.
endDate
)],
dateRange
:
[
moment
(
this
.
detailData
.
startDate
),
moment
(
this
.
detailData
.
endDate
)],
dateTime
:
moment
(
this
.
detailData
.
startDate
)
dateTime
:
moment
(
this
.
detailData
.
startDate
),
form
:
this
.
$form
.
createForm
(
this
)
}
}
},
},
watch
:{
watch
:{
...
@@ -78,12 +79,16 @@ export default {
...
@@ -78,12 +79,16 @@ export default {
},
},
methods
:
{
methods
:
{
handleOk
()
{
handleOk
()
{
addHoliday
(
this
.
detailInfo
).
then
(
response
=>
{
this
.
form
.
validateFieldsAndScroll
((
err
)
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
if
(
!
err
)
{
this
.
visible
=
false
;
addHoliday
(
this
.
detailInfo
).
then
(
response
=>
{
this
.
$emit
(
'flushData'
)
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
visible
=
false
;
this
.
$emit
(
'flushData'
)
}
})
}
}
})
;
})
},
},
onChange
(
date
,
dateStr
)
{
onChange
(
date
,
dateStr
)
{
this
.
detailInfo
.
duration
=
date
[
1
].
diff
(
date
[
0
],
'day'
)
+
1
;
this
.
detailInfo
.
duration
=
date
[
1
].
diff
(
date
[
0
],
'day'
)
+
1
;
...
...
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