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
7a9d3862
Commit
7a9d3862
authored
Aug 19, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 前台-订单管理-列表
parent
45ff8ad0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
345 additions
and
71 deletions
+345
-71
pages.json
src/pages.json
+90
-70
order.vue
src/pages/index/order.vue
+1
-1
list.vue
src/pages/mine/order/list.vue
+254
-0
No files found.
src/pages.json
View file @
7a9d3862
...
@@ -162,6 +162,26 @@
...
@@ -162,6 +162,26 @@
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
"path"
:
"order/index"
,
"style"
:
{
"navigationBarTitleText"
:
"订单管理"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
,
"navigationStyle"
:
"custom"
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"order/list"
,
"style"
:
{
"navigationBarTitleText"
:
"订单管理-订单列表"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
,
"navigationStyle"
:
"custom"
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
{
"path"
:
"wallet/index"
,
"path"
:
"wallet/index"
,
"style"
:
{
"style"
:
{
...
@@ -253,69 +273,69 @@
...
@@ -253,69 +273,69 @@
"navigationBarTitleText"
:
"备件押金"
,
"navigationBarTitleText"
:
"备件押金"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
{
"path"
:
"setting/index"
,
"path"
:
"setting/index"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"设置"
,
"navigationBarTitleText"
:
"设置"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"warehouse/index"
,
"path"
:
"warehouse/index"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"备件订单"
,
"navigationBarTitleText"
:
"备件订单"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"warehouse/spare"
,
"path"
:
"warehouse/spare"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"备件库"
,
"navigationBarTitleText"
:
"备件库"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"warehouse/return"
,
"path"
:
"warehouse/return"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"返件信息"
,
"navigationBarTitleText"
:
"返件信息"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"warehouse/searchParts"
,
"path"
:
"warehouse/searchParts"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
" "
,
//
备件单搜索
"navigationBarTitleText"
:
" "
,
//
备件单搜索
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"warehouse/express"
,
"path"
:
"warehouse/express"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
" "
,
//
备件单物流
"navigationBarTitleText"
:
" "
,
//
备件单物流
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"warehouse/records"
,
"path"
:
"warehouse/records"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"出库记录"
,
"navigationBarTitleText"
:
"出库记录"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
...
@@ -397,24 +417,24 @@
...
@@ -397,24 +417,24 @@
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"document-tag"
,
"path"
:
"document-tag"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
//
合作商或品牌标签列表
"navigationBarTitleText"
:
""
,
//
合作商或品牌标签列表
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"specification"
,
"path"
:
"specification"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
//
完工-产品规格
"navigationBarTitleText"
:
""
,
//
完工-产品规格
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
{
"path"
:
"parts"
,
"path"
:
"parts"
,
...
@@ -556,7 +576,7 @@
...
@@ -556,7 +576,7 @@
{
{
"path"
:
"addParts"
,
"path"
:
"addParts"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"备件选择"
,
"navigationBarTitleText"
:
"备件选择"
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
}
}
...
...
src/pages/index/order.vue
View file @
7a9d3862
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
:customStyle=
"noOrderCustomStyle"
:customStyle=
"noOrderCustomStyle"
/>
/>
<template
v-else
>
<template
v-else
>
<view
v-for=
"
(item, index)
in orderList"
:key=
"item.orderId"
>
<view
v-for=
"
item
in orderList"
:key=
"item.orderId"
>
<OrderCell
<OrderCell
:orderData=
"item"
:orderData=
"item"
:type=
"cellType"
:type=
"cellType"
...
...
src/pages/mine/order/list.vue
View file @
7a9d3862
<
template
>
<view
class=
"list-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
:title=
"title"
titleColor=
"#333333"
: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>
<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>
</template>
<
script
>
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
export
default
{
components
:
{
OrderCell
,
NoOrder
,
},
data
()
{
return
{
pageNumber
:
0
,
pageSize
:
1000
,
// 因为需要排序,所以暂时去掉分页
orderList
:
[],
loadStatus
:
'loading'
,
dataValue
:
[],
loaded
:
false
,
triggered
:
true
,
_freshing
:
false
,
orderType
:
''
,
timeType
:
''
,
}
},
computed
:
{
title
()
{
return
(
this
.
orderTypeTexts
[
this
.
timeType
]
+
'-'
+
this
.
orderTypeTexts
[
this
.
orderType
]
)
},
orderTypeTexts
()
{
return
{
waitAppointment
:
'已接单'
,
waitCheckIn
:
'已接单'
,
waitFinish
:
'已前到'
,
finish
:
'已完工'
,
}
},
timeTypeTexts
()
{
return
{
today
:
'今日'
,
yesterday
:
'昨日'
,
week
:
'本周'
,
month
:
'本月'
}
},
cellType
()
{
return
this
.
orderType
==
'waitLianxi'
?
''
:
this
.
orderType
},
noMore
()
{
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
},
noOrderCustomStyle
()
{
return
'margin-top: 100rpx;background-color: #F4F5F7'
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'订单首页'
)
this
.
_freshing
=
false
if
(
e
&&
e
.
orderType
)
{
this
.
orderType
=
e
.
orderType
}
if
(
e
&&
e
.
timeType
)
{
this
.
timeType
=
e
.
timeType
}
},
onShow
()
{
this
.
reloadOrderInfo
()
},
methods
:
{
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getOrderList
()
},
// 页面数据
getOrderList
()
{
// 状态处理
this
.
pageNumber
+=
1
if
(
this
.
pageNumber
==
1
)
{
this
.
loaded
=
false
}
var
param
=
{
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
keyword
:
''
,
type
:
this
.
orderType
,
}
var
self
=
this
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
self
.
pageNumber
==
1
)
{
self
.
orderList
=
[]
}
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
self
.
orderList
.
sort
((
x
,
y
)
=>
{
return
x
.
currentOverTime
<=
y
.
currentOverTime
?
1
:
-
1
})
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
&&
res
.
data
.
list
.
length
==
self
.
pageSize
?
'loadmore'
:
'nomore'
}
}
else
{
console
.
log
(
res
.
message
,
'获取订单数量失败!'
)
}
self
.
$nextTick
(()
=>
{
if
(
self
.
_freshing
)
{
self
.
triggered
=
false
self
.
_freshing
=
false
}
})
this
.
loaded
=
true
})
},
handleClickCellButton
(
item
,
type
)
{
if
(
type
==
'exception'
)
{
this
.
$u
.
api
.
workerDealWithError
(
item
.
orderId
).
then
(()
=>
{})
}
// 去完工
uni
.
navigateTo
({
url
:
'pages/order/complete?orderId='
+
item
.
orderId
+
'&categoryId='
+
item
.
categoryId
+
'&orderServiceType='
+
item
.
orderServiceType
+
'&inGuaranteePeriod='
+
item
.
inGuaranteePeriod
+
'&partnerCompanyId='
+
item
.
partnerCompanyId
+
'&maintainStep='
+
item
.
maintainStep
+
'&orderStatus='
+
item
.
orderStatus
+
'&brandId='
+
item
.
lianbaoBrandId
+
'&auditResults='
+
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
).
join
()
:
''
),
})
},
handleClick
(
item
,
type
,
showCountTime
)
{
// type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
//type类型
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
item
.
orderId
+
'&type='
+
type
+
'&showCountTime='
+
showCountTime
,
})
},
onRefresh
()
{
if
(
this
.
_freshing
)
return
this
.
_freshing
=
true
this
.
reloadOrderInfo
()
},
onRestore
()
{
this
.
triggered
=
'restore'
// 需要重置
},
reloadOrderInfo
()
{
this
.
reloadOrderList
()
this
.
getOrderCount
()
},
reloadOrderList
()
{
this
.
pageNumber
=
0
this
.
loadStatus
=
'loading'
this
.
getOrderList
()
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.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
;
}
}
</
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