Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
e435c02e
Commit
e435c02e
authored
Sep 16, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
司导日历
parent
8e2d5bff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
691 additions
and
20 deletions
+691
-20
pages.json
pages.json
+2
-0
njzz-calendar.vue
pages/guidecar/components/njzz-calendar/njzz-calendar.vue
+369
-0
guidedetails.vue
pages/guidecar/guidedetails.vue
+58
-19
index.vue
pages/guidecar/index.vue
+0
-1
rili.vue
pages/guidecar/rili.vue
+262
-0
No files found.
pages.json
View file @
e435c02e
...
...
@@ -325,6 +325,8 @@
"path"
:
"guidedetails"
},{
"path"
:
"place_order"
},{
"path"
:
"rili"
}]
},
{
...
...
pages/guidecar/components/njzz-calendar/njzz-calendar.vue
0 → 100755
View file @
e435c02e
This diff is collapsed.
Click to expand it.
pages/guidecar/guidedetails.vue
View file @
e435c02e
...
...
@@ -3,14 +3,14 @@
<view
class=
"guide"
v-if=
'type==1'
>
<view
class=
"guide-top"
>
<image
:src=
"g
.guide_p
hoto"
style=
"width: 60px; height: 60px;margin-right: 10px"
mode=
"widthFix"
></image>
<image
:src=
"g
uideModel.GuideP
hoto"
style=
"width: 60px; height: 60px;margin-right: 10px"
mode=
"widthFix"
></image>
<view
class=
"column"
style=
"height: 36px;justify-content: space-between;"
>
<view
class=
"row"
>
<span>
{{
g
.
guide_n
ame
}}
</span>
<span>
{{
g
uideModel
.
N
ame
}}
</span>
</view>
<view
class=
"row"
>
<u-rate
:current=
"g
.guide_s
core"
:current=
"g
uideModel.S
core"
active-color=
"#FF8C10"
inactive-color=
"#b2b2b2"
active-icon=
"star"
...
...
@@ -25,16 +25,20 @@
<view
class=
"guide-info"
>
<view
class=
"guide-info-item"
>
<span
class=
'info-text'
>
工龄:
</span>
<span>
{{
g
.
guide_worky
ears
}}
年
</span>
<span>
{{
g
uideModel
.
WorkY
ears
}}
年
</span>
</view>
<!--
<view
class=
"guide-info-item"
>
<view
class=
"guide-info-item"
>
<span
class=
'info-text'
>
电话:
</span>
<span>
{{
guideModel
.
Telephone
}}
</span>
</view>
<view
class=
"guide-info-item"
>
<span
class=
'info-text'
>
服务人数:
</span>
<span>
{{
g
.
guide_workyears
}}
年
</span>
<span>
{{
g
uideModel
.
OrderGuestNum
}}
人
</span>
</view>
<view
class=
"guide-info-item"
>
<span
class=
'info-text'
>
出单:
</span>
<span>
{{
g
.
guide_workyears
}}
单
</span>
</view>
-->
<span>
{{
g
uideModel
.
OrderNum
}}
单
</span>
</view>
</view>
<view
class=
"guide-info"
>
<view
class=
"guide-info-item"
>
...
...
@@ -66,11 +70,11 @@
</swiper>
</view>
<view
style=
"margin-top: 15px ;font-size: 16px;"
>
{{
g
.
car_model
!=
''
?
g
.
car_model
:
'无'
}}
{{
carModel
.
CarBrand
!=
''
?
carModel
.
CarBrand
:
'无'
}}
</view>
<view
style=
"margin-top: 5px;"
>
<u-rate
:current=
"
g.car_s
core"
:current=
"
carModel.S
core"
active-color=
"#FF8C10"
inactive-color=
"#b2b2b2"
active-icon=
"star"
...
...
@@ -83,19 +87,19 @@
<view
class=
"guide-info"
>
<view
class=
"guide-info-item"
>
<span
class=
'info-text'
>
购买年限:
</span>
<span>
{{
g
.
car_buyyear
}}
</span>
<span>
{{
carModel
.
car_buyyear
}}
</span>
</view>
<view
class=
"guide-info-item"
>
<span
class=
'info-text'
>
颜色:
</span>
<span>
{{
g
.
carcolor_name
}}
</span>
<span>
{{
carModel
.
carcolor_name
}}
</span>
</view>
<view
class=
"guide-info-item"
>
<span
class=
'info-text'
>
座位数:
</span>
<span>
{{
g
.
ride_n
um
}}
座
</span>
<span>
{{
carModel
.
GuestN
um
}}
座
</span>
</view>
<view
class=
"guide-info-item"
>
<span
class=
'info-text'
>
分类:
</span>
<span>
{{
g
.
guide_workyears
}}
</span>
<span>
{{
carModel
.
CarClassStr
}}
</span>
</view>
</view>
</view>
...
...
@@ -120,7 +124,9 @@ export default {
type
:
1
,
//1为
g
:{},
detailContent
:
''
,
imgs
:[]
imgs
:[],
carModel
:{},
guideModel
:{},
};
},
...
...
@@ -135,19 +141,18 @@ export default {
uni
.
setNavigationBarTitle
({
title
:
'导游详情'
,
});
this
.
getGuideCarGuideModel
()
}
else
{
uni
.
setNavigationBarTitle
({
title
:
'车辆详情'
,
});
this
.
getGuideCarModel
()
}
}
this
.
g
.
pic_url
.
forEach
((
x
)
=>
{
this
.
imgs
.
push
(
x
.
pic_url
);
});
let
richtext
=
this
.
g
.
guide_introduction
;
setTimeout
(()
=>
{
this
.
detailContent
=
richtext
;
},
10
)
...
...
@@ -163,7 +168,41 @@ export default {
},
methods
:
{
getGuideCarGuideModel
(){
//根据导游id获取导游信息
this
.
request2
(
{
url
:
'/api/AppletGuideCar/GetGuideCarGuideModel'
,
data
:
{
ID
:
this
.
g
.
guide_id
,
}
},
(
res
)
=>
{
this
.
guideModel
=
res
.
data
;
let
richtext
=
this
.
guideModel
.
Introduction
;
setTimeout
(()
=>
{
this
.
detailContent
=
richtext
;
},
10
)
console
.
log
(
this
.
guideModel
)
}
);
},
getGuideCarModel
(){
this
.
request2
(
{
url
:
'/api/AppletGuideCar/GetGuideCarModel'
,
data
:
{
ID
:
this
.
g
.
car_id
,
}
},
(
res
)
=>
{
this
.
carModel
=
res
.
data
;
console
.
log
(
this
.
guideModel
)
}
);
},
clickDescription
(
e
)
{
console
.
log
(
e
);
},
...
...
pages/guidecar/index.vue
View file @
e435c02e
...
...
@@ -203,7 +203,6 @@
day
:
true
,
hour
:
true
,
minute
:
true
,
},
amapPlugin
:
null
,
key
:
'c785085c46d1eb41b1ebe8d1ec7fd945'
,
...
...
pages/guidecar/rili.vue
0 → 100644
View file @
e435c02e
<
template
>
<view
class=
"rili"
>
<div
class=
'g_top'
>
<view
class=
"topB"
@
click=
""
>
<span
class=
'ztext'
>
{{
STime
.
month
}}
月
{{
STime
.
day
}}
日
</span>
<span
class=
'titext'
>
{{
STime
.
week
+
' '
+
STime
.
hour
+
':'
+
STime
.
minute
}}
</span>
</view>
<view
class=
"topB"
style=
"height: 20px;align-items: center;"
>
<span
style=
'font-size: 11px;color: #1C1E1F;'
>
{{
intervalDay
}}
</span>
<image
src=
"../../static/images/sanjiao.png"
mode=
"aspectFill"
style=
"width: 55px;height: 4px;"
></image>
</view>
<view
class=
"topB"
@
click=
""
>
<span
class=
'ztext'
>
{{
ETime
.
month
}}
月
{{
ETime
.
day
}}
日
</span>
<span
class=
'titext'
>
{{
ETime
.
week
+
' '
+
ETime
.
hour
+
':'
+
ETime
.
minute
}}
</span>
</view>
</div>
<view>
<z-calendar
ref=
"calendar"
:datePrice=
"datePrice"
howManyMonth=
"6"
mode=
"2"
@
changeDate=
"changeDate"
@
changeMonth=
"changeMonth"
:defaultSelect=
"defaultSelect"
></z-calendar>
</view>
<view
class=
"time"
>
<view
class=
"time_item"
@
click=
"showStart=true,timeType=1,defaultTime = qutime"
>
<span>
取车时间
</span>
<span>
{{
qutime
}}
</span>
</view>
<view
class=
"time_item"
@
click=
"showStart=true,timeType=2,defaultTime = stilltime"
>
<span>
还车时间
</span>
<span>
{{
stilltime
}}
</span>
</view>
</view>
<view
class=
"btn"
>
确定
</view>
<u-picker
v-model=
"showStart"
mode=
"time"
:params=
"params"
@
confirm=
'btnStart'
:default-time=
'defaultTime'
></u-picker>
</view>
</
template
>
<
script
>
import
zCalendar
from
"./components/njzz-calendar/njzz-calendar.vue"
export
default
{
components
:{
zCalendar
},
data
()
{
return
{
selectedData
:{},
datePrice
:[
],
STime
:{},
ETime
:{},
intervalDay
:
''
,
defaultSelect
:
''
,
qutime
:
''
,
stilltime
:
''
,
showStart
:
false
,
defaultTime
:
''
,
//默认取、还车时间
params
:
{
//时间的配置
hour
:
true
,
minute
:
true
,
},
};
},
mounted
()
{
let
myDate
=
new
Date
();
let
year
=
myDate
.
getFullYear
();
//年
let
month
=
myDate
.
getMonth
()
+
1
;
//月
let
hour
=
myDate
.
getHours
();
//时
let
minute
=
myDate
.
getMinutes
();
//分
if
(
month
<
10
){
month
=
(
'0'
+
month
)
}
let
Month
=
year
+
'-'
+
month
this
.
STime
=
this
.
getTime
(
'2020-09-18 12:20'
,
1
)
this
.
ETime
=
this
.
getTime
(
'2020-09-19 12:20'
,
2
)
let
startTime
=
new
Date
(
'2020-09-18 12:20'
);
// 开始时间
let
endTime
=
new
Date
(
'2020-09-19 12:20'
);
// 结束时间
let
usedTime
=
endTime
-
startTime
;
// 相差的毫秒数
let
days
=
Math
.
floor
(
usedTime
/
(
24
*
3600
*
1000
));
// 计算出天数
let
leavel
=
usedTime
%
(
24
*
3600
*
1000
);
// 计算天数后剩余的时间
let
hours
=
Math
.
floor
(
leavel
/
(
3600
*
1000
));
// 计算剩余的小时数
if
(
days
>
0
){
if
(
leavel
>
0
){
this
.
intervalDay
=
days
+
1
+
'天'
}
else
{
this
.
intervalDay
=
days
+
'天'
}
}
else
{
if
(
hours
>=
6
){
this
.
intervalDay
=
'1天'
}
else
{
this
.
intervalDay
=
'半天'
}
}
this
.
getGoodsDateList
(
Month
)
},
methods
:{
changeDate
(
data
){
//选择日期事件 可以将data绑定到此页面以用来提交等操作
console
.
log
(
"日期:"
+
data
);
this
.
selectedData
=
data
;
this
.
STime
=
this
.
getTime
(
data
+
' '
+
this
.
qutime
)
},
getTest
(){
//上面那个是选择日期时自动绑定的方式,但默认赋值之后没有进行选择操作 如何拿到选中的值
//一般来说设置默认的值在此页面早就拿到了 但如果不想再次处理数据格式可以用以下方式获取组件已经处理好的数据 $refs或者$children请查看vue官方文档
console
.
log
(
this
.
$refs
.
calendar
.
getSelectData
())
},
changeMonth
(
nowMonth
){
let
Month
=
nowMonth
.
year
+
'-'
+
nowMonth
.
month
;
this
.
getGoodsDateList
(
Month
)
},
getGoodsDateList
(
Month
){
this
.
request2
(
{
url
:
'/api/AppletGCOrder/GetAppletSDGoodsTargetDateList'
,
data
:
{
GoodsId
:
367468
,
Month
:
Month
}
},
res
=>
{
let
data
=
res
.
data
;
let
datePrice
=
[];
data
.
forEach
(
x
=>
{
if
(
x
.
IsReserve
==
1
&&
x
.
SurplusNum
>
0
){
let
obj
=
{}
obj
.
date
=
x
.
Date
;
obj
.
price
=
'剩'
+
x
.
SurplusNum
+
'座'
;
datePrice
.
push
(
obj
)
}
})
this
.
datePrice
=
datePrice
}
);
},
btnStart
(
val
){
console
.
log
(
val
)
if
(
this
.
timeType
==
1
){
this
.
qutime
=
val
.
hour
+
":"
+
val
.
minute
}
if
(
this
.
timeType
==
2
){
this
.
stilltime
=
val
.
hour
+
":"
+
val
.
minute
}
},
getTime
(
time
,
type
=
0
){
let
myDate
=
new
Date
(
time
);
let
obj
=
{}
obj
.
year
=
myDate
.
getFullYear
();
//年
obj
.
month
=
myDate
.
getMonth
()
+
1
;
//月
obj
.
day
=
myDate
.
getDate
();
//日
obj
.
hour
=
myDate
.
getHours
();
//时
obj
.
minute
=
myDate
.
getMinutes
();
//分
let
days
=
myDate
.
getDay
();
obj
.
week
=
this
.
getweek
(
days
)
//星期几
if
(
type
==
1
){
if
(
obj
.
month
<
10
){
obj
.
month
=
(
'0'
+
obj
.
month
)
}
this
.
defaultSelect
=
obj
.
year
+
'-'
+
obj
.
month
+
'-'
+
obj
.
day
;
this
.
qutime
=
obj
.
hour
+
':'
+
obj
.
minute
//初始取车时间
}
else
if
(
type
==
2
){
this
.
stilltime
=
obj
.
hour
+
':'
+
obj
.
minute
//初始还车时间
}
return
obj
},
getweek
(
day
){
//根据值返回当前时间的星期几
if
(
day
==
1
){
return
'星期一'
}
else
if
(
day
==
2
){
return
'星期二'
}
else
if
(
day
==
3
){
return
'星期三'
}
else
if
(
day
==
4
){
return
'星期四'
}
else
if
(
day
==
5
){
return
'星期五'
}
else
if
(
day
==
6
){
return
'星期六'
}
else
if
(
day
==
0
){
return
'星期日'
}
},
}
}
</
script
>
<
style
>
.rili
.time
{
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-around
;
margin-top
:
20px
;
}
.rili
.time_item
{
width
:
50%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.rili
.btn
{
width
:
90%
;
margin-left
:
5%
;
height
:
44px
;
border-radius
:
22px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
16px
;
margin-top
:
30px
;
color
:
#FFF
;
background-image
:
linear-gradient
(
to
right
,
#FF8585
,
#EE4454
);
}
.rili
.g_top
{
width
:
92%
;
height
:
45px
;
border-radius
:
22.5px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-around
;
padding
:
0
20px
;
margin-left
:
4%
;
margin-top
:
10px
;
margin-bottom
:
10px
;
}
.rili
.topB
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
/* align-items: center; */
}
.rili
.titext
{
font-size
:
22
rpx
;
color
:
#929292
;
}
.rili
.ztext
{
font-size
:
28
rpx
;
color
:
#1C1E1F
;
}
</
style
>
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