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
e8dea083
Commit
e8dea083
authored
Apr 27, 2021
by
Morson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
# Conflicts: # src/common/api/order.js
parents
56ae2fac
c425d896
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
142 additions
and
56 deletions
+142
-56
order.js
src/common/api/order.js
+6
-0
index.vue
src/components/popView/index.vue
+5
-2
pages.json
src/pages.json
+5
-0
detail.vue
src/pages/order/detail.vue
+109
-47
feedback.vue
src/pages/order/feedback.vue
+1
-1
refuse.vue
src/pages/order/refuse.vue
+15
-5
sign-contract.vue
src/pages/settle/sign-contract.vue
+1
-1
No files found.
src/common/api/order.js
View file @
e8dea083
...
...
@@ -80,6 +80,11 @@ let orderApiFun = function(vm){
*/
let
openTimerange
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/appointment/timerange'
,
params
);
/**
* 联系时间接口
*/
let
contactTime
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/record/'
+
vm
.
vuex_token
+
'/contact/'
+
orderId
,
params
);
const
orderApi
=
{
listByRecommendOrder
,
listOrderCount
,
...
...
@@ -99,6 +104,7 @@ let orderApiFun = function(vm){
saveImage
,
getWatermark
,
openTimerange
,
contactTime
,
}
return
orderApi
}
...
...
src/components/popView/index.vue
View file @
e8dea083
...
...
@@ -7,9 +7,11 @@
<text>
{{
title
}}
</text>
</view>
<view
class=
"line-view"
/>
<view
v-if=
"count"
class=
"order-content"
>
<view
class=
"order-content"
>
<view
v-if=
"count"
>
你本月还有
<text
class=
"order-content-count"
>
{{
count
}}
</text>
次拒单机会
</view>
</view>
</view>
<view
class=
"order-pop-text"
>
<text>
{{
message
}}
</text>
</view>
...
...
@@ -94,6 +96,7 @@
}
.order-content
{
min-height
:
14rpx
;
text-align
:
center
;
color
:
#333333
;
font-size
:
32rpx
;
...
...
src/pages.json
View file @
e8dea083
...
...
@@ -369,6 +369,11 @@
"name"
:
"订单 - 拒单"
,
//模式名称
"path"
:
"pages/order/refuse"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"订单 - 过程反馈"
,
//模式名称
"path"
:
"pages/order/feedback"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
]
}
...
...
src/pages/order/detail.vue
View file @
e8dea083
...
...
@@ -23,7 +23,7 @@
<text>
客户信息:
</text>
<text>
{{
order
.
contactName
}}
</text>
</view>
<u-image
width=
"60rpx"
height=
"60rpx"
:src=
"phoneIcon"
></u-image>
<u-image
width=
"60rpx"
height=
"60rpx"
:src=
"phoneIcon"
@
click=
"phoneToCustomer(order.contactPhone)"
></u-image>
</view>
<view
class=
"order-cell"
>
<text>
联系方式:
</text>
...
...
@@ -34,7 +34,7 @@
<u-icon
name=
"map"
size=
"28"
></u-icon>
<text
class=
"address-txt"
>
{{
order
.
contactAddress
}}
</text>
</view>
<u-image
width=
"60rpx"
height=
"60rpx"
:src=
"navigationIcon"
></u-image>
<u-image
width=
"60rpx"
height=
"60rpx"
:src=
"navigationIcon"
@
click=
"openLocation"
></u-image>
</view>
</view>
<view
class=
"card order-item"
>
...
...
@@ -79,7 +79,7 @@
<!-- 过程反馈 -->
<view
class=
"left"
>
<view
v-show=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
>
过程反馈
<text>
过程反馈
</text>
</view>
</view>
<!--接单,抢单,已被抢, 预约 ,签到 ,去完工 timestampDiff(order.currentOverTime)>0 -->
...
...
@@ -153,7 +153,10 @@
btnClass
:
'appoint-btn'
,
takeStatus
:
false
,
errorSignIn
:
false
,
scenePhoto
:
true
scenePhoto
:
true
,
isErrorSign
:
false
,
errorSignUrl
:
''
,
isAllowDianhuaAndDaohang
:
false
}
},
onLoad
(
option
)
{
...
...
@@ -170,10 +173,22 @@
},
computed
:
{
phoneIcon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/dianhua-1@2x.png'
//self-support/icon/dianhua-0@2x.png
if
(
this
.
isAllowDianhuaAndDaohang
){
return
process
.
uniEnv
.
qn_base_url
+
'icon/dianhua-1@2x.png'
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/dianhua-0@2x.png'
}
},
navigationIcon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/daohang-1@2x.png'
//self-support/icon/daohang-0@2x.png
if
(
this
.
isAllowDianhuaAndDaohang
){
return
process
.
uniEnv
.
qn_base_url
+
'icon/daohang-1@2x.png'
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/daohang-0@2x.png'
}
},
centerButtonClass
()
{
let
btnClass
=
"appoint-btn"
...
...
@@ -181,6 +196,45 @@
}
},
methods
:
{
openLocation
(){
if
(
this
.
isAllowDianhuaAndDaohang
){
uni
.
getLocation
({
type
:
'gcj02'
,
//返回可以用于uni.openLocation的经纬度
success
:
function
(
res
)
{
const
latitude
=
res
.
latitude
;
const
longitude
=
res
.
longitude
;
uni
.
openLocation
({
latitude
:
latitude
,
longitude
:
longitude
,
success
:
function
()
{
console
.
log
(
'success'
);
}
});
}
});
}
},
phoneToCustomer
(
phone
){
// 联系客户
if
(
this
.
isAllowDianhuaAndDaohang
){
uni
.
makePhoneCall
({
phoneNumber
:
phone
,
//仅为示例
complete
()
{
}
});
this
.
contactTime
()
}
},
contactTime
()
{
let
self
=
this
var
data
=
{}
self
.
$u
.
api
.
contactTime
(
data
,
this
.
order
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
}
else
{
console
.
log
(
res
.
message
);
}
})
},
scenePhotoClick
()
{
// 跳转拍照小程序
uni
.
navigateTo
({
url
:
'pages/photo/list?orderId='
+
this
.
order
.
orderId
+
'&brandId='
+
this
.
order
.
lianbaoBrandId
+
'&brand='
+
this
.
order
.
brandName
...
...
@@ -196,18 +250,13 @@
this
.
takeStatus
=
false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if
(
img
){
// 拍照完成
this
.
$refs
.
uToast
.
show
({
title
:
'签到成功'
,
type
:
'success'
,
url
:
'pages/order/detail'
,
params
:
{
id
:
1
}
})
this
.
isErrorSign
=
true
this
.
errorSignUrl
=
img
this
.
handleBtn
()
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
'异常签到失败,请先按要求拍照'
,
type
:
'waning'
type
:
'wa
r
ning'
})
}
},
...
...
@@ -222,14 +271,8 @@
console
.
log
(
"==="
,
res
.
data
)
self
.
order
=
res
.
data
this
.
getCurrentBtn
()
this
.
visibale
=
true
// self.order.operationType = "accept"
// }else{
// self.order.operationType = "appointment"
// }
// self.method =self.operationDoing[self.order.operationType].action;
// // 根据工单的状态确定是否需要过程反馈
// self.allowFeedback = self.allowFeedbackStatus.indexOf(self.order.orderStatus)>0
if
(
self
.
order
.
isFirstOrder
){
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
}
...
...
@@ -238,7 +281,7 @@
loadOrderRecord
()
{
let
self
=
this
var
param
=
{
'orderId'
:
self
.
orderId
orderId
:
self
.
orderId
};
self
.
$u
.
api
.
listOrderRecord
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -248,9 +291,6 @@
}
})
},
rejectOrder
()
{
// 拒单
console
.
log
(
"点击拒单"
)
},
/**
* 点击下一周
* @param {Object} data
...
...
@@ -297,6 +337,7 @@
this
.
allowFeedback
=
true
this
.
showCenterBtn
=
true
this
.
showTimeSelect
=
true
this
.
isAllowDianhuaAndDaohang
=
true
this
.
submitType
=
"workerAppointment"
}
else
if
(
orderStatus
===
31
&&
this
.
order
.
appointmentDatetime
)
{
// 签到
...
...
@@ -310,36 +351,44 @@
// 完工
this
.
centerButton
=
"filish"
this
.
centerButtonText
=
"去完工"
this
.
submitType
=
"toFilish"
this
.
allowFeedback
=
true
this
.
showCenterBtn
=
true
this
.
scenePhoto
=
true
}
else
{}
},
handleBtn
()
{
if
(
this
.
centerButton
===
"filish"
){
this
.
filish
()
return
}
if
(
!
this
.
submitType
){
return
;
}
const
data
=
{}
// 不同请求类型传递不同数据
if
(
this
.
submitType
===
'maintainWorkerCheckin'
)
{
// 签到
// 检查见到距离是否符合
if
(
this
.
getDistance
(
this
.
order
.
contactAddressLatitud
,
this
.
order
.
contactAddressLongitud
)
>
3
){
this
.
$refs
.
uToast
.
show
({
title
:
'签到失败,请点击异常签到处理或联系客服'
,
type
:
'error'
})
return
}
data
.
remark
=
"123"
data
.
revert
=
true
}
else
if
(
this
.
submitType
===
'orderAccept'
){
// 接单
if
(
this
.
submitType
===
'orderAccept'
){
// 接单
data
.
orderId
=
this
.
order
.
orderId
}
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'
)
return
}
}
else
if
(
this
.
submitType
===
'maintainWorkerCheckin'
)
{
// 签到
// 检查见到距离是否符合
if
(
!
this
.
isErrorSign
){
if
(
this
.
getDistance
(
this
.
order
.
contactAddressLatitud
,
this
.
order
.
contactAddressLongitud
)
>
3
){
this
.
commonToast
(
'签到失败,请点击异常签到处理或联系客服'
,
'error'
)
return
}
}
data
.
exception
=
this
.
isErrorSign
data
.
coordinate
=
this
.
dataValue
?
this
.
dataValue
[
0
]
+
','
+
this
.
dataValue
[
1
]:
''
data
.
url
=
this
.
errorSignUrl
?
this
.
errorSignUrl
:
''
}
else
if
(
this
.
submitType
===
'toFilish'
){
// 去完工
this
.
filish
()
return
}
this
.
$u
.
api
[
this
.
submitType
](
data
,
this
.
order
.
orderId
).
then
(
res
=>
{
if
((
res
.
data
.
code
!==
undefined
&&
res
.
data
.
code
===
200
)
...
...
@@ -349,8 +398,7 @@
type
:
'success'
,
url
:
'pages/order/detail'
,
params
:
{
id
:
1
,
menu
:
2
id
:
this
.
order
.
orderId
}
})
}
else
{
...
...
@@ -363,6 +411,14 @@
}
})
},
commonToast
(
message
,
type
,
url
,
params
){
// 统一得toast
this
.
$refs
.
uToast
.
show
({
title
:
message
,
type
:
type
,
url
:
url
,
params
:
params
})
},
isGan
(){
this
.
centerButtonText
=
"已被抢"
this
.
submitType
=
""
...
...
@@ -380,6 +436,11 @@
url
:
'pages/order/complete?orderId='
+
this
.
order
.
orderId
})
},
rejectOrder
()
{
// 拒单
uni
.
navigateTo
({
url
:
'pages/order/refuse?orderId='
+
this
.
order
.
orderId
})
},
/**
* 获取当前位置的经纬度
*/
...
...
@@ -441,13 +502,14 @@
this
.
btnClass
=
'timeOut-btn'
self
.
$refs
[
'uCountDown'
].
seconds
+=
2
}
},
handleClick
(){
},
handleClick
(){
this
.
visibale
=
false
// 去完工
uni
.
navigateTo
({
url
:
'pages/photo/list'
})
}
}
}
};
</
script
>
...
...
src/pages/order/feedback.vue
View file @
e8dea083
...
...
@@ -257,7 +257,7 @@
height
:
100vh
;
overflow
:
auto
;
background-color
:
#F4F5F7
;
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
0%
,
#2272FF
10
0%
);
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
0%
,
#2272FF
5
0%
);
background-size
:
750rpx
600rpx
;
background-repeat
:
no-repeat
;
}
...
...
src/pages/order/refuse.vue
View file @
e8dea083
...
...
@@ -23,8 +23,8 @@
</view>
</view>
<view
class=
"bottm-btn-view"
>
<button
:loading=
"submiting"
:disabled=
"disabledSubmit"
class=
"btn
"
@
click=
"handleClickSubmit"
>
确定
</button>
<view
class=
"bott
o
m-btn-view"
>
<button
:loading=
"submiting"
:disabled=
"disabledSubmit"
class=
"btn
bottom-btn"
@
click=
"handleClickSubmit"
><text
class=
"button-text"
>
提交
</text>
</button>
</view>
<PopView
title=
"拒单提示"
message=
"确定“拒单”操作,将影响对您的派单频率,\n甚至进入黑名单,请谨慎操作"
:visible
.
sync=
"visibale"
:count=
"count"
@
click=
"handleClick"
buttonText=
"确定"
/>
...
...
@@ -76,10 +76,9 @@
if
(
this
.
count
>
0
)
{
this
.
visibale
=
true
}
else
{
let
message
=
'本月无拒单机会,请联系客服'
uni
.
showToast
({
icon
:
'none'
,
title
:
message
,
title
:
'本月无拒单机会,请联系客服'
,
})
}
},
...
...
@@ -218,10 +217,21 @@
margin-right
:
10rpx
;
color
:
#FA5A49
}
.bottm-btn-view
{
.bott
o
m-btn-view
{
width
:
100%
;
padding
:
0
80rpx
;
position
:
absolute
;
bottom
:
40rpx
;
.bottom-btn
{
height
:
104rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.button-text
{
font-size
:
32rpx
;
font-weight
:
bold
;
}
}
}
</
style
>
src/pages/settle/sign-contract.vue
View file @
e8dea083
...
...
@@ -470,7 +470,7 @@
}
.item
{
display
:
flex
;
padding
:
28rpx
3
0rpx
;
padding
:
28rpx
0rpx
;
width
:
100%
;
font-size
:
32rpx
;
color
:
#333
;
...
...
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