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
2ecfd683
Commit
2ecfd683
authored
Aug 18, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 前台-订单列表-页面
parent
246bdd71
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
711 additions
and
601 deletions
+711
-601
index.vue
src/pages/index/index.vue
+592
-535
order.vue
src/pages/index/order.vue
+119
-66
No files found.
src/pages/index/index.vue
View file @
2ecfd683
This diff is collapsed.
Click to expand it.
src/pages/index/order.vue
View file @
2ecfd683
...
...
@@ -21,7 +21,7 @@
<text
class=
"search-btn-text"
>
搜订单
</text>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<view
class=
"u-tabs-box"
>
<u-tabs
height=
"66"
activeColor=
"#2272FF"
...
...
@@ -29,8 +29,8 @@
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"
[0, 0
]"
:list=
"list"
:offset=
"
offset[curNow
]"
:list=
"list
[curNow]
"
count=
"total"
:current=
"current"
@
change=
"change"
...
...
@@ -68,7 +68,7 @@
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"
order
Type"
:type=
"
cell
Type"
:location=
"dataValue"
@
click=
"handleClick"
@
action=
"handleClickCellButton"
...
...
@@ -106,26 +106,46 @@ export default {
pageSize
:
1000
,
// 因为需要排序,所以暂时去掉分页
orderList
:
[],
list
:
[
{
name
:
'待预约'
,
total
:
0
,
},
{
name
:
'待签到'
,
total
:
0
,
},
{
name
:
'待完工'
,
total
:
0
,
},
{
name
:
'审核中'
,
total
:
0
,
},
{
name
:
'异常单'
,
total
:
0
,
},
[
{
name
:
'待预约'
,
total
:
0
,
},
{
name
:
'待签到'
,
total
:
0
,
},
{
name
:
'待完工'
,
total
:
0
,
},
{
name
:
'审核中'
,
total
:
0
,
},
{
name
:
'异常单'
,
total
:
0
,
},
{
name
:
'已完工'
,
total
:
0
,
},
],
[
{
name
:
'待联系'
,
total
:
0
,
},
{
name
:
'待完工'
,
total
:
0
,
},
{
name
:
'异常单'
,
total
:
0
,
},
],
],
current
:
0
,
loadStatus
:
'loading'
,
...
...
@@ -141,38 +161,54 @@ export default {
},
computed
:
{
subList
()
{
return
[
'
待处理'
,
'已完工
'
]
return
[
'
全部订单'
,
'今日订单
'
]
},
// 0:'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5'已完工'
orderType
()
{
return
this
.
indexStatus
[
this
.
cur
rentIndex
]
return
this
.
indexStatus
[
this
.
cur
Now
][
this
.
current
]
},
currentIndex
()
{
return
this
.
curNow
==
0
?
this
.
current
:
5
cellType
()
{
return
this
.
orderType
==
'waitLianxi'
?
''
:
this
.
orderType
},
offset
()
{
return
[
[
0
,
0
],
[
0
,
44
],
]
},
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
types
()
{
return
{
waitAppointment
:
0
,
// 待预约、
waitCheckIn
:
1
,
// 待签到、
waitFinish
:
2
,
// 待完工、
audit
:
3
,
// 审核中、
exception
:
4
,
// 异常单、
finish
:
5
,
//已完工
}
return
[
{
waitAppointment
:
0
,
// 待预约、
waitCheckIn
:
1
,
// 待签到、
waitFinish
:
2
,
// 待完工、
audit
:
3
,
// 审核中、
exception
:
4
,
// 异常单、
finish
:
5
,
//已完工
},
{
waitLianxi
:
0
,
// 待联系、
waitFinish
:
1
,
// 待完工、
exception
:
2
,
// 异常单、
},
]
},
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
()
{
return
{
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'audit'
,
4
:
'exception'
,
5
:
'finish'
,
}
return
[
[
'waitAppointment'
,
'waitCheckIn'
,
'waitFinish'
,
'audit'
,
'exception'
,
'finish'
,
],
[
'waitLianxi'
,
'waitFinish'
,
'exception'
],
]
},
countKeys
()
{
return
[
...
...
@@ -181,15 +217,16 @@ export default {
'toFinishCount'
,
'reviewingCount'
,
'exceptionCount'
,
'todayDlxCount'
,
'todayDwgCount'
,
'todayYcdCount'
,
]
},
noMore
()
{
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
},
noOrderCustomStyle
()
{
return
this
.
curNow
==
0
?
'margin-top: 100rpx;background-color: #F4F5F7'
:
'margin-top: 200rpx;background-color: #F4F5F7'
return
'margin-top: 100rpx;background-color: #F4F5F7'
},
},
onLoad
(
e
)
{
...
...
@@ -217,10 +254,10 @@ export default {
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getOrderList
(
this
.
currentIndex
)
this
.
getOrderList
()
},
// 页面数据
getOrderList
(
index
)
{
getOrderList
()
{
// 状态处理
this
.
pageNumber
+=
1
if
(
this
.
pageNumber
==
1
)
{
...
...
@@ -230,7 +267,7 @@ export default {
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
keyword
:
''
,
type
:
this
.
indexStatus
[
index
]
,
type
:
this
.
orderType
,
}
var
self
=
this
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
...
...
@@ -242,10 +279,14 @@ export default {
}
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
if
(
self
.
list
[
self
.
types
[
res
.
data
.
type
]])
{
self
.
list
[
self
.
types
[
res
.
data
.
type
]].
total
=
res
.
data
.
total
if
(
self
.
list
[
this
.
curNow
][
self
.
types
[
this
.
curNow
][
res
.
data
.
type
]]
)
{
self
.
list
[
this
.
curNow
][
self
.
types
[
this
.
curNow
][
res
.
data
.
type
]
].
total
=
res
.
data
.
total
}
self
.
orderList
.
sort
((
x
,
y
)
=>
{
return
x
.
currentOverTime
<=
y
.
currentOverTime
?
1
:
-
1
})
...
...
@@ -271,19 +312,26 @@ export default {
// 获取订单数量
getOrderCount
()
{
var
self
=
this
self
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
this
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
// 修改各个tab数量
var
j
=
0
var
i
=
0
var
count
=
0
for
(
var
item
of
self
.
list
)
{
item
.
total
=
res
.
data
[
self
.
countKeys
[
i
]]
count
+=
item
.
total
i
++
for
(
var
items
of
this
.
list
)
{
for
(
var
item
of
items
)
{
console
.
log
(
this
.
curNow
,
i
,
this
.
countKeys
[
i
])
item
.
total
=
res
.
data
[
this
.
countKeys
[
i
]]
||
0
if
(
j
==
0
)
{
// 待处理数量加起来
count
+=
item
.
total
console
.
log
(
'count'
,
item
)
}
i
++
}
j
++
}
// 修改tab总数
if
(
count
>
0
)
{
uni
.
setTabBarBadge
({
...
...
@@ -302,9 +350,9 @@ export default {
})
},
handleClickCellButton
(
item
,
type
)
{
if
(
type
==
'exception'
)
{
this
.
$u
.
api
.
workerDealWithError
(
item
.
orderId
).
then
(()
=>
{})
}
if
(
type
==
'exception'
)
{
this
.
$u
.
api
.
workerDealWithError
(
item
.
orderId
).
then
(()
=>
{})
}
// 去完工
uni
.
navigateTo
({
url
:
...
...
@@ -362,7 +410,7 @@ export default {
reloadOrderList
()
{
this
.
pageNumber
=
0
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
this
.
currentIndex
)
this
.
getOrderList
()
},
scroll
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
...
...
@@ -381,7 +429,12 @@ export default {
.u-tabs-box
{
margin-bottom
:
30rpx
;
}
// .u-tabs-box {
// margin-bottom: 20rpx !important;
// }
// /deep/ .u-tab-bar {
// bottom: 10rpx !important;
// }
.tab-view
{
height
:
100%
;
overflow
:
auto
;
...
...
@@ -403,7 +456,7 @@ export default {
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
padding-bottom
:
20
rpx
;
padding-bottom
:
18
rpx
;
.search-sub
{
height
:
72rpx
;
...
...
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