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
08393ac0
Commit
08393ac0
authored
Aug 23, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve: 前台-订单挂起/悬浮
parent
055289ff
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
186 additions
and
77 deletions
+186
-77
fiveOrders.vue
src/components/order/fiveOrders.vue
+28
-3
index.vue
src/components/order/index.vue
+112
-63
applyButton.vue
src/components/parts/applyButton.vue
+41
-9
index.vue
src/pages/index/index.vue
+4
-1
mine.vue
src/pages/index/mine.vue
+1
-1
No files found.
src/components/order/fiveOrders.vue
View file @
08393ac0
...
@@ -9,14 +9,20 @@
...
@@ -9,14 +9,20 @@
close-icon-color=
"#FFFFFF"
close-icon-color=
"#FFFFFF"
>
>
<view
class=
"pop-view"
>
<view
class=
"pop-view"
>
<view
class=
"head-view"
>
最近查看
<view
class=
"head-message"
>
最近查看或操作过的5条订单
</view
></view
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
<u-loading
mode=
"flower"
></u-loading>
</view>
</view>
<view
v-else
>
<view
class=
"content-view"
v-else
>
<view
v-for=
"item in orderList"
:key=
"item.orderId"
>
<view
v-for=
"item in orderList"
:key=
"item.orderId"
>
<OrderCell
<OrderCell
:orderData=
"item"
:orderData=
"item"
:location=
"[]"
:location=
"[]"
model=
"simple"
@
click=
"handleClickCell"
@
click=
"handleClickCell"
@
action=
"handleClickButton"
@
action=
"handleClickButton"
>
>
...
@@ -98,8 +104,23 @@ export default {
...
@@ -98,8 +104,23 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.pop-view
{
.pop-view
{
padding
:
30rpx
;
// padding: 30rpx;
height
:
800rpx
;
height
:
900rpx
;
display
:
flex
;
flex-direction
:
column
;
.head-view
{
padding
:
30rpx
30rpx
24rpx
30rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
color
:
#333333
;
border-bottom
:
2rpx
solid
#f4f5f7
;
.head-message
{
font-size
:
28rpx
;
color
:
#999999
;
font-weight
:
400
;
margin-top
:
10rpx
;
}
}
.loading-view
{
.loading-view
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
@@ -108,5 +129,9 @@ export default {
...
@@ -108,5 +129,9 @@ export default {
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
}
}
.content-view
{
height
:
100%
;
overflow
:
auto
;
}
}
}
</
style
>
</
style
>
src/components/order/index.vue
View file @
08393ac0
<
template
>
<
template
>
<view
class=
"order-view"
@
click=
"handleClickCell"
>
<view
<view
class=
"order-top-view"
>
:class=
"['order-view',
{ simple: isSimple }]"
@click="handleClickCell"
hover-class="u-hover-class"
>
<view
v-if=
"!isSimple"
class=
"order-top-view"
>
<view
class=
"left-view"
>
<view
class=
"left-view"
>
<view
:class=
"['tag-view',
{ active: active }]">
<view
:class=
"['tag-view',
{ active: active }]">
{{
orderData
.
orderServiceType
}}
{{
orderData
.
orderServiceType
}}
...
@@ -10,7 +14,13 @@
...
@@ -10,7 +14,13 @@
<view
class=
"right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
<view
class=
"right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
</view>
</view>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
:style=
"item.style"
>
<view
class=
"info-left-view"
>
<view
class=
"info-title"
>
<view
class=
"info-title"
>
<text>
{{
item
.
name
+
':'
}}
</text>
<text>
{{
item
.
name
+
':'
}}
</text>
</view>
</view>
...
@@ -18,7 +28,13 @@
...
@@ -18,7 +28,13 @@
<text
@
longpress=
"handleLongpress(key, orderData[key])"
>
{{
<text
@
longpress=
"handleLongpress(key, orderData[key])"
>
{{
orderData
[
key
]
orderData
[
key
]
}}
</text>
}}
</text>
<text
v-if=
"item.content"
>
{{
' / '
+
orderData
[
item
.
content
]
}}
</text>
<text
v-if=
"item.content"
>
{{
' / '
+
orderData
[
item
.
content
]
}}
</text>
</view>
</view>
<view
v-if=
"item.icon"
>
<u-icon
:name=
"item.icon"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"address-view"
>
<view
class=
"address-view"
>
...
@@ -35,8 +51,8 @@
...
@@ -35,8 +51,8 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
<template
v-if=
"!isSimple"
>
<view
class=
"reason-view"
v-if=
"showReason"
>
<view
class=
"reason-view"
v-if=
"showReason"
>
<view
class=
"reason-title"
><text>
未通过原因:
</text></view>
<view
class=
"reason-title"
><text>
未通过原因:
</text></view>
<view
class=
"reason-text"
<view
class=
"reason-text"
...
@@ -77,11 +93,15 @@
...
@@ -77,11 +93,15 @@
{{
orderText
}}
{{
orderText
}}
</u-button>
</u-button>
</view>
</view>
</
template
>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
import
uIcon
from
'../../uview-ui/components/u-icon/u-icon.vue'
import
stringMixin
from
'../createCom/stringMixin'
export
default
{
export
default
{
components
:
{
uIcon
},
props
:
{
props
:
{
orderData
:
{
orderData
:
{
type
:
Object
,
type
:
Object
,
...
@@ -125,6 +145,11 @@ export default {
...
@@ -125,6 +145,11 @@ export default {
return
[
116.3896
,
39.91917
]
// 纬度,经度
return
[
116.3896
,
39.91917
]
// 纬度,经度
},
},
},
},
// simple: 只显示订单号、联系人/电话、地址,点击cell相当于点击订单列表的按钮; normal: 显示全部信息
model
:
{
type
:
String
,
default
:
'normal'
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -137,6 +162,9 @@ export default {
...
@@ -137,6 +162,9 @@ export default {
// 按钮文字
// 按钮文字
return
this
.
typeTexts
[
this
.
orderType
]
return
this
.
typeTexts
[
this
.
orderType
]
},
},
isSimple
()
{
return
this
.
model
==
'simple'
},
buttonStyle
()
{
buttonStyle
()
{
// 按钮样式
// 按钮样式
/** orderType
/** orderType
...
@@ -176,7 +204,16 @@ export default {
...
@@ -176,7 +204,16 @@ export default {
return
[
4
,
5
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
return
[
4
,
5
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
},
},
infoTexts
()
{
infoTexts
()
{
return
{
return
this
.
isSimple
?
{
orderNumber
:
{
name
:
'工单编号'
,
style
:
'font-weight: 450'
,
icon
:
'arrow-right'
,
},
contactName
:
{
name
:
'客户信息'
,
content
:
'contactPhone'
},
}
:
{
orderNumber
:
{
name
:
'工单编号'
},
orderNumber
:
{
name
:
'工单编号'
},
partnerCompanyName
:
{
name
:
'合作厂商'
},
partnerCompanyName
:
{
name
:
'合作厂商'
},
contactName
:
{
name
:
'客户信息'
,
content
:
'contactPhone'
},
contactName
:
{
name
:
'客户信息'
,
content
:
'contactPhone'
},
...
@@ -252,6 +289,7 @@ export default {
...
@@ -252,6 +289,7 @@ export default {
},
},
showDistance
()
{
showDistance
()
{
return
(
return
(
!
this
.
isSimple
&&
this
.
orderType
==
0
&&
this
.
orderType
==
0
&&
this
.
location
.
length
>=
2
&&
this
.
location
.
length
>=
2
&&
(
this
.
orderData
.
contactAddressLatitud
||
(
this
.
orderData
.
contactAddressLatitud
||
...
@@ -459,12 +497,18 @@ export default {
...
@@ -459,12 +497,18 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.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
;
margin-bottom
:
20rpx
;
.hover-class
{
background-color
:
#dddddd
;
}
&
.simple
{
padding
:
0rpx
;
margin
:
30rpx
;
}
.order-top-view
{
.order-top-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -516,16 +560,21 @@ export default {
...
@@ -516,16 +560,21 @@ export default {
font-size
:
26rpx
;
font-size
:
26rpx
;
margin-top
:
18rpx
;
margin-top
:
18rpx
;
margin-bottom
:
18rpx
;
margin-bottom
:
18rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.info-left-view
{
display
:
flex
;
display
:
flex
;
align-items
:
flex-start
;
align-items
:
flex-start
;
.info-title
{
.info-title
{
flex-shrink
:
0
;
flex-shrink
:
0
;
align-items
:
center
;
}
}
.info-content
{
.info-content
{
word-break
:
break-all
;
word-break
:
break-all
;
}
}
}
}
}
.address-view
{
.address-view
{
display
:
flex
;
display
:
flex
;
...
...
src/components/parts/applyButton.vue
View file @
08393ac0
...
@@ -7,8 +7,21 @@
...
@@ -7,8 +7,21 @@
@
click
.
stop=
"handleClick"
@
click
.
stop=
"handleClick"
type=
"primary"
type=
"primary"
>
>
<u-icon
class=
"apply-icon"
:name=
"iconName"
></u-icon>
<view
class=
"button-view"
>
<!--
<image
:src=
"imageUrl"
class=
"image-icon"
v-if=
"isImage"
></image>
<u-icon
v-else
class=
"apply-icon"
:name=
"icon"
></u-icon>
-->
<!--
<u-icon
class=
"apply-icon"
name=
"plus"
></u-icon>
-->
<u-loading
mode=
"flower"
:show=
"loading"
></u-loading>
<image
v-if=
"isImage && !loading"
:src=
"imageUrl"
class=
"image-icon"
mode=
"widthFix"
></image>
<u-icon
v-else-if=
"!loading"
class=
"apply-icon"
:name=
"icon"
></u-icon>
<text
class=
"apply-text"
v-if=
"showText"
>
{{
text
}}
</text>
<text
class=
"apply-text"
v-if=
"showText"
>
{{
text
}}
</text>
</view>
</u-button>
</u-button>
</view>
</view>
</
template
>
</
template
>
...
@@ -25,7 +38,7 @@ export default {
...
@@ -25,7 +38,7 @@ export default {
type
:
String
,
type
:
String
,
default
:
'申请备件'
,
default
:
'申请备件'
,
},
},
icon
Name
:
{
icon
:
{
type
:
String
,
type
:
String
,
default
:
'plus'
,
default
:
'plus'
,
},
},
...
@@ -38,6 +51,10 @@ export default {
...
@@ -38,6 +51,10 @@ export default {
type
:
String
,
type
:
String
,
default
:
'normal'
,
default
:
'normal'
,
},
},
loading
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
computed
:
{
computed
:
{
typeWidth
()
{
typeWidth
()
{
...
@@ -46,6 +63,12 @@ export default {
...
@@ -46,6 +63,12 @@ export default {
expand
:
'220rpx'
,
expand
:
'220rpx'
,
}
}
},
},
imageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
+
this
.
icon
},
isImage
()
{
return
/
\.(
png|jpg|gif|jpeg|webp
)
$/
.
test
(
this
.
icon
)
},
clickedHidden
()
{
clickedHidden
()
{
return
this
.
clickedType
==
'hidden'
return
this
.
clickedType
==
'hidden'
},
},
...
@@ -100,6 +123,10 @@ export default {
...
@@ -100,6 +123,10 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.apply-button
{
.apply-button
{
.button-view
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
.apply-icon
{
.apply-icon
{
font-size
:
36rpx
;
font-size
:
36rpx
;
}
}
...
@@ -107,5 +134,10 @@ export default {
...
@@ -107,5 +134,10 @@ export default {
font-size
:
32rpx
;
font-size
:
32rpx
;
padding-left
:
10rpx
;
padding-left
:
10rpx
;
}
}
.image-icon
{
width
:
30rpx
;
height
:
34rpx
;
}
}
}
}
</
style
>
</
style
>
src/pages/index/index.vue
View file @
08393ac0
...
@@ -105,6 +105,9 @@
...
@@ -105,6 +105,9 @@
<view
class=
"fixed-button"
>
<view
class=
"fixed-button"
>
<ApplyButton
<ApplyButton
:type
.
sync=
"buttonType"
:type
.
sync=
"buttonType"
icon=
"dingdan-button.png"
text=
"最近查看"
:loading=
"!loadedOrder"
clickedType=
"hidden"
clickedType=
"hidden"
:show
.
sync=
"showApplyButton"
:show
.
sync=
"showApplyButton"
@
click=
"visible = true"
@
click=
"visible = true"
...
@@ -615,6 +618,6 @@ export default {
...
@@ -615,6 +618,6 @@ export default {
.fixed-button
{
.fixed-button
{
position
:
fixed
;
position
:
fixed
;
right
:
10rpx
;
right
:
10rpx
;
bottom
:
40
rpx
;
bottom
:
64
rpx
;
}
}
</
style
>
</
style
>
src/pages/index/mine.vue
View file @
08393ac0
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
pathName
:
'order/index'
,
pathName
:
'order/index'
,
title
:
'订单管理'
,
title
:
'订单管理'
,
value
:
''
,
value
:
''
,
icon
:
'
qianbao
.png'
,
icon
:
'
dingdanguanli
.png'
,
imageStyle
:
'width:34rpx;height:32rpx'
imageStyle
:
'width:34rpx;height:32rpx'
},{
},{
pathName
:
'wallet/index'
,
pathName
:
'wallet/index'
,
...
...
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