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
35da037d
Commit
35da037d
authored
Apr 28, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/common/api/order.js
parents
d0315d90
ab1f0f76
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
126 additions
and
54 deletions
+126
-54
.env.dev.js
.env.dev.js
+2
-2
order.js
src/common/api/order.js
+10
-3
detail.vue
src/pages/order/detail.vue
+88
-29
feedback.vue
src/pages/order/feedback.vue
+20
-15
list.vue
src/pages/photo/list.vue
+6
-4
preview.vue
src/pages/photo/preview.vue
+0
-1
No files found.
.env.dev.js
View file @
35da037d
...
...
@@ -5,8 +5,8 @@ const UNI_APP = {
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl
:
{
//
apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl
:
'http://apidoc.banshouhui.com:3000/mock/31'
,
// mock端域名请求头
apiUrl
:
'http://192.168.1.22'
,
//java端域名请求头
//
apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
}
...
...
src/common/api/order.js
View file @
35da037d
...
...
@@ -22,7 +22,7 @@ let orderApiFun = function(vm){
/**
* 师傅预约
*/
let
workerAppointment
=
async
(
params
=
{}
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/'
+
vm
.
vuex_token
+
'/order/{orderId}'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
workerAppointment
=
async
(
params
=
{}
,
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
)
// 联系顾客时间更新接口,暂时没有
...
...
@@ -39,7 +39,7 @@ let orderApiFun = function(vm){
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
/* 预约+过程反馈 接口 */
let
traceAndAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
`/
${
orderId
}
`
,
params
)
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
)
...
...
@@ -53,7 +53,7 @@ let orderApiFun = function(vm){
/**
* 接单
*/
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
ge
t
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
);
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
pos
t
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
);
/**
* 抢单
...
...
@@ -90,6 +90,12 @@ let orderApiFun = function(vm){
*/
let
checkRejectable
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/'
+
vm
.
vuex_token
+
'/wokerOrder/checkRejectable'
,
params
);
/**
* 获取签到距离
*/
let
getSignDistance
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/'
+
vm
.
vuex_token
+
`/wokerOrder/sign/distance`
,
params
)
/**
* 获取订单的完工项目(配置+数据)
...
...
@@ -126,6 +132,7 @@ let orderApiFun = function(vm){
openTimerange
,
contactTime
,
checkRejectable
,
getSignDistance
,
getCompleteConfigAndData
,
getMeasure
,
saveCompleteData
...
...
src/pages/order/detail.vue
View file @
35da037d
...
...
@@ -67,7 +67,7 @@
<!--
</u-read-more>
-->
</view>
<view
class=
"card appoint-item"
v-show=
"showTimeSelect"
>
<appoint-time
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
<appoint-time
:dateList=
"dateList"
:timeList=
"timeList"
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
<view
class=
"card order-item record-item"
>
<view
class=
"top-item"
>
...
...
@@ -79,7 +79,7 @@
<view
class=
"order-cell between-cell"
>
<text>
{{
record
.
operationType
}}
</text>
<text>
{{
$u
.
timeFormat
(
record
.
operationDatetime
,
'yyyy-mm-dd hh:MM:ss'
)
}}
</text>
<text
style=
"color: red;"
>
{{
record
.
overTime
?
'
'
:
'超时 '
}}{{
record
.
exception
?
''
:
' 异常
'
}}
</text>
<text
style=
"color: red;"
>
{{
record
.
overTime
?
'
超时 '
:
''
}}{{
record
.
exception
?
' 异常'
:
'
'
}}
</text>
</view>
</view>
<view
v-if=
"orderRecords.length > showLenght"
>
...
...
@@ -100,7 +100,7 @@
<!-- 背景,内容,请求接口 根据状态不同改变
{{
operationDoing
[
order
.
orderStatus
].
background
}}
-->
<!-- 过程反馈 -->
<view
class=
"left"
>
<view
v-
show
=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
>
<view
v-
if
=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
>
<text>
过程反馈
</text>
</view>
</view>
...
...
@@ -110,7 +110,7 @@
<u-toast
ref=
"uToast"
/>
</view>
<view
v-if=
"showCenterBtn"
@
click=
"handleBtn"
class=
"button"
:class=
"['center-button-view', btnClass]"
>
<text>
{{
centerButtonText
}}
抢单
</text>
<text>
{{
centerButtonText
}}
</text>
<view
v-if=
"order.currentOverTime > 0"
class=
"time-view"
>
<text>
{{
order
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</text>
<u-count-down
...
...
@@ -144,6 +144,7 @@
import
appointTime
from
'@/components/appoint/appoint-time.vue'
import
takePhoto
from
'@/components/take/index.vue'
import
PopView
from
"@/components/popView/index.vue"
let
now
=
Date
.
now
()
export
default
{
components
:
{
appointTime
,
...
...
@@ -155,6 +156,26 @@
readMore
:
true
,
readMoreRecord
:
true
,
showLenght
:
5
,
dateList
:
[
{
day
:
now
,
timeRange
:
[]},
{
day
:
now
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
5
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
6
*
86400000
),
timeRange
:
[]},
],
timeList
:
[
{
"name"
:
"06:00-08:00"
,
"pkey"
:
"appointment_range_8"
},
{
"name"
:
"08:00-10:00"
,
"pkey"
:
"appointment_range_10"
},
{
"name"
:
"10:00-12:00"
,
"pkey"
:
"appointment_range_12"
},
{
"name"
:
"12:00-14:00"
,
"pkey"
:
"appointment_range_14"
},
{
"name"
:
"14:00-16:00"
,
"pkey"
:
"appointment_range_16"
},
{
"name"
:
"16:00-18:00"
,
"pkey"
:
"appointment_range_18"
},
{
"name"
:
"18:00-20:00"
,
"pkey"
:
"appointment_range_20"
},
{
"name"
:
"20:00-22:00"
,
"pkey"
:
"appointment_range_22"
},
{
"name"
:
"22:00-24:00"
,
"pkey"
:
"appointment_range_24"
}
],
background
:
{
backgroundColor
:
'none'
,
// 导航栏背景图
...
...
@@ -173,17 +194,20 @@
centerButtonText
:
''
,
orderRecords
:
[],
method
:
null
,
showCenterBtn
:
tru
e
,
showCenterBtn
:
fals
e
,
showTimeSelect
:
false
,
submitType
:
''
,
nextUrl
:
''
,
btnClass
:
'appoint-btn'
,
takeStatus
:
false
,
errorSignIn
:
false
,
scenePhoto
:
tru
e
,
scenePhoto
:
fals
e
,
isErrorSign
:
false
,
errorSignUrl
:
''
,
isAllowDianhuaAndDaohang
:
false
isAllowDianhuaAndDaohang
:
false
,
appointmentDatetimeRange
:
''
,
appointmentDatetime
:
''
,
signDistance
:
3000
}
},
onLoad
(
option
)
{
...
...
@@ -198,6 +222,7 @@
this
.
loadOrderDetail
()
this
.
loadOrderRecord
()
this
.
getLocation
()
this
.
getSignDistance
()
},
computed
:
{
phoneIcon
()
{
...
...
@@ -315,6 +340,15 @@
}
});
},
getSignDistance
(){
let
self
=
this
var
data
=
{}
self
.
$u
.
api
.
getSignDistance
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
self
.
signDistance
=
res
.
data
}
});
},
loadOrderRecord
()
{
let
self
=
this
var
param
=
{
...
...
@@ -322,32 +356,53 @@
};
self
.
$u
.
api
.
listOrderRecord
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
self
.
orderRecords
=
res
.
data
}
else
{
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
}
})
},
/**
* 点击下一周
* @param {Object} data
*/
weekChange
(
data
)
{
console
.
log
(
data
,
'week-data'
)
weekChange
(
data
){
// 点击下一周
console
.
log
(
data
,
'weekChange'
)
if
(
data
&&
data
.
time
)
{
let
num
=
data
.
num
let
time
=
data
.
time
if
(
num
==
0
)
{
this
.
dateList
=
[
{
day
:
time
,
timeRange
:
[]},
{
day
:
time
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
5
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
6
*
86400000
),
timeRange
:
[]},
]
}
else
{
this
.
dateList
=
[
{
day
:
time
,
timeRange
:
[]},
{
day
:
time
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
5
*
86400000
),
timeRange
:
[]},
]
}
}
},
/**
* 点击日期选择
* @param {Object} data
*/
dateChange
(
data
)
{
console
.
log
(
data
,
'week-data'
)
dateChange
(
data
){
// 点击日期选择
console
.
log
(
data
,
'dateChange'
)
let
self
=
this
self
.
appointmentDatetime
=
data
.
item
.
day
},
/**
* 时间段选择变化
* @param {Object} data
*/
timeChange
(
data
)
{
console
.
log
(
data
,
'week-data'
)
timeChange
(
data
){
// 时间段选择变化
console
.
log
(
data
,
'timeChange'
)
this
.
appointmentDatetimeRange
=
data
.
item
},
getCurrentBtn
()
{
// 根据工单状态确定按钮的显示
...
...
@@ -406,10 +461,14 @@
}
else
if
(
this
.
submitType
===
'orderGan'
){
// 抢单
data
.
orderId
=
this
.
order
.
orderId
}
else
if
(
this
.
submitType
===
'workerAppointment'
){
// 预约
data
.
appointmentDatetime
=
''
data
.
appointmentDatetimeRange
=
''
if
(
!
data
.
appointmentDatetime
||
!
data
.
appointmentDatetimeRange
){
this
.
commonToast
(
'请选择预约时间和时间段'
,
'waring'
)
data
.
appointmentDatetime
=
this
.
appointmentDatetime
data
.
appointmentDatetimeRange
=
this
.
appointmentDatetimeRange
.
pkey
if
(
!
data
.
appointmentDatetime
){
this
.
commonToast
(
'请选择预约日期'
,
'waring'
)
return
}
if
(
!
data
.
appointmentDatetimeRange
){
this
.
commonToast
(
'请选择预约时间段'
,
'waring'
)
return
}
}
else
if
(
this
.
submitType
===
'maintainWorkerCheckin'
)
{
// 签到
...
...
src/pages/order/feedback.vue
View file @
35da037d
...
...
@@ -116,10 +116,10 @@
type
:{
title
:
'问题类型'
,
},
appoint
:{
'报单'
:
'下次联系时间'
,
'改约'
:
'预约
时间'
,
}
},
appoint
:{
'报单'
:
'下次联系
时间'
,
'改约'
:
'预约时间'
,
},
config
:
null
,
options
:
[],
...
...
@@ -132,6 +132,7 @@
nextTraceDatetime
:
''
,
// 下次跟踪时间
remark
:
''
,
// 备注
},
appointTitle
:
"预约时间"
};
},
components
:{
...
...
@@ -159,12 +160,9 @@
return
true
},
appointTitle
()
{
return
this
.
feedback
.
appoint
[
this
.
trace
.
reasonType
]
},
},
async
onLoad
(
e
)
{
this
.
$u
.
vuex
(
'vuex_token'
,
'RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5'
);
//
this.$u.vuex('vuex_token', 'RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5');
this
.
orderId
=
1
this
.
categoryId
=
88
if
(
e
)
{
...
...
@@ -218,9 +216,23 @@
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
self
.
showRemark
=
true
self
.
appointTitle
=
'预约时间'
if
(
self
.
dateList
&&
self
.
timeList
)
{
self
.
timeList
.
map
((
item
,
index
)
=>
{
if
(
data
.
item
.
timeRange
.
indexOf
(
item
.
pkey
)
>
-
1
)
{
item
.
disabled
=
true
}
else
{
item
.
disabled
=
false
}
})
}
}
else
{
self
.
showRemark
=
false
self
.
trace
.
remark
=
''
self
.
appointTitle
=
'下次联系时间'
self
.
timeList
.
map
((
item
,
index
)
=>
{
item
.
disabled
=
false
})
}
}
},
...
...
@@ -265,12 +277,6 @@
changeType
(
key
)
{
this
.
trace
.
reason
=
key
},
/**
* 拒单
*/
// rejectOrder() {
// console.log("点击拒单")
// },
weekChange
(
data
){
// 点击下一周
console
.
log
(
data
,
'week-data'
)
...
...
@@ -302,7 +308,6 @@
},
dateChange
(
data
){
debugger
// 点击日期选择
console
.
log
(
data
,
'week-data'
)
let
self
=
this
...
...
src/pages/photo/list.vue
View file @
35da037d
...
...
@@ -14,14 +14,14 @@
<view
class=
"right-view-title"
>
拍照项有:
</view>
<template
v-for=
"(item,ikey) in rightList"
>
<view
class=
"rightItemView"
@
click=
"take(item,ikey)"
:key=
"ikey"
>
<view
:class=
"['rightContentView',
{'active':item.
i
mages[0]}]">
<view
:class=
"['rightContentView',
{'active':item.
orderI
mages[0]}]">
<text
class=
"ph-lst-item-index"
>
{{
ikey
+
1
}}
</text>
<text
class=
""
>
{{
item
.
name
}}
</text>
<image
class=
"ph-list-item-arrow"
src=
"/static/photo/arrow.png"
></image>
<!--
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
-->
</view>
<view
class=
"rightImageView"
v-if=
"item.
i
mages.length > 0"
>
<image
class=
"rightImage"
v-for=
"(image, index) in item.
i
mages.slice(0 , 10)"
:src=
"image"
<view
class=
"rightImageView"
v-if=
"item.
orderImages && item.orderI
mages.length > 0"
>
<image
class=
"rightImage"
v-for=
"(image, index) in item.
orderI
mages.slice(0 , 10)"
:src=
"image"
:key=
"index"
@
click
.
stop=
"handleClickImage(item, index)"
mode=
"aspectFill"
></image>
</view>
</view>
...
...
@@ -107,6 +107,7 @@
}
// this.getListData()
this
.
getListDataNew
()
this
.
getWatermark
()
},
...
...
@@ -219,7 +220,7 @@
this
.
dataList
=
result
if
(
result
.
length
>
0
)
{
var
item
=
result
[
0
]
globalData
.
photo
.
waterSetting
=
this
.
userWatermark
g
etApp
().
g
lobalData
.
photo
.
waterSetting
=
this
.
userWatermark
this
.
rightList
=
item
.
list
}
},
...
...
@@ -292,6 +293,7 @@
this
.
takeStatus
=
false
},
getWatermark
(){
var
data
=
{}
this
.
$u
.
api
.
getWatermark
(
data
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
...
...
src/pages/photo/preview.vue
View file @
35da037d
...
...
@@ -197,7 +197,6 @@
}
},
fail
(
e
)
{
debugger
}
})
}
...
...
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