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
fc74282d
Commit
fc74282d
authored
Apr 25, 2021
by
郭晓清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单列表+详情(接单)
parent
eb807255
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
387 additions
and
261 deletions
+387
-261
order.js
src/common/api/order.js
+27
-4
detail.vue
src/pages/order/detail.vue
+342
-230
index.vue
src/pages/order/index.vue
+18
-27
No files found.
src/common/api/order.js
View file @
fc74282d
...
@@ -7,9 +7,9 @@ let orderApiFun = function(vm){
...
@@ -7,9 +7,9 @@ let orderApiFun = function(vm){
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/queryOrdersCount/V2'
,
params
);
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/queryOrdersCount/V2'
,
params
);
/**
/**
* 工单列表接口
* 工单列表接口
http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/order/revision/{token}/list
*/
*/
let
listOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/
'
+
vm
.
vuex_token
+
'/order/revision
/list'
,
params
);
let
listOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/
order/revision/'
+
vm
.
vuex_token
+
'
/list'
,
params
);
/**
/**
* 获取师傅的预约日历
* 获取师傅的预约日历
...
@@ -26,7 +26,26 @@ let orderApiFun = function(vm){
...
@@ -26,7 +26,26 @@ let orderApiFun = function(vm){
/**
/**
* 师傅签到接口
* 师傅签到接口
*/
*/
let
maintainWorkerCheckin
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/{orderId}/maintainWorkerCheckin'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
maintainWorkerCheckin
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintainWorkerCheckin'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
/**
* 订单详情查询
*/
let
orderDetail
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
params
.
orderId
,
params
);
/**
* 查询工单操作记录列表接口
*/
let
listOrderRecord
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/order/record/'
+
vm
.
vuex_token
+
'/listOrderRecord/'
+
params
.
orderId
,
params
);
/**
* 接单
*/
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
);
/**
* 抢单
*/
let
orderGan
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/31/wxh-worker-rest/rest/order/revision/applets/'
+
vm
.
vuex_token
+
'/order/acceptAppletsOrder'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
const
orderApi
=
{
const
orderApi
=
{
...
@@ -35,7 +54,11 @@ let orderApiFun = function(vm){
...
@@ -35,7 +54,11 @@ let orderApiFun = function(vm){
listOrder
,
listOrder
,
workerCalendar
,
workerCalendar
,
workerAppointment
,
workerAppointment
,
maintainWorkerCheckin
maintainWorkerCheckin
,
orderDetail
,
listOrderRecord
,
orderAccept
,
orderGan
}
}
return
orderApi
return
orderApi
}
}
...
...
src/pages/order/detail.vue
View file @
fc74282d
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<view
class=
"tag"
>
{{
order
.
orderServiceType
}}
</view>
<view
class=
"tag"
>
{{
order
.
orderServiceType
}}
</view>
<text
class=
"title"
>
{{
order
.
categoryName
}}
</text>
<text
class=
"title"
>
{{
order
.
categoryName
}}
</text>
</view>
</view>
<view
class=
"right"
>
分配单
</view>
<view
class=
"right"
>
{{
order
.
orderBusinessTypeText
}}
</view>
</view>
</view>
<view
class=
"order-cell"
>
<view
class=
"order-cell"
>
<text>
工单编号:
</text>
<text>
工单编号:
</text>
...
@@ -62,24 +62,36 @@
...
@@ -62,24 +62,36 @@
<view
class=
"top-item"
>
<view
class=
"top-item"
>
<text
class=
"title"
>
履约记录
</text>
<text
class=
"title"
>
履约记录
</text>
</view>
</view>
<view
class=
"order-cell between-cell"
>
<view
class=
"order"
v-for=
"(record,index) in orderRecords"
:key=
"record.operationContent"
>
<text>
接单时间:2021.04.21 16:40:35
</text>
<view
class=
"order-cell between-cell"
>
<text>
{{
record
.
operationType
}}
</text>
<text>
{{
$u
.
timeFormat
(
record
.
operationDatetime
,
'yyyy-mm-dd hh:MM:ss'
)
}}
</text>
<text
style=
"color: red;"
>
{{
record
.
overTime
?
''
:
'超时 '
}}{{
record
.
exception
?
''
:
' 异常'
}}
</text>
</view>
</view>
</view>
</view>
</view>
<view
class=
"card appoint-item"
>
<view
class=
"card appoint-item"
v-show=
"showTimeSelect"
>
<appoint-time
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
<appoint-time
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
</view>
</view>
<view
class=
"toolbar"
>
<view
class=
"toolbar"
>
<!-- view用于占位 -->
<!-- 背景,内容,请求接口 根据状态不同改变
{{
operationDoing
[
order
.
orderStatus
].
background
}}
-->
<!-- 过程反馈 -->
<view
class=
"left"
>
<view
class=
"left"
>
<view
v-show=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
></view>
<view
v-show=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
>
<text
style=
"font-size: small;"
>
过程反馈
</text>
</view>
</view>
</view>
<!--接单,抢单,已被抢, 预约 ,签到 ,去完工 :class="appoint-btn" v-show="buttonShow(btn)"-->
<view
class=
"center"
>
<view
class=
"center"
>
<view
v-if=
"centerButton=='appoint'"
@
click=
"clickCenterButton"
class=
"button"
:class=
"centerButtonClass"
>
<view>
<u-toast
ref=
"uToast"
/>
</view>
<view
v-if=
"showCenterBtn"
@
click=
"handleBtn"
class=
"button"
:class=
"centerButtonClass"
>
{{
centerButtonText
}}
{{
centerButtonText
}}
</view>
</view>
</view>
</view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view
class=
"right"
>
<view
class=
"right"
>
<view
v-show=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
></view>
<view
v-show=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
></view>
</view>
</view>
...
@@ -89,8 +101,11 @@
...
@@ -89,8 +101,11 @@
<
script
>
<
script
>
import
appointTime
from
'@/components/appoint/appoint-time.vue'
import
appointTime
from
'@/components/appoint/appoint-time.vue'
import
{
getQueryString
}
from
'@/common/util.js'
export
default
{
export
default
{
components
:{
components
:
{
appointTime
appointTime
},
},
data
()
{
data
()
{
...
@@ -106,20 +121,30 @@
...
@@ -106,20 +121,30 @@
orderId
:
null
,
orderId
:
null
,
order
:
{},
order
:
{},
allowRejection
:
false
,
// 允许拒单
allowRejection
:
false
,
// 允许拒单
allowFeedback
:
tru
e
,
// 允许过程反馈
allowFeedback
:
fals
e
,
// 允许过程反馈
needPhotograph
:
true
,
// 需要现场拍摄
needPhotograph
:
true
,
// 需要现场拍摄
centerButton
:
'appoint'
,
// 是否显示按钮
centerButton
:
''
,
// 是否显示按钮
centerButtonText
:
'预约'
,
centerButtonText
:
''
,
};
orderRecords
:
[],
method
:
null
,
allowFeedbackStatus
:
[
30
,
31
],
// 过程反馈状态列表
showCenterBtn
:
false
,
showTimeSelect
:
false
,
submitType
:
""
}
},
},
onLoad
(
e
)
{
onLoad
(
option
)
{
if
(
e
&&
e
.
id
)
{
// 生命周期函数--监听页面加载
this
.
orderId
=
e
.
id
console
.
log
(
"option"
,
option
)
if
(
option
&&
option
.
id
)
{
this
.
orderId
=
option
.
id
}
else
{
}
else
{
// 异常处理
// 异常处理
}
}
this
.
loadOrderDetail
()
this
.
loadOrderDetail
()
this
.
loadOrderRecord
()
},
},
created
(
option
)
{},
computed
:
{
computed
:
{
phoneIcon
()
{
phoneIcon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/dianhua-1@2x.png'
return
process
.
uniEnv
.
qn_base_url
+
'icon/dianhua-1@2x.png'
...
@@ -130,144 +155,257 @@
...
@@ -130,144 +155,257 @@
centerButtonClass
()
{
centerButtonClass
()
{
let
btnClass
=
"appoint-btn"
let
btnClass
=
"appoint-btn"
return
btnClass
return
btnClass
}
,
}
},
},
methods
:
{
methods
:
{
loadOrderDetail
()
{
loadOrderDetail
()
{
// 获取工单详情
let
self
=
this
let
self
=
this
let
timestamp
=
new
Date
().
getTime
();
let
timestamp
=
new
Date
().
getTime
();
let
order
=
{
var
data
=
{
brandName
:
'沃尔沃'
,
'orderId'
:
self
.
orderId
categoryId
:
1
,
};
categoryName
:
'充电桩'
,
self
.
$u
.
api
.
orderDetail
(
data
).
then
((
res
)
=>
{
contactAddress
:
'湾街道荔枝花园D座125号'
,
if
(
res
.
code
==
200
)
{
contactAddressLatitud
:
'116.3896'
,
console
.
log
(
"==="
,
res
.
data
.
list
[
0
])
contactAddressLongitud
:
'39.91917'
,
self
.
order
=
res
.
data
.
list
[
0
]
contactCity
:
4403
,
this
.
getCurrentBtn
()
contactCityText
:
'深圳市'
,
// self.order.operationType = "accept"
contactCommunity
:
440306
,
// }else{
contactCommunityText
:
'宝安区'
,
// self.order.operationType = "appointment"
contactId
:
1
,
// }
contactName
:
'郭小清'
,
// self.method =self.operationDoing[self.order.operationType].action;
contactPhone
:
'13631612077'
,
// // 根据工单的状态确定是否需要过程反馈
contactProvince
:
44
,
// self.allowFeedback = self.allowFeedbackStatus.indexOf(self.order.orderStatus)>0
contactProvinceText
:
'广东省'
,
contactStreet
:
44030601
,
}
else
{
contactStreetText
:
'新安街道'
,
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
lianbaoBrandId
:
1
,
}
orderBusinessType
:
'R'
,
});
orderId
:
1
,
orderNumber
:
'OR2021041809827'
,
orderProductCount
:
1
,
orderServiceType
:
'安装'
,
orderStatus
:
'30'
,
serviceContent
:
'沃尔沃全球标充电桩(国标32A,4G联网)'
,
orderBusinessTypeText
:
'订单池'
,
auditResults
:
[],
currentWillOverTime
:
timestamp
,
currentOverTime
:
timestamp
,
appointmentDatetime
:
timestamp
,
auditDatetime
:
timestamp
,
}
self
.
order
=
order
},
},
loadOrderRecord
()
{
/**
let
self
=
this
* 拒单
var
param
=
{
*/
'orderId'
:
self
.
orderId
rejectOrder
()
{
};
self
.
$u
.
api
.
listOrderRecord
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==========="
,
res
.
data
)
self
.
orderRecords
=
res
.
data
}
else
{
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
}
})
},
rejectOrder
()
{
// 拒单
console
.
log
(
"点击拒单"
)
console
.
log
(
"点击拒单"
)
},
},
/**
/**
* 点击下一周
* 点击下一周
* @param {Object} data
* @param {Object} data
*/
*/
weekChange
(
data
){
weekChange
(
data
)
{
console
.
log
(
data
,
'week-data'
)
console
.
log
(
data
,
'week-data'
)
},
},
/**
/**
* 点击日期选择
* 点击日期选择
* @param {Object} data
* @param {Object} data
*/
*/
dateChange
(
data
){
dateChange
(
data
)
{
console
.
log
(
data
,
'week-data'
)
console
.
log
(
data
,
'week-data'
)
},
},
/**
/**
* 时间段选择变化
* 时间段选择变化
* @param {Object} data
* @param {Object} data
*/
*/
timeChange
(
data
){
timeChange
(
data
)
{
console
.
log
(
data
,
'week-data'
)
console
.
log
(
data
,
'week-data'
)
},
},
clickCenterButton
()
{
getCurrentBtn
()
{
// 根据工单状态确定按钮的显示
var
orderStatus
=
this
.
order
.
orderStatus
// 业务类型 指派单/订单池
var
orderBusinessType
=
this
.
order
.
orderBusinessTypeText
if
(
orderStatus
<
31
&&
orderBusinessType
===
'指派单'
)
{
// 接单
this
.
showCenterBtn
=
true
this
.
centerButtonText
=
"接单"
// 已派单的时显示拒单按钮
this
.
allowRejection
=
true
}
else
if
(
orderStatus
<
31
&&
orderBusinessType
===
'订单池'
)
{
// 抢单
this
.
centerButton
=
"appoint1"
this
.
centerButtonText
=
"抢单"
this
.
showCenterBtn
=
true
}
else
if
(
orderStatus
===
31
&&
!
this
.
order
.
appointmentDatetime
)
{
// 预约
this
.
centerButton
=
"appoint2"
this
.
centerButtonText
=
"预约"
this
.
allowFeedback
=
true
this
.
showCenterBtn
=
true
this
.
showTimeSelect
=
true
this
.
submitType
=
"workerAppointment"
}
else
if
(
orderStatus
===
31
&&
this
.
order
.
appointmentDatetime
)
{
// 签到
this
.
centerButton
=
"appoint3"
this
.
centerButtonText
=
"签到"
this
.
allowFeedback
=
true
this
.
showCenterBtn
=
true
this
.
submitType
=
"maintainWorkerCheckin"
}
else
if
(
orderStatus
>
31
&&
orderStatus
<
80
)
{
// 完工
this
.
centerButton
=
"appoint4"
this
.
centerButtonText
=
"去完工"
this
.
allowFeedback
=
true
this
.
showCenterBtn
=
true
}
else
{}
},
},
handleBtn
()
{
const
data
=
{}
// 不同请求类型传递不同数据
if
(
this
.
submitType
===
'maintainWorkerCheckin'
)
{
data
.
remark
=
"123"
data
.
revert
=
true
}
this
.
$u
.
api
[
this
.
submitType
](
data
,
123
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
$refs
.
uToast
.
show
({
title
:
this
.
centerButtonText
+
'操作成功'
,
type
:
'success'
,
url
:
'pages/order/feedback'
,
params
:
{
id
:
1
,
menu
:
3
}
})
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
data
.
message
,
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type
:
'error'
})
}
})
}
}
}
}
}
;
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.order-wrap
{
.order-wrap
{
width
:
750rpx
;
width
:
750rpx
;
height
:
100vh
;
height
:
100vh
;
overflow
:
auto
;
overflow
:
auto
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
,
#2272FF
);
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
,
#2272FF
);
background-size
:
750rpx
600rpx
;
background-size
:
750rpx
600rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
.header
{
padding
:
12rpx
30rpx
40rpx
30rpx
;
.header
{
display
:
flex
;
padding
:
12rpx
30rpx
40rpx
30rpx
;
justify-content
:
space-between
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.title
{
align-items
:
center
;
font-size
:
40rpx
;
font-weight
:
bold
;
.title
{
color
:
#FFFFFF
;
font-size
:
40rpx
;
}
font-weight
:
bold
;
.button
{
color
:
#FFFFFF
;
text-align
:
center
;
}
width
:
106rpx
;
height
:
52rpx
;
.button
{
background
:
#FFFFFF
;
text-align
:
center
;
border-radius
:
40rpx
;
width
:
106rpx
;
font-size
:
24rpx
;
height
:
52rpx
;
font-weight
:
400
;
background
:
#FFFFFF
;
color
:
#2272FF
;
border-radius
:
40rpx
;
line-height
:
52rpx
;
font-size
:
24rpx
;
}
font-weight
:
400
;
}
color
:
#2272FF
;
.content
{
line-height
:
52rpx
;
height
:
2000rpx
;
}
.card
{
background-color
:
#FFFFFF
;
margin
:
0
30rpx
20rpx
30rpx
;
padding
:
30rpx
30rpx
0
30rpx
;
border-radius
:
6px
;
}
}
.base-item
{
padding-bottom
:
36rpx
;
.content
{
.top-item
{
height
:
2000rpx
;
display
:
flex
;
justify-content
:
space-between
;
.card
{
margin-bottom
:
20rpx
;
background-color
:
#FFFFFF
;
.left
{
margin
:
0
30rpx
20rpx
30rpx
;
padding
:
30rpx
30rpx
0
30rpx
;
border-radius
:
6px
;
}
.base-item
{
padding-bottom
:
36rpx
;
.top-item
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.tag
{
margin-bottom
:
20rpx
;
.left
{
display
:
flex
;
align-items
:
center
;
.tag
{
text-align
:
center
;
width
:
84rpx
;
height
:
40rpx
;
background-image
:
linear-gradient
(
270deg
,
#47ABFF
0%
,
#2272FF
100%
);
border-radius
:
8rpx
;
font-size
:
22rpx
;
font-weight
:
500
;
color
:
#FFFFFF
;
line-height
:
40rpx
;
}
.title
{
margin-left
:
30rpx
;
height
:
36rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
color
:
#333333
;
line-height
:
36rpx
;
}
}
.right
{
text-align
:
center
;
text-align
:
center
;
width
:
84
rpx
;
width
:
100
rpx
;
height
:
40rpx
;
height
:
40rpx
;
background
-image
:
linear-gradient
(
270deg
,
#47ABFF
0%
,
#2272FF
100%
)
;
background
:
#F4F5F7
;
border-radius
:
8
rpx
;
border-radius
:
22
rpx
;
font-size
:
22rpx
;
font-size
:
22rpx
;
font-weight
:
5
00
;
font-weight
:
4
00
;
color
:
#
FFFFFF
;
color
:
#
333333
;
line-height
:
40rpx
;
line-height
:
40rpx
;
}
}
}
.address-cell
{
height
:
24rpx
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
24rpx
;
.left
{
.address-txt
{
margin-left
:
8rpx
;
}
}
}
}
.order-item
{
padding-bottom
:
34rpx
;
.top-item
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
20rpx
;
.title
{
.title
{
margin-left
:
30rpx
;
height
:
36rpx
;
height
:
36rpx
;
font-size
:
36rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
...
@@ -275,134 +413,108 @@
...
@@ -275,134 +413,108 @@
line-height
:
36rpx
;
line-height
:
36rpx
;
}
}
}
}
.right
{
text-align
:
center
;
.address-cell
{
width
:
100rpx
;
height
:
24rpx
;
height
:
40rpx
;
font-size
:
24rpx
;
background
:
#F4F5F7
;
border-radius
:
22rpx
;
font-size
:
22rpx
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#333333
;
color
:
#333333
;
line-height
:
40rpx
;
line-height
:
24rpx
;
}
}
.left
{
.address-cell
{
.address-txt
{
height
:
24rpx
;
margin-left
:
8rpx
;
font-size
:
24rpx
;
}
font-weight
:
400
;
color
:
#333333
;
line-height
:
24rpx
;
.left
{
.address-txt
{
margin-left
:
8rpx
;
}
}
}
}
}
}
}
.order-item
{
.record-item
{}
padding-bottom
:
34rpx
;
.top-item
{
.appoint-item
{
display
:
flex
;
padding
:
0
;
justify-content
:
space-between
;
margin-bottom
:
20rpx
;
.title
{
height
:
36rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
color
:
#333333
;
line-height
:
36rpx
;
}
}
.address-cell
{
height
:
24rpx
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
24rpx
;
.left
{
.address-txt
{
margin-left
:
8rpx
;
}
}
}
}
}
}
.record-item
{
}
.toolbar
{
.appoint-item
{
margin-bottom
:
104rpx
;
padding
:
0
;
display
:
flex
;
}
justify-content
:
center
;
}
align-items
:
center
;
.toolbar
{
margin-bottom
:
104rpx
;
.left
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.left
{
width
:
100rpx
;
height
:
100rpx
;
.button
{
width
:
100rpx
;
width
:
100rpx
;
height
:
100rpx
;
height
:
100rpx
;
background
:
#929CB8
;
border-radius
:
100rpx
;
.button
{
width
:
100rpx
;
height
:
100rpx
;
background
:
#929CB8
;
border-radius
:
100rpx
;
}
}
}
}
.center
{
.center
{
width
:
140rpx
;
height
:
140rpx
;
margin-left
:
74rpx
;
margin-right
:
74rpx
;
.button
{
width
:
140rpx
;
width
:
140rpx
;
height
:
140rpx
;
height
:
140rpx
;
border-radius
:
100rpx
;
margin-left
:
74rpx
;
display
:
flex
;
margin-right
:
74rpx
;
justify-content
:
center
;
align-items
:
center
;
.button
{
color
:
#FFFFFF
;
width
:
140rpx
;
font-size
:
32rpx
;
height
:
140rpx
;
font-weight
:
bold
;
border-radius
:
100rpx
;
}
display
:
flex
;
.appoint-btn
{
justify-content
:
center
;
background
:
#2272FF
;
align-items
:
center
;
box-shadow
:
2px
2px
20px
0px
rgba
(
34
,
114
,
255
,
0
.3
);
color
:
#FFFFFF
;
}
font-size
:
32rpx
;
.sign-timeout-btn
{
font-weight
:
bold
;
background
:
#FA5A49
;
}
box-shadow
:
2px
2px
20px
0px
rgba
(
34
,
114
,
255
,
0
.3
);
}
.appoint-btn
{
.appoint-btn
{
background
:
#2272FF
;
background
:
#2272FF
;
box-shadow
:
2px
2px
20px
0px
rgba
(
34
,
114
,
255
,
0
.3
);
box-shadow
:
2px
2px
20px
0px
rgba
(
34
,
114
,
255
,
0
.3
);
}
.sign-timeout-btn
{
background
:
#FA5A49
;
box-shadow
:
2px
2px
20px
0px
rgba
(
34
,
114
,
255
,
0
.3
);
}
.appoint-btn
{
background
:
#2272FF
;
box-shadow
:
2px
2px
20px
0px
rgba
(
34
,
114
,
255
,
0
.3
);
}
}
}
}
.right
{
.right
{
width
:
100rpx
;
height
:
100rpx
;
.button
{
width
:
100rpx
;
width
:
100rpx
;
height
:
100rpx
;
height
:
100rpx
;
background
:
#12CF84
;
border-radius
:
100rpx
;
.button
{
width
:
100rpx
;
height
:
100rpx
;
background
:
#12CF84
;
border-radius
:
100rpx
;
}
}
}
}
}
}
}
}
// 页面公用css
// 页面公用css
.order-cell
{
.order-cell
{
height
:
48rpx
;
height
:
48rpx
;
font-size
:
26rpx
;
font-size
:
26rpx
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#333333
;
color
:
#333333
;
line-height
:
48rpx
;
line-height
:
48rpx
;
margin-bottom
:
30rpx
;
margin-bottom
:
30rpx
;
}
}
.between-cell
{
.between-cell
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
}
}
</
style
>
</
style
>
src/pages/order/index.vue
View file @
fc74282d
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</u-count-down>
</view>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem"
>
<view
class=
"right-btn"
@
click=
"viewOderItem
(index)
"
>
<text>
去预约
</text>
<text>
去预约
</text>
</view>
</view>
</view>
</view>
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</u-count-down>
</view>
</view>
<view
class=
"right-btn"
>
<view
class=
"right-btn"
@
click=
"viewOderItem(index)"
>
<text>
去签到
</text>
<text>
去签到
</text>
</view>
</view>
</view>
</view>
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
</scroll-view>
</scroll-view>
</swiper-item>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
v-if=
"orderList.length
<2
"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
v-if=
"orderList.length
=== 0
"
>
<view
class=
"page-box"
>
<view
class=
"page-box"
>
<view>
<view>
<view
class=
"centre"
>
<view
class=
"centre"
>
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</u-count-down>
</view>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem"
>
<view
class=
"right-btn"
@
click=
"viewOderItem
(index)
"
>
<text>
去完工
</text>
<text>
去完工
</text>
</view>
</view>
</view>
</view>
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</u-count-down>
</view>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem"
>
<view
class=
"right-btn"
@
click=
"viewOderItem
(index)
"
>
<text>
审核中
</text>
<text>
审核中
</text>
</view>
</view>
</view>
</view>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
<u-count-down
:timestamp=
"timestampDiff(res.currentOverTime)"
font-size=
"44"
color=
"#FF930D"
:ref=
"'uCountDown' + index"
@
change=
"timeChange(res.currentOverTime,index)"
>
</u-count-down>
</u-count-down>
</view>
</view>
<view
class=
"right-btn"
@
click=
"viewOderItem"
>
<view
class=
"right-btn"
@
click=
"viewOderItem
(index)
"
>
<text>
去处理
</text>
<text>
去处理
</text>
</view>
</view>
</view>
</view>
...
@@ -288,7 +288,7 @@
...
@@ -288,7 +288,7 @@
<view
>
<view
>
<u-icon
name=
"map"
size=
"32"
></u-icon>
<u-icon
name=
"map"
size=
"32"
></u-icon>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactAddress
}}
</text>
<text
style=
"margin-left: 8rpx;"
>
{{
res
.
contactAddress
}}
</text>
<text
style=
"margin-left: 200rpx; font-size:large;"
@
click=
"viewOderItem"
>
>
</text>
<text
style=
"margin-left: 200rpx; font-size:large;"
@
click=
"viewOderItem
(index)
"
>
>
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -546,27 +546,19 @@ export default {
...
@@ -546,27 +546,19 @@ export default {
console
.
log
(
"getOrderList"
,
res
.
data
)
console
.
log
(
"getOrderList"
,
res
.
data
)
if
(
res
.
data
)
{
if
(
res
.
data
)
{
self
.
orderList
=
res
.
data
.
list
;
self
.
orderList
=
res
.
data
.
list
;
// //测试使用
//测试使用
// self.orderList.forEach((item,index)=>{
self
.
orderList
.
forEach
((
item
,
index
)
=>
{
// if(index === 1){
if
(
index
===
1
){
// item.currentOverTime -= 10
item
.
currentOverTime
-=
10
// }
}
// })
})
self
.
total
=
res
.
data
.
total
;
self
.
total
=
res
.
data
.
total
;
}
}
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
}
});
});
// for (let i = 0; i
<
indexStatus
.
size
;
i
++
)
{
// let index = this.$u.random(0, this.dataList.length - 1);
// let data = JSON.parse(JSON.stringify(this.dataList[index]));
// data.id = this.$u.guid();
// this.orderList[idx].push(data);
// }
// this.loadStatus.splice(this.current, 1, 'loadmore');
},
},
// 获取订单数量
// 获取订单数量
getOrderCount
()
{
getOrderCount
()
{
...
@@ -612,7 +604,6 @@ export default {
...
@@ -612,7 +604,6 @@ export default {
},
},
// tab栏切换
// tab栏切换
change
(
index
)
{
change
(
index
)
{
console
.
log
(
"============"
,
index
)
this
.
swiperCurrent
=
index
;
this
.
swiperCurrent
=
index
;
this
.
getOrderList
(
index
);
this
.
getOrderList
(
index
);
},
},
...
@@ -623,11 +614,11 @@ export default {
...
@@ -623,11 +614,11 @@ export default {
this
.
$refs
.
tabs
.
setFinishCurrent
(
current
);
this
.
$refs
.
tabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
this
.
current
=
current
;
},
viewOderItem
()
{
// 跳转工单详情页面
},
viewOderItem
(
index
)
{
// 跳转工单详情页面
let
that
=
this
;
let
order
=
this
.
orderList
[
index
]
let
params
=
''
//`id=${e.id}&courseId=${e.courseId}&status=${e.status}`
console
.
log
(
"order"
,
order
)
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/order/orderItem?
${
params
}
`
url
:
'pages/order/detail?id='
+
order
.
orderId
})
})
}
}
}
}
...
...
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