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
Show 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
...
@@ -77,7 +77,14 @@
...
@@ -77,7 +77,14 @@
}
}
}
}
},
},
orderType
:
Number
,
// 0:待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6'已完工'
// waitAccept:待接单、
// waitAppointment:待预约、
// waitCheckIn:待签到、
// waitFinish:待完工、
// review: 审核中、
// exception:异常单、
// finish:已完工
type
:
String
,
location
:
{
// 当前坐标
location
:
{
// 当前坐标
type
:
Array
,
type
:
Array
,
default
()
{
default
()
{
...
@@ -207,6 +214,20 @@
...
@@ -207,6 +214,20 @@
},
},
showDistance
()
{
showDistance
()
{
return
this
.
orderType
==
0
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
:
{
methods
:
{
...
...
src/components/order/noOrder.vue
View file @
3d59a3bd
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
color
:
#666666
;
color
:
#666666
;
font-size
:
28rpx
;
font-size
:
28rpx
;
padding
:
30rpx
;
padding
:
30rpx
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
min-height
:
460rpx
;
min-height
:
460rpx
;
...
...
src/components/popView/index.vue
View file @
3d59a3bd
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
取消
取消
</u-button>
</u-button>
<u-button
:custom-style=
"customStyleSave"
shape=
"circle"
type=
"primary"
@
click=
"handleClickSure"
>
<u-button
:custom-style=
"customStyleSave"
shape=
"circle"
type=
"primary"
@
click=
"handleClickSure"
>
确定
查看
</u-button>
</u-button>
</view>
</view>
</view>
</view>
...
...
src/pages/index/index.vue
View file @
3d59a3bd
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
</view>
</view>
<view
v-else-if=
"!needSettled && orderList.length > 0"
class=
"order-item-view"
>
<view
v-else-if=
"!needSettled && orderList.length > 0"
class=
"order-item-view"
>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<OrderCell
:orderData=
"item"
:orderType=
"0"
:location=
"location"
@
click=
"handleClick
"
<OrderCell
:orderData=
"item"
type=
"waitAccept"
:location=
"location"
@
click=
"handleClick(item.orderId)
"
@
action=
"handleAction"
>
</OrderCell>
@
action=
"handleAction
(item.orderId)
"
>
</OrderCell>
</view>
</view>
<u-loadmore
:status=
"currentLoadStatus"
bgColor=
"#f2f2f2"
></u-loadmore>
<u-loadmore
:status=
"currentLoadStatus"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
</view>
...
@@ -143,12 +143,18 @@
...
@@ -143,12 +143,18 @@
},
},
methods
:
{
methods
:
{
handleClick
()
{
// 点击了cell
handleClick
(
orderId
)
{
// 点击了cell
console
.
log
(
'点击了cell'
)
console
.
log
(
'点击了cell'
)
this
.
viewOderItem
(
orderId
)
},
},
handleAction
()
{
// 点击了按钮
handleAction
(
orderId
)
{
// 点击了按钮
console
.
log
(
'点击了按钮'
)
console
.
log
(
'点击了按钮'
)
this
.
viewOderItem
(
orderId
)
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
})
},
},
async
initSettleInfo
()
{
async
initSettleInfo
()
{
let
self
=
this
;
let
self
=
this
;
...
...
src/pages/order/index.vue
View file @
3d59a3bd
...
@@ -14,16 +14,18 @@
...
@@ -14,16 +14,18 @@
</view>
</view>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<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=
"4
4"
<u-tabs
height=
"66"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"
4"
:offset=
"[0,0]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
bar-width=
"44"
:offset=
"[0,0]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
</view>
</view>
<view
class=
"tab-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"
>
-->
<!--
<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
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:orderType=
"orderType"
:location=
"dataValue
"
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)
"
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
@
action=
"handleAction(item)"
>
</OrderCell>
</view>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</scroll-view>
</scroll-view>
...
@@ -31,17 +33,20 @@
...
@@ -31,17 +33,20 @@
</view>
</view>
<!--
</view>
-->
<!--
</view>
-->
<PopView
title=
"aaaa"
message=
"bbbb"
:visible=
"visibale"
/>
<PopView
title=
"aaaa"
message=
"bbbb"
:visible=
"visibale"
/>
</TabBarPage>
</TabBarPage>
</
template
>
</
template
>
<
script
>
<
script
>
import
TabBarPage
from
"@/components/tabBarList/index.vue"
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
{
export
default
{
components
:
{
components
:
{
TabBarPage
,
TabBarPage
,
OrderCell
OrderCell
,
NoOrder
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -50,14 +55,6 @@
...
@@ -50,14 +55,6 @@
curNow
:
0
,
curNow
:
0
,
pageNumber
:
0
,
pageNumber
:
0
,
pageSize
:
10
,
pageSize
:
10
,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
:
{
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'exception'
,
5
:
'finish'
},
orderList
:
[],
orderList
:
[],
list
:
[{
list
:
[{
name
:
'待预约'
,
name
:
'待预约'
,
...
@@ -72,7 +69,7 @@
...
@@ -72,7 +69,7 @@
total
:
0
,
total
:
0
,
},
},
{
{
name
:
'
待审核
'
,
name
:
'
审核中
'
,
total
:
0
,
total
:
0
,
},
},
{
{
...
@@ -83,6 +80,7 @@
...
@@ -83,6 +80,7 @@
current
:
0
,
current
:
0
,
loadStatus
:
'loading'
,
loadStatus
:
'loading'
,
dataValue
:
[],
dataValue
:
[],
loaded
:
false
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -94,15 +92,40 @@
...
@@ -94,15 +92,40 @@
subList
()
{
subList
()
{
return
[
'待受理'
,
'已完工'
]
return
[
'待受理'
,
'已完工'
]
},
},
// 0:
待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6
'已完工'
// 0:
'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5
'已完工'
orderType
()
{
orderType
()
{
return
this
.
currentIndex
+
1
return
this
.
indexStatus
[
this
.
currentIndex
]
},
},
currentIndex
()
{
currentIndex
()
{
return
this
.
curNow
==
0
?
this
.
current
:
5
return
this
.
curNow
==
0
?
this
.
current
:
5
},
},
sousuoImage
()
{
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
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
:
{
methods
:
{
...
@@ -116,6 +139,7 @@
...
@@ -116,6 +139,7 @@
// tab栏切换
// tab栏切换
change
(
index
)
{
change
(
index
)
{
this
.
current
=
index
;
this
.
current
=
index
;
this
.
pageNumber
=
0
this
.
orderList
=
[]
this
.
orderList
=
[]
this
.
loadStatus
=
'loading'
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
);
this
.
getOrderList
(
index
);
...
@@ -148,7 +172,8 @@
...
@@ -148,7 +172,8 @@
// 页面数据
// 页面数据
getOrderList
(
index
)
{
getOrderList
(
index
)
{
// 状态处理
// 状态处理
// this.pageNumber += 1
this
.
pageNumber
+=
1
this
.
loaded
=
false
var
param
=
{
var
param
=
{
pageNumber
:
this
.
pageNumber
,
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
pageSize
:
this
.
pageSize
,
...
@@ -160,11 +185,11 @@
...
@@ -160,11 +185,11 @@
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"getOrderList"
,
res
.
data
)
console
.
log
(
"getOrderList"
,
res
.
data
)
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
var
res
=
{
res
.
data
.
type
=
self
.
orderType
data
:
{
if
(
res
.
data
.
list
)
{
total
:
15
,
res
.
data
.
total
=
15
orderType
:
this
.
currentIndex
,
if
(
res
.
data
.
list
.
length
==
0
&&
res
.
data
.
total
>
0
)
{
list
:
[{
res
.
data
.
list
=
[{
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
categoryName
:
'充电桩'
,
// 品类:充电桩
categoryName
:
'充电桩'
,
// 品类:充电桩
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
...
@@ -182,25 +207,30 @@
...
@@ -182,25 +207,30 @@
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
auditResults
:
{},
// 审核结果
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
// 后台需要返回type,防止数据返回延迟期间点击了其他的tab
if
(
res
.
data
)
{
if
(
res
.
data
.
type
!=
self
.
orderType
)
return
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
self
.
orderList
.
push
(...
res
.
data
.
list
)
if
(
self
.
list
[
res
.
data
.
orderType
])
{
if
(
self
.
list
[
self
.
types
[
res
.
data
.
type
]])
{
self
.
list
[
res
.
data
.
orderType
].
total
=
res
.
data
.
total
self
.
list
[
self
.
types
[
res
.
data
.
type
]].
total
=
res
.
data
.
total
}
}
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
}
}
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
}
this
.
loaded
=
true
});
});
},
},
...
@@ -472,12 +502,14 @@
...
@@ -472,12 +502,14 @@
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
.search-image
{
.search-image
{
width
:
36rpx
;
width
:
36rpx
;
height
:
32rpx
;
height
:
32rpx
;
flex-shrink
:
0
;
flex-shrink
:
0
;
margin-right
:
24rpx
;
margin-right
:
24rpx
;
}
}
.search-btn-text
{
.search-btn-text
{
line-height
:
36rpx
;
line-height
:
36rpx
;
font-weight
:
400
;
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