Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-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
youjj
cloud-platform-ui
Commits
27ae43ee
Commit
27ae43ee
authored
Nov 21, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
租车价格日历
parent
c8074be3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
31 deletions
+29
-31
priceList.vue
src/views/vehicleType/priceList.vue
+29
-31
No files found.
src/views/vehicleType/priceList.vue
View file @
27ae43ee
...
...
@@ -77,7 +77,7 @@
>
{{
dayobject
.
day
.
getDate
()
}}
</span>
<!--如果是本月 还需要判断是不是这一天-->
<span
v-else
>
<span
v-else
ref=
"allDays"
>
<span
v-if=
"dayobject.day.getFullYear() == new Date().getFullYear() && dayobject.day.getMonth() == new Date().getMonth() && dayobject.day.getDate() == new Date().getDate()"
class=
"active"
...
...
@@ -85,19 +85,6 @@
<span
v-else
>
{{
dayobject
.
day
.
getDate
()
}}
</span>
</span>
<p
style=
"color:red"
>
{{
matching
(
GMTToStr
(
dayobject
.
day
))
}}
</p>
<!--
<p
style=
"color:red"
>
{{
GMTToStr
(
dayobject
.
day
)
}}
倍
</p>
-->
<!--
<p
v-if=
"new Date(dayobject.day).getDay()+1 == 1 || new Date(dayobject.day).getDay()+1 == 7"
style=
"color:red"
>
{{
GMTToStr
(
dayobject
.
day
)
}}
</p>
-->
<!--显示剩余多少数量-->
<!--
<p
v-if=
"leftobj[dayobject.index]"
>
剩余:
<span
style=
"color: red"
>
{{
leftobj
[
dayobject
.
index
].
count
}}
</span>
</p>
-->
<!---->
<!--
<button
@
click=
"order(dayobject)"
v-if=
"leftobj[dayobject.index]"
>
预定
</button>
-->
</li>
</ul>
...
...
@@ -327,10 +314,6 @@ export default {
type
:
this
.
setForm
.
type
})
}
// else {
// this.$message.error('请设置不同车型不同价格1')
// return false
// }
}
else
if
(
this
.
setForm
.
type
==
2
)
{
if
(
!!
element
.
price
||
!!
element
.
freeDays
)
{
params
.
push
({
...
...
@@ -343,10 +326,6 @@ export default {
type
:
this
.
setForm
.
type
})
}
// else {
// this.$message.error('请设置不同车型不同价格2')
// return false
// }
}
else
{
if
(
!!
element
.
level
||
!!
element
.
freeDays
)
{
params
.
push
({
...
...
@@ -359,15 +338,11 @@ export default {
type
:
this
.
setForm
.
type
})
}
// else {
// this.$message.error('请设置不同车型不同价格3')
// return false
// }
}
})
}
if
(
params
==
''
)
{
add_edit
(
''
,
this
.
activeTime
).
then
(
data
=>
{
add_edit
(
''
,
this
.
activeTime
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
$message
.
success
(
'设置成功'
)
this
.
chooseData
=
[]
...
...
@@ -377,7 +352,9 @@ export default {
}
})
}
else
{
add_edit
(
params
,
this
.
activeTime
).
then
(
data
=>
{
// console.log(params);
add_edit
(
params
,
this
.
activeTime
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
$message
.
success
(
'设置成功'
)
this
.
chooseData
=
[]
...
...
@@ -398,8 +375,9 @@ export default {
})
},
setVal
(
val
,
index
,
isClick
)
{
//val:当前日期 index:当前索引 isClick:不置灰
if
(
!
isClick
)
{
this
.
activeTime
=
val
this
.
activeTime
=
val
.
length
==
1
?
'0'
+
val
:
val
if
(
this
.
calendarStatus
==
1
&&
this
.
setForm
.
isGlobal
==
0
)
{
dayList
(
val
).
then
(
data
=>
{
data
.
data
.
forEach
(
element
=>
{
...
...
@@ -564,7 +542,7 @@ export default {
this
.
days
.
push
(
dayobject
)
//将日期放入data 中的days数组 供页面渲染使用
}
//其他周
for
(
var
i
=
1
;
i
<=
35
-
this
.
currentWeek
+
7
;
i
++
)
{
for
(
var
i
=
1
;
i
<=
35
-
this
.
currentWeek
+
7
;
i
++
)
{
var
d
=
new
Date
(
str
)
d
.
setDate
(
d
.
getDate
()
+
i
)
var
dayobject
=
{}
...
...
@@ -588,14 +566,34 @@ export default {
d
.
setDate
(
0
)
this
.
initData
(
this
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
))
this
.
getList
()
this
.
changeIsGlobal
(
0
)
this
.
chooseData
=
[]
},
pickNext
:
function
(
year
,
month
)
{
var
d
=
new
Date
(
this
.
formatDate
(
year
,
month
,
1
))
d
.
setDate
(
35
)
this
.
initData
(
this
.
formatDate
(
d
.
getFullYear
(),
d
.
getMonth
()
+
1
,
1
))
this
.
getList
()
},
this
.
changeIsGlobal
(
0
)
this
.
chooseData
=
[]
// this.reset()
},
// reset() {
// if ((this.calendarStatus = 1)) {
// let activeStatus = this.$refs.activeDay
// let allDays = this.$refs.allDays
// for (let index = 0; index
<
activeStatus
.
length
;
index
++
)
{
// if (
// this.days[index].day.getMonth() + 1 !=
// this.currentMonth
// ) {
// activeStatus[index].className = '';
// }
// }
// }
// },
// 返回 类似 2016-01-02 格式的字符串
formatDate
:
function
(
year
,
month
,
day
)
{
var
y
=
year
...
...
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