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
3d59a3bd
Commit
3d59a3bd
authored
Apr 26, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单列表数据
parent
da86b864
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
164 additions
and
106 deletions
+164
-106
index.vue
src/components/order/index.vue
+23
-2
noOrder.vue
src/components/order/noOrder.vue
+0
-1
index.vue
src/components/popView/index.vue
+1
-1
index.vue
src/pages/index/index.vue
+12
-6
index.vue
src/pages/order/index.vue
+128
-96
No files found.
src/components/order/index.vue
View file @
3d59a3bd
...
...
@@ -76,8 +76,15 @@
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
}
}
},
orderType
:
Number
,
// 0:待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6'已完工'
},
// waitAccept:待接单、
// waitAppointment:待预约、
// waitCheckIn:待签到、
// waitFinish:待完工、
// review: 审核中、
// exception:异常单、
// finish:已完工
type
:
String
,
location
:
{
// 当前坐标
type
:
Array
,
default
()
{
...
...
@@ -207,6 +214,20 @@
},
showDistance
()
{
return
this
.
orderType
==
0
},
types
()
{
return
{
'waitAccept'
:
0
,
// 待接单、
'waitAppointment'
:
1
,
// 待预约、
'waitCheckIn'
:
2
,
// 待签到、
'waitFinish'
:
3
,
// 待完工、
'review'
:
4
,
// 审核中、
'exception'
:
5
,
// 异常单、
'finish'
:
6
,
//已完工
}
},
orderType
()
{
return
this
.
types
[
this
.
type
]
}
},
methods
:
{
...
...
src/components/order/noOrder.vue
View file @
3d59a3bd
...
...
@@ -24,7 +24,6 @@
color
:
#666666
;
font-size
:
28rpx
;
padding
:
30rpx
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
min-height
:
460rpx
;
...
...
src/components/popView/index.vue
View file @
3d59a3bd
...
...
@@ -16,7 +16,7 @@
取消
</u-button>
<u-button
:custom-style=
"customStyleSave"
shape=
"circle"
type=
"primary"
@
click=
"handleClickSure"
>
确定
查看
</u-button>
</view>
</view>
...
...
src/pages/index/index.vue
View file @
3d59a3bd
...
...
@@ -37,8 +37,8 @@
</view>
<view
v-else-if=
"!needSettled && orderList.length > 0"
class=
"order-item-view"
>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<OrderCell
:orderData=
"item"
:orderType=
"0"
:location=
"location"
@
click=
"handleClick
"
@
action=
"handleAction"
>
</OrderCell>
<OrderCell
:orderData=
"item"
type=
"waitAccept"
:location=
"location"
@
click=
"handleClick(item.orderId)
"
@
action=
"handleAction
(item.orderId)
"
>
</OrderCell>
</view>
<u-loadmore
:status=
"currentLoadStatus"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
...
...
@@ -143,12 +143,18 @@
},
methods
:
{
handleClick
()
{
// 点击了cell
console
.
log
(
'点击了cell'
)
handleClick
(
orderId
)
{
// 点击了cell
console
.
log
(
'点击了cell'
)
this
.
viewOderItem
(
orderId
)
},
handleAction
()
{
// 点击了按钮
handleAction
(
orderId
)
{
// 点击了按钮
console
.
log
(
'点击了按钮'
)
this
.
viewOderItem
(
orderId
)
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
})
},
async
initSettleInfo
()
{
let
self
=
this
;
...
...
src/pages/order/index.vue
View file @
3d59a3bd
<
template
>
<TabBarPage
title=
"订单"
:fixed=
"true"
>
<!--
<view
class=
"wrap"
>
-->
<view
class=
"tools-box"
>
<view
class=
"search-sub"
>
<u-subsection
:current=
"curNow"
:list=
"subList"
active-color=
"white"
bg-color=
"white"
inactive-color=
"#666"
button-color=
"#2272FF"
border-radius=
"36"
@
change=
"sectionChange"
height=
"72"
bold
>
</u-subsection>
</view>
<view
class=
"search-btn"
@
click=
"handleClickSearch"
>
<image
class=
"search-image"
mode=
"widthFix"
:src=
"sousuoImage"
></image>
<text
class=
"search-btn-text"
>
搜订单
</text>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<u-tabs
height=
"66"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[0,0]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
<view
class=
"tools-box"
>
<view
class=
"search-sub"
>
<u-subsection
:current=
"curNow"
:list=
"subList"
active-color=
"white"
bg-color=
"white"
inactive-color=
"#666"
button-color=
"#2272FF"
border-radius=
"36"
@
change=
"sectionChange"
height=
"72"
bold
>
</u-subsection>
</view>
<view
class=
"tab-view"
>
<!--
<swiper-item
class=
"swiper-item"
v-for=
"(res, ind) in orderList"
:key=
"ind"
>
-->
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:orderType=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</scroll-view>
<!--
</swiper-item>
-->
<view
class=
"search-btn"
@
click=
"handleClickSearch"
>
<image
class=
"search-image"
mode=
"widthFix"
:src=
"sousuoImage"
></image>
<text
class=
"search-btn-text"
>
搜订单
</text>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<u-tabs
height=
"66"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[0,0]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
</view>
<NoOrder
v-if=
"noMore"
style=
"margin-top: 100rpx;"
/>
<view
v-else
class=
"tab-view"
>
<!--
<swiper-item
class=
"swiper-item"
v-for=
"(res, ind) in orderList"
:key=
"ind"
>
-->
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</scroll-view>
<!--
</swiper-item>
-->
</view>
<!--
</view>
-->
<PopView
title=
"aaaa"
message=
"bbbb"
:visible=
"visibale"
/>
<!--
</view>
-->
<PopView
title=
"aaaa"
message=
"bbbb"
:visible=
"visibale"
/>
</TabBarPage>
</
template
>
<
script
>
import
TabBarPage
from
"@/components/tabBarList/index.vue"
import
OrderCell
from
"@/components/order/index.vue"
import
OrderCell
from
"@/components/order/index.vue"
import
NoOrder
from
"@/components/order/noOrder.vue"
export
default
{
components
:
{
TabBarPage
,
OrderCell
OrderCell
,
NoOrder
},
data
()
{
return
{
return
{
visibale
:
false
,
showSview
:
true
,
curNow
:
0
,
pageNumber
:
0
,
pageNumber
:
0
,
pageSize
:
10
,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
:
{
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'exception'
,
5
:
'finish'
},
orderList
:
[],
list
:
[{
name
:
'待预约'
,
...
...
@@ -72,7 +69,7 @@
total
:
0
,
},
{
name
:
'
待审核
'
,
name
:
'
审核中
'
,
total
:
0
,
},
{
...
...
@@ -83,6 +80,7 @@
current
:
0
,
loadStatus
:
'loading'
,
dataValue
:
[],
loaded
:
false
};
},
onLoad
()
{
...
...
@@ -94,31 +92,57 @@
subList
()
{
return
[
'待受理'
,
'已完工'
]
},
// 0:
待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6
'已完工'
// 0:
'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5
'已完工'
orderType
()
{
return
this
.
currentIndex
+
1
return
this
.
indexStatus
[
this
.
currentIndex
]
},
currentIndex
()
{
return
this
.
curNow
==
0
?
this
.
current
:
5
},
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
types
()
{
return
{
'waitAppointment'
:
0
,
// 待预约、
'waitCheckIn'
:
1
,
// 待签到、
'waitFinish'
:
2
,
// 待完工、
'review'
:
3
,
// 审核中、
'exception'
:
4
,
// 异常单、
'finish'
:
5
,
//已完工
}
},
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
()
{
return
{
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'review'
,
4
:
'exception'
,
5
:
'finish'
}
},
noMore
()
{
console
.
log
(
'nomore:'
,
this
.
orderList
.
length
==
0
&&
this
.
pageNumber
!=
0
)
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
}
},
methods
:
{
sectionChange
(
index
)
{
this
.
curNow
=
index
;
this
.
pageNumber
=
0
this
.
orderList
=
[]
sectionChange
(
index
)
{
this
.
curNow
=
index
;
this
.
pageNumber
=
0
this
.
orderList
=
[]
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
===
0
?
0
:
5
)
},
// tab栏切换
change
(
index
)
{
this
.
current
=
index
;
this
.
orderList
=
[]
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
);
},
// tab栏切换
change
(
index
)
{
this
.
current
=
index
;
this
.
pageNumber
=
0
this
.
orderList
=
[]
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
);
},
/**
* 获取当前位置的经纬度
...
...
@@ -140,15 +164,16 @@
});
},
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getOrderList
(
this
.
currentIndex
)
},
// 页面数据
getOrderList
(
index
)
{
// 状态处理
// this.pageNumber += 1
this
.
pageNumber
+=
1
this
.
loaded
=
false
var
param
=
{
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
...
...
@@ -156,15 +181,15 @@
type
:
this
.
indexStatus
[
index
]
}
var
self
=
this
;
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"getOrderList"
,
res
.
data
)
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
var
res
=
{
data
:
{
total
:
15
,
orderType
:
this
.
currentIndex
,
list
:
[{
res
.
data
.
type
=
self
.
orderType
if
(
res
.
data
.
list
)
{
res
.
data
.
total
=
15
if
(
res
.
data
.
list
.
length
==
0
&&
res
.
data
.
total
>
0
)
{
res
.
data
.
list
=
[{
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
categoryName
:
'充电桩'
,
// 品类:充电桩
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
...
...
@@ -181,26 +206,31 @@
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
auditResults
:
{},
// 审核结果
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderId
:
'0'
,
// 订单id
}]
}
}
res
.
data
.
list
=
[...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
]
res
.
data
.
list
=
[...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
]
}
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
// 后台需要返回orderType,防止数据返回延迟期间点击了其他的tab
if
(
res
.
data
)
{
// 后台需要返回type,防止数据返回延迟期间点击了其他的tab
if
(
res
.
data
.
type
!=
self
.
orderType
)
return
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
if
(
self
.
list
[
res
.
data
.
orderType
])
{
self
.
list
[
res
.
data
.
orderType
].
total
=
res
.
data
.
total
}
if
(
self
.
list
[
self
.
types
[
res
.
data
.
type
]])
{
self
.
list
[
self
.
types
[
res
.
data
.
type
]].
total
=
res
.
data
.
total
}
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
this
.
loaded
=
true
});
},
...
...
@@ -243,11 +273,11 @@
handleAction
(
item
)
{
console
.
log
(
'click button'
)
this
.
viewOderItem
(
item
.
orderId
)
},
handleClickSearch
()
{
uni
.
navigateTo
({
url
:
'pages/order/search'
})
},
handleClickSearch
()
{
uni
.
navigateTo
({
url
:
'pages/order/search'
})
}
}
};
...
...
@@ -433,12 +463,12 @@
flex-direction
:
column
;
height
:
calc
(
100vh
-
var
(
--
window-top
));
width
:
100%
;
}
.tab-view
{
height
:
100%
;
overflow
:
auto
;
padding-bottom
:
20rpx
;
}
.tab-view
{
height
:
100%
;
overflow
:
auto
;
padding-bottom
:
20rpx
;
}
// .swiper-box {
...
...
@@ -446,9 +476,9 @@
// }
// .swiper-item {
// height: 100%;
// .page-box {
// padding-bottom: 20rpx;
// height: 100%;
// .page-box {
// padding-bottom: 20rpx;
// }
// }
...
...
@@ -472,12 +502,14 @@
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.search-image
{
width
:
36rpx
;
height
:
32rpx
;
flex-shrink
:
0
;
margin-right
:
24rpx
;
.search-image
{
width
:
36rpx
;
height
:
32rpx
;
flex-shrink
:
0
;
margin-right
:
24rpx
;
}
.search-btn-text
{
line-height
:
36rpx
;
font-weight
:
400
;
...
...
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