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
aac25a0a
Commit
aac25a0a
authored
May 15, 2021
by
Morson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除调试代码
修复拒单问题
parent
6d9a8b82
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
47 deletions
+13
-47
order.js
src/common/api/order.js
+1
-1
index.vue
src/components/order/index.vue
+0
-2
index.vue
src/pages/index/index.vue
+0
-5
order.vue
src/pages/index/order.vue
+0
-5
detail.vue
src/pages/order/detail.vue
+1
-14
refuse.vue
src/pages/order/refuse.vue
+11
-20
No files found.
src/common/api/order.js
View file @
aac25a0a
...
...
@@ -47,7 +47,7 @@ let orderApiFun = function(vm){
let
traceAndAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
`/`
+
orderId
,
params
)
/* 师傅拒单 */
let
rejectOrder
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
`/order/
${
orderId
}
/workerReject/V2`
,
params
)
let
rejectOrder
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
`/order/
${
orderId
}
/workerReject/V2`
,
params
,
formType
)
/**
...
...
src/components/order/index.vue
View file @
aac25a0a
...
...
@@ -216,7 +216,6 @@
}
},
created
()
{
console
.
log
(
'+++++++++++'
)
/*
orderStatus:
待接单 orderStatus<31 工单状态小于31
...
...
@@ -252,7 +251,6 @@
}
this
.
timeout
=
this
.
orderData
.
currentOverTime
<
new
Date
().
getTime
()
this
.
timestamp
=
Math
.
round
(
Math
.
abs
(
this
.
orderData
.
currentOverTime
-
new
Date
().
getTime
())
/
1000
)
console
.
log
(
'++++++'
,
this
.
timestamp
)
},
methods
:
{
handleClick
()
{
...
...
src/pages/index/index.vue
View file @
aac25a0a
...
...
@@ -186,11 +186,9 @@
this
.
initSettleInfo
();
},
handleClick
(
orderId
)
{
// 点击了cell
console
.
log
(
'点击了cell'
)
this
.
viewOderItem
(
orderId
)
},
handleAction
(
orderId
)
{
// 点击了按钮
console
.
log
(
'点击了按钮'
)
this
.
viewOderItem
(
orderId
)
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
...
...
@@ -233,7 +231,6 @@
});
},
loadOrderList
()
{
console
.
log
(
'-----------准备加载推荐列表-----------'
)
this
.
search
.
pageNumber
+=
1
let
self
=
this
;
// 加载订单列表
...
...
@@ -250,7 +247,6 @@
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
);
}
console
.
log
(
'this.orderlist;'
,
this
.
orderList
)
self
.
currentLoadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
&&
(
res
.
data
.
list
||
[]).
length
==
self
.
search
.
pageSize
?
'loadmore'
:
'nomore'
}
else
{
...
...
@@ -331,7 +327,6 @@
var
self
=
this
;
// 加载订单列表
self
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
if
(
res
.
data
)
{
var
count
=
0
for
(
var
i
in
res
.
data
)
{
...
...
src/pages/index/order.vue
View file @
aac25a0a
...
...
@@ -140,7 +140,6 @@
}
},
noMore
()
{
console
.
log
(
'nomore:'
,
this
.
orderList
.
length
==
0
&&
this
.
pageNumber
!=
0
)
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
},
noOrderCustomStyle
()
{
...
...
@@ -203,7 +202,6 @@
},
reachBottom
(
e
)
{
console
.
log
(
'-------底部-------'
,
this
.
loadStatus
)
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getOrderList
(
this
.
currentIndex
)
...
...
@@ -283,7 +281,6 @@
var
self
=
this
;
// 加载订单列表
self
.
$u
.
api
.
listOrderCount
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
if
(
res
.
data
)
{
self
.
list
.
forEach
(
item
=>
{
if
(
item
.
name
===
'待预约'
)
{
...
...
@@ -329,7 +326,6 @@
this
.
filish
(
item
)
return
}
console
.
log
(
'click cell'
)
this
.
viewOderItem
(
item
.
orderId
)
},
filish
(
item
){
...
...
@@ -343,7 +339,6 @@
})
},
handleAction
(
item
)
{
console
.
log
(
'click button'
)
if
(
item
.
orderStatus
===
86
||
item
.
orderStatus
===
88
){
this
.
filish
(
item
)
return
...
...
src/pages/order/detail.vue
View file @
aac25a0a
...
...
@@ -237,7 +237,6 @@
},
onLoad
(
option
)
{
// 生命周期函数--监听页面加载
console
.
log
(
"option"
,
option
)
if
(
option
&&
option
.
id
)
{
this
.
orderId
=
option
.
id
}
...
...
@@ -306,7 +305,6 @@
// }
// ,
// complete: function(res) {
// console.log('-------complete-----', res)
// if (res.errMsg.indexOf('auth') != -1) {
// uni.showModal({
// title: '提示',
...
...
@@ -348,13 +346,7 @@
let
self
=
this
var
data
=
{}
if
(
this
.
submitType
===
"workerAppointment"
){
self
.
$u
.
api
.
contactTime
(
data
,
this
.
order
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
}
else
{
console
.
log
(
res
.
message
);
}
})
self
.
$u
.
api
.
contactTime
(
data
,
this
.
order
.
orderId
)
}
},
handleClickRight
(
active
)
{
...
...
@@ -371,7 +363,6 @@
this
.
takeStatus
=
true
},
closeTake
(
img
)
{
console
.
log
(
"image"
,
img
)
this
.
takeStatus
=
false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if
(
img
){
// 拍照完成
...
...
@@ -444,7 +435,6 @@
},
weekChange
(
data
){
// 点击下一周
console
.
log
(
data
,
'week-data'
)
if
(
data
&&
data
.
time
)
{
let
num
=
data
.
num
let
time
=
data
.
time
...
...
@@ -486,7 +476,6 @@
},
dateChange
(
data
){
// 点击日期选择
console
.
log
(
data
,
'dateChange'
)
let
self
=
this
self
.
appointmentDatetime
=
data
.
item
.
day
self
.
dateItem
=
data
.
item
...
...
@@ -501,7 +490,6 @@
},
timeChange
(
data
){
// 时间段选择变化
console
.
log
(
data
,
'timeChange'
)
this
.
appointmentDatetimeRange
=
data
.
item
},
addressToCoordinate
(){
...
...
@@ -754,7 +742,6 @@
if
(
!
currentOverTime
){
return
0
}
console
.
log
(
'--------'
,
Math
.
round
(
Math
.
abs
(
this
.
order
.
currentOverTime
-
new
Date
().
getTime
())
/
1000
))
return
Math
.
round
(
Math
.
abs
(
this
.
order
.
currentOverTime
-
new
Date
().
getTime
())
/
1000
);
},
timeOutChange
(
currentOverTime
){
...
...
src/pages/order/refuse.vue
View file @
aac25a0a
...
...
@@ -50,7 +50,7 @@
rejectReason
:
''
,
remark
:
''
},
count
:
3
,
// 剩余次数
count
:
0
,
// 剩余次数
};
},
computed
:
{
...
...
@@ -62,15 +62,15 @@
PopView
},
onLoad
(
e
)
{
if
(
e
)
{
if
(
e
.
orderId
)
{
this
.
orderId
=
e
.
orderId
}
else
if
(
e
.
count
)
{
if
(
e
&&
e
.
orderId
)
{
this
.
orderId
=
e
.
orderId
if
(
e
.
count
)
{
this
.
count
=
e
.
count
}
else
{
this
.
getRejectCount
()
}
}
if
(
!
this
.
count
)
{
this
.
getRejectCount
()
}
else
{
this
.
$u
.
toast
(
"本月无拒单机会,请联系客服"
)
}
},
methods
:
{
...
...
@@ -116,18 +116,9 @@
let
res
=
await
self
.
$u
.
api
.
rejectOrder
(
self
.
formData
,
self
.
orderId
)
self
.
submiting
=
false
if
(
res
&&
res
.
code
==
200
)
{
let
data
=
res
.
data
if
(
data
.
code
==
200
)
{
uni
.
showToast
({
title
:
"拒单成功"
,
})
}
else
{
let
message
=
'本月无拒单机会,请联系客服'
uni
.
showToast
({
icon
:
'none'
,
title
:
message
,
})
}
uni
.
showToast
({
title
:
res
.
message
||
res
.
data
||
'拒单成功'
,
})
}
},
}
...
...
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