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
f7cdfa91
Commit
f7cdfa91
authored
Aug 25, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 订单列表接口调试
parent
7ec8ee1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
19 deletions
+39
-19
order.vue
src/pages/index/order.vue
+39
-19
No files found.
src/pages/index/order.vue
View file @
f7cdfa91
...
@@ -174,7 +174,7 @@ export default {
...
@@ -174,7 +174,7 @@ export default {
return
[
'全部订单'
,
'今日订单'
]
return
[
'全部订单'
,
'今日订单'
]
},
},
// 0 全部订单: 0:'待预约', 1:'待签到', 2:'待完工', 3:'审核中', 4:'异常单', 5'已完工'
// 0 全部订单: 0:'待预约', 1:'待签到', 2:'待完工', 3:'审核中', 4:'异常单', 5'已完工'
// 1 今日订单: 0:'
待联系', 1:'待完工', 2:'
异常单'
// 1 今日订单: 0:'
今日待联系', 1:'今日待完工', 2:'今日
异常单'
orderType
()
{
orderType
()
{
return
this
.
indexStatus
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]]
return
this
.
indexStatus
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]]
},
},
...
@@ -202,6 +202,7 @@ export default {
...
@@ -202,6 +202,7 @@ export default {
sousuoImage
()
{
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
},
// 每一种状态对应的tab的index
types
()
{
types
()
{
return
[
return
[
{
{
...
@@ -213,13 +214,13 @@ export default {
...
@@ -213,13 +214,13 @@ export default {
finish
:
5
,
//已完工
finish
:
5
,
//已完工
},
},
{
{
waitLianxi
:
0
,
//
待联系、
todayWaitContact
:
0
,
// 今日
待联系、
waitFinish
:
1
,
//
待完工、
todayWaitFinish
:
1
,
// 今日
待完工、
exception
:
2
,
//
异常单、
todayException
:
2
,
// 今日
异常单、
},
},
]
]
},
},
//
waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
//
每一个tab对应的状态
indexStatus
()
{
indexStatus
()
{
return
[
return
[
[
[
...
@@ -230,19 +231,21 @@ export default {
...
@@ -230,19 +231,21 @@ export default {
'exception'
,
'exception'
,
'finish'
,
'finish'
,
],
],
[
'
waitLianxi'
,
'waitFinish'
,
'e
xception'
],
[
'
todayWaitContact'
,
'todayWaitFinish'
,
'todayE
xception'
],
]
]
},
},
// 订单数量接的返回数量的key
countKeys
()
{
countKeys
()
{
return
[
return
[
'toAppointmentCount'
,
[
'toCheckinCount'
,
'toAppointmentCount'
,
'toFinishCount'
,
'toCheckinCount'
,
'reviewingCount'
,
'toFinishCount'
,
'exceptionCount'
,
'reviewingCount'
,
'todayDlxCount'
,
'exceptionCount'
,
'todayDwgCount'
,
''
,
// 待完工没有数量
'todayYcdCount'
,
],
[
'todayContactCount'
,
'todayFinishCount'
,
'todayExceptionCount'
],
]
]
},
},
noMore
()
{
noMore
()
{
...
@@ -251,8 +254,22 @@ export default {
...
@@ -251,8 +254,22 @@ export default {
this
.
loaded
this
.
loaded
)
)
},
},
cellTypes
()
{
return
[
[
'waitAppointment'
,
'waitCheckIn'
,
'waitFinish'
,
'audit'
,
'exception'
,
'finish'
,
],
[
''
,
'waitFinish'
,
'exception'
],
]
},
// 仅用于传给OrderCell的type
cellType
()
{
cellType
()
{
return
this
.
orderType
==
'waitLianxi'
?
''
:
this
.
orderType
return
this
.
cellTypes
[
this
.
curNow
][
this
.
current
[
this
.
curNow
]]
},
},
noOrderCustomStyle
()
{
noOrderCustomStyle
()
{
return
'margin-top: 100rpx;background-color: #F4F5F7'
return
'margin-top: 100rpx;background-color: #F4F5F7'
...
@@ -262,7 +279,10 @@ export default {
...
@@ -262,7 +279,10 @@ export default {
getApp
().
trackPage
(
'订单首页'
)
getApp
().
trackPage
(
'订单首页'
)
this
.
_freshing
=
false
this
.
_freshing
=
false
if
(
e
&&
e
.
type
)
{
if
(
e
&&
e
.
type
)
{
this
.
current
[
this
.
curNow
]
=
this
.
indexStatus
[
this
.
curNow
].
indexOf
(
e
.
type
)
this
.
current
[
this
.
curNow
]
=
Math
.
max
(
0
,
this
.
indexStatus
[
this
.
curNow
].
indexOf
(
e
.
type
)
)
}
}
},
},
onShow
()
{
onShow
()
{
...
@@ -354,13 +374,13 @@ export default {
...
@@ -354,13 +374,13 @@ export default {
if
(
res
.
data
)
{
if
(
res
.
data
)
{
// 修改各个tab数量
// 修改各个tab数量
var
j
=
0
var
j
=
0
var
i
=
0
var
count
=
0
var
count
=
0
for
(
var
items
of
this
.
list
)
{
for
(
var
items
of
this
.
list
)
{
var
i
=
0
for
(
var
item
of
items
)
{
for
(
var
item
of
items
)
{
item
.
total
=
res
.
data
[
this
.
countKeys
[
i
]]
||
0
item
.
total
=
res
.
data
[
this
.
countKeys
[
j
][
i
]]
||
0
if
(
j
==
0
)
{
if
(
j
==
0
)
{
//
待处理
数量加起来
//
非今日订单
数量加起来
count
+=
item
.
total
count
+=
item
.
total
}
}
i
++
i
++
...
...
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