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
fb65759c
Commit
fb65759c
authored
Apr 22, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
684d26d3
f9620873
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
411 additions
and
109 deletions
+411
-109
index.vue
src/components/order/index.vue
+175
-98
index.vue
src/pages/index/index.vue
+2
-6
detail.vue
src/pages/order/detail.vue
+234
-5
No files found.
src/components/order/index.vue
View file @
fb65759c
<
template
>
<
template
>
<view
class=
"order-cell"
>
<view
class=
"order-view"
@
click=
"handleClickCell"
>
<view
class=
"order-view"
@
click=
"handleClickCell"
>
<view
class=
"order-top-view"
>
<view
class=
"order-top-view"
>
<view
class=
"left-view"
>
<view
class=
"left-view"
>
<view
:class=
"['tag-view',
{'active': orderData.orderServiceType == '安装'}]">
<view
:class=
"['tag-view',
{'active': active}]">
{{
orderData
.
orderServiceType
}}
</view>
{{
orderData
.
orderServiceType
}}
</view>
<view
class=
"store-view"
>
{{
orderData
.
categoryName
}}
</view>
<view
class=
"store-view"
>
{{
orderData
.
categoryName
}}
</view>
</view>
</view>
<view
class=
"right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
<view
class=
"right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
...
@@ -15,26 +17,28 @@
...
@@ -15,26 +17,28 @@
</view>
</view>
<view
class=
"address-view"
>
<view
class=
"address-view"
>
<view
class=
"address-left-view"
>
<view
class=
"address-left-view"
>
<image
class=
"address-image"
:src=
"dizhiImage
"
></image>
<image
class=
"address-image"
:src=
"dizhiImage"
mode=
"widthFix
"
></image>
<text>
{{
orderData
.
contactAddress
}}
</text>
<text>
{{
orderData
.
contactAddress
}}
</text>
</view
class="address-right-view"
>
</view
class="address-right-view"
>
<view>
{{
getDistance
(
orderData
.
contactAddressLatitud
,
orderData
.
contactAddressLongitud
)
}}
km
</view>
<view>
{{
getDistance
(
orderData
.
contactAddressLatitud
,
orderData
.
contactAddressLongitud
)
}}
km
</view>
</view>
</view>
</view>
</view>
<u-divider
margin-top=
"16"
half-width=
"630"
border-color=
"#F4F5F7"
:use-slot=
"false"
>
<view
class=
"line-view"
></view>
</u-divider>
<view
class=
"bottom"
>
<view
class=
"bottom-view"
>
<view
class=
"left"
>
<view
class=
"bottom-left-view"
>
<view
class=
"tag"
>
剩
</view>
<view
:class=
"['bottom-tag-view',
{'will': orderData.currentWillOverTime}]">
{{
tagText
}}
</view>
<u-count-down
:timestamp=
"timestamp"
font-size=
"44"
color=
"#FF930D"
></u-count-down>
<u-count-down
:timestamp=
"orderData.currentWillOverTime || orderData.currentOverTime"
font-size=
"44"
color=
"#FF930D"
@
change=
"handleChange"
ref=
"order-count-down"
></u-count-down>
</view>
</view>
<u-button
class=
"right-btn"
@
click
.
stop=
"handleClick"
:custom-style=
"buttonStyle"
>
<u-button
class=
"right-btn"
@
click
.
stop=
"handleClick"
:custom-style=
"buttonStyle"
type=
"primary"
shape=
"circle"
>
{{
orderText
}}
{{
orderText
}}
</u-button>
</u-button>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -42,7 +46,8 @@
...
@@ -42,7 +46,8 @@
props
:
{
props
:
{
orderData
:
{
orderData
:
{
type
:
Object
,
type
:
Object
,
default
:
{
default
()
{
return
{
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
categoryName
:
'充电桩'
,
// 品类:充电桩
categoryName
:
'充电桩'
,
// 品类:充电桩
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
...
@@ -52,11 +57,20 @@
...
@@ -52,11 +57,20 @@
contactAddress
:
'湾街道荔枝花园D座125号'
,
// 详细地址
contactAddress
:
'湾街道荔枝花园D座125号'
,
// 详细地址
contactAddressLatitud
:
'116.3896'
,
// 联系人地址经度
contactAddressLatitud
:
'116.3896'
,
// 联系人地址经度
contactAddressLongitud
:
'39.91917'
,
// 联系人地址纬度
contactAddressLongitud
:
'39.91917'
,
// 联系人地址纬度
orderStatus
:
'0'
,
// 工单状态
orderStatus
:
0
,
// 工单状态
appointmentDatetime
:
''
// 预约时间
appointmentDatetime
:
''
,
// 预约时间
currentWillOverTime
:
10000
,
// 剩余时间
currentOverTime
:
0
,
// 超过时间
}
}
}
},
},
orderType
:
Number
// 0:待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6'已完工'
orderType
:
Number
,
// 0:待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6'已完工'
location
:
{
// 当前坐标
type
:
Array
,
default
()
{
return
[
116.3896
,
39.91917
]
// 经度,纬度
}
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -99,21 +113,21 @@
...
@@ -99,21 +113,21 @@
return
this
.
typeTexts
[
this
.
orderType
]
return
this
.
typeTexts
[
this
.
orderType
]
},
},
buttonStyle
()
{
// 按钮样式
buttonStyle
()
{
// 按钮样式
switch
(
this
.
s
tatus
)
{
switch
(
this
.
orderData
.
orderS
tatus
)
{
case
0
:
case
0
:
if
(
this
.
orderData
.
currentWillOverTime
)
{
if
(
this
.
orderData
.
currentWillOverTime
)
{
return
this
.
buttonStyle
[
0
]
return
this
.
buttonStyle
s
[
0
]
}
else
{
}
else
{
return
this
.
buttonStyle
[
1
]
return
this
.
buttonStyle
s
[
1
]
}
}
case
1
:
case
1
:
case
2
:
case
2
:
case
3
:
case
3
:
case
5
:
case
5
:
return
this
.
buttonStyle
[
0
]
return
this
.
buttonStyle
s
[
0
]
case
4
:
case
4
:
case
6
:
case
6
:
return
this
.
buttonStyle
[
2
]
return
this
.
buttonStyle
s
[
2
]
}
}
},
},
infoTexts
()
{
infoTexts
()
{
...
@@ -132,21 +146,30 @@
...
@@ -132,21 +146,30 @@
buttonStyles
()
{
buttonStyles
()
{
return
[{
return
[{
'background-color'
:
'#2272FF'
,
'background-color'
:
'#2272FF'
,
'color'
:
'#FFFFFF'
'color'
:
'#FFFFFF'
,
'font-size'
:
'32rpx'
},
{
},
{
'background-color'
:
'#FF930D'
,
'background-color'
:
'#FF930D'
,
'color'
:
'#FFFFFF'
'color'
:
'#FFFFFF'
,
'font-size'
:
'32rpx'
},
{
},
{
'background-color'
:
'transparent'
,
'background-color'
:
'transparent'
,
'color'
:
'#2272FF'
'color'
:
'#2272FF'
,
'font-size'
:
'32rpx'
}]
}]
},
},
buttonDisabled
()
{
buttonDisabled
()
{
return
this
.
orderData
.
orderStatus
==
4
||
this
.
orderData
.
orderStatus
==
6
return
this
.
orderData
.
orderStatus
==
4
||
this
.
orderData
.
orderStatus
==
6
},
},
dizhiImage
()
{
dizhiImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'dizhi.png'
return
process
.
uniEnv
.
qn_base_url
+
'shouye-dizhi.png'
},
active
()
{
return
this
.
orderData
.
orderServiceType
==
'安装'
},
},
tagText
()
{
return
this
.
orderData
.
currentWillOverTime
?
'剩'
:
'超'
}
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
...
@@ -156,8 +179,11 @@
...
@@ -156,8 +179,11 @@
actionClick
()
{
actionClick
()
{
this
.
$emit
(
'click'
)
this
.
$emit
(
'click'
)
},
},
handleChange
(
timestamp
)
{
this
.
$refs
[
'order-count-down'
].
seconds
+=
2
},
getDistance
(
Latitud
,
Longitud
)
{
getDistance
(
Latitud
,
Longitud
)
{
return
this
.
distance
(
Latitud
,
Longitud
,
this
.
dataValue
[
0
],
this
.
dataValue
[
1
])
return
this
.
distance
(
Latitud
,
Longitud
,
this
.
location
[
0
],
this
.
location
[
1
])
},
},
/**
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
* echo distance(116.3896,39.91917,116.3940,39.91726);
...
@@ -185,16 +211,21 @@
...
@@ -185,16 +211,21 @@
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.order-cell
{
padding-bottom
:
20rpx
;
.order-view
{
.order-view
{
width
:
100%
;
width
:
100%
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
30rpx
;
padding
:
30rpx
;
margin-bottom
:
20rpx
;
.order-top-view
{
.order-top-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
margin-bottom
:
20rpx
;
.left-view
{
.left-view
{
display
:
flex
;
display
:
flex
;
...
@@ -234,31 +265,77 @@
...
@@ -234,31 +265,77 @@
.content-view
{
.content-view
{
.info-view
{
.info-view
{
text-align
:
left
;
text-align
:
left
;
margin-top
:
20rpx
;
color
:
#333333
;
color
:
#333333
;
font-size
:
26rpx
;
font-size
:
26rpx
;
margin-top
:
12rpx
;
margin-bottom
:
12rpx
;
}
}
.address-view
{
.address-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
flex-start
;
justify-content
:
space-between
;
justify-content
:
space-between
;
color
:
#333333
;
color
:
#333333
;
font-size
:
24rpx
;
font-size
:
24rpx
;
margin-top
:
12rpx
;
.address-left-view
{
.address-left-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
align-items
:
flex-start
;
.address-image
{
.address-image
{
width
:
24
rpx
;
width
:
26
rpx
;
height
:
24
rpx
;
height
:
28
rpx
;
margin-right
:
8rpx
;
margin-right
:
8rpx
;
flex-shrink
:
0
;
margin-top
:
4rpx
;
}
}
}
}
.address-right-view
{}
.address-right-view
{}
}
}
}
}
.line-view
{
background-color
:
#F4F5F7
;
height
:
2rpx
;
width
:
100%
;
margin-top
:
30rpx
;
}
.bottom-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
30rpx
;
.bottom-left-view
{
display
:
flex
;
align-items
:
center
;
.bottom-tag-view
{
width
:
52rpx
;
height
:
52rpx
;
border-radius
:
26rpx
;
line-height
:
56rpx
;
color
:
#FFFFFF
;
font-size
:
26rpx
;
background-color
:
#FA5A49
;
margin-right
:
20rpx
;
&
.will
{
background-color
:
#FF930D
;
}
}
}
.right-btn
{
width
:
200rpx
;
height
:
80rpx
;
color
:
#FFFFFF
;
}
}
}
}
}
</
style
>
</
style
>
src/pages/index/index.vue
View file @
fb65759c
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<!--
<scroll-view
class=
"scroll-view"
scroll-y
style=
"height: 100%; width: 100%"
@
scrolltolower=
"reachBottom"
@
scroll=
"handleScroll"
refresher-enabled
:refresher-triggered=
"triggered"
@
refresherrefresh=
"onRefresh"
scroll-anchoring
@
refresherrestore=
"onRestore"
@
refresherpulling=
"triggered = true"
:show-scrollbar=
"false"
enable-back-to-top
>
-->
<view
style=
"width: 700rpx; height: 800rpx"
>
<view
style=
"width: 700rpx; height: 800rpx"
>
<!--
<view
class=
"title-view"
>
充电桩自营平台
</view>
-->
<!--
<view
class=
"title-view"
>
充电桩自营平台
</view>
-->
<u-navbar
<u-navbar
:is-back=
"false"
:is-back=
"false"
background=
"
{background: transparent}"
:border-bottom="false"
:is-fixed=
"false"
:is-fixed=
"false"
:background=
"
{ background: 'transparent' }"
:border-bottom="false"
>
>
<text
class=
"title-view"
>
充电桩自营平台
</text>
<text
class=
"title-view"
>
充电桩自营平台
</text>
</u-navbar>
</u-navbar>
...
...
src/pages/order/detail.vue
View file @
fb65759c
...
@@ -3,9 +3,70 @@
...
@@ -3,9 +3,70 @@
<u-navbar
back-icon-color=
"#FFFFFF"
:background=
"background"
:border-bottom=
"false"
></u-navbar>
<u-navbar
back-icon-color=
"#FFFFFF"
:background=
"background"
:border-bottom=
"false"
></u-navbar>
<view
class=
"header"
>
<view
class=
"header"
>
<view
class=
"title"
>
订单信息
</view>
<view
class=
"title"
>
订单信息
</view>
<view
class=
"button"
@
click=
"rejectOrder"
>
拒单
</view>
<view
v-show=
"allowRejection"
class=
"button"
@
click=
"rejectOrder"
>
拒单
</view>
</view>
<view
class=
"content"
>
<view
class=
"card base-item"
>
<view
class=
"top-item"
>
<view
class=
"left"
>
<view
class=
"tag"
>
{{
order
.
orderServiceType
}}
</view>
<text
class=
"title"
>
{{
order
.
categoryName
}}
</text>
</view>
<view
class=
"right"
>
分配单
</view>
</view>
<view
class=
"order-cell"
>
<text>
工单编号:
</text>
<text>
{{
order
.
orderNumber
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<view
class=
"left"
>
<text>
客户信息:
</text>
<text>
{{
order
.
contactName
}}
</text>
</view>
<u-image
width=
"60rpx"
height=
"60rpx"
:src=
"phoneIcon"
></u-image>
</view>
<view
class=
"order-cell"
>
<text>
联系方式:
</text>
<text>
{{
order
.
contactPhone
}}
</text>
</view>
<view
class=
"between-cell address-cell"
>
<view
class=
"left"
>
<u-icon
name=
"map"
size=
"28"
></u-icon>
<text
class=
"address-txt"
>
{{
order
.
contactAddress
}}
</text>
</view>
<u-image
width=
"60rpx"
height=
"60rpx"
:src=
"navigationIcon"
></u-image>
</view>
</view>
<view
class=
"card order-item"
>
<view
class=
"top-item"
>
<text
class=
"title"
>
订单内容
</text>
</view>
<view
class=
"order-cell between-cell"
>
<text>
品牌:
</text>
<text>
{{
order
.
brandName
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<text>
数量:
</text>
<text>
x
{{
order
.
orderProductCount
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<text>
信息:
</text>
<text>
{{
order
.
serviceContent
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<text>
备注:
</text>
<text>
{{
order
.
serviceContent
}}
</text>
</view>
</view>
<view
class=
"card order-item record-item"
>
<view
class=
"top-item"
>
<text
class=
"title"
>
履约记录
</text>
</view>
<view
class=
"order-cell between-cell"
>
<text>
接单时间:2021.04.21 16:40:35
</text>
</view>
</view>
</view>
</view>
<view
class=
"content"
></view>
</view>
</view>
</
template
>
</
template
>
...
@@ -20,10 +81,69 @@
...
@@ -20,10 +81,69 @@
// 还可以设置背景图size属性
// 还可以设置背景图size属性
// backgroundSize: 'cover',
// backgroundSize: 'cover',
// 渐变色
// 渐变色
}
},
orderId
:
null
,
order
:
{},
allowRejection
:
false
,
};
};
},
},
onLoad
(
e
)
{
if
(
e
&&
e
.
id
)
{
this
.
orderId
=
e
.
id
}
else
{
// 异常处理
}
this
.
loadOrderDetail
()
},
computed
:
{
phoneIcon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/dianhua-1@2x.png'
},
navigationIcon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/daohang-1@2x.png'
},
},
methods
:
{
methods
:
{
loadOrderDetail
()
{
let
self
=
this
let
timestamp
=
new
Date
().
getTime
();
let
order
=
{
brandName
:
'沃尔沃'
,
categoryId
:
1
,
categoryName
:
'充电桩'
,
contactAddress
:
'湾街道荔枝花园D座125号'
,
contactAddressLatitud
:
'116.3896'
,
contactAddressLongitud
:
'39.91917'
,
contactCity
:
4403
,
contactCityText
:
'深圳市'
,
contactCommunity
:
440306
,
contactCommunityText
:
'宝安区'
,
contactId
:
1
,
contactName
:
'郭小清'
,
contactPhone
:
'13631612077'
,
contactProvince
:
44
,
contactProvinceText
:
'广东省'
,
contactStreet
:
44030601
,
contactStreetText
:
'新安街道'
,
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
},
/**
/**
* 拒单
* 拒单
*/
*/
...
@@ -37,8 +157,12 @@
...
@@ -37,8 +157,12 @@
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.order-wrap
{
.order-wrap
{
width
:
750rpx
;
width
:
750rpx
;
height
:
600rpx
;
height
:
100vh
;
background
:
linear-gradient
(
360deg
,
#F4F5F7
0%
,
#2272FF
100%
);
overflow
:
auto
;
background-color
:
#F4F5F7
;
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
,
#2272FF
);
background-size
:
750rpx
600rpx
;
background-repeat
:
no-repeat
;
.header
{
.header
{
padding
:
12rpx
30rpx
40rpx
30rpx
;
padding
:
12rpx
30rpx
40rpx
30rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -63,6 +187,111 @@
...
@@ -63,6 +187,111 @@
}
}
.content
{
.content
{
height
:
2000rpx
;
height
:
2000rpx
;
.card
{
background-color
:
#FFFFFF
;
margin
:
0
30rpx
20rpx
30rpx
;
padding
:
30rpx
30rpx
0
30rpx
;
border-radius
:
6px
;
}
.base-item
{
padding-bottom
:
36rpx
;
.top-item
{
display
:
flex
;
justify-content
:
space-between
;
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
;
width
:
100rpx
;
height
:
40rpx
;
background
:
#F4F5F7
;
border-radius
:
22rpx
;
font-size
:
22rpx
;
font-weight
:
400
;
color
:
#333333
;
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
{
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
{
}
}
}
// 页面公用css
.order-cell
{
height
:
48rpx
;
font-size
:
26rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
48rpx
;
margin-bottom
:
30rpx
;
}
.between-cell
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
}
</
style
>
</
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