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
21477a12
Commit
21477a12
authored
Apr 26, 2021
by
Morson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接拒单功能
parent
0a83b361
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
35 deletions
+116
-35
.env.test.js
.env.test.js
+1
-2
order.js
src/common/api/order.js
+7
-2
appoint-time.vue
src/components/appoint/appoint-time.vue
+24
-16
pages.json
src/pages.json
+2
-2
feedback.vue
src/pages/order/feedback.vue
+22
-7
refuse.vue
src/pages/order/refuse.vue
+60
-6
No files found.
.env.test.js
View file @
21477a12
...
...
@@ -5,8 +5,7 @@ const UNI_APP = {
banshou
:
'https://m.test.ibanshou.cn'
,
//扳手app
},
systemUrl
:
{
// apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头
apiUrl
:
'http://apidoc.banshouhui.com:3000/mock/31'
,
// mock端域名请求头
apiUrl
:
'https://system.dev.banshouhui.com'
,
//java端域名请求头
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
}
...
...
src/common/api/order.js
View file @
21477a12
...
...
@@ -37,7 +37,11 @@ let orderApiFun = function(vm){
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rst/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
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/workerReject/V2'
,
params
)
/**
* 查询工单操作记录列表接口
...
...
@@ -68,7 +72,8 @@ let orderApiFun = function(vm){
orderGan
,
maintainWorkerCheckin
,
feedbackConfig
,
traceAndAppointment
traceAndAppointment
,
rejectOrder
}
return
orderApi
}
...
...
src/components/appoint/appoint-time.vue
View file @
21477a12
<!-- 预约时间 -->
<
template
>
<view
:class=
"
{'con-box':titleShow}">
<view
class=
"title"
v-if=
"titleShow"
>
{{
'预约时间'
}}
</view>
<view
class=
"title"
v-if=
"titleShow"
>
{{
'预约时间'
}}
</view>
<view
class=
"u-m-t-40"
>
<view
class=
"appoint-box"
>
<view
class=
"select-date"
>
...
...
@@ -24,11 +24,11 @@
<view
class=
"select-time u-p-t-50"
>
<view
class=
"u-flex u-row-between"
>
<view
class=
"txt"
>
选择时间
</view>
<view
class=
"txt active"
>
{{
timeList
[
currentTime
]
}}
</view>
<view
class=
"txt active"
>
{{
currentTimeTxt
}}
</view>
</view>
<view
class=
"u-p-t-30 u-flex u-flex-wrap time-list"
>
<view
@
click=
"timeChange(item,index,timeList)"
:class=
"
{'time-item':true,'active':
index===currentTime
}" v-for="(item,index) in timeList"
:class=
"
{'time-item':true,'active':
(currentTime
&&
index===currentTime)
}" v-for="(item,index) in timeList"
:key="index">
<text
class=
"time"
>
{{
item
}}
</text>
</view>
...
...
@@ -51,31 +51,39 @@
data
()
{
return
{
currentDay
:
0
,
currentTime
:
0
,
currentTime
:
null
,
dateList
:
[{
weekDay
:
'周三'
,
day
:
'21'
day
:
'21'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
四
'
,
day
:
'2
2'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
五
'
,
day
:
'2
3'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
六
'
,
day
:
'2
4'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
日
'
,
day
:
'2
5'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
一
'
,
day
:
'2
6'
,
},
],
timeList
:
[
'06:00-08:00'
,
'08:00-10:00'
,
'10:00-12:00'
,
'12:00-14:00'
,
'14:00-16:00'
,
'16:00-18:00'
,
'18:00-20:00'
,
'20:00-22:00'
,
'22:00-24:00'
]
]
,
}
},
computed
:
{
currentTimeTxt
()
{
if
(
this
.
currentTime
!=
null
)
{
return
this
.
timeList
[
this
.
currentTime
]
}
return
''
},
},
methods
:
{
getDateList
()
{
// 获取日期
...
...
src/pages.json
View file @
21477a12
...
...
@@ -365,8 +365,8 @@
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"订单 -
过程反馈
"
,
//模式名称
"path"
:
"pages/order/
feedback
"
,
//启动页面,必选
"name"
:
"订单 -
拒单
"
,
//模式名称
"path"
:
"pages/order/
refuse
"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
]
...
...
src/pages/order/feedback.vue
View file @
21477a12
...
...
@@ -62,7 +62,7 @@
<appoint-time
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
<view
class=
"u-m-60"
>
<button
class=
"btn"
@
click=
"submitF
ro
m"
:loading=
"submiting"
:disabled=
"disabledSubmit"
>
确定
</button>
<button
class=
"btn"
@
click=
"submitF
or
m"
:loading=
"submiting"
:disabled=
"disabledSubmit"
>
确定
</button>
</view>
</view>
</
template
>
...
...
@@ -89,7 +89,8 @@
title
:
'问题类型'
,
},
appoint
:{
title
:
'预约时间'
,
'报单'
:
'下次联系时间'
,
'改约'
:
'预约时间'
,
}
},
config
:
null
,
...
...
@@ -117,11 +118,14 @@
disabledSubmit
()
{
let
self
=
this
debugger
if
(
self
.
trace
.
reasonType
&&
(
self
.
trace
.
reasonType
==
'报备'
||
self
.
trace
.
reasonType
==
'改约'
)){
if
(
self
.
trace
.
reasonType
&&
self
.
trace
.
reasonType
==
'报备'
){
if
(
self
.
trace
.
reasonRelegation
&&
self
.
trace
.
reason
&&
self
.
trace
.
nextTraceDatetime
&&
self
.
trace
.
appointmentDatetimeRange
)
{
return
false
}
}
else
if
(
self
.
trace
.
reasonType
&&
self
.
trace
.
reasonType
==
'改约'
)
{
if
(
self
.
trace
.
reasonRelegation
&&
self
.
trace
.
reason
&&
self
.
trace
.
appointmentDatetimeRange
)
{
&&
self
.
trace
.
appointmentDatetime
&&
self
.
trace
.
appointmentDatetime
Range
)
{
return
false
}
}
...
...
@@ -212,12 +216,23 @@
dateChange
(
data
){
// 点击日期选择
console
.
log
(
data
,
'week-data'
)
let
self
=
this
if
(
self
.
trace
.
reasonType
==
'报备'
)
{
self
.
trace
.
appointmentDatetime
=
null
self
.
trace
.
nextTraceDatetime
=
data
.
item
.
day
}
else
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
self
.
trace
.
appointmentDatetime
=
data
.
item
.
day
self
.
trace
.
nextTraceDatetime
=
null
}
},
timeChange
(
data
){
// 时间段选择变化
console
.
log
(
data
,
'week-data'
)
this
.
trace
.
appointmentDatetimeRange
=
data
.
item
},
async
submitF
ro
m
()
{
async
submitF
or
m
()
{
let
self
=
this
self
.
orderId
=
666
if
(
!
self
.
orderId
)
{
...
...
src/pages/order/refuse.vue
View file @
21477a12
...
...
@@ -7,19 +7,24 @@
<view
class=
"con-box"
>
<view
class=
"tit u-m-b-40 u-flex"
><text
class=
"txt label"
>
※
</text>
{{
refuse
.
title
}}
</view>
<view
class=
"u-flex u-flex-wrap"
>
<view
:class=
"
{'txt-item':true,'active':true}" v-for="(txt,index) in refuse.list" :key="index">
<view
:class=
"
{
'txt-item':true,
'active': (formData.rejectReason == txt)}"
v-for="(txt,index) in refuse.list"
:key="index" @click="changeReason(txt)">
<text
class=
"txt"
>
{{
txt
}}
</text>
</view>
</view>
</view>
<view
class=
"con-box"
>
<view
class=
"tit u-m-b-40"
>
补充说明
</view>
<u-input
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
<u-input
v-model=
"formData.remark"
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
</view>
</view>
<view
class=
"u-m-60"
>
<button
class=
"btn
"
>
确定
</button>
<button
:loading=
"submiting"
:disabled=
"disabledSubmit"
class=
"btn"
@
click=
"submitForm
"
>
确定
</button>
</view>
</view>
</
template
>
...
...
@@ -28,18 +33,57 @@
export
default
{
data
()
{
return
{
orderId
:
''
,
submiting
:
false
,
background
:
{
backgroundColor
:
'none'
,
},
refuse
:{
title
:
'
问题归属
'
,
title
:
'
拒单原因
'
,
list
:[
'时间不匹配'
,
'技术不匹配'
,
'价格过低'
,
'距离太远'
,
'其他'
],
},
formData
:
{
rejectReason
:
''
,
remark
:
''
},
};
},
computed
:
{
disabledSubmit
()
{
return
!
this
.
formData
.
rejectReason
}
},
components
:{},
onLoad
(
e
)
{
this
.
orderId
=
111
if
(
e
&&
e
.
orderId
)
{
this
.
orderId
=
e
.
orderId
}
},
methods
:
{
changeReason
(
reason
)
{
this
.
formData
.
rejectReason
=
reason
},
async
submitForm
()
{
let
self
=
this
self
.
submiting
=
true
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
,
})
}
}
},
}
}
</
script
>
...
...
@@ -65,7 +109,7 @@
background-color
:
#fff
;
}
.con-box
{
padding
:
30rpx
30rpx
30rpx
2
0rpx
;
padding
:
3
0rpx
;
// border-radius: 12rpx;
background-color
:
#FFFFFF
;
.tit
{
...
...
@@ -99,6 +143,11 @@
line-height
:
26rpx
;
color
:
#333
;
}
.label
{
font-size
:
24rpx
;
line-height
:
40rpx
;
color
:
#FA5A49
}
.textarea
{
/
deep
/
.u-input
{
...
...
@@ -121,8 +170,13 @@
&
:
:
after
{
content
:
''
;
height
:
0
;
border
:
none
;
}
}
button
[
disabled
]
:not
([
type
])
{
background
:
#D1D4D4
;
color
:
#FFFFFF
;
}
.width-320
{
width
:
320rpx
;
}
...
...
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