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
16c5f708
Commit
16c5f708
authored
Aug 20, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 前台-订单管理高保真;订单页面加载显示优化
parent
c0cd6ca7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
64 deletions
+109
-64
order.vue
src/pages/index/order.vue
+12
-10
index.vue
src/pages/mine/order/index.vue
+97
-54
No files found.
src/pages/index/order.vue
View file @
16c5f708
...
@@ -56,11 +56,8 @@
...
@@ -56,11 +56,8 @@
@
scroll=
"scroll"
@
scroll=
"scroll"
enable-back-to-top
enable-back-to-top
>
>
<view
class=
"loading-view"
v-if=
"!loaded && !_freshing"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<NoOrder
<NoOrder
v-
else-
if=
"noMore"
v-if=
"noMore"
imageName=
"zwdd.png"
imageName=
"zwdd.png"
:customStyle=
"noOrderCustomStyle"
:customStyle=
"noOrderCustomStyle"
/>
/>
...
@@ -83,6 +80,9 @@
...
@@ -83,6 +80,9 @@
></u-loadmore>
></u-loadmore>
</view>
</view>
</
template
>
</
template
>
<view
class=
"loading-view"
v-if=
"!loaded && !_freshing"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
</TabBarPage>
</TabBarPage>
...
@@ -157,6 +157,7 @@ export default {
...
@@ -157,6 +157,7 @@ export default {
old
:
{
old
:
{
scrollTop
:
0
,
scrollTop
:
0
,
},
},
cellType
:
'waitAppointment'
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -167,9 +168,6 @@ export default {
...
@@ -167,9 +168,6 @@ export default {
orderType
()
{
orderType
()
{
return
this
.
indexStatus
[
this
.
curNow
][
this
.
current
]
return
this
.
indexStatus
[
this
.
curNow
][
this
.
current
]
},
},
cellType
()
{
return
this
.
orderType
==
'waitLianxi'
?
''
:
this
.
orderType
},
offset
()
{
offset
()
{
return
[
return
[
[
0
,
0
],
[
0
,
0
],
...
@@ -247,7 +245,7 @@ export default {
...
@@ -247,7 +245,7 @@ export default {
// tab栏切换
// tab栏切换
change
(
index
)
{
change
(
index
)
{
this
.
current
=
index
this
.
current
=
index
this
.
orderList
=
[]
//
this.orderList = []
this
.
reloadOrderList
()
this
.
reloadOrderList
()
},
},
...
@@ -277,6 +275,7 @@ export default {
...
@@ -277,6 +275,7 @@ export default {
if
(
self
.
pageNumber
==
1
)
{
if
(
self
.
pageNumber
==
1
)
{
self
.
orderList
=
[]
self
.
orderList
=
[]
}
}
this
.
cellType
=
this
.
orderType
==
'waitLianxi'
?
''
:
this
.
orderType
if
(
res
.
data
.
list
)
{
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
self
.
orderList
.
push
(...
res
.
data
.
list
)
if
(
if
(
...
@@ -350,6 +349,7 @@ export default {
...
@@ -350,6 +349,7 @@ export default {
})
})
},
},
handleClickCellButton
(
item
,
type
)
{
handleClickCellButton
(
item
,
type
)
{
if
(
!
this
.
loaded
)
return
if
(
type
==
'exception'
)
{
if
(
type
==
'exception'
)
{
this
.
$u
.
api
.
workerDealWithError
(
item
.
orderId
).
then
(()
=>
{})
this
.
$u
.
api
.
workerDealWithError
(
item
.
orderId
).
then
(()
=>
{})
}
}
...
@@ -377,6 +377,7 @@ export default {
...
@@ -377,6 +377,7 @@ export default {
})
})
},
},
handleClick
(
item
,
type
,
showCountTime
)
{
handleClick
(
item
,
type
,
showCountTime
)
{
if
(
!
this
.
loaded
)
return
// type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
// type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
//type类型
//type类型
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
...
@@ -444,11 +445,12 @@ export default {
...
@@ -444,11 +445,12 @@ export default {
}
}
.loading-view
{
.loading-view
{
width
:
100%
;
width
:
100%
;
background-color
:
transparent
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
margin-top
:
300rpx
;
top
:
50%
;
position
:
absolute
;
position
:
fixed
;
}
}
}
}
...
...
src/pages/mine/order/index.vue
View file @
16c5f708
...
@@ -8,25 +8,41 @@
...
@@ -8,25 +8,41 @@
:border-bottom=
"false"
:border-bottom=
"false"
title-bold
title-bold
></u-navbar>
></u-navbar>
<view
class=
"body-view"
>
<view
class=
"header-view"
>
<view
class=
"header-view"
>
<view
class=
"title-view"
>
工作数据
</view>
<view
class=
"title-view"
>
工作数据
</view>
<view
class=
"time-view"
>
<view
class=
"time-view"
>
<view
<u-tabs
v-for=
"(value, key) in timeTypeTexts"
height=
"56"
:key=
"key"
activeColor=
"#2272FF"
@
click=
"handleSelectTime(key)"
bg-color=
"none"
>
{{
value
}}
</view
inactive-color=
"#999"
>
bar-height=
"4"
bar-width=
"44"
:offset=
"offset"
:list=
"timeTypeTexts"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
font-size=
"26"
bold
></u-tabs>
</view>
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
v-for=
"(value, key) in detailLabels"
:key=
"key"
class=
"item-view"
>
<view
<view
v-if=
"key == 'total'"
class=
"line-view"
></view>
v-for=
"(item, index) in detailLabels"
<view
class=
"left-view"
@
click=
"handleClick(value.key)"
>
:key=
"index"
<view
class=
"count-view"
>
{{
info
[
key
]
||
0
}}
</view>
class=
"item-view"
<view>
{{
value
.
label
}}
</view>
>
<view
class=
"left-view"
@
click=
"handleClick(item.type)"
>
<view
:class=
"['count-view',
{ active: item.type == 'finish' }]">
{{
info
[
item
.
key
]
||
0
}}
</view>
<view>
{{
item
.
label
}}
</view>
</view>
</view>
</view>
<view
v-if=
"key == 'total'"
class=
"line-view"
></view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -36,19 +52,30 @@ export default {
...
@@ -36,19 +52,30 @@ export default {
data
()
{
data
()
{
return
{
return
{
info
:
{},
info
:
{},
offset
:
[
0
,
0
],
current
:
0
,
currentTime
:
'today'
,
currentTime
:
'today'
,
}
}
},
},
computed
:
{
computed
:
{
timeTypeTexts
()
{
timeTypeTexts
()
{
return
{
today
:
'今日'
,
yesterday
:
'昨日'
,
week
:
'本周'
,
month
:
'本月'
}
return
[
{
name
:
'今日'
,
key
:
'today'
},
{
name
:
'昨日'
,
key
:
'yesterday'
},
{
name
:
'本周'
,
key
:
'week'
},
{
name
:
'本月'
,
key
:
'month'
},
]
// return { today: '今日', yesterday: '昨日', week: '本周', month: '本月' }
},
},
detailLabels
()
{
detailLabels
()
{
return
{
return
[
acceptedCount
:
{
label
:
'已接单'
,
key
:
'waitCheckIn'
},
{
label
:
'已接单'
,
type
:
'waitCheckIn'
,
key
:
'acceptedCount'
},
toFinishCount
:
{
label
:
'已签到'
,
key
:
'waitFinish'
},
{
label
:
'已签到'
,
type
:
'waitFinish'
,
key
:
'toFinishCount'
},
finishedCount
:
{
label
:
'已完工'
,
key
:
'finish'
},
{
label
:
'已完工'
,
type
:
'finish'
,
key
:
'finishedCount'
},
}
]
},
currentKey
()
{
return
this
.
timeTypeTexts
[
this
.
current
].
key
},
},
},
},
onLoad
()
{
onLoad
()
{
...
@@ -67,6 +94,10 @@ export default {
...
@@ -67,6 +94,10 @@ export default {
}
}
})
})
},
},
change
(
index
)
{
this
.
current
=
index
this
.
getOrderCount
()
},
handleSelectTime
(
key
)
{
handleSelectTime
(
key
)
{
this
.
currentTime
=
key
this
.
currentTime
=
key
this
.
getOrderCount
()
this
.
getOrderCount
()
...
@@ -85,44 +116,56 @@ export default {
...
@@ -85,44 +116,56 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.order-manage-view
{
.order-manage-view
{
.body-view
{
background-color
:
#ffffff
;
margin
:
20rpx
30rpx
;
border-radius
:
12rpx
;
padding
:
20rpx
30rpx
;
.header-view
{
.header-view
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
20rpx
30rpx
;
.title-view
{
.title-view
{
font-size
:
32rpx
;
color
:
#333333
;
font-weight
:
bold
;
display
:
flex
;
align-items
:
center
;
}
}
.time-view
{
.time-view
{
display
:
flex
;
width
:
300rpx
;
justify-content
:
flex-end
;
align-content
:
center
;
}
}
}
}
.line-view
{
width
:
100%
;
background-color
:
#f4f5f7
;
height
:
2rpx
;
margin
:
30rpx
0
;
}
.content-view
{
.content-view
{
display
:
flex
;
display
:
flex
;
align-self
:
center
;
align-self
:
center
;
justify-content
:
space-around
;
justify-content
:
space-around
;
padding-top
:
56rpx
;
padding
:
54rpx
0
;
padding-bottom
:
66rpx
;
.item-view
{
.item-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
.left-view
{
.left-view
{
text-align
:
center
;
text-align
:
center
;
color
:
#333333
;
color
:
#666666
;
font-size
:
26
rpx
;
font-size
:
28
rpx
;
width
:
240rpx
;
width
:
240rpx
;
.count-view
{
.count-view
{
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
48rpx
;
font-size
:
52rpx
;
margin-bottom
:
6rpx
;
margin-bottom
:
20rpx
;
color
:
#333333
;
&
.active
{
color
:
#2272ff
;
}
}
}
}
}
.line-view
{
width
:
2rpx
;
background-color
:
#7993ff
;
height
:
70rpx
;
}
}
}
}
}
}
...
...
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