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
7a0a0df3
Commit
7a0a0df3
authored
Apr 25, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单列表页ui修改
parent
f9921081
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
690 additions
and
951 deletions
+690
-951
index.vue
src/components/order/index.vue
+7
-4
index.vue
src/components/tabBarList/index.vue
+42
-0
pages.json
src/pages.json
+5
-3
index.vue
src/pages/index/index.vue
+58
-94
index.vue
src/pages/order/index.vue
+577
-849
file.vue
src/pages/settle/file.vue
+1
-1
No files found.
src/components/order/index.vue
View file @
7a0a0df3
...
...
@@ -185,7 +185,7 @@
}]
},
buttonDisabled
()
{
return
this
.
order
Data
.
orderStatus
==
4
||
this
.
orderData
.
orderStatus
==
6
return
this
.
order
Type
==
4
||
this
.
orderType
==
6
},
dizhiImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'shouye-dizhi.png'
...
...
@@ -266,7 +266,8 @@
display
:
flex
;
align-items
:
center
;
.tag-view
{
.tag-view
{
text-align
:
center
;
width
:
84rpx
;
height
:
40rpx
;
color
:
#FFFFFF
;
...
...
@@ -286,7 +287,8 @@
}
}
.right-view
{
.right-view
{
text-align
:
center
;
width
:
100rpx
;
height
:
40rpx
;
background-color
:
#F4F5F7
;
...
...
@@ -360,7 +362,8 @@
display
:
flex
;
align-items
:
center
;
.bottom-tag-view
{
.bottom-tag-view
{
text-align
:
center
;
width
:
52rpx
;
height
:
52rpx
;
border-radius
:
26rpx
;
...
...
src/components/tabBarList/index.vue
0 → 100644
View file @
7a0a0df3
<
template
>
<view
class=
"content"
>
<u-navbar
:is-back=
"false"
:is-fixed=
"false"
:background=
"
{ background: 'transparent' }" :border-bottom="false">
<text
class=
"title-view"
>
{{
title
}}
</text>
</u-navbar>
<slot></slot>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
title
:
{
type
:
String
,
default
:
'充电桩自营平台'
}
},
data
()
{
return
{
}
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.content
{
height
:
100vh
;
background-color
:
#f4f5f7
;
padding
:
0rpx
30rpx
0
30rpx
;
overflow-y
:
auto
;
.title-view
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
40rpx
;
}
}
</
style
>
src/pages.json
View file @
7a0a0df3
...
...
@@ -14,7 +14,9 @@
{
"path"
:
"pages/order/index"
,
"style"
:
{
"navigationBarTitleText"
:
"订单"
"navigationBarTitleText"
:
"订单"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
true
}
},
{
...
...
@@ -201,13 +203,13 @@
"navigationStyle"
:
"custom"
//
隐藏系统导航栏
}
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"backgroundColor"
:
"#F
8F8F8
"
"backgroundColor"
:
"#F
4F5F7
"
},
"tabBar"
:
{
"color"
:
"#7A7E83"
,
...
...
src/pages/index/index.vue
View file @
7a0a0df3
<
template
>
<view
class=
"content"
>
<!--
<view
style=
"width: 700rpx; height: 800rpx"
>
-->
<!--
<view
class=
"title-view"
>
充电桩自营平台
</view>
-->
<u-navbar
:is-back=
"false"
:is-fixed=
"false"
:background=
"
{ background: 'transparent' }" :border-bottom="false">
<text
class=
"title-view"
>
充电桩自营平台
</text>
</u-navbar>
<!--
<u-swiper
:height=
"240"
:list=
"list"
:indicator-pos=
"indicatorPos"
:mode=
"mode"
:interval=
"3000"
@
click=
"clickSwiper"
>
</u-swiper>
-->
<TabBarPage
title=
"充电桩自营平台"
>
<image
class=
"banner-image"
:src=
"bannerImage"
></image>
<view
class=
"msg-view"
>
...
...
@@ -66,23 +52,24 @@
</view>
<!--
</view>
-->
<!--
</scroll-view>
-->
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
v-if=
"needSettled || orderList.length
<
=
0
"
>
<view
class=
"bottom-line-view"
></view>
<view
class=
"bottom-text"
>
我也是有底线哒
</view>
<view
class=
"bottom-line-view"
></view>
</view>
</
view
>
</
TabBarPage
>
</
template
>
<
script
>
import
util
from
"@/utils/util.js"
;
import
TabBarPage
from
"@/components/tabBarList/index.vue"
const
app
=
getApp
();
import
OrderCell
from
"@/components/order/index.vue"
;
export
default
{
components
:
{
OrderCell
,
TabBarPage
},
data
()
{
return
{
...
...
@@ -102,12 +89,13 @@
pageNumber
:
0
,
pageSize
:
10
,
},
bottomLoading
:
false
,
bottomLoading
:
false
};
},
watch
:
{
vuex_token
(
val
)
{
// 监听token变化,如果更新则重新加载页面数据
vuex_token
(
val
,
oldVal
)
{
// 监听token变化,如果更新则重新加载页面数据
console
.
log
(
''
,
val
,
oldVal
)
val
&&
this
.
initSettleInfo
()
}
},
...
...
@@ -142,10 +130,11 @@
// 每次进入页面都刷新入驻状态
if
(
this
.
vuex_token
)
{
this
.
initSettleInfo
();
}
else
{
// 初始化订单数据
this
.
loadOrderList
();
}
// else {
// // 初始化订单数据
// this.loadOrderList();
// }
},
onPullDownRefresh
()
{
console
.
log
(
'------下拉刷新------'
)
...
...
@@ -194,6 +183,8 @@
});
},
loadOrderList
()
{
console
.
log
(
'-----------准备加载推荐列表-----------'
)
return
let
self
=
this
;
// 加载订单列表
self
.
search
.
token
=
self
.
vuex_token
;
...
...
@@ -208,21 +199,6 @@
}
});
},
onRefresh
()
{
if
(
this
.
_freshing
)
return
;
this
.
_freshing
=
true
;
// 获取入驻状态
this
.
initSettleInfo
();
// 获取推荐订单及数量
// ....
setTimeout
(()
=>
{
// 数据加载完成更新入驻状态和推荐列表
this
.
triggered
=
false
;
this
.
_freshing
=
false
;
},
1000
);
},
onRestore
()
{
this
.
triggered
=
"restore"
;
},
...
...
@@ -294,82 +270,70 @@
</
script
>
<
style
lang=
"scss"
scoped
>
.
content
{
height
:
100vh
;
background-color
:
#f4f5f7
;
padding
:
0rpx
30rpx
0
30
rpx
;
overflow-y
:
auto
;
.
banner-image
{
width
:
730rpx
;
height
:
280rpx
;
margin-left
:
-14
rpx
;
}
.title-view
{
.msg-view
{
.msg-title
{
color
:
#333333
;
font-size
:
32rpx
;
font-weight
:
bold
;
font-size
:
4
0rpx
;
padding
:
1rpx
0rpx
30rpx
0rpx
;
}
.banner-image
{
width
:
730rpx
;
height
:
280rpx
;
margin-left
:
-14rpx
;
.msg-list-view
{
border-radius
:
12rpx
;
background-color
:
#ffffff
;
padding
:
12rpx
30rpx
;
height
:
252rpx
;
}
.msg-view
{
.msg-title
{
color
:
#333333
;
font-size
:
32rpx
;
font-weight
:
bold
;
padding
:
1rpx
0rpx
30rpx
0rpx
;
}
.msg-list-view
{
border-radius
:
12rpx
;
background-color
:
#ffffff
;
padding
:
12rpx
30rpx
;
height
:
252rpx
;
}
.msg-content
{
color
:
#333333
;
font-size
:
26rpx
;
.msg-content
{
color
:
#333333
;
font-size
:
26rpx
;
.msg-content-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
20rpx
;
margin-bottom
:
20rpx
;
.
msg-conten
t-view
{
.
lef
t-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
20rpx
;
margin-bottom
:
20rpx
;
.left-view
{
display
:
flex
;
align-items
:
center
;
.msg-icon
{
width
:
80rpx
;
height
:
36rpx
;
margin-right
:
20rpx
;
}
.msg-text
{
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
448rpx
;
}
.msg-icon
{
width
:
80rpx
;
height
:
36rpx
;
margin-right
:
20rpx
;
}
.right-icon
{
width
:
14rpx
;
height
:
24rpx
;
.msg-text
{
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
448rpx
;
}
}
.
line-view
{
height
:
2
rpx
;
background-color
:
#f4f5f7
;
.
right-icon
{
width
:
14
rpx
;
height
:
24rpx
;
}
}
.line-view
{
height
:
2rpx
;
background-color
:
#f4f5f7
;
}
}
}
.logo
{
height
:
200
rpx
;
width
:
100%
;
...
...
@@ -452,7 +416,7 @@
font-size
:
28rpx
;
padding
:
30rpx
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
min-height
:
460rpx
;
.no-order-image
{
...
...
src/pages/order/index.vue
View file @
7a0a0df3
<
template
>
<view>
<view
class=
"wrap"
>
<view
class=
"tools-box"
>
<view
class=
"search-sub"
>
<u-subsection
:current=
"curNow"
:list=
"['待受理', '已完工']"
active-color=
"white"
bg-color=
"white"
inactive-color=
"#666"
button-color=
"#2272FF"
border-radius=
"36"
@
change=
"sectionChange"
></u-subsection>
</view>
<view
class=
"search-btn"
>
<u-icon
name=
"search"
color=
"#666"
size=
"32"
></u-icon>
<text
class=
"search-btn-text"
>
搜订单
</text>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"showSview"
>
<u-tabs-swiper
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[-1,10]"
ref=
"tabs"
:list=
"list"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
<swiper
v-show=
"showSview"
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
>
<view
class=
"page-box"
>
<view
class=
"order"
v-for=
"(res, index) in orderList"
:key=
"res.id"
>
<view
class=
"top"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
orderServiceType
}}
</view>
<view
class=
"store"
>
{{
res
.
categoryName
}}
</view>
<view
>
{{
res
.
orderNumber
}}
</view>
</view>
<view
class=
"right"
>
{{
res
.
orderBusinessTypeText
}}
</view>
</view>
<view
class=
"content"
>
<view
class=
"title u-line-2"
>
<text>
{{
res
.
contactName
}}
</text>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactPhone
}}
</text>
</view>
</view>
<view
class=
"address u-line-2"
>
<view
class=
"left"
>
<view
><u-icon
name=
"map"
size=
"32"
></u-icon>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactAddress
}}
</text></view>
</view>
<view
class=
"right"
>
{{
getDistance
(
res
.
contactAddressLatitud
,
res
.
contactAddressLongitud
)
}}
km
</view>
</view>
<u-divider
margin-top=
"16"
half-width=
"630"
border-color=
"#F4F5F7"
:use-slot=
"false"
>
</u-divider>
<view
class=
"bottom"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</view>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem(index)"
>
<text>
去预约
</text>
</view>
</view>
</view>
<u-loadmore
:status=
"loadStatus[0]"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
>
<view
class=
"page-box"
>
<view
class=
"order"
v-for=
"(res, index) in orderList"
:key=
"res.id"
>
<view
class=
"top"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
orderServiceType
}}
</view>
<view
class=
"store"
>
{{
res
.
categoryName
}}
</view>
<view
>
{{
res
.
orderNumber
}}
</view>
</view>
<view
class=
"right"
>
{{
res
.
orderBusinessTypeText
}}
</view>
</view>
<view
class=
"content"
>
<view
class=
"title u-line-2"
>
<text>
{{
res
.
contactName
}}
</text>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactPhone
}}
</text>
</view>
</view>
<view
class=
"address u-line-2"
>
<view
class=
"left"
>
<view
><u-icon
name=
"map"
size=
"32"
></u-icon>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactAddress
}}
</text></view>
</view>
<view
class=
"right"
>
{{
getDistance
(
res
.
contactAddressLatitud
,
res
.
contactAddressLongitud
)
}}
km
</view>
</view>
<u-divider
margin-top=
"16"
half-width=
"630"
border-color=
"#F4F5F7"
:use-slot=
"false"
>
</u-divider>
<view
class=
"bottom"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</view>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem(index)"
>
<text>
去签到
</text>
</view>
</view>
</view>
<u-loadmore
:status=
"loadStatus[0]"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
v-if=
"orderList.length === 0"
>
<view
class=
"page-box"
>
<view>
<view
class=
"centre"
>
<image
src=
"https://cdn.uviewui.com/uview/template/taobao-order.png"
mode=
""
></image>
<view
class=
"explain"
>
您还没有相关的订单
<view
class=
"tips"
>
可以去看看有那些想买的
</view>
</view>
<view
class=
"btn"
>
随便逛逛
</view>
</view>
</view>
</view>
</scroll-view>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
v-else
>
<view
class=
"page-box"
>
<view
class=
"order"
v-for=
"(res, index) in orderList"
:key=
"res.id"
>
<view
class=
"top"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
orderServiceType
}}
</view>
<view
class=
"store"
>
{{
res
.
categoryName
}}
</view>
<view
>
{{
res
.
orderNumber
}}
</view>
</view>
<view
class=
"right"
>
{{
res
.
orderBusinessTypeText
}}
</view>
</view>
<view
class=
"content"
>
<view
class=
"title u-line-2"
>
<text>
{{
res
.
contactName
}}
</text>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactPhone
}}
</text>
</view>
</view>
<view
class=
"address u-line-2"
>
<view
class=
"left"
>
<view
><u-icon
name=
"map"
size=
"32"
></u-icon>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactAddress
}}
</text></view>
</view>
<view
class=
"right"
>
{{
getDistance
(
res
.
contactAddressLatitud
,
res
.
contactAddressLongitud
)
}}
km
</view>
</view>
<u-divider
margin-top=
"16"
half-width=
"630"
border-color=
"#F4F5F7"
:use-slot=
"false"
>
</u-divider>
<view
class=
"bottom"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</view>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem(index)"
>
<text>
去完工
</text>
</view>
</view>
</view>
<u-loadmore
:status=
"loadStatus[0]"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
>
<view
class=
"page-box"
>
<view
class=
"order"
v-for=
"(res, index) in orderList"
:key=
"res.id"
>
<view
class=
"top"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
orderServiceType
}}
</view>
<view
class=
"store"
>
{{
res
.
categoryName
}}
</view>
<view
>
{{
res
.
orderNumber
}}
</view>
</view>
<view
class=
"right"
>
{{
res
.
orderBusinessTypeText
}}
</view>
</view>
<view
class=
"content"
>
<view
class=
"title u-line-2"
>
<text>
{{
res
.
contactName
}}
</text>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactPhone
}}
</text>
</view>
</view>
<view
class=
"address u-line-2"
>
<view
class=
"left"
>
<view
><u-icon
name=
"map"
size=
"32"
></u-icon>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactAddress
}}
</text></view>
</view>
<view
class=
"right"
>
{{
getDistance
(
res
.
contactAddressLatitud
,
res
.
contactAddressLongitud
)
}}
km
</view>
</view>
<u-divider
margin-top=
"16"
half-width=
"630"
border-color=
"#F4F5F7"
:use-slot=
"false"
>
</u-divider>
<view
class=
"bottom"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</view>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem(index)"
>
<text>
审核中
</text>
</view>
</view>
</view>
<u-loadmore
:status=
"loadStatus[0]"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
>
<view
class=
"page-box"
>
<view
class=
"order"
v-for=
"(res, index) in orderList"
:key=
"res.id"
>
<view
class=
"top"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
orderServiceType
}}
</view>
<view
class=
"store"
>
{{
res
.
categoryName
}}
</view>
<view
>
{{
res
.
orderNumber
}}
</view>
</view>
<view
class=
"right"
>
{{
res
.
orderBusinessTypeText
}}
</view>
</view>
<view
class=
"content"
>
<view
class=
"title u-line-2"
>
<text>
{{
res
.
contactName
}}
</text>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactPhone
}}
</text>
</view>
</view>
<view
class=
"address u-line-2"
>
<view
class=
"left"
>
<view
><u-icon
name=
"map"
size=
"32"
></u-icon>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactAddress
}}
</text></view>
</view>
<view
class=
"right"
>
{{
getDistance
(
res
.
contactAddressLatitud
,
res
.
contactAddressLongitud
)
}}
km
</view>
</view>
<u-divider
margin-top=
"16"
half-width=
"630"
border-color=
"#F4F5F7"
:use-slot=
"false"
>
</u-divider>
<view
class=
"bottom"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</view>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem(index)"
>
<text>
去处理
</text>
</view>
</view>
</view>
<u-loadmore
:status=
"loadStatus[0]"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
</scroll-view>
</swiper-item>
</swiper>
<swiper
v-show=
"!showSview"
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
>
<view
class=
"page-box"
>
<view
class=
"order"
v-for=
"(res, index) in orderList"
:key=
"res.id"
>
<view
class=
"top"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
res
.
orderServiceType
}}
</view>
<view
class=
"store"
>
{{
res
.
categoryName
}}
</view>
<view
>
{{
res
.
orderNumber
}}
</view>
</view>
<view
class=
"right"
>
{{
res
.
orderBusinessTypeText
}}
</view>
</view>
<view
class=
"content"
>
<view
class=
"title u-line-2"
>
<text>
{{
res
.
contactName
}}
</text>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactPhone
}}
</text>
</view>
</view>
<view
class=
"address u-line-2"
>
<view
class=
"left"
>
<view
>
<u-icon
name=
"map"
size=
"32"
></u-icon>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactAddress
}}
</text>
<text
style=
"margin-left: 200rpx; font-size:large;"
@
click=
"viewOderItem(index)"
>
>
</text>
</view>
</view>
</view>
<u-divider
margin-top=
"16"
half-width=
"630"
border-color=
"#F4F5F7"
:use-slot=
"false"
>
</u-divider>
<view
class=
"bottom"
>
<view
class=
"left"
>
<text>
审核时间 :
</text><text>
{{
res
.
auditDatetime
}}
</text>
</view>
<view
>
<text>
已完工
</text>
</view>
</view>
</view>
<!--
<u-loadmore
:status=
"loadStatus[0]"
bgColor=
"#f2f2f2"
></u-loadmore>
-->
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
showSview
:
true
,
curNow
:
0
,
timestamp
:
1000
,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
:{
0
:
'waitAccept'
,
1
:
'waitAppointment'
,
2
:
'waitCheckIn'
,
3
:
'waitFinish'
,
4
:
'exception'
,
5
:
'finish'
},
orderList
:
[],
dataList
:
[
{
id
:
1
,
store
:
'夏日流星限定贩卖'
,
deal
:
'交易成功'
,
goodsList
:
[
{
goodsUrl
:
'//img13.360buyimg.com/n7/jfs/t1/103005/7/17719/314825/5e8c19faEb7eed50d/5b81ae4b2f7f3bb7.jpg'
,
title
:
'【冬日限定】现货 原创jk制服女2020冬装新款小清新宽松软糯毛衣外套女开衫短款百搭日系甜美风'
,
type
:
'灰色;M'
,
deliveryTime
:
'付款后30天内发货'
,
price
:
'348.58'
,
number
:
2
}
]
},
{
id
:
2
,
store
:
'江南皮革厂'
,
deal
:
'交易失败'
,
goodsList
:
[
{
goodsUrl
:
'//img14.360buyimg.com/n7/jfs/t1/60319/15/6105/406802/5d43f68aE9f00db8c/0affb7ac46c345e2.jpg'
,
title
:
'【冬日限定】现货 原创jk制服女2020冬装新款小清新宽松软糯毛衣外套女开衫短款百搭日系甜美风'
,
type
:
'粉色;M'
,
deliveryTime
:
'付款后7天内发货'
,
price
:
'128.05'
,
number
:
1
}
]
},
{
id
:
3
,
store
:
'三星旗舰店'
,
deal
:
'交易失败'
,
goodsList
:
[
{
goodsUrl
:
'//img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg'
,
title
:
'三星(SAMSUNG)京品家电 UA65RUF70AJXXZ 65英寸4K超高清 HDR 京东微联 智能语音 教育资源液晶电视机'
,
type
:
'4K,广色域'
,
deliveryTime
:
'保质5年'
,
price
:
'1998'
,
number
:
3
}
]
},
{
id
:
4
,
store
:
'三星旗舰店'
,
deal
:
'交易失败'
,
goodsList
:
[
{
goodsUrl
:
'//img10.360buyimg.com/n7/jfs/t22300/31/1505958241/171936/9e201a89/5b2b12ffNe6dbb594.jpg!q90.jpg'
,
title
:
'法国进口红酒 拉菲(LAFITE)传奇波尔多干红葡萄酒750ml*6整箱装'
,
type
:
'4K,广色域'
,
deliveryTime
:
'珍藏10年好酒'
,
price
:
'1543'
,
number
:
3
}
]
},
{
id
:
5
,
store
:
'三星旗舰店'
,
deal
:
'交易成功'
,
goodsList
:
[
{
goodsUrl
:
'//img12.360buyimg.com/n7/jfs/t1/52408/35/3554/78293/5d12e9cfEfd118ba1/ba5995e62cbd747f.jpg!q90.jpg'
,
title
:
'企业微信 中控人脸指纹识别考勤机刷脸机 无线签到异地多店打卡机WX108'
,
type
:
'识别效率高'
,
deliveryTime
:
'使用方便'
,
price
:
'451'
,
number
:
9
}
]
}
],
list
:
[
{
name
:
'待预约'
,
count
:
3
},
{
name
:
'待签到'
,
count
:
2
},
{
name
:
'待完工'
,
count
:
2
},
{
name
:
'待审核'
,
count
:
10
},
{
name
:
'异常单'
,
count
:
2
}
],
current
:
0
,
swiperCurrent
:
0
,
tabsHeight
:
0
,
dx
:
0
,
loadStatus
:
[
'loadmore'
,
'loadmore'
,
'loadmore'
,
'loadmore'
],
dataValue
:[],
total
:
0
};
},
onLoad
()
{
this
.
getLocation
();
this
.
getOrderCount
();
this
.
getOrderList
(
0
);
},
computed
:
{
// 价格小数
priceDecimal
()
{
return
val
=>
{
if
(
val
!==
parseInt
(
val
))
return
val
.
slice
(
-
2
);
else
return
'00'
;
};
},
// 价格整数
priceInt
()
{
return
val
=>
{
if
(
val
!==
parseInt
(
val
))
return
val
.
split
(
'.'
)[
0
];
else
return
val
;
};
}
},
methods
:
{
sectionChange
(
index
){
if
(
index
===
1
){
this
.
showSview
=
false
// 加载已完工的数据
this
.
getOrderList
(
5
)
}
else
{
this
.
showSview
=
true
// 加载已完工的数据
this
.
getOrderList
(
0
)
}
this
.
curNow
=
index
;
},
timeChange
(
currentOverTime
,
index
){
let
self
=
this
var
nowTime
=
new
Date
();
// 当前时间
if
(
nowTime
.
getTime
()
>
currentOverTime
*
1000
){
self
.
$refs
[
'uCountDown'
+
index
][
0
].
seconds
+=
2
}
},
timestampDiff
(
currentOverTime
){
var
nowTime
=
new
Date
();
// 当前时间
if
(
nowTime
.
getTime
()
>
currentOverTime
*
1000
){
var
diff
=
nowTime
.
getTime
()
-
(
currentOverTime
*
1000
);
}
else
{
var
diff
=
(
currentOverTime
*
1000
)
-
nowTime
.
getTime
();
}
return
diff
;
},
/**
* 获取当前位置的经纬度
*/
getLocation
()
{
let
self
=
this
const
dataValue
=
this
.
dataValue
||
[]
const
waterInfo
=
this
.
waterInfo
uni
.
getLocation
({
type
:
'gcj02'
,
success
:
function
(
res
)
{
dataValue
.
push
(
res
.
longitude
)
dataValue
.
push
(
res
.
latitude
)
self
.
dataValue
=
dataValue
},
fail
(
err
)
{
}
});
},
getDistance
(
Latitud
,
Longitud
){
return
this
.
distance
(
Latitud
,
Longitud
,
this
.
dataValue
[
0
],
this
.
dataValue
[
1
])
},
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离
* @param float $lon1 经度
* @param float $lat1 维度
* @param float $lon2 经度
* @param float $lat2 维度
* @return float 浮点数
*/
distance
(
la1
,
lo1
,
la2
,
lo2
)
{
var
La1
=
la1
*
Math
.
PI
/
180.0
;
var
La2
=
la2
*
Math
.
PI
/
180.0
;
var
La3
=
La1
-
La2
;
var
Lb3
=
lo1
*
Math
.
PI
/
180.0
-
lo2
*
Math
.
PI
/
180.0
;
var
s
=
2
*
Math
.
asin
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
sin
(
La3
/
2
),
2
),
Math
.
cos
(
La1
)
*
Math
.
cos
(
La2
)
*
Math
.
pow
(
Math
.
sin
(
Lb3
/
2
),
2
)));
s
=
s
*
6378.137
;
//地球半径
s
=
Math
.
round
(
s
*
10000
)
/
10000
;
// console.log("计算结果",s,'KM');
return
s
?
s
.
toFixed
(
2
):
0
;
},
reachBottom
()
{
// 此tab为空数据
if
(
this
.
current
!=
2
)
{
this
.
loadStatus
.
splice
(
this
.
current
,
1
,
'loading'
);
setTimeout
(()
=>
{
this
.
getOrderList
(
this
.
current
);
},
1200
);
}
},
// 页面数据
getOrderList
(
index
)
{
// 状态处理
console
.
log
(
"chage:"
,
this
.
indexStatus
[
index
])
var
page
=
0
var
pageSize
=
10
var
param
=
{
pageNumber
:
page
,
pageSize
:
pageSize
,
keyword
:
''
,
type
:
this
.
indexStatus
[
index
]}
var
self
=
this
;
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"getOrderList"
,
res
.
data
)
if
(
res
.
data
)
{
self
.
orderList
=
res
.
data
.
list
;
// //测试使用
// self.orderList.forEach((item,index)=>{
// if(index === 1){
// item.currentOverTime -= 10
// }
// })
self
.
total
=
res
.
data
.
total
;
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
});
},
// 获取订单数量
getOrderCount
()
{
var
self
=
this
;
// 加载订单列表
self
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
if
(
res
.
data
)
{
self
.
list
.
forEach
(
item
=>
{
if
(
item
.
name
===
'待预约'
){
item
.
count
=
res
.
data
.
toAppointmentCount
}
else
if
(
item
.
name
===
'待签到'
){
item
.
count
=
res
.
data
.
toCheckinCount
}
else
if
(
item
.
name
===
'待完工'
){
item
.
count
=
res
.
data
.
toFinishCount
}
else
if
(
item
.
name
===
'待审核'
){
item
.
count
=
res
.
data
.
reviewingCount
}
else
if
(
item
.
name
===
'异常单'
){
item
.
count
=
res
.
data
.
exceptionCount
}
})
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
});
},
// 总价
totalPrice
(
item
)
{
let
price
=
0
;
item
.
map
(
val
=>
{
price
+=
parseFloat
(
val
.
price
);
});
return
price
.
toFixed
(
2
);
},
// 总件数
totalNum
(
item
)
{
let
num
=
0
;
item
.
map
(
val
=>
{
num
+=
val
.
number
;
});
return
num
;
},
// tab栏切换
change
(
index
)
{
this
.
swiperCurrent
=
index
;
this
.
getOrderList
(
index
);
},
transition
({
detail
:
{
dx
}
})
{
this
.
$refs
.
tabs
.
setDx
(
dx
);
},
animationfinish
({
detail
:
{
current
}
})
{
this
.
$refs
.
tabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
viewOderItem
(
index
)
{
// 跳转工单详情页面
let
order
=
this
.
orderList
[
index
]
console
.
log
(
"order"
,
order
)
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
order
.
orderId
})
}
}
};
</
script
>
<
style
>
/* #ifndef H5 */
page
{
height
:
100%
;
background-color
:
#f2f2f2
;
}
/* #endif */
</
style
>
<
style
lang=
"scss"
scoped
>
.order
{
width
:
710rpx
;
background-color
:
#ffffff
;
margin
:
20rpx
auto
;
border-radius
:
20rpx
;
box-sizing
:
border-box
;
padding
:
20rpx
;
font-size
:
28rpx
;
.top
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.left
{
display
:
flex
;
align-items
:
center
;
.tag
{
text-align
:
center
;
width
:
84rpx
;
height
:
40rpx
;
background
:
linear-gradient
(
270deg
,
#47ABFF
0%
,
#2272FF
100%
);
border-radius
:
8rpx
;
font-size
:
22rpx
;
font-weight
:
500
;
color
:
#FFFFFF
;
line-height
:
40rpx
;
}
.store
{
margin
:
0
10rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
color
:
#333333
;
line-height
:
36px
;
}
}
.right
{
height
:
40rpx
;
background
:
#F4F5F7
;
border-radius
:
22rpx
;
padding
:
8rpx
16rpx
8rpx
16rpx
;
font-size
:
22rpx
;
line-height
:
24rpx
;
font-weight
:
400
;
color
:
#333333
;
}
}
.item
{
display
:
flex
;
flex-direction
:
column
;
margin
:
20rpx
0
0
;
.content
{
.title
{
font-size
:
26rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
52rpx
;
}
}
.address
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
52rpx
;
.left
{
}
.right
{
}
}
}
.total
{
margin-top
:
20rpx
;
text-align
:
right
;
font-size
:
24rpx
;
.total-price
{
font-size
:
32rpx
;
}
}
.bottom
{
display
:
flex
;
margin-top
:
30rpx
;
padding
:
0
10rpx
;
justify-content
:
space-between
;
align-items
:
center
;
.left
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.tag
{
text-align
:
center
;
width
:
54rpx
;
height
:
54rpx
;
background
:
#FF930D
;
font-size
:
26rpx
;
font-weight
:
500
;
color
:
#FFFFFF
;
line-height
:
54rpx
;
border-radius
:
50%
;
margin-right
:
20rpx
;
}
}
.right-btn
{
text-align
:
center
;
width
:
200rpx
;
height
:
80rpx
;
background
:
#2272FF
;
border-radius
:
40rpx
;
font-size
:
32rpx
;
font-weight
:
600
;
color
:
#FFFFFF
;
line-height
:
80rpx
;
font-family
:
PingFangSC-Semibold
,
PingFang
SC
;
}
}
}
.centre
{
text-align
:
center
;
margin
:
200rpx
auto
;
font-size
:
32rpx
;
image
{
width
:
164rpx
;
height
:
164rpx
;
border-radius
:
50%
;
margin-bottom
:
20rpx
;
}
.tips
{
font-size
:
24rpx
;
color
:
#999999
;
margin-top
:
20rpx
;
}
.btn
{
margin
:
80rpx
auto
;
width
:
200rpx
;
border-radius
:
32rpx
;
line-height
:
64rpx
;
color
:
#ffffff
;
font-size
:
26rpx
;
background
:
linear-gradient
(
270deg
,
rgba
(
249
,
116
,
90
,
1
)
0%
,
rgba
(
255
,
158
,
1
,
1
)
100%
);
}
}
.wrap
{
display
:
flex
;
flex-direction
:
column
;
height
:
calc
(
100vh
-
var
(
--
window-top
));
width
:
100%
;
}
.swiper-box
{
flex
:
1
;
}
.swiper-item
{
height
:
100%
;
}
.tools-box
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
padding
:
20rpx
30rpx
18rpx
34rpx
;
.search-sub
{
height
:
72rpx
;
width
:
320rpx
;
}
.search-btn
{
height
:
72rpx
;
width
:
220rpx
;
background-color
:
#ffffff
;
border-radius
:
36rpx
;
color
:
#666666
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-around
;
align-items
:
center
;
.search-btn-text
{
line-height
:
36rpx
;
font-weight
:
400
;
font-size
:
26rpx
;
}
}
}
.order-taps
{
height
:
80rpx
;
padding
:
8rpx
30rpx
20rpx
30rpx
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
.order-taps-item
{
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
20px
;
.taps-count
{
position
:
absolute
;
font-size
:
16rpx
;
font-weight
:
400
;
line-height
:
16rpx
;
width
:
36rpx
;
height
:
24rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
border
:
2rpx
solid
#FA5A49
;
text-align
:
center
;
color
:
#FA5A49
;
}
}
}
<
template
>
<TabBarPage
title=
"订单"
>
<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"
>
</u-subsection>
</view>
<view
class=
"search-btn"
>
<u-icon
name=
"search"
color=
"#666"
size=
"32"
></u-icon>
<text
class=
"search-btn-text"
>
搜订单
</text>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<u-tabs-swiper
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[-1,10]"
ref=
"tabs"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
<swiper
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<swiper-item
class=
"swiper-item"
v-for=
"(res, ind) in orderLists"
:key=
"ind"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
refresher-enabled
@
refresherrefresh=
"refresherrefresh"
>
<view
class=
"page-box"
>
<view
v-for=
"(item, index) in res"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:orderType=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
</view>
<u-loadmore
:status=
"loadStatus[0]"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</TabBarPage>
</
template
>
<
script
>
import
TabBarPage
from
"@/components/tabBarList/index.vue"
import
OrderCell
from
"@/components/order/index.vue"
;
export
default
{
components
:
{
TabBarPage
,
OrderCell
},
data
()
{
return
{
showSview
:
true
,
curNow
:
0
,
timestamp
:
1000
,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
:
{
0
:
'waitAccept'
,
1
:
'waitAppointment'
,
2
:
'waitCheckIn'
,
3
:
'waitFinish'
,
4
:
'exception'
,
5
:
'finish'
},
orderLists
:
[
[],
[],
[],
[],
[],
[]
],
dataList
:
[],
list
:
[{
name
:
'待预约'
,
total
:
0
,
pageNumber
:
0
,
pageSize
:
10
},
{
name
:
'待签到'
,
total
:
0
,
pageNumber
:
0
,
pageSize
:
10
},
{
name
:
'待完工'
,
total
:
0
,
pageNumber
:
0
,
pageSize
:
10
},
{
name
:
'待审核'
,
total
:
0
,
pageNumber
:
0
,
pageSize
:
10
},
{
name
:
'异常单'
,
total
:
0
,
pageNumber
:
0
,
pageSize
:
10
}
],
current
:
0
,
swiperCurrent
:
0
,
tabsHeight
:
0
,
dx
:
0
,
loadStatus
:
[
'loading'
,
'loading'
,
'loading'
,
'loading'
,
'loading'
,
'loading'
],
dataValue
:
[],
total
:
0
};
},
onLoad
()
{
this
.
getLocation
();
this
.
getOrderCount
();
this
.
getOrderList
(
0
);
},
computed
:
{
subList
()
{
return
[
'待受理'
,
'已完工'
]
},
// 0:待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6'已完工'
orderType
()
{
return
this
.
currentIndex
+
1
},
currentIndex
()
{
return
this
.
curNow
==
0
?
this
.
swiperCurrent
:
5
}
},
methods
:
{
sectionChange
(
index
)
{
if
(
index
===
1
)
{
this
.
showSview
=
false
// 加载已完工的数据
this
.
getOrderList
(
5
)
}
else
{
this
.
showSview
=
true
// 加载已完工的数据
this
.
getOrderList
(
0
)
}
this
.
curNow
=
index
;
},
timeChange
(
currentOverTime
,
index
)
{
let
self
=
this
var
nowTime
=
new
Date
();
// 当前时间
if
(
nowTime
.
getTime
()
>
currentOverTime
*
1000
)
{
self
.
$refs
[
'uCountDown'
+
index
][
0
].
seconds
+=
2
}
},
timestampDiff
(
currentOverTime
)
{
var
nowTime
=
new
Date
();
// 当前时间
if
(
nowTime
.
getTime
()
>
currentOverTime
*
1000
)
{
var
diff
=
nowTime
.
getTime
()
-
(
currentOverTime
*
1000
);
}
else
{
var
diff
=
(
currentOverTime
*
1000
)
-
nowTime
.
getTime
();
}
return
diff
;
},
/**
* 获取当前位置的经纬度
*/
getLocation
()
{
let
self
=
this
const
dataValue
=
this
.
dataValue
||
[]
const
waterInfo
=
this
.
waterInfo
uni
.
getLocation
({
type
:
'gcj02'
,
success
:
function
(
res
)
{
dataValue
.
push
(
res
.
longitude
)
dataValue
.
push
(
res
.
latitude
)
self
.
dataValue
=
dataValue
},
fail
(
err
)
{
}
});
},
reachBottom
()
{
// 此tab为空数据
if
(
this
.
current
!=
2
)
{
this
.
loadStatus
.
splice
(
this
.
current
,
1
,
'loading'
);
setTimeout
(()
=>
{
this
.
getOrderList
(
this
.
current
);
},
1200
);
}
},
// 页面数据
getOrderList
(
index
)
{
// 状态处理
console
.
log
(
"chage:"
,
this
.
indexStatus
[
index
])
this
.
list
[
index
].
pageNumber
+=
1
var
param
=
{
pageNumber
:
this
.
list
[
index
].
pageNumber
,
pageSize
:
this
.
list
[
index
].
pageSize
,
keyword
:
''
,
type
:
this
.
indexStatus
[
index
]
}
var
self
=
this
;
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"getOrderList"
,
res
.
data
)
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
var
res
=
{
data
:
{
total
:
100
,
orderType
:
this
.
currentIndex
,
list
:
[{
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
categoryName
:
'充电桩'
,
// 品类:充电桩
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
orderNumber
:
'OR2021041809827'
,
// 工单编号
contactName
:
'郭小清'
,
// 客户信息
contactPhone
:
'13631612077'
,
// 联系方式
contactAddress
:
'湾街道荔枝花园D座125号'
,
// 详细地址
contactAddressLatitud
:
'116.3896'
,
// 联系人地址经度
contactAddressLongitud
:
'39.91917'
,
// 联系人地址纬度
orderStatus
:
0
,
// 工单状态
appointmentDatetime
:
''
,
// 预约时间
currentWillOverTime
:
10000
,
// 剩余时间
currentOverTime
:
0
,
// 超过时间
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
auditResults
:
{},
// 审核结果
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
}]
}
}
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
// 后台需要返回order_type,防止数据返回延迟期间点击了其他的tab
if
(
res
.
data
)
{
self
.
orderLists
[
res
.
data
.
orderType
].
push
(...
res
.
data
.
list
)
self
.
list
[
res
.
data
.
orderType
].
total
=
res
.
data
.
total
;
self
.
loadStatus
[
res
.
data
.
orderType
]
=
res
.
data
.
total
>
self
.
orderLists
[
res
.
data
.
orderType
].
length
?
'loading'
:
'nomore'
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
});
},
refresherrefresh
()
{
this
.
list
[
this
.
currentIndex
].
pageNumber
=
0
this
.
orderLists
[
this
.
currentIndex
]
=
[]
this
.
getOrderList
()
},
// 获取订单数量
getOrderCount
()
{
var
self
=
this
;
// 加载订单列表
self
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
if
(
res
.
data
)
{
self
.
list
.
forEach
(
item
=>
{
if
(
item
.
name
===
'待预约'
)
{
item
.
count
=
res
.
data
.
toAppointmentCount
}
else
if
(
item
.
name
===
'待签到'
)
{
item
.
count
=
res
.
data
.
toCheckinCount
}
else
if
(
item
.
name
===
'待完工'
)
{
item
.
count
=
res
.
data
.
toFinishCount
}
else
if
(
item
.
name
===
'待审核'
)
{
item
.
count
=
res
.
data
.
reviewingCount
}
else
if
(
item
.
name
===
'异常单'
)
{
item
.
count
=
res
.
data
.
exceptionCount
}
})
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
});
},
// 总价
totalPrice
(
item
)
{
let
price
=
0
;
item
.
map
(
val
=>
{
price
+=
parseFloat
(
val
.
price
);
});
return
price
.
toFixed
(
2
);
},
// 总件数
totalNum
(
item
)
{
let
num
=
0
;
item
.
map
(
val
=>
{
num
+=
val
.
number
;
});
return
num
;
},
// tab栏切换
change
(
index
)
{
this
.
swiperCurrent
=
index
;
this
.
getOrderList
(
index
);
},
transition
({
detail
:
{
dx
}
})
{
this
.
$refs
.
tabs
.
setDx
(
dx
);
},
animationfinish
({
detail
:
{
current
}
})
{
this
.
$refs
.
tabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
})
},
handleClick
(
item
)
{
console
.
log
(
'click cell'
)
this
.
viewOderItem
(
item
.
orderId
)
},
handleAction
(
item
)
{
console
.
log
(
'click button'
)
this
.
viewOderItem
(
item
.
orderId
)
}
}
};
</
script
>
<
style
>
/* #ifndef H5 */
page
{
height
:
100%
;
background-color
:
#f2f2f2
;
}
/* #endif */
</
style
>
<
style
lang=
"scss"
scoped
>
.u-tabs-box
{
margin-bottom
:
30rpx
;
}
.order
{
// width: 710rpx;
// background-color: #ffffff;
// margin: 20rpx auto;
// border-radius: 20rpx;
// box-sizing: border-box;
// padding: 20rpx;
// font-size: 28rpx;
.top
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.left
{
display
:
flex
;
align-items
:
center
;
.tag
{
text-align
:
center
;
width
:
84rpx
;
height
:
40rpx
;
background
:
linear-gradient
(
270deg
,
#47ABFF
0%
,
#2272FF
100%
);
border-radius
:
8rpx
;
font-size
:
22rpx
;
font-weight
:
500
;
color
:
#FFFFFF
;
line-height
:
40rpx
;
}
.store
{
margin
:
0
10rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
color
:
#333333
;
line-height
:
36px
;
}
}
.right
{
height
:
40rpx
;
background
:
#F4F5F7
;
border-radius
:
22rpx
;
padding
:
8rpx
16rpx
8rpx
16rpx
;
font-size
:
22rpx
;
line-height
:
24rpx
;
font-weight
:
400
;
color
:
#333333
;
}
}
.item
{
display
:
flex
;
flex-direction
:
column
;
margin
:
20rpx
0
0
;
.content
{
.title
{
font-size
:
26rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
52rpx
;
}
}
.address
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
52rpx
;
.left
{}
.right
{}
}
}
.total
{
margin-top
:
20rpx
;
text-align
:
right
;
font-size
:
24rpx
;
.total-price
{
font-size
:
32rpx
;
}
}
.bottom
{
display
:
flex
;
margin-top
:
30rpx
;
padding
:
0
10rpx
;
justify-content
:
space-between
;
align-items
:
center
;
.left
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.tag
{
text-align
:
center
;
width
:
54rpx
;
height
:
54rpx
;
background
:
#FF930D
;
font-size
:
26rpx
;
font-weight
:
500
;
color
:
#FFFFFF
;
line-height
:
54rpx
;
border-radius
:
50%
;
margin-right
:
20rpx
;
}
}
.right-btn
{
text-align
:
center
;
width
:
200rpx
;
height
:
80rpx
;
background
:
#2272FF
;
border-radius
:
40rpx
;
font-size
:
32rpx
;
font-weight
:
600
;
color
:
#FFFFFF
;
line-height
:
80rpx
;
font-family
:
PingFangSC-Semibold
,
PingFang
SC
;
}
}
}
.centre
{
text-align
:
center
;
margin
:
200rpx
auto
;
font-size
:
32rpx
;
image
{
width
:
164rpx
;
height
:
164rpx
;
border-radius
:
50%
;
margin-bottom
:
20rpx
;
}
.tips
{
font-size
:
24rpx
;
color
:
#999999
;
margin-top
:
20rpx
;
}
.btn
{
margin
:
80rpx
auto
;
width
:
200rpx
;
border-radius
:
32rpx
;
line-height
:
64rpx
;
color
:
#ffffff
;
font-size
:
26rpx
;
background
:
linear-gradient
(
270deg
,
rgba
(
249
,
116
,
90
,
1
)
0%
,
rgba
(
255
,
158
,
1
,
1
)
100%
);
}
}
.wrap
{
display
:
flex
;
flex-direction
:
column
;
height
:
calc
(
100vh
-
var
(
--
window-top
));
width
:
100%
;
}
.swiper-box
{
flex
:
1
;
}
.swiper-item
{
height
:
100%
;
}
.tools-box
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
padding
:
20rpx
0rpx
18rpx
0rpx
;
.search-sub
{
height
:
72rpx
;
width
:
320rpx
;
}
.search-btn
{
height
:
72rpx
;
width
:
220rpx
;
background-color
:
#ffffff
;
border-radius
:
36rpx
;
color
:
#666666
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-around
;
align-items
:
center
;
.search-btn-text
{
line-height
:
36rpx
;
font-weight
:
400
;
font-size
:
26rpx
;
}
}
}
.order-taps
{
height
:
80rpx
;
padding
:
8rpx
30rpx
20rpx
30rpx
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
.order-taps-item
{
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
20px
;
.taps-count
{
position
:
absolute
;
font-size
:
16rpx
;
font-weight
:
400
;
line-height
:
16rpx
;
width
:
36rpx
;
height
:
24rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
border
:
2rpx
solid
#FA5A49
;
text-align
:
center
;
color
:
#FA5A49
;
}
}
}
</
style
>
src/pages/settle/file.vue
View file @
7a0a0df3
...
...
@@ -18,7 +18,7 @@
mode=
"aspectFill"
v-for=
"(src, key) in fileItem.placeholderImages"
:src=
"fileItem.imgs.length > key ? fileItem.imgs[key] : src"
:key=
"
src +
key"
:key=
"key"
@
click=
"handleClick(fileItem, index, key)"
></image>
</view>
...
...
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