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
cf273f90
Commit
cf273f90
authored
May 31, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情页面的详情部分单独做成组件
parent
6d672f5d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
269 additions
and
248 deletions
+269
-248
detail.vue
src/components/order/detail.vue
+267
-229
detail.vue
src/pages/order/detail.vue
+2
-19
No files found.
src/components/order/detail.vue
View file @
cf273f90
...
@@ -20,7 +20,8 @@
...
@@ -20,7 +20,8 @@
<text>
客户信息:
</text>
<text>
客户信息:
</text>
<text>
{{
order
.
contactName
}}
</text>
<text>
{{
order
.
contactName
}}
</text>
</view>
</view>
<image
style=
"width: 84rpx;height: 56rpx;"
:src=
"phoneIcon"
@
click=
"phoneToCustomer(order.contactPhone)"
></image>
<image
style=
"width: 84rpx;height: 56rpx;"
:src=
"phoneIcon"
@
click=
"phoneToCustomer(order.contactPhone)"
>
</image>
</view>
</view>
<view
class=
"order-cell"
>
<view
class=
"order-cell"
>
<text>
联系方式:
</text>
<text>
联系方式:
</text>
...
@@ -31,10 +32,10 @@
...
@@ -31,10 +32,10 @@
<u-icon
name=
"map"
size=
"28"
></u-icon>
<u-icon
name=
"map"
size=
"28"
></u-icon>
<text
class=
"address-txt"
>
{{
formatAddress
}}
</text>
<text
class=
"address-txt"
>
{{
formatAddress
}}
</text>
</view>
</view>
<image
style=
"width: 84rpx;height: 56rpx;"
:src=
"navigationIcon"
@
click=
"openLocation(order.contactAddress)"
></image>
<image
style=
"width: 84rpx;height: 56rpx;"
:src=
"navigationIcon"
@
click=
"openLocation(order.contactAddress)"
></image>
</view>
</view>
<!--
<u-read-more
ref=
"uReadMore"
:show-height=
"40"
:shadowStyle=
"
{paddingTop: '0rpx',marginTop: '0rpx'}" close-text="查看更多" open-text="点击收起" toggle color="#2272FF" font-size="26"> -->
<view
v-if=
"readMore"
@
click=
"handleClick(false)"
class=
"read-more-toggle"
>
<view
v-if=
"readMore"
@
click=
"$emit('update:readMore', true)"
class=
"read-more-toggle"
>
<u-icon
name=
"arrow-down"
></u-icon>
<u-icon
name=
"arrow-down"
></u-icon>
<text
class=
"read-more-text"
>
查看更多
</text>
<text
class=
"read-more-text"
>
查看更多
</text>
</view>
</view>
...
@@ -52,7 +53,7 @@
...
@@ -52,7 +53,7 @@
<text
class=
"cell-title"
>
充电桩信息:
</text>
<text
class=
"cell-title"
>
充电桩信息:
</text>
<text>
{{
order
.
serviceContent
}}
</text>
<text>
{{
order
.
serviceContent
}}
</text>
</view>
</view>
<view
class=
"read-more-toggle"
@
click=
"$emit('update:readMore', true)"
>
<view
class=
"read-more-toggle"
@
click=
"handleClick(true)"
>
<u-icon
name=
"arrow-up"
></u-icon>
<u-icon
name=
"arrow-up"
></u-icon>
<text
class=
"read-more-text"
>
点击收起
</text>
<text
class=
"read-more-text"
>
点击收起
</text>
</view>
</view>
...
@@ -71,20 +72,18 @@
...
@@ -71,20 +72,18 @@
}
}
},
},
readMore
:
{
readMore
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{}
}
},
},
computed
:
{
computed
:
{
formatAddress
()
{
formatAddress
()
{
let
self
=
this
let
self
=
this
let
address
=
""
let
address
=
""
if
(
self
.
order
)
{
if
(
self
.
order
)
{
address
=
self
.
order
.
contactProvinceText
||
""
address
=
self
.
order
.
contactProvinceText
||
""
address
+=
self
.
order
.
contactCityText
||
""
address
+=
self
.
order
.
contactCityText
||
""
address
+=
self
.
order
.
contactCommunityText
||
""
address
+=
self
.
order
.
contactCommunityText
||
""
...
@@ -92,53 +91,68 @@
...
@@ -92,53 +91,68 @@
address
+=
self
.
order
.
contactAddress
||
""
address
+=
self
.
order
.
contactAddress
||
""
}
}
return
address
return
address
},
phoneIcon
()
{
//self-support/icon/dianhua-0@2x.png
if
(
this
.
isAllowDianhuaAndDaohang
)
{
return
process
.
uniEnv
.
qn_base_url
+
'dianhua.png'
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'dianhua-d.png'
}
}
},
},
navigationIcon
()
{
//self-support/icon/daohang-0@2x.png
if
(
this
.
isAllowDianhuaAndDaohang
)
{
return
process
.
uniEnv
.
qn_base_url
+
'daohang.png'
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'daohang-d.png'
}
},
},
methods
:
{
methods
:
{
openLocation
(
address
)
{
openLocation
(
address
)
{
if
(
this
.
isAllowDianhuaAndDaohang
){
if
(
this
.
isAllowDianhuaAndDaohang
)
{
const
latitude
=
this
.
order
.
contactAddressLatitud
//res.latitude;
const
latitude
=
this
.
order
.
contactAddressLatitud
//res.latitude;
const
longitude
=
this
.
order
.
contactAddressLongitud
//res.longitude;
const
longitude
=
this
.
order
.
contactAddressLongitud
//res.longitude;
uni
.
openLocation
({
uni
.
openLocation
({
latitude
:
Number
(
latitude
),
latitude
:
Number
(
latitude
),
longitude
:
Number
(
longitude
),
longitude
:
Number
(
longitude
),
success
:
function
()
{
success
:
function
()
{
console
.
log
(
'success'
);
console
.
log
(
'success'
);
}
}
});
});
}
}
},
},
phoneToCustomer
(
phone
)
{
// 联系客户
phoneToCustomer
(
phone
)
{
// 联系客户
if
(
this
.
isAllowDianhuaAndDaohang
){
if
(
this
.
isAllowDianhuaAndDaohang
)
{
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
phoneNumber
:
phone
,
//仅为示例
phoneNumber
:
phone
,
//仅为示例
complete
()
{
complete
()
{}
}
});
});
this
.
contactTime
()
this
.
contactTime
()
}
}
},
},
contactTime
()
{
contactTime
()
{
let
self
=
this
let
self
=
this
var
data
=
{}
var
data
=
{}
if
(
this
.
submitType
===
"workerAppointment"
){
if
(
this
.
submitType
===
"workerAppointment"
)
{
self
.
$u
.
api
.
contactTime
(
data
,
this
.
order
.
orderId
)
self
.
$u
.
api
.
contactTime
(
data
,
this
.
order
.
orderId
)
}
}
},
},
handleClick
(
val
)
{
this
.
$emit
(
'update:readMore'
,
val
)
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.card
{
.base-item
{
padding-bottom
:
6rpx
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
padding
:
30rpx
30rpx
0
30rpx
;
padding
:
30rpx
30rpx
0
30rpx
;
border-radius
:
6px
;
border-radius
:
6px
;
}
.base-item
{
padding-bottom
:
6rpx
;
.top-item
{
.top-item
{
display
:
flex
;
display
:
flex
;
...
@@ -198,9 +212,11 @@
...
@@ -198,9 +212,11 @@
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
.left-address
{
.left-address
{
display
:
flex
;
display
:
flex
;
align-items
:
flex-start
;
align-items
:
flex-start
;
.address-txt
{
.address-txt
{
line-height
:
30rpx
;
line-height
:
30rpx
;
margin-left
:
8rpx
;
margin-left
:
8rpx
;
...
@@ -226,6 +242,7 @@
...
@@ -226,6 +242,7 @@
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#333333
;
color
:
#333333
;
text-align
:
right
;
text-align
:
right
;
.line-view
{
.line-view
{
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
height
:
2rpx
;
height
:
2rpx
;
...
@@ -233,4 +250,25 @@
...
@@ -233,4 +250,25 @@
}
}
}
}
.order-cell
{
font-size
:
26rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
48rpx
;
margin-bottom
:
10rpx
;
}
.between-cell
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.display-cell
{
display
:
flex
;
}
.cell-title
{
text-align
:
left
;
flex-shrink
:
0
;
}
</
style
>
</
style
>
src/pages/order/detail.vue
View file @
cf273f90
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
</view>
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"card base-item"
>
<view
class=
"card base-item"
>
<Detail
:order=
"order"
></Detail>
<Detail
:order=
"order"
:readMore
.
sync=
"readMore"
></Detail>
</view>
</view>
<!-- 从我的页面进来显示计算信息 -->
<!-- 从我的页面进来显示计算信息 -->
<view
v-if=
"isFromMine"
class=
"settlement-view"
>
<view
v-if=
"isFromMine"
class=
"settlement-view"
>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<appoint-time
:dateList=
"dateList"
:timeList=
"timeList"
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
<appoint-time
:dateList=
"dateList"
:timeList=
"timeList"
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
<view
class=
"card record-item"
>
<view
class=
"card record-item"
>
<Record
:orderRecords=
"orderRecords"
:readMore
.
sync=
"readMore"
></Record>
<Record
:orderRecords=
"orderRecords"
></Record>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -207,23 +207,6 @@
...
@@ -207,23 +207,6 @@
this
.
closeLocationChange
()
this
.
closeLocationChange
()
},
},
computed
:
{
computed
:
{
phoneIcon
()
{
//self-support/icon/dianhua-0@2x.png
if
(
this
.
isAllowDianhuaAndDaohang
){
return
process
.
uniEnv
.
qn_base_url
+
'dianhua.png'
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'dianhua-d.png'
}
},
navigationIcon
()
{
//self-support/icon/daohang-0@2x.png
if
(
this
.
isAllowDianhuaAndDaohang
){
return
process
.
uniEnv
.
qn_base_url
+
'daohang.png'
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'daohang-d.png'
}
},
centerButtonClass
()
{
centerButtonClass
()
{
let
btnClass
=
"appoint-btn"
let
btnClass
=
"appoint-btn"
return
btnClass
return
btnClass
...
...
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