Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
20a4ad96
Commit
20a4ad96
authored
Apr 29, 2021
by
郭晓清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预约+时间组件对接
parent
936a248d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
35 deletions
+48
-35
appoint-time.vue
src/components/appoint/appoint-time.vue
+4
-0
detail.vue
src/pages/order/detail.vue
+43
-34
index.vue
src/pages/order/index.vue
+1
-1
No files found.
src/components/appoint/appoint-time.vue
View file @
20a4ad96
...
...
@@ -302,6 +302,10 @@
/
deep
/
button
[
plain
]
{
border
:
none
;
}
button
[
disabled
]
:not
([
type
])
{
background
:
#d1d4d4
;
color
:
#ffffff
;
}
}
}
</
style
>
src/pages/order/detail.vue
View file @
20a4ad96
...
...
@@ -52,13 +52,13 @@
<text>
x
{{
order
.
orderProductCount
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<text>
信息:
</text>
<text>
充电桩
信息:
</text>
<text>
{{
order
.
serviceContent
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<
!--
<
view
class=
"order-cell between-cell"
>
<text>
备注:
</text>
<text>
{{
order
.
serviceContent
}}
</text>
</view>
</view>
-->
<view
class=
"read-more-toggle"
>
<u-icon
name=
"arrow-up"
></u-icon>
<text
class=
"read-more-text"
@
click=
"readMore = true"
>
点击收起
</text>
...
...
@@ -130,8 +130,6 @@
</u-count-down>
</view>
</view>
</view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view
class=
"right"
>
...
...
@@ -212,7 +210,8 @@
isAllowDianhuaAndDaohang
:
false
,
appointmentDatetimeRange
:
''
,
appointmentDatetime
:
''
,
signDistance
:
3000
signDistance
:
3000
,
num
:
0
}
},
onLoad
(
option
)
{
...
...
@@ -220,9 +219,7 @@
console
.
log
(
"option"
,
option
)
if
(
option
&&
option
.
id
)
{
this
.
orderId
=
option
.
id
}
else
{
// 异常处理
}
}
this
.
loadOrderDetail
()
this
.
loadOrderRecord
()
this
.
getLocation
()
...
...
@@ -236,7 +233,6 @@
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'dianhua-0.png'
}
},
navigationIcon
()
{
//self-support/icon/daohang-0@2x.png
...
...
@@ -245,7 +241,6 @@
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'daohang-0.png'
}
},
centerButtonClass
()
{
let
btnClass
=
"appoint-btn"
...
...
@@ -336,7 +331,6 @@
};
self
.
$u
.
api
.
orderDetail
(
data
,
self
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
self
.
order
=
res
.
data
this
.
getCurrentBtn
()
if
(
self
.
order
.
isFirstOrder
){
...
...
@@ -362,7 +356,6 @@
};
self
.
$u
.
api
.
listOrderRecord
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
self
.
orderRecords
=
res
.
data
}
else
{
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
...
...
@@ -371,39 +364,55 @@
},
weekChange
(
data
){
// 点击下一周
console
.
log
(
data
,
'week
Change
'
)
console
.
log
(
data
,
'week
-data
'
)
if
(
data
&&
data
.
time
)
{
let
num
=
data
.
num
let
time
=
data
.
time
this
.
num
=
num
if
(
num
==
0
)
{
this
.
dateList
=
[
{
day
:
time
,
timeRange
:
[]},
{
day
:
time
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
5
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
6
*
86400000
),
timeRange
:
[]},
]
this
.
loadCalendar
()
}
else
{
this
.
dateList
=
[
{
day
:
time
,
timeRange
:
[]},
{
day
:
time
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
5
*
86400000
),
timeRange
:
[]},
]
this
.
loadCalendar
()
}
}
},
/* 加载日历数据 */
async
loadCalendar
()
{
let
self
=
this
let
params
=
{
num
:
this
.
num
}
let
res
=
await
this
.
$u
.
api
.
workerCalendar
(
params
)
if
(
res
&&
res
.
code
==
200
)
{
self
.
dateList
=
res
.
data
self
.
dateList
[
1
].
timeRange
[
0
]
=
'appointment_range_8'
}
},
/* 加载预约时间段 */
async
loadTimerange
()
{
let
self
=
this
let
res
=
await
this
.
$u
.
api
.
openTimerange
()
if
(
res
&&
res
.
code
==
200
)
{
let
list
=
res
.
data
list
.
map
((
item
,
index
)
=>
{
item
.
disabled
=
false
})
self
.
timeList
=
list
}
},
dateChange
(
data
){
// 点击日期选择
console
.
log
(
data
,
'dateChange'
)
this
.
loadCalendar
()
let
self
=
this
self
.
appointmentDatetime
=
data
.
item
.
day
self
.
timeList
.
map
((
item
,
index
)
=>
{
if
(
data
.
item
.
timeRange
.
indexOf
(
item
.
pkey
)
>
-
1
)
{
item
.
disabled
=
true
}
else
{
item
.
disabled
=
false
}
})
},
timeChange
(
data
){
// 时间段选择变化
...
...
@@ -624,7 +633,7 @@
};
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.order-wrap
{
width
:
750rpx
;
height
:
100vh
;
...
...
src/pages/order/index.vue
View file @
20a4ad96
...
...
@@ -183,7 +183,7 @@
// 页面数据
getOrderList
(
index
)
{
// 状态处理
this
.
pageNumber
+=
1
//
this.pageNumber += 1
this
.
loaded
=
false
var
param
=
{
pageNumber
:
this
.
pageNumber
,
...
...
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