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
9fd10d3f
Commit
9fd10d3f
authored
Aug 19, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 前台-订单管理
parent
7a9d3862
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
200 additions
and
72 deletions
+200
-72
index.vue
src/components/order/index.vue
+7
-7
index.vue
src/pages/index/index.vue
+0
-2
index.vue
src/pages/mine/order/index.vue
+130
-0
list.vue
src/pages/mine/order/list.vue
+63
-63
No files found.
src/components/order/index.vue
View file @
9fd10d3f
...
...
@@ -295,13 +295,13 @@ export default {
orderType
()
{
/*
orderStatus:
待接单 orderStatus<31 工单状态小于31
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
审核中 orderStatus ==83 or orderStatus == 87 or orderStatus == 88 工单状态 等于85 或者 等于87 或者 等于88
异常 orderStatus ==86 工单状态 等于86
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
待接单 orderStatus<31
工单状态小于31
待预约 orderStatus == 31 and appointmentDatetime == null
工单状态等于30并且预约时间为空
待签到 orderStatus == 31 and appointmentDatetime is not null
工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80
工单状态大于31 小于80
审核中 orderStatus ==83 or orderStatus == 87 or orderStatus == 88 工单状态 等于8
3 或者 等于8
5 或者 等于87 或者 等于88
异常 orderStatus ==86
工单状态 等于86
已完工 orderStatus in(80,81,89,110)
工单状态 等于80 or 81 or 89 or 110
*/
if
(
!
this
.
type
)
{
if
(
this
.
orderData
.
orderStatus
<
31
)
{
...
...
src/pages/index/index.vue
View file @
9fd10d3f
...
...
@@ -8,7 +8,6 @@
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
scroll-anchoring
scroll-y=
"true"
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
...
...
@@ -108,7 +107,6 @@
</template>
<
script
>
import
util
from
'@/utils/util.js'
import
TabBarPage
from
'@/components/tabBarList/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
const
app
=
getApp
()
...
...
src/pages/mine/order/index.vue
View file @
9fd10d3f
<
template
>
<view
class=
"order-manage-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"订单管理"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"header-view"
>
<view
class=
"title-view"
>
工作数据
</view>
<view
class=
"time-view"
>
<view
v-for=
"(value, key) in timeTypeTexts"
:key=
"key"
@
click=
"handleSelectTime(key)"
>
{{
value
}}
</view
>
</view>
</view>
<view
class=
"content-view"
>
<view
v-for=
"(value, key) in detailLabels"
:key=
"key"
class=
"item-view"
>
<view
v-if=
"key == 'total'"
class=
"line-view"
></view>
<view
class=
"left-view"
@
click=
"handleClick(value.key)"
>
<view
class=
"count-view"
>
{{
info
[
key
]
||
0
}}
</view>
<view>
{{
value
.
label
}}
</view>
</view>
<view
v-if=
"key == 'total'"
class=
"line-view"
></view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
info
:
{},
currentTime
:
'today'
,
}
},
computed
:
{
timeTypeTexts
()
{
return
{
today
:
'今日'
,
yesterday
:
'昨日'
,
week
:
'本周'
,
month
:
'本月'
}
},
detailLabels
()
{
return
{
acceptedCount
:
{
label
:
'已接单'
,
key
:
'waitCheckIn'
},
toFinishCount
:
{
label
:
'已签到'
,
key
:
'waitFinish'
},
finishedCount
:
{
label
:
'已完工'
,
key
:
'finish'
},
}
},
},
onLoad
()
{
this
.
getOrderCount
()
},
methods
:
{
// 获取订单数量
getOrderCount
()
{
this
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
info
=
res
.
data
||
{}
}
}
else
{
console
.
log
(
res
.
message
,
'获取订单数量失败!'
)
}
})
},
handleSelectTime
(
key
)
{
this
.
currentTime
=
key
this
.
getOrderCount
()
},
handleClick
(
key
)
{
this
.
$u
.
route
({
url
:
'pages/mine/order/list'
,
params
:
{
orderType
:
key
,
timeType
:
this
.
currentTime
,
},
})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.order-manage-view
{
.header-view
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
0rpx
30rpx
;
.title-view
{
}
.time-view
{
display
:
flex
;
justify-content
:
flex-end
;
align-content
:
center
;
}
}
.content-view
{
display
:
flex
;
align-self
:
center
;
justify-content
:
space-around
;
padding-top
:
56rpx
;
padding-bottom
:
66rpx
;
.item-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.left-view
{
text-align
:
center
;
color
:
#333333
;
font-size
:
26rpx
;
width
:
240rpx
;
.count-view
{
font-weight
:
bold
;
font-size
:
48rpx
;
margin-bottom
:
6rpx
;
}
}
.line-view
{
width
:
2rpx
;
background-color
:
#7993ff
;
height
:
70rpx
;
}
}
}
}
</
style
>
src/pages/mine/order/list.vue
View file @
9fd10d3f
...
...
@@ -8,55 +8,56 @@
:border-bottom=
"false"
title-bold
></u-navbar>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
:scroll-top=
"scrollTop"
refresher-background=
"#F4F5F7"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
@
scroll=
"scroll"
enable-back-to-top
>
<view
class=
"loading-view"
v-if=
"!loaded && !_freshing"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<NoOrder
v-else-if=
"noMore"
imageName=
"zwdd.png"
:customStyle=
"noOrderCustomStyle"
/>
<template
v-else
>
<view
v-for=
"item in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"cellType"
:location=
"dataValue"
@
click=
"handleClick"
@
action=
"handleClickCellButton"
>
</OrderCell>
<view
class=
"content-view"
>
<scroll-view
scroll-y
@
scrolltolower=
"reachBottom"
scroll-anchoring
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
:scroll-top=
"scrollTop"
refresher-background=
"#F4F5F7"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
enable-back-to-top
>
<view
class=
"loading-view"
v-if=
"!loaded && !_freshing"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<view
class=
"load-more-view"
>
<u-loadmore
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</
template
>
</scroll-view>
<NoOrder
v-else-if=
"noMore"
imageName=
"zwdd.png"
:customStyle=
"noOrderCustomStyle"
/>
<template
v-else
>
<view
v-for=
"item in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"cellType"
:location=
"dataValue"
@
click=
"handleClick"
@
action=
"handleClickCellButton"
>
</OrderCell>
</view>
<view
class=
"load-more-view"
>
<u-loadmore
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</
template
>
</scroll-view>
</view>
</view>
</template>
<
script
>
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
Complete
from
'../../order/complete.vue'
export
default
{
components
:
{
...
...
@@ -80,7 +81,7 @@ export default {
computed
:
{
title
()
{
return
(
this
.
order
TypeTexts
[
this
.
timeType
]
+
this
.
time
TypeTexts
[
this
.
timeType
]
+
'-'
+
this
.
orderTypeTexts
[
this
.
orderType
]
)
...
...
@@ -89,7 +90,7 @@ export default {
return
{
waitAppointment
:
'已接单'
,
waitCheckIn
:
'已接单'
,
waitFinish
:
'已
前
到'
,
waitFinish
:
'已
签
到'
,
finish
:
'已完工'
,
}
},
...
...
@@ -115,10 +116,9 @@ export default {
if
(
e
&&
e
.
timeType
)
{
this
.
timeType
=
e
.
timeType
}
this
.
reloadOrderList
()
},
onShow
()
{
this
.
reloadOrderInfo
()
},
methods
:
{
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
...
...
@@ -214,15 +214,11 @@ export default {
onRefresh
()
{
if
(
this
.
_freshing
)
return
this
.
_freshing
=
true
this
.
reloadOrder
Info
()
this
.
reloadOrder
List
()
},
onRestore
()
{
this
.
triggered
=
'restore'
// 需要重置
},
reloadOrderInfo
()
{
this
.
reloadOrderList
()
this
.
getOrderCount
()
},
reloadOrderList
()
{
this
.
pageNumber
=
0
this
.
loadStatus
=
'loading'
...
...
@@ -236,19 +232,23 @@ export default {
.list-view
{
height
:
100vh
;
overflow
:
auto
;
padding-bottom
:
24rpx
;
display
:
flex
;
flex-direction
:
column
;
.load-more-view
{
margin-bottom
:
20rpx
;
}
.loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
300rpx
;
position
:
absolute
;
.content-view
{
height
:
100%
;
overflow
:
auto
;
padding
:
0rpx
30rpx
20rpx
30rpx
;
.load-more-view
{
margin-bottom
:
20rpx
;
}
.loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
300rpx
;
position
:
absolute
;
}
}
}
</
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