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
647e391c
Commit
647e391c
authored
Apr 29, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
ca27b067
ef79a171
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
475 additions
and
1712 deletions
+475
-1712
App.vue
src/App.vue
+2
-1
order.js
src/common/api/order.js
+26
-45
appoint-time.vue
src/components/appoint/appoint-time.vue
+4
-4
pages.json
src/pages.json
+0
-6
detail.vue
src/pages/order/detail.vue
+6
-4
feedback.vue
src/pages/order/feedback.vue
+437
-432
base copy.vue
src/pages/settle/base copy.vue
+0
-647
city.vue
src/pages/settle/city.vue
+0
-43
file-upload.vue
src/pages/settle/file-upload.vue
+0
-244
index copy.vue
src/pages/settle/index copy.vue
+0
-286
No files found.
src/App.vue
View file @
647e391c
...
@@ -159,7 +159,8 @@ export default {
...
@@ -159,7 +159,8 @@ export default {
setUserData
(
userInfo
)
{
setUserData
(
userInfo
)
{
if
(
userInfo
&&
userInfo
.
token
)
{
if
(
userInfo
&&
userInfo
.
token
)
{
// 如果已经登录则直接获取相关信息
// 如果已经登录则直接获取相关信息
this
.
$u
.
vuex
(
'vuex_token'
,
userInfo
.
token
);
// RTOKENf22df8e7b9db396f560e8f61bebceea2000cb05c
this
.
$u
.
vuex
(
'vuex_token'
,
userInfo
.
token
);
this
.
$u
.
vuex
(
'vuex_token'
,
"RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5"
);
this
.
$u
.
vuex
(
'vuex_user'
,
userInfo
);
this
.
$u
.
vuex
(
'vuex_user'
,
userInfo
);
this
.
$u
.
vuex
(
'vuex_wx_uid'
,
userInfo
.
wxopenid
);
this
.
$u
.
vuex
(
'vuex_wx_uid'
,
userInfo
.
wxopenid
);
}
else
{
}
else
{
...
...
src/common/api/order.js
View file @
647e391c
...
@@ -8,110 +8,93 @@ let orderApiFun = function(vm){
...
@@ -8,110 +8,93 @@ let orderApiFun = function(vm){
* 工单数量查询接口
* 工单数量查询接口
*/
*/
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/queryOrdersCount/V2'
,
params
);
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/queryOrdersCount/V2'
,
params
);
/**
/**
* 工单列表接口
* 工单列表接口
*/
*/
let
listOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/list'
,
params
);
let
listOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/list'
,
params
);
/**
/**
* 获取师傅的预约日历
* 获取师傅的预约日历
*/
*/
let
workerCalendar
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/appointment/calendar'
,
params
);
let
workerCalendar
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/appointment/calendar'
,
params
);
/**
/**
* 师傅预约
* 师傅预约
*/
*/
let
workerAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
)
let
workerAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
)
// 联系顾客时间更新接口,暂时没有
// 联系顾客时间更新接口,暂时没有
/**
/**
* 师傅签到接口
* 师傅签到接口
*/
*/
let
maintainWorkerCheckin
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintainWorkerCheckin'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
maintainWorkerCheckin
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintainWorkerCheckin'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
/**
/**
* 订单详情查询
* 订单详情查询
*/
*/
let
orderDetail
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
);
let
orderDetail
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
);
/* 过程反馈查询接口 */
/* 过程反馈查询接口 */
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
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
)
let
rejectOrder
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
`/order/
${
orderId
}
/workerReject/V2`
,
params
)
/**
/**
* 查询工单操作记录列表接口
* 查询工单操作记录列表接口
*/
*/
let
listOrderRecord
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/record/'
+
vm
.
vuex_token
+
'/listOrderRecord/'
+
params
.
orderId
,
params
);
let
listOrderRecord
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/record/'
+
vm
.
vuex_token
+
'/listOrderRecord/'
+
params
.
orderId
,
params
);
/**
/**
* 接单
* 接单
*/
*/
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
);
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
);
/**
/**
* 抢单
* 抢单
*/
*/
let
orderGan
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/revision/applets/'
+
vm
.
vuex_token
+
'/order/acceptAppletsOrder'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
orderGan
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/revision/applets/'
+
vm
.
vuex_token
+
'/order/acceptAppletsOrder'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
/**
/**
* 获取拍照标准
* 获取拍照标准
*/
*/
let
orderStandard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/standard'
,
params
);
let
orderStandard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/standard'
,
params
);
/**
/**
* 保存图片信息
* 保存图片信息
*/
*/
let
saveImage
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveImage'
,
params
);
let
saveImage
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveImage'
,
params
);
/**
/**
* 获取师傅水印 or 默认水印
* 获取师傅水印 or 默认水印
*/
*/
let
getWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/watermark'
,
params
);
let
getWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/watermark'
,
params
);
/**
/**
* 获取师傅开放可选时间段
* 获取师傅开放可选时间段
*/
*/
let
openTimerange
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/appointment/timerange'
,
params
);
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
);
let
contactTime
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/record/'
+
vm
.
vuex_token
+
'/contact/'
+
orderId
,
params
);
/**
/**
* 检查是否可以拒单
* 检查是否可以拒单
*/
*/
let
checkRejectable
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/'
+
vm
.
vuex_token
+
'/wokerOrder/checkRejectable'
,
params
);
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
)
let
getSignDistance
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
`/wokerOrder/sign/distance`
,
params
)
/**
* 获取订单的完工项目(配置+数据)
*/
let
getCompleteConfigAndData
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/info'
);
/**
* 查询措施
*/
let
getMeasure
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'wxh-worker-rest/rest/service/'
+
vm
.
vuex_token
+
'/measure/queryMeasureItems'
,
params
);
/**
* 保存售后记录
*/
let
saveCompleteData
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveMaintainInfoV2'
,
params
);
const
orderApi
=
{
const
orderApi
=
{
listByRecommendOrder
,
listByRecommendOrder
,
listOrderCount
,
listOrderCount
,
...
@@ -123,6 +106,7 @@ let orderApiFun = function(vm){
...
@@ -123,6 +106,7 @@ let orderApiFun = function(vm){
listOrderRecord
,
listOrderRecord
,
orderAccept
,
orderAccept
,
orderGan
,
orderGan
,
maintainWorkerCheckin
,
feedbackConfig
,
feedbackConfig
,
traceAndAppointment
,
traceAndAppointment
,
rejectOrder
,
rejectOrder
,
...
@@ -132,13 +116,10 @@ let orderApiFun = function(vm){
...
@@ -132,13 +116,10 @@ let orderApiFun = function(vm){
openTimerange
,
openTimerange
,
contactTime
,
contactTime
,
checkRejectable
,
checkRejectable
,
getSignDistance
,
getSignDistance
getCompleteConfigAndData
,
getMeasure
,
saveCompleteData
}
}
return
orderApi
return
orderApi
}
}
module
.
exports
=
{
module
.
exports
=
{
orderApiFun
orderApiFun
}
}
\ No newline at end of file
src/components/appoint/appoint-time.vue
View file @
647e391c
...
@@ -96,9 +96,9 @@
...
@@ -96,9 +96,9 @@
},
},
data
()
{
data
()
{
return
{
return
{
currentDay
:
0
,
currentDay
:
null
,
currentTime
:
null
,
currentTime
:
null
,
appointTime
:
n
ow
,
appointTime
:
n
ull
,
appointRange
:
""
,
appointRange
:
""
,
num
:
0
,
num
:
0
,
hasLast
:
false
hasLast
:
false
...
@@ -106,9 +106,9 @@
...
@@ -106,9 +106,9 @@
},
},
watch
:
{
watch
:
{
title
()
{
title
()
{
this
.
currentDay
=
0
this
.
currentDay
=
null
this
.
appointTime
=
now
this
.
currentTime
=
null
this
.
currentTime
=
null
this
.
appointTime
=
null
this
.
appointRange
=
""
this
.
appointRange
=
""
}
}
},
},
...
...
src/pages.json
View file @
647e391c
...
@@ -126,12 +126,6 @@
...
@@ -126,12 +126,6 @@
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
"path"
:
"pages/settle/file-upload"
,
"style"
:
{
"navigationBarTitleText"
:
"图片上传"
}
},
{
{
"path"
:
"pages/settle/pay-ensure"
,
"path"
:
"pages/settle/pay-ensure"
,
"style"
:
{
"style"
:
{
...
...
src/pages/order/detail.vue
View file @
647e391c
...
@@ -313,11 +313,13 @@
...
@@ -313,11 +313,13 @@
this
.
takeStatus
=
true
this
.
takeStatus
=
true
},
},
closeTake
(
img
)
{
closeTake
(
img
)
{
console
.
log
(
"image"
,
img
)
this
.
takeStatus
=
false
this
.
takeStatus
=
false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if
(
img
){
// 拍照完成
if
(
img
&&
img
.
length
>
0
){
// 拍照完成
this
.
isErrorSign
=
true
this
.
isErrorSign
=
true
this
.
errorSignUrl
=
img
this
.
errorSignUrl
=
process
.
uniEnv
.
qn_base_url
+
img
[
img
.
length
-
1
].
key
this
.
handleBtn
()
this
.
handleBtn
()
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
...
@@ -527,7 +529,7 @@
...
@@ -527,7 +529,7 @@
clickFeedback
(){
clickFeedback
(){
// 过程反馈
// 过程反馈
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/order/feedback?orderId='
+
this
.
order
.
orderId
url
:
'pages/order/feedback?orderId='
+
this
.
order
.
orderId
+
'&categoryId='
+
this
.
order
.
categoryId
})
})
},
},
filish
(){
filish
(){
...
@@ -588,7 +590,7 @@
...
@@ -588,7 +590,7 @@
var
s
=
2
*
Math
.
asin
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
sin
(
La3
/
2
),
2
),
Math
.
cos
(
La1
)
*
Math
.
cos
(
La2
)
*
Math
.
pow
(
Math
.
sin
(
Lb3
/
2
),
2
)));
var
s
=
2
*
Math
.
asin
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
sin
(
La3
/
2
),
2
),
Math
.
cos
(
La1
)
*
Math
.
cos
(
La2
)
*
Math
.
pow
(
Math
.
sin
(
Lb3
/
2
),
2
)));
s
=
s
*
6378.137
;
//地球半径
s
=
s
*
6378.137
;
//地球半径
s
=
Math
.
round
(
s
*
10000
)
/
10000
;
s
=
Math
.
round
(
s
*
10000
)
/
10000
;
//
console.log("计算结果",s,'KM');
console
.
log
(
"计算结果"
,
s
,
'KM'
);
return
s
?
s
.
toFixed
(
2
):
0
;
return
s
?
s
.
toFixed
(
2
):
0
;
},
},
timestampDiff
(
currentOverTime
){
// 计算超时时间
timestampDiff
(
currentOverTime
){
// 计算超时时间
...
...
src/pages/order/feedback.vue
View file @
647e391c
...
@@ -3,27 +3,14 @@
...
@@ -3,27 +3,14 @@
<view
class=
"feedback-box bg"
>
<view
class=
"feedback-box bg"
>
<u-navbar
back-icon-color=
"#FFFFFF"
:background=
"background"
title=
"过程反馈"
titleColor=
"#FFFFFF"
:border-bottom=
"false"
></u-navbar>
<u-navbar
back-icon-color=
"#FFFFFF"
:background=
"background"
title=
"过程反馈"
titleColor=
"#FFFFFF"
:border-bottom=
"false"
></u-navbar>
<view
class=
"content u-p-l-30 u-p-r-30"
>
<view
class=
"content u-p-l-30 u-p-r-30"
>
<!--
<view
class=
"width-320 u-m-t-20"
>
<u-subsection
:bold=
"false"
:current=
"curSub"
:list=
"subList"
active-color=
"white"
bg-color=
"white"
height=
"72"
inactive-color=
"#666"
button-color=
"#2272FF"
border-radius=
"36"
></u-subsection>
</view>
-->
<view
class=
"top-tab"
>
<view
class=
"top-tab"
>
<u-tabs
<u-tabs
:list=
"
tabList"
:list=
"
options"
:current=
"curTab"
:current=
"curTab"
height=
"60"
height=
"60"
gutter=
"89"
gutter=
"89"
bar-height=
"4"
bar-height=
"4"
bar-width=
"44"
bar-width=
"44"
bg-color=
"none"
bg-color=
"none"
active-color=
"#FFFFFF"
active-color=
"#FFFFFF"
inactive-color=
"#DEDEDE"
inactive-color=
"#DEDEDE"
...
@@ -32,41 +19,47 @@
...
@@ -32,41 +19,47 @@
@
change=
"changeTab"
@
change=
"changeTab"
></u-tabs>
></u-tabs>
</view>
</view>
<!--
<view
class=
"con-box"
>
</view>
-->
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"con-box"
>
<view
class=
"con-box"
>
<view
class=
"title"
>
{{
feedback
.
own
.
title
}}
</view>
<view
class=
"title"
>
{{
traceTitles
[
0
]
}}
</view>
<view
class=
"u-flex u-flex-wrap"
>
<view
class=
"u-flex u-flex-wrap"
>
<view
<view
v-for=
"(item, index) in options[curTab]"
v-for=
"(item, index) in options[curTab]['owns']"
:key=
"index"
:key=
"index"
@
click=
"changeOwn(index)"
@
click=
"changeOwn(index, item.name, item.types)"
:class=
"
{'txt-item':true,'active': (trace.reasonRelegation == index)}">
:class=
"
{ 'txt-item': true, active: curOwn == index }"
<text
class=
"txt"
>
{{
item
}}
</text>
>
<text
class=
"txt"
>
{{
item
.
name
}}
</text>
</view>
</view>
</view>
</view>
<u-gap
height=
"30"
></u-gap>
<u-gap
height=
"30"
></u-gap>
<view
class=
"title"
>
{{
traceTitles
[
1
]
}}
</view>
<view
class=
"title"
>
{{
feedback
.
type
.
title
}}
</view>
<view
class=
"u-flex u-flex-wrap"
>
<view
class=
"u-flex u-flex-wrap"
>
<view
<view
v-for=
"(txt, index) in options[curTab]['owns'][curOwn]['types']"
v-for=
"(txt, index) in options[curTab][trace.reasonRelegation]"
:key=
"index"
:key=
"index"
@
click=
"changeType(index, txt)"
@
click=
"changeType(txt)"
:class=
"
{ 'txt-item': true, active: trace.reason == txt }"
:class=
"
{'txt-item':true,'active': (trace.reason == txt)}" style="width: 306rpx;margin-right: 18rpx">
style="width: 306rpx;margin-right: 18rpx"
<text
class=
"txt"
>
{{
txt
}}
</text>
>
<text
class=
"txt"
>
{{
txt
}}
</text>
</view>
</view>
<view
class=
"input-view"
v-show=
"showRemark"
>
<u-input
v-model=
"trace.remark"
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
</view>
</view>
</view>
</view>
<view
class=
"input-view"
v-show=
"showRemark"
>
<view
class=
"time-view"
>
<u-input
v-model=
"trace.remark"
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
<appoint-time
:dateList=
"dateList"
:title=
"appointTitle"
:timeList=
"timeList"
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
</view>
</view>
<view
class=
"time-view"
>
<appoint-time
:dateList=
"dateList"
:title=
"appointTitle"
:timeList=
"timeList"
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
</view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<button
class=
"btn, bottom-btn"
@
click=
"submitForm"
:loading=
"submiting"
:disabled=
"disabledSubmit"
><text
class=
"button-text"
>
确定
</text></button>
<button
class=
"btn, bottom-btn"
@
click=
"submitForm"
:loading=
"submiting"
:disabled=
"disabledSubmit"
><text
class=
"button-text"
>
确定
</text></button>
...
@@ -75,425 +68,437 @@
...
@@ -75,425 +68,437 @@
</
template
>
</
template
>
<
script
>
<
script
>
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
import
appointTime
from
'@/components/appoint/appoint-time.vue'
import
appointTime
from
'@/components/appoint/appoint-time.vue'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
orderId
:
null
,
orderId
:
null
,
categoryId
:
null
,
categoryId
:
null
,
showRemark
:
false
,
background
:
{
submiting
:
false
,
backgroundColor
:
'none'
dateList
:
[
},
{
day
:
now
,
timeRange
:
[]},
feedback
:
null
,
{
day
:
now
+
(
1
*
86400000
),
timeRange
:
[]},
options
:
[
{
day
:
now
+
(
2
*
86400000
),
timeRange
:
[]},
{
{
day
:
now
+
(
3
*
86400000
),
timeRange
:
[]},
name
:
'报备'
,
{
day
:
now
+
(
4
*
86400000
),
timeRange
:
[]},
owns
:
[
{
day
:
now
+
(
5
*
86400000
),
timeRange
:
[]},
{
{
day
:
now
+
(
6
*
86400000
),
timeRange
:
[]},
name
:
'客户'
,
],
types
:
[
'等客户报装电表'
,
'等客户与物业沟通'
,
'等客户改造电源'
,
'客户不确定安装时间'
,
'等客户通知安装时间'
,
'客户电话未打通'
,
'客户反馈暂不安装'
]
timeList
:
[
},
{
"name"
:
"06:00-08:00"
,
"pkey"
:
"appointment_range_8"
,
"disabled"
:
false
},
{
name
:
'个人'
,
types
:
[]
},
{
"name"
:
"08:00-10:00"
,
"pkey"
:
"appointment_range_10"
,
"disabled"
:
false
},
{
name
:
'客观'
,
types
:
[]
}
{
"name"
:
"10:00-12:00"
,
"pkey"
:
"appointment_range_12"
,
"disabled"
:
false
},
]
{
"name"
:
"12:00-14:00"
,
"pkey"
:
"appointment_range_14"
,
"disabled"
:
false
},
{
"name"
:
"14:00-16:00"
,
"pkey"
:
"appointment_range_16"
,
"disabled"
:
false
},
{
"name"
:
"16:00-18:00"
,
"pkey"
:
"appointment_range_18"
,
"disabled"
:
false
},
{
"name"
:
"18:00-20:00"
,
"pkey"
:
"appointment_range_20"
,
"disabled"
:
false
},
{
"name"
:
"20:00-22:00"
,
"pkey"
:
"appointment_range_22"
,
"disabled"
:
false
},
{
"name"
:
"22:00-24:00"
,
"pkey"
:
"appointment_range_24"
,
"disabled"
:
false
}
],
background
:
{
backgroundColor
:
'none'
,
},
tabList
:
[{
name
:
'报单'
},
{
name
:
'改约'
}],
curTab
:
0
,
feedback
:
{
own
:{
title
:
'问题归属'
,
},
type
:{
title
:
'问题类型'
,
},
},
appoint
:{
'报单'
:
'下次联系时间'
,
'改约'
:
'预约时间'
,
},
config
:
null
,
options
:
[],
trace
:
{
reasonType
:
'报单'
,
// 反馈类型
reasonRelegation
:
''
,
// 反馈归属
reason
:
''
,
// 反馈原因
appointmentDatetime
:
null
,
// 预约时间
appointmentDatetimeRange
:
''
,
// 预约时间段类型
nextTraceDatetime
:
''
,
// 下次跟踪时间
remark
:
''
,
// 备注
},
},
appointTitle
:
"预约时间"
,
{
name
:
'改约'
,
owns
:
[{
name
:
'客户'
,
types
:
[
'有事耽搁'
,
'未带齐工具'
,
'个人改约'
,
'其他'
]
},
{
name
:
'个人'
,
types
:
[]
},
{
name
:
'客观'
,
types
:
[]
}]
}
num
:
0
,
],
};
dateList
:
[
},
{
day
:
now
,
timeRange
:
[]
},
components
:{
{
day
:
now
+
1
*
86400000
,
timeRange
:
[]
},
appointTime
{
day
:
now
+
2
*
86400000
,
timeRange
:
[]
},
},
{
day
:
now
+
3
*
86400000
,
timeRange
:
[]
},
watch
:
{
{
day
:
now
+
4
*
86400000
,
timeRange
:
[]
},
vuex_token
(
val
)
{
{
day
:
now
+
5
*
86400000
,
timeRange
:
[]
},
this
.
initPageData
()
{
day
:
now
+
6
*
86400000
,
timeRange
:
[]
}
],
timeList
:
[
{
name
:
'06:00-08:00'
,
pkey
:
'appointment_range_8'
,
disabled
:
false
},
{
name
:
'08:00-10:00'
,
pkey
:
'appointment_range_10'
,
disabled
:
false
},
{
name
:
'10:00-12:00'
,
pkey
:
'appointment_range_12'
,
disabled
:
false
},
{
name
:
'12:00-14:00'
,
pkey
:
'appointment_range_14'
,
disabled
:
false
},
{
name
:
'14:00-16:00'
,
pkey
:
'appointment_range_16'
,
disabled
:
false
},
{
name
:
'16:00-18:00'
,
pkey
:
'appointment_range_18'
,
disabled
:
false
},
{
name
:
'18:00-20:00'
,
pkey
:
'appointment_range_20'
,
disabled
:
false
},
{
name
:
'20:00-22:00'
,
pkey
:
'appointment_range_22'
,
disabled
:
false
},
{
name
:
'22:00-24:00'
,
pkey
:
'appointment_range_24'
,
disabled
:
false
}
],
traceTitles
:
[
'问题归属'
,
'问题类型'
],
appointTitle
:
'预约时间'
,
appoint
:
[
'下次联系时间'
,
'预约时间'
],
trace
:
{
reasonType
:
'报单'
,
// 反馈类型
reasonRelegation
:
''
,
// 反馈归属
reason
:
''
,
// 反馈原因
appointmentDatetime
:
null
,
// 预约时间
appointmentDatetimeRange
:
''
,
// 预约时间段类型
nextTraceDatetime
:
''
,
// 下次跟踪时间
remark
:
''
// 备注
},
appointTime
:
{
dateItem
:
{},
timeItem
:
{}
},
showRemark
:
false
,
submiting
:
false
,
curTab
:
0
,
curOwn
:
0
,
num
:
0
};
},
components
:
{
appointTime
},
watch
:
{
vuex_token
(
val
)
{
this
.
initPageData
();
}
},
computed
:
{
disabledSubmit
()
{
let
self
=
this
;
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
.
appointmentDatetime
&&
self
.
trace
.
appointmentDatetimeRange
)
{
return
false
;
}
}
return
true
;
}
},
async
onLoad
(
e
)
{
this
.
orderId
=
1
;
this
.
categoryId
=
88
;
if
(
e
)
{
this
.
orderId
=
e
.
orderId
||
null
;
this
.
categoryId
=
e
.
categoryId
||
null
;
}
uni
.
showLoading
({
title
:
'数据加载中'
,
mask
:
true
});
await
this
.
initPageData
();
},
methods
:
{
/* 初始化页面数据 */
async
initPageData
()
{
let
self
=
this
;
await
Promise
.
all
([
self
.
loadCalendar
(),
self
.
loadTimerange
()]);
let
params
=
{
categoryId
:
self
.
categoryId
};
let
res
=
await
self
.
$u
.
api
.
feedbackConfig
(
params
);
if
(
res
&&
res
.
code
==
200
)
{
self
.
feedback
=
res
.
data
;
self
.
buildConfig
();
}
}
uni
.
hideLoading
();
},
},
computed
:
{
/* 组装数据项参数 */
disabledSubmit
()
{
buildConfig
()
{
let
self
=
this
let
self
=
this
;
if
(
self
.
trace
.
reasonType
&&
self
.
trace
.
reasonType
==
'报备'
){
if
(
self
.
feedback
)
{
if
(
self
.
trace
.
reasonRelegation
&&
self
.
trace
.
reason
let
tabs
=
Object
.
keys
(
self
.
feedback
);
&&
self
.
trace
.
nextTraceDatetime
&&
self
.
trace
.
appointmentDatetimeRange
)
{
let
tabVals
=
Object
.
values
(
self
.
feedback
);
return
false
let
configs
=
[];
}
tabs
.
forEach
(
function
(
tab
,
index
)
{
}
else
if
(
self
.
trace
.
reasonType
&&
self
.
trace
.
reasonType
==
'改约'
)
{
let
row
=
tabVals
[
index
];
if
(
self
.
trace
.
reasonRelegation
&&
self
.
trace
.
reason
let
owns
=
Object
.
keys
(
row
);
&&
self
.
trace
.
appointmentDatetime
&&
self
.
trace
.
appointmentDatetimeRange
)
{
let
ownVals
=
Object
.
values
(
row
);
return
false
configs
[
index
]
=
{
name
:
tab
,
owns
:
[]
};
if
(
tab
==
'改约'
)
{
self
.
appoint
[
index
]
=
'预约时间'
}
else
if
(
tab
==
'报备'
)
{
self
.
appoint
[
index
]
=
'下次联系时间'
}
}
}
owns
.
forEach
(
function
(
own
,
key
)
{
configs
[
index
][
'owns'
][
key
]
=
{
name
:
own
,
types
:
ownVals
[
key
]
};
});
});
return
true
// 数组改写需要刷新绑定数据
},
self
.
options
=
configs
;
},
this
.
initParams
()
async
onLoad
(
e
)
{
this
.
orderId
=
1
this
.
categoryId
=
88
if
(
e
)
{
this
.
orderId
=
e
.
orderId
||
null
this
.
categoryId
=
e
.
categoryId
||
null
}
}
uni
.
showLoading
({
title
:
"数据加载中"
,
mask
:
true
})
await
this
.
initPageData
()
},
},
methods
:
{
/* 初始化参数 */
/* 初始化页面数据 */
initParams
()
{
async
initPageData
()
{
let
self
=
this
;
let
self
=
this
if
(
self
.
options
)
{
let
params
=
{
categoryId
:
self
.
categoryId
}
let
tabList
=
self
.
options
[
self
.
curTab
]
let
pse
=
await
Promise
.
all
([
self
.
$u
.
api
.
feedbackConfig
(
params
),
self
.
loadCalendar
(),
self
.
loadTimerange
()])
self
.
trace
.
reasonType
=
tabList
.
name
;
let
res
=
pse
[
0
]
self
.
trace
.
reasonRelegation
=
tabList
[
'owns'
][
self
.
curOwn
].
name
;
if
(
res
&&
res
.
code
==
200
)
{
self
.
trace
.
reason
=
tabList
[
'owns'
][
self
.
curOwn
][
'types'
][
0
];
self
.
config
=
res
.
data
self
.
appointTitle
=
self
.
appoint
[
self
.
curTab
]
self
.
initParams
()
self
.
trace
.
remark
=
''
;
self
.
buildConfig
()
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
}
self
.
showRemark
=
true
;
uni
.
hideLoading
()
if
(
self
.
dateList
&&
self
.
timeList
)
{
},
/* 组装参数 */
buildConfig
()
{
let
self
=
this
if
(
self
.
config
)
{
let
tabs
=
Object
.
keys
(
self
.
config
)
let
list
=
Object
.
values
(
self
.
config
)
tabs
.
forEach
(
function
(
tab
,
index
){
self
.
tabList
[
index
]
=
{
name
:
tab
}
self
.
options
[
index
]
=
list
[
index
]
})
}
},
/* 初始化参数 */
initParams
()
{
let
self
=
this
if
(
self
.
config
)
{
let
tabs
=
Object
.
keys
(
self
.
config
)
let
list
=
Object
.
values
(
self
.
config
)
let
relegation
=
Object
.
keys
(
list
[
self
.
curTab
])[
0
]
let
types
=
Object
.
values
(
list
[
self
.
curTab
][
relegation
])
self
.
trace
.
reasonType
=
tabs
[
self
.
curTab
]
self
.
trace
.
reasonRelegation
=
relegation
self
.
trace
.
reason
=
types
[
0
]
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
self
.
showRemark
=
true
self
.
appointTitle
=
'预约时间'
if
(
self
.
dateList
&&
self
.
timeList
)
{
self
.
timeList
.
map
((
item
,
index
)
=>
{
if
(
self
.
dateList
.
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
)
=>
{
self
.
timeList
.
map
((
item
,
index
)
=>
{
item
.
disabled
=
false
if
(
self
.
dateList
.
indexOf
(
item
.
pkey
)
>
-
1
)
{
})
item
.
disabled
=
true
;
}
else
{
item
.
disabled
=
false
;
}
});
}
}
}
else
{
self
.
showRemark
=
false
;
self
.
timeList
.
map
((
item
,
index
)
=>
{
item
.
disabled
=
false
;
});
}
}
},
}
},
/* 加载日历数据 */
async
loadCalendar
()
{
/* 加载日历数据 */
let
self
=
this
async
loadCalendar
()
{
let
params
=
{
let
self
=
this
;
num
:
this
.
num
let
res
=
await
this
.
$u
.
api
.
workerCalendar
({
num
:
this
.
num
});
}
if
(
res
&&
res
.
code
==
200
)
{
let
res
=
await
this
.
$u
.
api
.
workerCalendar
(
params
)
self
.
dateList
=
res
.
data
;
if
(
res
&&
res
.
code
==
200
)
{
}
self
.
dateList
=
res
.
data
},
}
},
/* 加载预约时间段 */
async
loadTimerange
()
{
/* 加载预约时间段 */
let
self
=
this
;
async
loadTimerange
()
{
let
res
=
await
this
.
$u
.
api
.
openTimerange
();
let
self
=
this
if
(
res
&&
res
.
code
==
200
)
{
let
res
=
await
this
.
$u
.
api
.
openTimerange
()
let
list
=
res
.
data
;
if
(
res
&&
res
.
code
==
200
)
{
list
.
map
((
item
,
index
)
=>
{
let
list
=
res
.
data
item
.
disabled
=
false
;
list
.
map
((
item
,
index
)
=>
{
});
item
.
disabled
=
false
self
.
timeList
=
list
;
})
}
self
.
timeList
=
list
},
/**
* 切换tab项
*/
changeTab
(
index
)
{
this
.
curTab
=
index
;
this
.
initParams
();
},
changeOwn
(
index
,
own
,
types
)
{
let
self
=
this
;
self
.
curOwn
=
index
;
self
.
trace
.
reasonRelegation
=
own
;
self
.
trace
.
reason
=
types
[
0
];
},
changeType
(
index
,
type
)
{
this
.
trace
.
reason
=
type
;
},
weekChange
(
data
)
{
// 点击下一周
console
.
log
(
data
,
'week-data'
);
if
(
data
&&
data
.
time
)
{
let
num
=
data
.
num
;
let
time
=
data
.
time
;
this
.
num
=
num
;
if
(
num
==
0
)
{
this
.
loadCalendar
();
}
else
{
this
.
loadCalendar
();
}
}
},
}
},
/**
dateChange
(
data
)
{
* 切换tab项
// 点击日期选择
*/
console
.
log
(
data
,
'week-data'
);
changeTab
(
index
)
{
let
self
=
this
;
this
.
curTab
=
index
;
self
.
appointTime
.
dateItem
=
data
.
item
this
.
initParams
()
if
(
self
.
trace
.
reasonType
==
'报备'
)
{
},
self
.
trace
.
appointmentDatetime
=
null
;
changeOwn
(
key
)
{
self
.
trace
.
nextTraceDatetime
=
data
.
item
.
day
;
let
self
=
this
self
.
timeList
.
map
((
item
,
index
)
=>
{
self
.
trace
.
reasonRelegation
=
key
item
.
disabled
=
false
;
self
.
trace
.
reason
=
self
.
options
[
self
.
curTab
][
key
][
0
]
});
},
}
else
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
changeType
(
key
)
{
self
.
trace
.
appointmentDatetime
=
data
.
item
.
day
;
this
.
trace
.
reason
=
key
self
.
trace
.
nextTraceDatetime
=
null
;
},
self
.
timeList
.
map
((
item
,
index
)
=>
{
weekChange
(
data
){
if
(
data
.
item
.
timeRange
.
indexOf
(
item
.
pkey
)
>
-
1
)
{
// 点击下一周
item
.
disabled
=
true
;
console
.
log
(
data
,
'week-data'
)
if
(
data
&&
data
.
time
)
{
let
num
=
data
.
num
let
time
=
data
.
time
this
.
num
=
num
if
(
num
==
0
)
{
this
.
loadCalendar
()
}
else
{
}
else
{
this
.
loadCalendar
()
item
.
disabled
=
false
;
}
}
});
}
}
self
.
trace
.
appointmentDatetimeRange
=
''
;
},
},
dateChange
(
data
){
timeChange
(
data
)
{
// 点击日期选择
// 时间段选择变化
console
.
log
(
data
,
'week-data'
)
console
.
log
(
data
,
'week-data'
);
let
self
=
this
this
.
trace
.
appointmentDatetimeRange
=
data
.
item
;
if
(
self
.
trace
.
reasonType
==
'报备'
)
{
this
.
appointTime
.
timeItem
=
data
.
item
self
.
trace
.
appointmentDatetime
=
null
},
self
.
trace
.
nextTraceDatetime
=
data
.
item
.
day
async
submitForm
()
{
self
.
timeList
.
map
((
item
,
index
)
=>
{
let
self
=
this
;
item
.
disabled
=
false
self
.
orderId
=
666
;
})
if
(
!
self
.
orderId
)
{
}
else
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
uni
.
showToast
({
self
.
trace
.
appointmentDatetime
=
data
.
item
.
day
icon
:
error
,
self
.
trace
.
nextTraceDatetime
=
null
title
:
'工单ID不能为空'
self
.
timeList
.
map
((
item
,
index
)
=>
{
});
if
(
data
.
item
.
timeRange
.
indexOf
(
item
.
pkey
)
>
-
1
)
{
return
false
;
item
.
disabled
=
true
}
}
else
{
item
.
disabled
=
false
self
.
submiting
=
true
;
}
let
res
=
await
self
.
$u
.
api
.
traceAndAppointment
(
self
.
trace
,
self
.
orderId
);
})
self
.
submiting
=
false
;
}
},
timeChange
(
data
){
// 时间段选择变化
console
.
log
(
data
,
'week-data'
)
this
.
trace
.
appointmentDatetimeRange
=
data
.
item
},
async
submitForm
()
{
let
self
=
this
self
.
orderId
=
666
if
(
!
self
.
orderId
)
{
uni
.
showToast
({
icon
:
error
,
title
:
"工单ID不能为空"
})
return
false
}
self
.
submiting
=
true
let
res
=
await
self
.
$u
.
api
.
traceAndAppointment
(
self
.
trace
,
self
.
orderId
)
self
.
submiting
=
false
},
}
}
}
}
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.bg
{
.bg
{
width
:
750rpx
;
width
:
750rpx
;
height
:
100vh
;
height
:
100vh
;
overflow
:
auto
;
overflow
:
auto
;
background-color
:
#F4F5F7
;
background-color
:
#f4f5f7
;
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
0%
,
#2272FF
50%
);
background-image
:
linear-gradient
(
to
top
,
#f4f5f7
0%
,
#2272ff
50%
);
background-size
:
750rpx
600rpx
;
background-size
:
750rpx
600rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
}
}
.feedback-box
{
.feedback-box
{
display
:
flex
;
flex-direction
:
column
;
.header
{
padding
:
12rpx
30rpx
40rpx
30rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
.header
{
align-items
:
center
;
padding
:
12rpx
30rpx
40rpx
30rpx
;
.title
{
display
:
flex
;
font-size
:
40rpx
;
justify-content
:
space-between
;
font-weight
:
bold
;
align-items
:
center
;
color
:
#ffffff
;
.title
{
font-size
:
40rpx
;
font-weight
:
bold
;
color
:
#FFFFFF
;
}
}
}
}
}
/
deep
/
.u-subsection
{
}
padding
:
4rpx
!
important
;
/
deep
/
.u-subsection
{
}
padding
:
4rpx
!
important
;
.top-tab
{
}
text-align
:
center
;
.top-tab
{
}
text-align
:
center
;
.content
{
}
display
:
flex
;
.content
{
flex-direction
:
column
;
display
:
flex
;
overflow
:
hidden
;
flex-direction
:
column
;
margin-bottom
:
188rpx
;
overflow
:
hidden
;
.content-view
{
margin-bottom
:
188rpx
;
height
:
100%
;
.content-view
{
height
:
100%
;
border-radius
:
12rpx
;
overflow
:
auto
;
margin-top
:
30rpx
;
.time-view
{
border-radius
:
12rpx
;
border-radius
:
12rpx
;
overflow
:
auto
;
background-color
:
#ffffff
;
margin-top
:
30rpx
;
padding-bottom
:
20rpx
;
.time-view
{
border-radius
:
12rpx
;
background-color
:
#FFFFFF
;
padding-bottom
:
20rpx
;
}
}
}
}
}
.bottom-view
{
}
position
:
fixed
;
.bottom-view
{
bottom
:
44rpx
;
position
:
fixed
;
width
:
100%
;
bottom
:
44rpx
;
width
:
100%
;
}
.bottom-btn
{
height
:
104rpx
;
width
:
600rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.button-text
{
font-size
:
32rpx
;
font-weight
:
bold
;
}
}
.bottom-btn
{
}
height
:
104rpx
;
width
:
600rpx
;
.con-box
{
display
:
flex
;
padding
:
30rpx
30rpx
8rpx
30rpx
;
align-items
:
center
;
border-radius
:
12rpx
;
justify-content
:
center
;
background-color
:
#ffffff
;
.button-text
{
.title
{
font-size
:
32rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
line-height
:
32rpx
;
color
:
#333
;
}
}
&
>
.u-flex
{
.con-box
{
margin-top
:
40rpx
;
padding
:
30rpx
30rpx
8rpx
30rpx
;
margin-right
:
-24rpx
;
border-radius
:
12rpx
;
.txt-item
{
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
.title
{
padding
:
24rpx
38rpx
;
font-weight
:
bold
;
width
:
196rpx
;
font-size
:
32rpx
;
height
:
72rpx
;
line-height
:
32rpx
;
text-align
:
center
;
color
:
#333
;
margin-right
:
22rpx
;
}
margin-bottom
:
20rpx
;
&
>
.u-flex
{
background-color
:
#f4f5f7
;
margin-top
:
40rpx
;
&
.active
{
margin-right
:
-24rpx
;
background-color
:
#2272ff
;
.txt-item
{
.txt
{
border-radius
:
12rpx
;
color
:
#fff
;
padding
:
24rpx
24rpx
;
text-overflow
:
ellipsis
;
width
:
196rpx
;
overflow
:
hidden
;
height
:
72rpx
;
white-space
:
nowrap
;
text-align
:
center
;
margin-right
:
22rpx
;
margin-bottom
:
20rpx
;
background-color
:
#F4F5F7
;
&
.active
{
background-color
:
#2272FF
;
.txt
{
color
:
#fff
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
}
}
}
}
}
}
.txt
{
display
:block
;
font-size
:
26rpx
;
line-height
:
26rpx
;
color
:
#333
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
.input-view
{
margin-bottom
:
24rpx
;
}
.textarea
{
/
deep
/
.u-input
{
textarea
{
margin-top
:
20rpx
;
border
:
2rpx
solid
#ECECEC
;
padding
:
18rpx
30rpx
;
}
}
}
}
}
.btn
{
padding
:
30rpx
;
.txt
{
border-radius
:
52rpx
;
display
:
block
;
line-height
:
44rpx
;
font-size
:
26rpx
;
font-size
:
32rpx
;
line-height
:
26rpx
;
text-align
:
center
;
color
:
#333
;
background-color
:
#2272FF
;
text-overflow
:
ellipsis
;
color
:
#fff
;
overflow
:
hidden
;
&
:
:
after
{
white-space
:
nowrap
;
content
:
''
;
height
:
0
;
border
:
none
;
}
}
}
button
[
disabled
]
:not
([
type
])
{
.input-view
{
background
:
#D1D4D4
;
margin-bottom
:
24rpx
;
color
:
#FFFFFF
;
}
}
.btn
{
.textarea
{
padding
:
30rpx
;
/
deep
/
.u-input
{
border-radius
:
52rpx
;
textarea
{
line-height
:
44rpx
;
margin-top
:
20rpx
;
font-size
:
32rpx
;
border
:
2rpx
solid
#ececec
;
text-align
:
center
;
padding
:
18rpx
30rpx
;
background-color
:
#2272FF
;
}
color
:
#fff
;
&
:
:
after
{
content
:
''
;
height
:
0
;
}
}
}
}
.width-320
{
}
width
:
320rpx
;
.btn
{
padding
:
30rpx
;
border-radius
:
52rpx
;
line-height
:
44rpx
;
font-size
:
32rpx
;
text-align
:
center
;
background-color
:
#2272ff
;
color
:
#fff
;
&
:
:
after
{
content
:
''
;
height
:
0
;
border
:
none
;
}
}
button
[
disabled
]
:not
([
type
])
{
background
:
#d1d4d4
;
color
:
#ffffff
;
}
.btn
{
padding
:
30rpx
;
border-radius
:
52rpx
;
line-height
:
44rpx
;
font-size
:
32rpx
;
text-align
:
center
;
background-color
:
#2272ff
;
color
:
#fff
;
&
:
:
after
{
content
:
''
;
height
:
0
;
}
}
}
.width-320
{
width
:
320rpx
;
}
</
style
>
</
style
>
src/pages/settle/base copy.vue
deleted
100644 → 0
View file @
ca27b067
<
template
>
<view
class=
"content"
>
<process
:process=
"1"
:type=
"0"
title=
"业务流程"
></process>
<view
class=
"base-list"
>
<view
class=
"item item-select u-row-between"
>
<view
class=
"label"
>
实名认证
</view>
<p
class=
"u-flex-1 u-text-right txt"
>
{{
areaTxts
.
slice
(
0
,
2
).
join
(
','
)
||
""
}}
</p>
<u-icon
name=
"arrow-right"
color=
"#999"
size=
"28"
></u-icon>
</view>
<view
class=
"newAddressView"
>
<view
class=
"newAddressTitleView"
@
click=
"locationClick()"
>
<view
class=
"address"
>
<text
class=
"itemTitle"
>
收货地址
</text>
</view>
<view
class=
"right-margin-40"
>
<u-icon
name=
"map"
color=
"#999"
size=
"34"
></u-icon>
<text
class=
"blueColor"
>
定位
</text>
</view>
</view>
<view
class=
"addressBackView"
>
<textarea
class=
"addressTextAreaView"
maxlength=
"100"
v-model=
"baseInfo.address"
auto-height=
"true"
value=
""
placeholder=
"请输入详细服务地址"
placeholder-style=
'color:#CCCCCC;font-size:28rpx;'
/>
</view>
<view
class=
"tips"
>
(必填项)填写可接收物料的地址
</view>
</view>
<view
class=
"item item-select u-row-between"
@
click=
"gopage('/pages/settle/select?selectType=area')"
>
<view
class=
"label"
>
接单城市:
</view>
<p
class=
"u-flex-1 u-text-right txt"
>
{{
areaTxts
.
slice
(
0
,
2
).
join
(
','
)
||
""
}}
</p>
<u-icon
name=
"arrow-right"
color=
"#999"
size=
"28"
></u-icon>
</view>
<view
class=
"tips"
>
(必选项)选择你可以服务的城市,可选多个
</view>
<view
class=
"item item-select u-row-between"
>
<view
class=
"label"
>
电工证
</view>
<p
class=
"u-flex-1 u-text-right txt"
>
{{
areaTxts
.
slice
(
0
,
2
).
join
(
','
)
||
""
}}
</p>
<u-icon
name=
"arrow-right"
color=
"#999"
size=
"28"
></u-icon>
</view>
<view
class=
"item item-select flex-yc"
@
click=
"gopage('/pages/settle/select?selectType=working_age')"
>
<view
class=
"label"
>
电工工龄(年):
</view>
<p
class=
"u-flex-1 u-text-right area"
v-show=
"baseInfo.working_age !== ''"
>
{{
workingAgeTxt
}}
</p>
<u-icon
name=
"arrow-right"
color=
"#999"
size=
"28"
></u-icon>
<!--
<i
class=
"iconfont icon-xiangyou"
></i>
-->
</view>
<view
class=
"tips"
>
(必选项)选择你从事电工工作的工龄
</view>
<view
class=
"item item-select u-row-between"
>
<view
class=
"label"
>
个人车辆信息
</view>
<p
class=
"u-flex-1 u-text-right txt"
>
{{
areaTxts
.
slice
(
0
,
2
).
join
(
','
)
||
""
}}
</p>
<u-icon
name=
"arrow-right"
color=
"#999"
size=
"28"
></u-icon>
</view>
<view
class=
"tips"
>
(选填项)填写你的车辆信息
</view>
<view
class=
"itemView"
>
<view
class=
"itemTitleView"
>
<text
class=
"itemTitle"
>
师傅数量
</text>
<!--text class="itemRedStar">*
</text-->
</view>
<input
class=
"itemInput"
@
input=
"countInput"
v-model=
"name"
type=
"number"
value=
""
placeholder=
"请输入师傅数量"
placeholder-style=
'color:#CCCCCC;font-size:32rpx;'
/>
</view>
<view
class=
"tips bottom_padding_80"
>
(选填项)输入可投入交付服务的人员数量
</view>
</view>
<view
class=
"seat"
></view>
<view
class=
"btn-wrap flex-xc"
>
<button
class=
"btn-submit"
:disabled=
"!submitStatus"
@
click=
"$u.debounce(submitBaseInfo, 500)"
>
确定
</button>
</view>
</view>
</
template
>
<
script
>
let
r
=
require
(
"../../libs/bmap-wx.min.js"
);
let
h
=
new
r
.
BMapWX
({
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
ak
:
"lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
});
export
default
{
data
()
{
return
{
baseInfo
:
{
name
:
""
,
mobile
:
""
,
service_area
:
[],
working_age
:
""
,
worker_num
:
""
,
address
:
''
},
saving
:
false
,
areaTxts
:
[],
workingAgeTxt
:
''
,
protocolContent
:
''
,
address
:
''
,
isPosting
:
false
}
},
onLoad
(
e
)
{
this
.
initLocation
()
},
onShow
()
{
if
(
this
.
isPosting
)
{
this
.
isPosting
=
false
}
},
computed
:
{
submitStatus
()
{
const
baseInfo
=
this
.
baseInfo
//baseInfo.name && baseInfo.mobile &&
const
flag
=
baseInfo
.
service_area
&&
baseInfo
.
working_age
!==
''
return
flag
&&
!
this
.
saving
;
},
},
components
:
{
},
methods
:
{
initLocation
(){
const
self
=
this
uni
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
self
.
baiduLocation
(
res
.
longitude
,
res
.
latitude
)
}
});
},
baiduLocation
(
long
,
lat
)
{
let
a
=
this
,
t
=
function
()
{
let
t
=
{
success
:
function
(
res
)
{
let
e
=
res
.
wxMarkerData
[
0
];
let
i
=
e
.
address
;
a
.
baseInfo
.
address
=
i
// a.setData({
// addressValue: i
// }), o.globalData.addressValue = i, a.initWatermarkBoxHeightAndWidth();
},
fail
:
function
(
a
)
{
// n.error(a), console.log(a);
}
};
if
(
lat
&&
long
)
{
let
e
=
lat
+
","
+
long
// let e = "113.88308" + ',' + "22.55329"
// let e = "22.55329" + ',' + "113.88308"
t
.
location
=
e
;
}
h
.
regeocoding
(
t
);
};
t
()
},
//师傅数量
countInput
(
e
){
this
.
baseInfo
.
worker_num
=
e
.
detail
.
value
},
//定位点击
locationClick
:
function
(){
let
that
=
this
uni
.
chooseLocation
({
success
:
function
(
res
)
{
that
.
baseInfo
.
address
=
res
.
address
+
res
.
name
//that.address = res.address + res.name
},
fail
:
function
(
res
)
{
uni
.
showToast
({
title
:
'定位失败'
})
}
});
},
gopage
(
url
)
{
uni
.
navigateTo
({
url
,
});
},
initBaseInfo
()
{
Indicator
.
open
();
let
params
=
{
id
:
''
,
}
const
res
=
this
.
$u
.
api
.
getSettleBaseInfo
(
params
)
uni
.
hideLoading
()
if
(
res
.
status
!=
200
)
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'success'
});
return
;
}
this
.
baseInfo
=
res
.
data
uni
.
showToast
({
title
:
'入驻基本信息提交成功'
,
icon
:
'success'
});
},
checkBaseInfo
()
{
const
baseInfo
=
this
.
baseInfo
;
let
rulesObj
=
{
/*
name: function(value) {
if (!value) {
uni.showToast({
title: '请输入您的姓名',
icon: 'none'
});
return false;
}
},
mobile: function(value) {
const mobileReg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!value) {
uni.showToast({
title: '请输入您的电话',
icon: 'none'
});
return false;
return false;
} else if (!mobileReg.test(value)) {
uni.showToast({
title: '请输入正确的电话',
icon: 'none'
});
return false;
}
},
*/
service_area
:
function
(
value
)
{
if
(
!
value
||
value
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请选择您的接单城市'
,
icon
:
'none'
});
return
false
;
}
},
working_age
:
function
(
value
)
{
if
(
value
===
''
)
{
uni
.
showToast
({
title
:
'请选择您的工龄'
,
icon
:
'none'
});
return
false
;
}
},
//address
address
:
function
(
value
)
{
if
(
value
===
''
)
{
uni
.
showToast
({
title
:
'请选择您的地址'
,
icon
:
'none'
});
return
false
;
}
},
};
const
flagArr
=
Object
.
keys
(
baseInfo
).
some
((
key
)
=>
{
// 返回验证失败的数组
let
flag
=
true
;
if
(
rulesObj
.
hasOwnProperty
(
key
))
{
const
func
=
rulesObj
[
key
];
const
value
=
baseInfo
[
key
];
if
(
typeof
func
===
"function"
)
{
flag
=
func
(
value
)
===
false
?
false
:
true
;
}
}
return
!
flag
;
});
return
!
flagArr
||
flagArr
.
length
<
1
;
},
/*
shakeCLick: function() {
let timer = setTimeout(() => {
clearTimeout(timer)
this.submitBaseInfo()
}, 2000)
},
*/
async
submitBaseInfo
()
{
// this.newSubmitBaseInfo()
// return
const
baseInfo
=
this
.
baseInfo
;
if
(
!
this
.
checkBaseInfo
())
{
return
;
}
this
.
saving
=
true
;
uni
.
showLoading
({
title
:
'加载中'
});
const
params
=
{
...
baseInfo
,
recommender
:
getApp
().
globalData
.
settleRecommend
}
console
.
log
(
params
,
'params'
)
params
.
service_area
=
baseInfo
.
service_area
.
join
(
','
)
const
res
=
await
this
.
$u
.
api
.
submitSettleBaseInfo
(
params
)
this
.
saving
=
false
;
uni
.
hideLoading
()
//this.isPosting = false
if
(
res
.
code
!=
200
)
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
});
return
;
}
uni
.
showToast
({
title
:
'入驻基本信息提交成功'
,
icon
:
'success'
});
let
timer
=
setTimeout
(()
=>
{
clearTimeout
(
timer
)
uni
.
navigateTo
({
url
:
'/pages/settle/file'
})
},
2000
)
},
},
}
</
script
>
<
style
lang=
"scss"
>
.base-list
{
.item
{
display
:
flex
;
margin-bottom
:
58rpx
;
padding
:
28rpx
30rpx
;
width
:
100%
;
height
:
100rpx
;
font-size
:
32rpx
;
background-color
:
#fff
;
.label
{
color
:
#333
;
font-size
:
32rpx
;
font-weight
:
bold
;
}
.txt
{
line-height
:
44rpx
;
color
:
#333
;
font-size
:
32rpx
;
display
:
-
webkit-box
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
word-wrap
:
break-word
;
white-space
:
normal
!
important
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.required
{
margin
:
0
6rpx
;
color
:
red
;
font-size
:
32rpx
;
}
.iconfont
{
color
:
#999
;
}
}
.tips
{
margin-top
:
20rpx
;
padding
:
0
30rpx
;
line-height
:
40rpx
;
font-size
:
28rpx
;
color
:
#666
;
&
+
.id-identity-box
{
margin-top
:
-38rpx
;
margin-bottom
:
40rpx
;
}
}
.id-identity-box
{
.txt
{
padding-top
:
8rpx
;
line-height
:
40rpx
;
font-size
:
28rpx
;
color
:
#666
;
&
:first-child
{
margin-top
:
-58rpx
;
padding-top
:
12rpx
;
}
.red
{
color
:
red
;
}
}
// &.tips{
// margin-bottom:0!important;
// }
}
.item
+
.tips
{
margin-top
:
-38rpx
;
margin-bottom
:
58rpx
;
}
/*选择内容*/
.item-select
{
font-size
:
30rpx
;
color
:
#333
;
font-weight
:
500
;
justify-content
:
space-between
;
border-bottom
:
1rpx
solid
#f5f5f5
;
}
.flex1
{
flex
:
1
!
important
;
&
.txt
{
white-space
:
nowrap
;
max-width
:
450rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
.item-input
{
overflow
:
hidden
;
input
{
text-align
:
right
;
line-height
:
44rpx
;
width
:
100%
;
font-size
:
30rpx
;
color
:
#333
;
font-weight
:
400
;
}
.input-readonly
{
font-size
:
30rpx
;
color
:
#999
;
font-weight
:
400
;
}
input
:
:-
webkit-input-placeholder
{
font-size
:
30rpx
;
color
:
#999
;
font-weight
:
400
;
}
input
:
-
moz-placeholder
{
font-size
:
30rpx
;
color
:
#999
;
font-weight
:
400
;
}
input
:
-
ms-input-placeholder
{
font-size
:
30rpx
;
color
:
#999
;
font-weight
:
400
;
}
}
}
.title
{
padding
:
30rpx
0
40rpx
;
text-align
:
center
;
line-height
:
50rpx
;
font-size
:
36rpx
;
color
:
#333
;
font-weight
:
bold
;
}
.seat
{
padding-bottom
:
144rpx
;
}
/*提交按钮*/
.btn-wrap
{
//position: fixed;
//left: 0;
//right: 0;
//bottom: 0;
padding
:
30rpx
0
;
background
:
#f3f3f3
;
width
:
100%
;
.btn-submit
{
width
:
600rpx
;
// left: 5%;
// bottom: px2rem(36);
height
:
104rpx
;
line-height
:
104rpx
;
border-radius
:
52rpx
;
background
:
#2272ff
;
font-size
:
32rpx
;
color
:
#fff
;
&
[
disabled
]
{
border
:
2rpx
solid
#999
;
background-color
:
#f3f3f3
;
color
:
#999
;
}
}
}
.itemView
{
background-color
:
#FFFFFF
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
width
:
100%
;
height
:
104rpx
;
}
.itemTitleView
{
background-color
:
#FFFFFF
;
width
:
30%
;
height
:
102rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.borderBottom
{
border-bottom
:
1rpx
solid
#CCCCCC
;
}
.itemTitle
{
background-color
:
#FFFFFF
;
margin-left
:
30rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
}
.itemRedStar
{
font-size
:
32rpx
;
color
:
#D02B2B
;
}
.itemInput
{
background-color
:
#FFFFFF
;
margin-right
:
30rpx
;
height
:
70rpx
;
width
:
70%
;
text-align
:
right
;
font-size
:
32rpx
;
}
.newAddressView
{
margin-top
:
60rpx
;
background-color
:
#FFFFFF
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
padding-bottom
:
30rpx
;
}
.newAddressTitleView
{
height
:
64rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
}
.itemTitle
{
background-color
:
#FFFFFF
;
margin-left
:
30rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
}
.itemRedStar
{
font-size
:
32rpx
;
color
:
#D02B2B
;
}
.addressBackView
{
background-color
:
#FFFFFF
;
width
:
690rpx
;
border
:
2rpx
solid
#F3F3F3
;
margin-left
:
30rpx
;
padding-bottom
:
24prx
;
}
.addressTextAreaView
{
background-color
:
#FFFFFF
;
width
:
640rpx
;
height
:
40rpx
;
margin-top
:
24rpx
;
margin-left
:
24rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
padding-bottom
:
20rpx
;
}
.right-margin-40
{
margin-right
:
40rpx
;
}
.blueColor
{
color
:
#007AFF
;
}
.area
{
max-width
:
400rpx
;
}
/* .back_view{
background-color: #FFFFFF;
position: absolute;
top: 0;
left: 0;
width: 100%;
display: flex;
flex-direction: column;
}
*/
</
style
>
src/pages/settle/city.vue
deleted
100644 → 0
View file @
ca27b067
<
template
>
<view
class=
"back_view"
>
选择可服务的城市
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
protocolContent
:
''
}
},
onLoad
(
e
)
{
},
methods
:
{
//拨打客服 点击
phoneCallClick
:
function
(
phone
)
{
uni
.
makePhoneCall
({
phoneNumber
:
phone
});
},
}
}
</
script
>
<
style
>
.back_view
{
background-color
:
#F3F3F3
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
</
style
>
src/pages/settle/file-upload.vue
deleted
100644 → 0
View file @
ca27b067
<
template
>
<view
class=
"img-wrap rel"
>
<view
class=
"upload-box"
>
<view
class=
"img-item pic"
v-for=
"(file,index) in imgList"
:key=
"index"
>
<!--
<view
class=
"tip-sucess u-flex u-row-center"
v-if=
"file && (file.status == status.QUEUED || file.status == status.UPLOADING)"
>
<span>
正在上传中...
{{
file
.
percent
}}
%
</span>
</view>
-->
<img
:src=
"file.src"
mode=
"aspectFill"
@
click=
"perviewImg(index)"
>
<view
class=
"close"
@
click=
"removeImg(index)"
>
<u-icon
name=
"close"
color=
"#fff"
size=
"20"
></u-icon>
</view>
</view>
<view>
<view
class=
"pic upload"
@
click=
"chooseImage('qiniu')"
>
<u-icon
name=
"camera"
color=
"#fff"
size=
"100"
></u-icon>
<span
class=
"txt"
>
点击拍摄
</span>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
base
from
'@/components/upload/index'
;
export
default
{
mixins
:[
base
],
data
()
{
return
{
initImgList
:[],
currentIndex
:
0
,
uploadType
:
''
,
pageTitle
:
''
}
},
computed
:
{
},
onLoad
(
option
)
{
this
.
initPage
(
option
)
// this.initworkingAgeList();
// this.getareaList()
},
beforeDestroy
(){
this
.
setPrevPageData
()
},
methods
:
{
goBack
(
type
)
{
// if (type) {
// this.setPrevPageData()
// }
this
.
setPrevPageData
()
uni
.
navigateBack
({
delta
:
2
});
},
initPage
(
option
)
{
const
uploadType
=
option
.
uploadType
this
.
uploadType
=
uploadType
let
pages
=
getCurrentPages
()
if
(
pages
.
length
<
2
)
{
return
}
let
prevVue
=
pages
[
pages
.
length
-
2
].
$vm
this
.
imgList
=
prevVue
.
imgObj
[
uploadType
]
||
[]
const
formShowList
=
prevVue
.
formShowList
formShowList
.
map
(
item
=>
{
if
(
item
.
filedName
===
uploadType
){
this
.
pageTitle
=
item
.
label
||
'图片上传'
}
})
if
(
this
.
uploadType
!==
'other_certificates'
){
this
.
selectNum
=
1
}
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
});
},
setPrevPageData
()
{
let
pages
=
getCurrentPages
()
if
(
pages
.
length
<
2
)
{
return
}
let
selected
=
this
.
selected
let
prevVue
=
pages
[
pages
.
length
-
2
].
$vm
const
uploadType
=
this
.
uploadType
prevVue
.
imgObj
[
uploadType
]
=
this
.
imgList
},
initworkingAgeList
()
{
let
list
=
[{
value
:
0
,
name
:
"1年内"
,
},
];
for
(
let
i
=
1
;
i
<
10
;
i
++
)
{
const
item
=
{
value
:
i
,
name
:
i
+
"年"
,
};
list
.
push
(
item
);
}
list
.
push
({
value
:
10
,
name
:
"10年+"
,
});
this
.
workingAgeList
=
list
;
},
getareaList
(
code
,
level
,
provinceIndex
)
{
provinceIndex
=
provinceIndex
||
0
this
.
currentIndex
=
provinceIndex
let
areaList
=
this
.
areaList
if
(
level
)
{
if
(
areaList
[
provinceIndex
].
children
)
{
return
}
}
uni
.
showLoading
({
title
:
'加载中'
});
let
params
=
{
type
:
'充电桩安装'
,
level
:
level
||
0
,
code
:
code
}
const
res
=
this
.
$u
.
api
.
getSettleArea
(
params
)
uni
.
hideLoading
()
if
(
res
.
status
!=
200
)
{
return
;
}
if
(
!
level
)
{
this
.
areaList
=
res
.
data
const
parmas
=
[
res
.
data
[
0
].
id
,
1
]
this
.
getareaList
(...
parmas
)
}
else
{
this
.
$set
(
areaList
[
provinceIndex
],
'children'
,
res
.
data
)
}
},
selectAge
(
item
)
{
this
.
selected
.
working_age
=
item
.
value
this
.
selected
.
workingAgeTxt
=
item
.
name
},
selectArea
(
areaItem
)
{
const
code
=
areaItem
.
id
const
selected
=
this
.
selected
const
idx
=
selected
.
areaIds
.
indexOf
(
code
)
const
currentProvince
=
this
.
areaList
[
this
.
currentIndex
]
let
txt
=
currentProvince
.
name
+
'-'
+
areaItem
.
name
if
(
idx
>=
0
)
{
selected
.
areaTxts
.
splice
(
idx
,
1
)
selected
.
areaIds
.
splice
(
idx
,
1
)
}
else
{
selected
.
areaIds
.
push
(
code
)
selected
.
areaTxts
.
push
(
txt
)
}
this
.
selected
=
selected
},
},
}
</
script
>
<
style
lang=
"scss"
>
.upload-box
{
padding
:
30rpx
16rpx
;
.pic
{
position
:
relative
;
display
:
block
;
width
:
720rpx
;
height
:
450rpx
;
// overflow: hidden;
border-radius
:
12rpx
;
margin-bottom
:
30rpx
;
img
{
width
:
100%
;
height
:
100%
;
}
}
.pic.upload
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
img
{
display
:
block
;
width
:
60rpx
;
height
:
52rpx
;
}
.txt
{
font-weight
:
bold
;
margin-top
:
18rpx
;
font-size
:
32rpx
;
color
:
#fff
;
&
.iconfont
{
font-size
:
60rpx
;
}
}
background-color
:
rgba
(
0
,
0
,
0
,
0
.3
);
}
}
.close
{
position
:
absolute
;
width
:
50rpx
;
height
:
50rpx
;
right
:
0
;
top
:
0
;
text-align
:
center
;
line-height
:
50rpx
;
border-radius
:
50%
;
background
:
red
;
color
:
#fff
;
}
.tip-sucess
{
position
:
absolute
;
bottom
:
0
;
left
:
0
;
padding
:
20rpx
0
;
width
:
100%
;
z-index
:
5
;
background
:
rgba
(
0
,
0
,
0
,
.4
);
border-radius
:
0
;
color
:
#fff
;
font-size
:
28rpx
;
&
.tip-fail
i
{
background
:
red
;
}
i
{
margin-right
:
12rpx
;
width
:
50rpx
;
height
:
50rpx
;
background
:
#7fbe4c
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
50rpx
;
font-size
:
24rpx
;
}
}
</
style
>
src/pages/settle/index copy.vue
deleted
100644 → 0
View file @
ca27b067
<
template
>
<view
class=
"wrap"
>
<process
:process=
"0"
:type=
"0"
title=
"业务流程"
></process>
<view
class=
"introduction"
>
<view
class=
"item"
>
<view
class=
"label"
>
<text>
招募要求
</text>
</view>
<view
class=
"content"
>
<text>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aenean euismod bibendum laoreet. Proin gravida dolor sit
amet lacus accumsan et viverra justo commodo. Proin sodales
pulvinar sic tempor. Sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus. Nam fermentum,
nulla luctus pharetra vulputate, felis tellus 。
</text>
</view>
</view>
<view
class=
"item"
>
<view
class=
"label"
>
<text>
结算价格
</text>
</view>
<view
class=
"content"
>
<text>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aenean euismod bibendum laoreet. Proin gravida dolor sit
amet lacus accumsan et viverra justo commodo. Proin sodales
pulvinar sic tempor. Sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus. Nam fermentum,
nulla luctus pharetra vulputate, felis tellus 。
</text>
</view>
</view>
<view
class=
"item"
>
<view
class=
"label"
>
<text>
入驻资料
</text>
</view>
<view
class=
"content"
>
<text>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aenean euismod bibendum laoreet. Proin gravida dolor sit
amet lacus accumsan et viverra justo commodo. Proin sodales
pulvinar sic tempor. Sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus. Nam fermentum,
nulla luctus pharetra vulputate, felis tellus 。
</text>
</view>
</view>
<view
class=
"item careful-color"
>
<view
class=
"careful-content"
>
<text>
注意事项:
</text>
<text>
身份证、银行卡、签约人均为同一人,否则无法入驻;
</text>
<text>
充电桩材料按要求自行准备
</text>
</view>
</view>
</view>
<view
class=
"bottom_view"
>
<button
:class=
"isStop ? 'bottom_btn apply_color' : 'bottom_btn default_color' "
@
click=
"$u.debounce(applyClick, 500)"
>
<text
class=
"bottom_title"
v-if=
"!isStop"
>
浏览
{{
count
}}
秒后可申请入驻
</text>
<text
class=
"bottom_title"
v-if=
"isStop"
>
申请入驻
</text>
</button>
</view>
</view>
</
template
>
<
script
>
import
{
process
}
from
'@/components/process/process'
export
default
{
components
:
{
process
},
data
()
{
return
{
theme_url
:
'https://qn-static.banshouhui.com/settle_theme.png?v='
+
new
Date
().
getTime
(),
count
:
9
,
isStop
:
false
,
settledInfo
:
null
,
status
:
''
,
saving
:
true
}
},
onLoad
(
e
)
{
this
.
initpageData
(
e
)
this
.
startCounting
()
},
onShow
(){
// if(!this.settledInfo){
// this.getBaseInfo()
// }
uni
.
hideLoading
()
},
methods
:
{
initpageData
(
option
){
let
recommender
=
''
if
(
option
&&
option
.
q
){
const
urlLink
=
decodeURIComponent
(
option
.
q
)
recommender
=
this
.
getQueryVariable
(
urlLink
,
'recommender'
)
getApp
().
globalData
.
settleRecommend
=
recommender
}
if
(
option
&&
option
.
recommender
){
recommender
=
decodeURI
(
option
.
recommender
)
getApp
().
globalData
.
settleRecommend
=
recommender
}
},
getQueryVariable
(
url
,
key
){
const
queryStringArr
=
url
.
split
(
'?'
)
let
val
=
''
let
queryStr
=
queryStringArr
&&
queryStringArr
.
length
>
1
&&
queryStringArr
[
1
]
if
(
!
queryStr
){
return
}
let
queryArr
=
queryStr
.
split
(
"&"
);
for
(
let
i
=
0
;
i
<
queryArr
.
length
;
i
++
)
{
let
pair
=
queryArr
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
key
){
val
=
pair
[
1
];
}
}
return
val
},
async
getBaseInfo
(){
const
app
=
getApp
()
const
callBack
=
(
vm
,
result
)
=>
{
vm
.
settledInfo
=
result
vm
.
status
=
result
.
record
.
status
}
let
settledInfo
=
await
app
.
getBaseInfo
(
this
,
callBack
)
if
(
!
settledInfo
){
return
}
this
.
settledInfo
=
settledInfo
this
.
status
=
settledInfo
.
record
.
status
},
startCounting
:
function
()
{
if
(
this
.
isStop
){
return
}
this
.
count
=
this
.
count
-
1
if
(
this
.
count
>
0
){
setTimeout
(
this
.
startCounting
,
1000
);
}
else
{
this
.
isStop
=
true
}
},
applyClick
:
async
function
()
{
if
(
!
this
.
isStop
){
return
}
this
.
saving
=
true
if
(
!
this
.
settledInfo
){
await
this
.
getBaseInfo
()
this
.
jumpJudge
()
this
.
saving
=
false
return
}
this
.
jumpJudge
()
},
jumpJudge
(){
if
(
this
.
status
>
0
){
uni
.
navigateTo
({
url
:
'/pages/settle/prompt'
})
return
}
uni
.
navigateTo
({
url
:
'/pages/settle/base'
})
}
}
}
</
script
>
<
style
>
/* page {
background-color: rgb(240, 242, 244);
} */
</
style
>
<
style
lang=
"scss"
scoped
>
.u-cell-icon
{
width
:
36rpx
;
height
:
36rpx
;
margin-right
:
8rpx
;
}
.back_view
{
background-color
:
#FFFFFF
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.theme_image
{
width
:
100%
;
height
:
3000rpx
;
margin-bottom
:
164rpx
;
}
.bottom_view
{
position
:fixed
;
box-shadow
:
0
-1rpx
6rpx
rgba
(
0
,
0
,
0
,
0
.05
);
bottom
:
0
;
background-color
:
#DAEBFF
;;
width
:
100%
;
height
:
164rpx
;
display
:
flex
;
align-content
:
center
;
justify-content
:
center
;
}
.bottom_btn
{
margin-top
:
30rpx
;
width
:
600rpx
;
height
:
104rpx
;
line-height
:
96rpx
;
border-radius
:
54rpx
;
// border: 4rpx solid #FFFFFF;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
&
.apply_color
{
// border: 4rpx solid #2272FF;
.bottom_title
{
color
:
#fff
;
}
}
}
.bottom_title
{
font-weight
:
bold
;
font-size
:
32rpx
;
color
:
#2272FF
;
}
.default_color
{
background-color
:
#fff
;
}
.apply_color
{
background-color
:
#2272FF
;
}
.introduction
{
border
:
4rpx
solid
#2272FF
;
border-radius
:
10rpx
;
background-color
:
#FFFFFF
;
margin
:
20rpx
;
margin-bottom
:
200rpx
;
}
.introduction
.item
{
padding
:
20rpx
;
}
.introduction
.item
.label
{
font-size
:
32rpx
;
padding
:
10rpx
;
}
.introduction
.item
.content
{
font-size
:
28rpx
;
padding
:
20rpx
40rpx
20rpx
40rpx
;
}
.careful-color
{
color
:
red
;
}
.careful-content
{
padding
:
10rpx
;
font-size
:
32rpx
;
}
</
style
>
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