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
26629893
Commit
26629893
authored
Apr 22, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单cell完成
parent
f9620873
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
25 deletions
+80
-25
index.vue
src/components/order/index.vue
+69
-22
index.vue
src/pages/index/index.vue
+11
-3
No files found.
src/components/order/index.vue
View file @
26629893
...
...
@@ -12,25 +12,35 @@
</view>
<view
class=
"content-view"
>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
>
<text>
{{
item
}}
:
</text>
<text>
{{
item
+
':'
}}
</text>
<text>
{{
orderData
[
key
]
}}
</text>
</view>
<view
class=
"address-view"
>
<view
class=
"address-left-view"
>
<image
class=
"address-image"
:src=
"dizhiImage"
mode=
"widthFix"
></image>
<text>
{{
orderData
.
contactAddress
}}
</text>
</view
class="address-right-view"
>
<view>
{{
getDistance
(
orderData
.
contactAddressLatitud
,
orderData
.
contactAddressLongitud
)
}}
km
</view>
</view>
<view
v-if=
"showDistance"
>
{{
getDistance
(
orderData
.
contactAddressLatitud
,
orderData
.
contactAddressLongitud
)
}}
km
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"reason-view"
v-if=
"showReason"
><text>
未通过原因:
</text>
<text
class=
"reason-text"
>
{{
orderData
.
auditResults
.
remark
}}
</text>
</view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-left-view"
>
<view
:class=
"['bottom-tag-view',
{'will': orderData.currentWillOverTime}]">
{{
tagText
}}
</view>
<u-count-down
:timestamp=
"orderData.currentWillOverTime || orderData.currentOverTime"
font-size=
"44"
color=
"#FF930D"
@
change=
"handleChange"
ref=
"order-count-down"
></u-count-down>
<view>
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
:class=
"['bottom-tag-view',
{'will': orderData.currentWillOverTime}]">
{{
tagText
}}
</view>
<u-count-down
:timestamp=
"orderData.currentWillOverTime || orderData.currentOverTime"
font-size=
"44"
color=
"#FF930D"
@
change=
"handleChange"
ref=
"order-count-down"
></u-count-down>
</view>
<view
v-else-if=
"showTime"
>
<text>
{{
timeTitle
}}
</text>
<text>
{{
timeText
}}
</text>
</view>
</view>
<u-button
class=
"right-btn"
@
click
.
stop=
"handleClick"
:custom-style=
"buttonStyle"
type=
"primary"
shape=
"circle"
>
...
...
@@ -39,6 +49,7 @@
</view>
</view>
</view>
</view>
</
template
>
<
script
>
...
...
@@ -61,6 +72,10 @@
appointmentDatetime
:
''
,
// 预约时间
currentWillOverTime
:
10000
,
// 剩余时间
currentOverTime
:
0
,
// 超过时间
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
auditResults
:
{},
// 审核结果
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
}
}
},
...
...
@@ -113,9 +128,9 @@
return
this
.
typeTexts
[
this
.
orderType
]
},
buttonStyle
()
{
// 按钮样式
switch
(
this
.
order
Data
.
orderStatus
)
{
switch
(
this
.
order
Type
)
{
case
0
:
if
(
this
.
orderData
.
currentWillOverTime
)
{
if
(
this
.
orderData
.
orderBusinessType
!=
'R'
)
{
return
this
.
buttonStyles
[
0
]
}
else
{
return
this
.
buttonStyles
[
1
]
...
...
@@ -130,6 +145,13 @@
return
this
.
buttonStyles
[
2
]
}
},
showCountTime
()
{
return
[
1
,
2
,
3
].
indexOf
(
this
.
orderType
)
!=
-
1
||
(
this
.
orderType
==
0
&&
this
.
orderData
.
orderBusinessType
!=
'R'
)
},
showTime
()
{
return
[
4
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
},
infoTexts
()
{
return
{
'orderNumber'
:
'工单编号'
,
...
...
@@ -141,21 +163,27 @@
return
[
this
.
type0Text
,
'去预约'
,
'去签到'
,
'去完工'
,
'审核中'
,
'去处理'
,
'已完工'
]
},
type0Text
()
{
return
this
.
orderData
.
currentWillOverTime
?
'接单'
:
'抢单'
return
this
.
orderData
.
orderBusinessType
!=
'R'
?
'接单'
:
'抢单'
},
buttonStyles
()
{
return
[{
'background-color'
:
'#2272FF'
,
'color'
:
'#FFFFFF'
,
'font-size'
:
'32rpx'
'font-size'
:
'32rpx'
,
'height'
:
'80rpx'
,
'width'
:
'200rpx'
},
{
'background-color'
:
'#FF930D'
,
'color'
:
'#FFFFFF'
,
'font-size'
:
'32rpx'
'font-size'
:
'32rpx'
,
'height'
:
'80rpx'
,
'width'
:
'200rpx'
},
{
'background-color'
:
'transparent'
,
'color'
:
'#2272FF'
,
'font-size'
:
'32rpx'
'font-size'
:
'32rpx'
,
'height'
:
'32rpx'
,
'width'
:
'100rpx'
}]
},
buttonDisabled
()
{
...
...
@@ -169,18 +197,30 @@
},
tagText
()
{
return
this
.
orderData
.
currentWillOverTime
?
'剩'
:
'超'
},
timeText
()
{
return
this
.
orderType
==
4
?
this
.
orderData
.
submissionTime
:
this
.
orderData
.
auditDatetime
},
timeTitle
()
{
return
this
.
orderType
==
4
?
'提交时间:'
:
'审核时间:'
},
showReason
()
{
return
this
.
orderType
==
5
},
showDistance
()
{
return
this
.
orderType
==
0
}
},
methods
:
{
handleClick
()
{
if
(
buttonDisabled
)
return
if
(
this
.
buttonDisabled
)
return
this
.
$emit
(
'action'
)
},
actionClick
()
{
handleClickCell
()
{
this
.
$emit
(
'click'
)
},
handleChange
(
timestamp
)
{
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
if
(
this
.
orderData
.
currentOverTime
)
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
},
getDistance
(
Latitud
,
Longitud
)
{
return
this
.
distance
(
Latitud
,
Longitud
,
this
.
location
[
0
],
this
.
location
[
1
])
...
...
@@ -304,6 +344,17 @@
margin-top
:
30rpx
;
}
.reason-view
{
text-align
:
left
;
margin-top
:
30rpx
;
font-size
:
26rpx
;
color
:
#666666
;
.reason-text
{
color
:
#FA5A49
;
}
}
.bottom-view
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -330,11 +381,7 @@
}
}
.right-btn
{
width
:
200rpx
;
height
:
80rpx
;
color
:
#FFFFFF
;
}
.right-btn
{}
}
}
}
...
...
src/pages/index/index.vue
View file @
26629893
...
...
@@ -72,7 +72,7 @@
class=
"order-item-view"
>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<OrderCell
:orderData=
"item"
>
</OrderCell>
<OrderCell
:orderData=
"item"
:orderType=
"0"
:location=
"location"
@
click=
"handleClick"
@
action=
"handleAction"
>
</OrderCell>
</view>
<u-loadmore
:status=
"currentLoadStatus"
...
...
@@ -106,7 +106,8 @@ export default {
data
()
{
return
{
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered
:
false
,
triggered
:
false
,
location
:
[
116.3896
,
39.91917
],
// 经纬度
// list: [
// {
// image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
...
...
@@ -179,7 +180,14 @@ export default {
this
.
loadOrderList
();
}
},
methods
:
{
methods
:
{
handleClick
()
{
// 点击了cell
console
.
log
(
'点击了cell'
)
},
handleAction
()
{
// 点击了按钮
console
.
log
(
'点击了按钮'
)
},
async
initSettleInfo
()
{
let
self
=
this
;
if
(
self
.
status
==
7
)
return
;
...
...
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