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
e63794f3
Commit
e63794f3
authored
Aug 24, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve: 前台-订单挂起/悬浮-保存记录优化、跳转
parent
6dc2a933
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
21 deletions
+54
-21
fiveOrders.vue
src/components/order/fiveOrders.vue
+34
-0
index.vue
src/components/order/index.vue
+20
-15
order.vue
src/pages/index/order.vue
+0
-3
list.vue
src/pages/mine/order/list.vue
+0
-3
No files found.
src/components/order/fiveOrders.vue
View file @
e63794f3
...
@@ -101,10 +101,44 @@ export default {
...
@@ -101,10 +101,44 @@ export default {
handleClickCell
(
item
,
type
,
showCountTime
)
{
handleClickCell
(
item
,
type
,
showCountTime
)
{
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'click'
,
item
,
type
,
showCountTime
)
this
.
$emit
(
'click'
,
item
,
type
,
showCountTime
)
// type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
//type类型
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
item
.
orderId
+
'&type='
+
type
+
'&showCountTime='
+
showCountTime
,
})
},
},
handleClickButton
(
item
,
type
)
{
handleClickButton
(
item
,
type
)
{
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'click'
,
item
,
type
,
showCountTime
)
this
.
$emit
(
'click'
,
item
,
type
,
showCountTime
)
// 去完工
uni
.
navigateTo
({
url
:
'pages/order/complete?orderId='
+
item
.
orderId
+
'&categoryId='
+
item
.
categoryId
+
'&orderServiceType='
+
item
.
orderServiceType
+
'&inGuaranteePeriod='
+
item
.
inGuaranteePeriod
+
'&partnerCompanyId='
+
item
.
partnerCompanyId
+
'&maintainStep='
+
item
.
maintainStep
+
'&orderStatus='
+
item
.
orderStatus
+
'&brandId='
+
item
.
lianbaoBrandId
+
'&auditResults='
+
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
).
join
()
:
''
),
})
},
},
},
},
}
}
...
...
src/components/order/index.vue
View file @
e63794f3
...
@@ -98,10 +98,7 @@
...
@@ -98,10 +98,7 @@
</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
,
...
@@ -405,7 +402,7 @@ export default {
...
@@ -405,7 +402,7 @@ export default {
this
.
type
,
this
.
type
,
this
.
showCountTime
?
'show'
:
''
this
.
showCountTime
?
'show'
:
''
)
)
this
.
storeOpara
tion
()
this
.
otherAc
tion
()
},
},
handleClickCell
()
{
handleClickCell
()
{
var
func
=
'click'
var
func
=
'click'
...
@@ -420,22 +417,30 @@ export default {
...
@@ -420,22 +417,30 @@ export default {
this
.
type
,
this
.
type
,
this
.
showCountTime
?
'show'
:
''
this
.
showCountTime
?
'show'
:
''
)
)
this
.
otherAction
()
},
// 如果是异常单告诉后台
// 更新最近5条查看记录
otherAction
()
{
this
.
exceptionRecord
()
this
.
storeOparation
()
this
.
storeOparation
()
},
},
exceptionRecord
()
{
// 如果是异常单告诉后台
if
(
this
.
type
==
'exception'
)
{
this
.
$u
.
api
.
workerDealWithError
(
item
.
orderId
).
then
(()
=>
{})
}
},
storeOparation
()
{
storeOparation
()
{
// 更新最近5条查看记录
if
(
!
this
.
isSimple
)
{
if
(
!
this
.
isSimple
)
{
var
array
=
[...
this
.
vuex_last_five_orders
]
||
[]
var
array
=
(
this
.
vuex_last_five_orders
||
[]).
filter
((
item
)
=>
{
var
i
=
0
// 如果记录中有该工单,删除
for
(
var
item
of
array
)
{
return
item
&&
item
.
orderId
!=
this
.
orderData
.
orderId
if
(
item
&&
item
.
orderId
==
this
.
orderData
.
orderId
)
{
})
// 需要替换,跳出for循环
break
}
i
++
}
array
[
i
]
=
this
.
orderData
// 用this.orderData替换或新增进this.vuex_last_five_orders
this
.
$u
.
vuex
(
'vuex_last_five_orders'
,
array
.
slice
(
-
5
))
array
.
unshift
(
this
.
orderData
)
this
.
$u
.
vuex
(
'vuex_last_five_orders'
,
array
.
slice
(
0
,
5
))
}
}
},
},
handleChange
(
timestamp
)
{
handleChange
(
timestamp
)
{
...
...
src/pages/index/order.vue
View file @
e63794f3
...
@@ -368,9 +368,6 @@ export default {
...
@@ -368,9 +368,6 @@ export default {
},
},
handleClickCellButton
(
item
,
type
)
{
handleClickCellButton
(
item
,
type
)
{
if
(
!
this
.
loaded
)
return
if
(
!
this
.
loaded
)
return
if
(
type
==
'exception'
)
{
this
.
$u
.
api
.
workerDealWithError
(
item
.
orderId
).
then
(()
=>
{})
}
// 去完工
// 去完工
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
url
:
...
...
src/pages/mine/order/list.vue
View file @
e63794f3
...
@@ -171,9 +171,6 @@ export default {
...
@@ -171,9 +171,6 @@ export default {
},
},
handleClickCellButton
(
item
,
type
)
{
handleClickCellButton
(
item
,
type
)
{
if
(
type
==
'exception'
)
{
this
.
$u
.
api
.
workerDealWithError
(
item
.
orderId
).
then
(()
=>
{})
}
// 去完工
// 去完工
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
url
:
...
...
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