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
6feded7e
Commit
6feded7e
authored
Apr 29, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
502e8a73
5419b705
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2067 additions
and
1931 deletions
+2067
-1931
order.js
src/common/api/order.js
+44
-25
appoint-time.vue
src/components/appoint/appoint-time.vue
+3
-3
XhCheckbox.vue
src/components/createCom/XhCheckbox.vue
+17
-17
XhFiles.vue
src/components/createCom/XhFiles.vue
+122
-102
XhInput.vue
src/components/createCom/XhInput.vue
+3
-4
XhLocation.vue
src/components/createCom/XhLocation.vue
+27
-28
XhPicker.vue
src/components/createCom/XhPicker.vue
+1
-1
XhRadio.vue
src/components/createCom/XhRadio.vue
+20
-20
XhSelect.vue
src/components/createCom/XhSelect.vue
+11
-6
XhServiceMeasure.vue
src/components/createCom/XhServiceMeasure.vue
+158
-0
XhTime.vue
src/components/createCom/XhTime.vue
+6
-10
arrMixin.js
src/components/createCom/arrMixin.js
+46
-0
answer.vue
src/pages/learn/answer.vue
+4
-5
index.vue
src/pages/learn/index.vue
+467
-557
complete.vue
src/pages/order/complete.vue
+569
-534
detail.vue
src/pages/order/detail.vue
+3
-2
feedback.vue
src/pages/order/feedback.vue
+10
-25
index.vue
src/pages/order/index.vue
+556
-592
No files found.
src/common/api/order.js
View file @
6feded7e
...
...
@@ -8,93 +8,110 @@ let orderApiFun = function(vm){
* 工单数量查询接口
*/
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
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
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
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
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
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
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
);
/**
* 获取师傅水印 or 默认水印
*/
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
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
getSignDistance
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/'
+
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
=
{
listByRecommendOrder
,
listOrderCount
,
...
...
@@ -106,7 +123,6 @@ let orderApiFun = function(vm){
listOrderRecord
,
orderAccept
,
orderGan
,
maintainWorkerCheckin
,
feedbackConfig
,
traceAndAppointment
,
rejectOrder
,
...
...
@@ -116,10 +132,13 @@ let orderApiFun = function(vm){
openTimerange
,
contactTime
,
checkRejectable
,
getSignDistance
getSignDistance
,
getCompleteConfigAndData
,
getMeasure
,
saveCompleteData
}
return
orderApi
}
module
.
exports
=
{
orderApiFun
}
\ No newline at end of file
}
src/components/appoint/appoint-time.vue
View file @
6feded7e
...
...
@@ -50,7 +50,7 @@
</
template
>
<
script
>
let
now
=
Date
.
now
()
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
export
default
{
props
:
{
titleShow
:
{
...
...
@@ -98,7 +98,7 @@
return
{
currentDay
:
0
,
currentTime
:
null
,
appointTime
:
Date
.
now
()
,
appointTime
:
now
,
appointRange
:
""
,
num
:
0
,
hasLast
:
false
...
...
@@ -107,7 +107,7 @@
watch
:
{
title
()
{
this
.
currentDay
=
0
this
.
appointTime
=
Date
.
now
()
this
.
appointTime
=
now
this
.
currentTime
=
null
this
.
appointRange
=
""
}
...
...
src/components/createCom/XhCheckbox.vue
View file @
6feded7e
...
...
@@ -2,7 +2,7 @@
<
template
>
<view
class=
"list"
>
<view
v-for=
"(item,index) in settings"
:key=
"index"
:class=
"
{'txt':true,'active':checkStatus(item
)}" @click="setValue(item)">
{{
item
}}
:class=
"
{'txt':true,'active':checkStatus(item
.key)}" @click="setValue(item.key)">
{{
item
.
label
}}
</view>
</view>
</
template
>
...
...
@@ -20,7 +20,7 @@
},
computed
:
{
settings
()
{
return
this
.
item
.
setting
s
||
[]
return
this
.
item
.
fieldsOption
s
||
[]
}
},
watch
:
{},
...
...
@@ -51,22 +51,22 @@
</
script
>
<
style
lang=
"scss"
scoped
>
.list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
.txt
{
color
:
#666
;
padding
:
10rpx
30rpx
;
margin
:
5rpx
;
background
:
#F4F5F7
;
border-radius
:
10rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
max-width
:
48%
;
&
.active
{
background-color
:
#2272FF
;
color
:
#fff
;
}
.txt
{
color
:
#666
;
padding
:
10rpx
30rpx
;
margin
:
5rpx
;
background
:
#F4F5F7
;
border-radius
:
10rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
max-width
:
48%
;
&
.active
{
background-color
:
#2272FF
;
color
:
#fff
;
}
}
}
</
style
>
src/components/createCom/XhFiles.vue
View file @
6feded7e
...
...
@@ -5,48 +5,48 @@
<view
class=
"txt u-flex-1"
>
{{
item
.
fieldsTitle
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
-->
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"img-list"
v-for=
"(item,index) in imgList"
:key=
"index"
>
<u-image
class=
"pic"
width=
"170"
height=
"170"
:src=
"item.path"
@
click
.
stop=
"prviewImage(item.path,index)"
></u-image>
<view
class=
"icon-del-box"
@
click
.
stop=
"delFile(index)"
>
<view
class=
"icon-del"
></view>
<view
class=
"icon-del rotate"
></view>
</view>
</view>
<view
class=
"img-list"
@
click=
"choose"
>
<u-image
class=
"pic"
width=
"170rpx"
height=
"170"
@
click=
"selectUpload"
src=
"https://gitee.com/xuqu/uView/blob/master/static/uview/example/min_button.png"
></u-image>
<u-image
class=
"pic"
width=
"170"
height=
"170"
:src=
"item.path"
@
click
.
stop=
"prviewImage(item.path,index)"
></u-image>
<view
class=
"icon-del-box"
@
click
.
stop=
"delFile(index)"
>
<view
class=
"icon-del"
></view>
<view
class=
"icon-del rotate"
></view>
</view>
</view>
<view
class=
"img-list"
>
<u-image
class=
"pic"
width=
"170rpx"
height=
"170"
@
click=
"selectUpload"
src=
"https://gitee.com/xuqu/uView/blob/master/static/uview/example/min_button.png"
></u-image>
</view>
<!--
<u-image
class=
"pic"
v-for=
"item in 6"
width=
"170rpx"
height=
"170"
src=
"'https://cdn.uviewui.com/uview/example/fade.jpg"
></u-image>
-->
</view>
</view>
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
</view>
</
template
>
<
script
>
import
objMixin
from
'./obj
Mixin'
import
arrMixin
from
'./arr
Mixin'
import
baseFile
from
'@/components/upload/index'
;
export
default
{
name
:
'XhFiles'
,
components
:
{},
mixins
:
[
obj
Mixin
,
baseFile
],
props
:
{
files
:
{
type
:
Array
,
}
mixins
:
[
arr
Mixin
,
baseFile
],
props
:
{
files
:
{
type
:
Array
,
}
},
filters
:{},
data
()
{
return
{
maskShow
:
false
,
list
:
[
{
text
:
'相册'
},
{
text
:
'拍照'
}
],
takeStatus
:
false
,
maskShow
:
false
,
list
:
[
{
text
:
'相册'
},
{
text
:
'拍照'
}
],
takeStatus
:
false
,
}
},
computed
:
{
...
...
@@ -54,34 +54,54 @@
return
this
.
item
.
settings
||
[]
}
},
watch
:
{
'takeStatus'
:
function
(
val
,
oldVal
){
this
.
$emit
(
'getTakeStatus'
,
{
status
:
val
,
index
:
this
.
itemIndex
})
},
'files'
:
{
// 处理相机拍照返回的图片
handler
(
val
)
{
this
.
imgList
=
val
.
map
(
v
=>
{
v
.
path
=
v
.
src
return
v
})
this
.
setValue
()
},
deep
:
true
,
immediate
:
true
,
}
watch
:
{
'takeStatus'
:
function
(
val
,
oldVal
){
this
.
$emit
(
'getTakeStatus'
,
{
status
:
val
,
index
:
this
.
itemIndex
})
},
'files'
:
{
// 处理相机拍照返回的图片
handler
(
val
)
{
if
(
val
&&
val
.
length
>
0
){
val
.
forEach
((
item
,
index
,
array
)
=>
{
item
.
path
=
item
.
src
this
.
imgList
.
push
(
item
)
})
// this.imgList = val.map(v => {
// v.path = v.src
// return v
// })
this
.
setValue
()
}
},
deep
:
true
,
immediate
:
true
,
},
// 'value'(val, oldVal){
// if(val){
// this.imgList = val.map(img =>{
// return {path:img}
// })
// }
// }
},
mounted
()
{
if
(
this
.
value
){
this
.
imgList
=
this
.
value
.
map
(
img
=>
{
return
{
path
:
img
}
})
}
this
.
setValue
()
},
mounted
()
{},
methods
:
{
selectUpload
(){
// 弹窗展示
this
.
maskShow
=
true
},
uploadSelect
(
index
)
{
if
(
index
===
0
)
{
this
.
uploadFile
(
'photo'
)
}
else
{
this
.
uploadFile
()
}
},
uploadSelect
(
index
)
{
if
(
index
===
0
)
{
this
.
uploadFile
(
'photo'
)
}
else
{
this
.
uploadFile
()
}
},
async
uploadFile
(
type
){
const
self
=
this
...
...
@@ -89,8 +109,8 @@
// 直接打开相册
let
config
=
{
options
:{
sourceType
:[
'album'
],
//['album', 'camera']
count
:
5
,
sourceType
:[
'album'
],
//['album', 'camera']
count
:
10
,
sizeType
:
[
'compressed'
]
}
}
...
...
@@ -104,67 +124,67 @@
setValue
()
{
const
dataValue
=
[]
this
.
imgList
.
map
(
item
=>
{
dataValue
.
push
(
item
.
key
)
})
console
.
log
(
this
.
imgList
)
dataValue
.
push
(
item
.
src
)
})
this
.
valueChange
(
dataValue
)
},
prviewImage
(
url
,
index
)
{
uni
.
previewImage
({
urls
:
[
url
],
current
:
index
});
},
delFile
(
index
)
{
this
.
imgList
.
splice
(
index
,
1
)
},
prviewImage
(
url
,
index
)
{
uni
.
previewImage
({
urls
:
[
url
],
current
:
index
});
},
delFile
(
index
)
{
this
.
imgList
.
splice
(
index
,
1
)
this
.
setValue
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.pic
{
margin-right
:
15rpx
;
margin-bottom
:
15rpx
;
//
margin-right: 15rpx;
//
margin-bottom: 15rpx;
&
:nth-child
(
3n
)
{
margin-right
:
0
;
}
}
.img-list
{
position
:
relative
;
margin
:
8rpx
;
border
:
1px
solid
#eee
;
width
:
170rpx
;
height
:
170rpx
;
.icon-del-box
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
top
:
10rpx
;
right
:
10rpx
;
height
:
40rpx
;
width
:
40rpx
;
border-radius
:
50%
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2
;
transform
:
rotate
(
-45deg
);
}
.icon-del
{
width
:
30rpx
;
height
:
4rpx
;
background-color
:
#fff
;
border-radius
:
2px
;
}
.rotate
{
position
:
absolute
;
transform
:
rotate
(
90deg
);
}
}
}
.img-list
{
position
:
relative
;
margin
:
8rpx
;
border
:
1px
solid
#eee
;
width
:
170rpx
;
height
:
170rpx
;
.icon-del-box
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
top
:
10rpx
;
right
:
10rpx
;
height
:
40rpx
;
width
:
40rpx
;
border-radius
:
50%
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2
;
transform
:
rotate
(
-45deg
);
}
.icon-del
{
width
:
30rpx
;
height
:
4rpx
;
background-color
:
#fff
;
border-radius
:
2px
;
}
.rotate
{
position
:
absolute
;
transform
:
rotate
(
90deg
);
}
}
// .list {
// display: flex;
...
...
src/components/createCom/XhInput.vue
View file @
6feded7e
...
...
@@ -16,8 +16,7 @@
return
{}
},
computed
:
{
type
()
{
console
.
log
(
this
.
item
)
type
()
{
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
||
this
.
item
.
fieldsType
==
'textarea'
)
{
return
this
.
item
.
fieldsType
}
else
{
...
...
@@ -32,7 +31,7 @@
</
script
>
<
style
scoped
>
.input-item
{
background
:
#F4F5F7
;
.input-item
{
background
:
#F4F5F7
;
}
</
style
>
src/components/createCom/XhLocation.vue
View file @
6feded7e
<!-- ******************* 定位 ******************* -->
<
template
>
<
template
>
<view>
<view
class=
"list u-flex u-row-between"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<!--
<u-button
type=
"primary"
size=
"mini"
@
click=
"$u.debounce(getLocation,1000)"
>
自动定位
</u-button>
-->
<view
class=
"u-flex-1 location-name"
>
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
自动定位
</view>
</view>
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
<view
class=
"u-flex-1 location-name"
>
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
自动定位
</view>
</view>
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
</view>
</
template
>
<
script
>
import
objMixin
from
'./obj
Mixin'
import
arrMixin
from
'./arr
Mixin'
export
default
{
name
:
'XhLocation'
,
components
:
{},
mixins
:
[
obj
Mixin
],
mixins
:
[
arr
Mixin
],
props
:
{},
filters
:{},
data
()
{
...
...
@@ -28,18 +27,18 @@
valueTxt
()
{
let
str
=
''
const
dataValue
=
this
.
dataValue
if
(
dataValue
&&
dataValue
.
length
>
1
){
if
(
dataValue
&&
dataValue
.
length
>
1
){
str
=
'经度:'
+
dataValue
[
0
].
toFixed
(
4
)
+
','
+
'纬度:'
+
dataValue
[
1
].
toFixed
(
4
)
}
return
str
},
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
}
},
watch
:
{},
created
()
{
this
.
getLocation
()
created
()
{
this
.
getLocation
()
},
methods
:
{
getLocation
()
{
...
...
@@ -69,18 +68,18 @@
font-size
:
28rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
}
.item-image
{
width
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
}
.location-name
{
color
:
#2272FF
;
text-align
:
right
;
}
.location
{
background
:
#F4F5F7
;
padding
:
10rpx
;
}
.item-image
{
width
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
}
.location-name
{
color
:
#2272FF
;
text-align
:
right
;
}
.location
{
background
:
#F4F5F7
;
padding
:
10rpx
;
}
</
style
>
src/components/createCom/XhPicker.vue
View file @
6feded7e
<!-- *******************
单级/多级 选择
******************* -->
<!-- *******************
服务措施
******************* -->
<
template
>
<view
class=
"picker-box"
>
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
...
...
src/components/createCom/XhRadio.vue
View file @
6feded7e
<!-- ******************* 单选框 ******************* -->
<
template
>
<view
class=
"list"
>
<view
v-for=
"(item,index) in settings"
:key=
"index"
:class=
"
{'txt':true,'active':item===dataValue}"
@click="setValue(item
)">
{{
item
}}
</view>
<view
v-for=
"(item,index) in settings"
:key=
"index"
:class=
"
{'txt':true,'active':item
.key
===dataValue}"
@click="setValue(item
.key)">
{{
item
.
label
}}
</view>
</view>
</
template
>
...
...
@@ -17,8 +17,8 @@
return
{}
},
computed
:
{
settings
(){
return
this
.
item
.
setting
s
||
[]
settings
(){
return
this
.
item
.
fieldsOption
s
||
[]
}
},
watch
:
{},
...
...
@@ -33,23 +33,23 @@
</
script
>
<
style
lang=
"scss"
scoped
>
.list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
.txt
{
color
:
#666
;
padding
:
10rpx
30rpx
;
margin
:
5rpx
;
background
:
#F4F5F7
;
border-radius
:
10rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
text-align
:
center
;
max-width
:
48%
;
&
.active
{
background-color
:
#2272FF
;
color
:
#fff
;
}
.txt
{
color
:
#666
;
padding
:
10rpx
30rpx
;
margin
:
5rpx
;
background
:
#F4F5F7
;
border-radius
:
10rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
text-align
:
center
;
max-width
:
48%
;
&
.active
{
background-color
:
#2272FF
;
color
:
#fff
;
}
}
}
</
style
>
src/components/createCom/XhSelect.vue
View file @
6feded7e
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<view>
<u-input
v-model=
"dataValue
"
readOnly
@
click=
"show=true"
type=
"select"
/>
<u-input
:value=
"text
"
readOnly
@
click=
"show=true"
type=
"select"
/>
<u-action-sheet
:list=
"settings"
v-model=
"show"
@
click=
"actionSheetCallback"
></u-action-sheet>
</view>
</
template
>
...
...
@@ -28,22 +28,27 @@
},
settings
()
{
let
result
=
[]
let
settings
=
this
.
item
.
setting
s
||
[]
let
settings
=
this
.
item
.
fieldsOption
s
||
[]
result
=
settings
.
map
(
item
=>
{
return
{
text
:
item
text
:
item
.
label
,
id
:
item
.
key
}
})
return
result
},
text
(){
let
option
=
this
.
item
.
fieldsOptions
.
find
(
a
=>
{
return
a
.
key
===
this
.
dataValue
})
return
option
?
option
.
label
:
''
}
},
watch
:
{},
mounted
()
{},
methods
:
{
actionSheetCallback
(
index
)
{
let
txt
=
this
.
settings
[
index
].
text
;
this
.
dataValue
=
txt
this
.
valueChange
(
txt
)
let
id
=
this
.
settings
[
index
].
id
;
this
.
dataValue
=
id
this
.
valueChange
(
id
)
}
}
}
...
...
src/components/createCom/XhServiceMeasure.vue
0 → 100644
View file @
6feded7e
<!-- ******************* 单级/多级 选择 ******************* -->
<
template
>
<view
class=
"picker-box"
>
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<view
class=
"txt u-flex-1"
>
{{
text
||
''
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
<u-picker
v-model=
"showPicker"
range-key=
"label"
@
columnchange=
"columnchange"
:mode=
"isNotMulti?'selector':'multiSelector'"
@
confirm=
"pickerConfirm"
:range=
"settings"
></u-picker>
<!-- :default-selector='[0, 1]' -->
<u-toast
ref=
"uToast"
/>
</view>
</
template
>
<
script
>
import
objMixin
from
'./objMixin'
export
default
{
name
:
'XhPicker'
,
components
:
{},
mixins
:
[
objMixin
],
props
:
{
// 当mode=selector或者mode=multiSelector时,提供的默认选中的下标
defaultSelector
:
{
type
:
Array
,
default
()
{
return
[
0
];
}
},
// 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容
rangeKey
:
{
type
:
String
,
default
:
'label'
},
value
:
{
type
:
String
,
default
:
'{}'
},
orderId
:{
type
:
Number
,
default
:
0
},
categoryId
:{
type
:
Number
,
default
:
0
},
specificationId
:{
type
:
String
,
default
:
'0'
},
orderServiceType
:{
type
:
String
,
default
:
'安装'
},
},
filters
:{},
data
()
{
return
{
isNotMulti
:
true
,
showPicker
:
false
,
settings
:[],
measure
:[]
}
},
computed
:
{
text
(){
let
val
=
''
if
(
this
.
value
){
let
data
=
JSON
.
parse
(
this
.
value
);
val
=
data
[
0
].
measureTypeName
+
"-"
+
data
[
0
].
measureName
}
return
val
}
},
watch
:
{
specificationId
(
val
,
oldVal
){
this
.
initComponent
()
},
},
mounted
()
{
this
.
isNotMulti
=
this
.
orderServiceType
===
'安装'
this
.
initComponent
()
},
methods
:
{
openPicker
(){
if
(
this
.
specificationId
===
'0'
){
this
.
$refs
.
uToast
.
show
({
title
:
'请先选择规格'
,
type
:
'error'
})
return
}
this
.
showPicker
=
true
},
initComponent
(){
if
(
this
.
isNotMulti
){
this
.
initMeasure
()
}
else
{
this
.
initSymptoms
()
}
},
initSymptoms
(){
// 初始化现象
},
initCause
(){
// 初始化原因
},
initMeasure
(){
// 初始化措施
let
self
=
this
if
(
self
.
orderId
){
let
param
=
{
orderId
:
self
.
orderId
,
categoryId
:
self
.
categoryId
,
specificationId
:
self
.
specificationId
,
orderServiceTypeText
:
self
.
orderServiceType
}
self
.
$u
.
api
.
getMeasure
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
result
=
[]
for
(
let
key
in
res
.
data
){
self
.
measure
=
res
.
data
[
key
].
measureExtendDtos
res
.
data
[
key
].
measureExtendDtos
.
map
((
item
,
index
)
=>
{
result
.
push
({
"id"
:
item
.
measureId
,
"label"
:
item
.
measureName
})
})
}
if
(
self
.
orderServiceType
===
'安装'
){
self
.
settings
=
result
}
else
{
self
.
settings
[
2
]
=
result
}
}
else
{
console
.
log
(
res
.
message
,
"查询措施失败"
);
}
});
}
},
pickerConfirm
(
data
){
let
result
=
[]
if
(
this
.
isMulti
){
// 维修
}
else
{
// 安装
result
.
push
(
this
.
measure
[
data
[
0
]])
}
this
.
valueChange
(
JSON
.
stringify
(
result
))
},
columnchange
(
data
){
// console.log(data,'data')
// // 树列改变时进行联动操作
// const {column ,index} = data
// let arr = [9,10,50]
// this.settings.splice(column+1,1,arr)
// console.log(this.settings,'this.settings')
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
src/components/createCom/XhTime.vue
View file @
6feded7e
...
...
@@ -2,8 +2,8 @@
<
template
>
<view
class=
"picker-box"
>
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<
view
class=
"txt"
>
{{
item
.
fieldsTitle
}}
</view
>
<view
class=
"txt u-flex-1"
>
{{
dataValue
}}
</view>
<
!--
<view
class=
"txt"
>
{{
item
.
fieldsTitle
}}
</view>
--
>
<view
class=
"txt u-flex-1"
>
{{
dataValue
||
'请选择时间'
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
<u-picker
:params=
"params"
v-model=
"showPicker"
mode=
"time"
@
confirm=
"pickerConfirm"
></u-picker>
...
...
@@ -25,10 +25,9 @@
year
:
true
,
month
:
true
,
day
:
true
,
hour
:
true
,
minute
:
true
,
second
:
true
,
// 选择时间的时间戳
hour
:
false
,
minute
:
false
,
second
:
false
,
timestamp
:
true
,
}
}
...
...
@@ -49,11 +48,8 @@
this
.
showPicker
=
true
},
pickerConfirm
(
data
)
{
console
.
log
(
data
,
'DATA'
)
let
result
=
[]
let
dataValue
=
data
.
year
+
'-'
+
data
.
month
+
'-'
+
data
.
day
+
' '
+
data
.
hour
+
':'
+
data
.
minute
+
':'
+
data
.
second
console
.
log
(
dataValue
,
'dataValue'
)
let
dataValue
=
data
.
year
+
'-'
+
data
.
month
+
'-'
+
data
.
day
this
.
dataValue
=
dataValue
this
.
valueChange
(
dataValue
)
},
...
...
src/components/createCom/arrMixin.js
0 → 100644
View file @
6feded7e
/** 自定义组件 共同逻辑 */
export
default
{
data
()
{
return
{
dataValue
:
null
}
},
watch
:
{
value
:
function
(
val
)
{
this
.
dataValue
=
val
}
},
props
:
{
value
:
{
type
:
Array
,
default
:
[]
},
/** 索引值 用于更新数据 */
itemIndex
:
Number
,
groupIndex
:
Number
,
/** 包含数据源 */
item
:
Object
,
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
mounted
()
{
/** 如果有值以传入值为主 如果无值 已默认值为主 */
this
.
dataValue
=
this
.
value
},
methods
:
{
// 输入的值
valueChange
(
val
)
{
const
data
=
{
groupIndex
:
this
.
groupIndex
,
// 左侧菜单下标
itemIndex
:
this
.
itemIndex
,
//右侧某一项下标
value
:
val
}
this
.
$emit
(
'value-change'
,
data
)
}
}
}
src/pages/learn/answer.vue
View file @
6feded7e
...
...
@@ -62,8 +62,7 @@ export default {
console
.
log
(
"标识符4"
,
this
.
userExamId
);
console
.
log
(
"标识符3"
+
num
);
this
.
userExamId
=
num
;
this
.
userExamId
=
num
.
userExamId
;
this
.
getExaminationQuestions
();
},
onUnload
()
{
...
...
@@ -112,7 +111,7 @@ export default {
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
.
userExamId
,
this
.
userExamId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
...
...
@@ -134,7 +133,7 @@ export default {
this
.
isQuestion
=
""
;
console
.
log
(
"标识符6666"
,
this
.
userExamId
.
userExamId
);
wx
.
navigateTo
({
url
:
"./result?userExamId="
+
this
.
userExamId
.
userExamId
,
url
:
"./result?userExamId="
+
this
.
userExamId
,
});
}
//判断有没有选
...
...
@@ -154,7 +153,7 @@ export default {
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
.
userExamId
+
this
.
userExamId
+
"&questionId="
+
this
.
ExaminationQuestions
.
question
.
id
+
"&userAnswerIds="
+
...
...
src/pages/learn/index.vue
View file @
6feded7e
This diff is collapsed.
Click to expand it.
src/pages/order/complete.vue
View file @
6feded7e
This diff is collapsed.
Click to expand it.
src/pages/order/detail.vue
View file @
6feded7e
...
...
@@ -223,7 +223,6 @@
}
else
{
// 异常处理
}
this
.
orderId
=
'8371315'
this
.
loadOrderDetail
()
this
.
loadOrderRecord
()
this
.
getLocation
()
...
...
@@ -534,7 +533,9 @@
filish
(){
// 去完工
uni
.
navigateTo
({
url
:
'pages/order/complete?orderId='
+
this
.
order
.
orderId
url
:
'pages/order/complete?orderId='
+
this
.
order
.
orderId
+
"&categoryId="
+
this
.
order
.
categoryId
+
"&orderServiceType="
+
this
.
order
.
orderServiceType
})
},
rejectOrder
()
{
// 拒单
...
...
src/pages/order/feedback.vue
View file @
6feded7e
...
...
@@ -75,7 +75,7 @@
</
template
>
<
script
>
let
now
=
Date
.
now
()
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
import
appointTime
from
'@/components/appoint/appoint-time.vue'
export
default
{
data
()
{
...
...
@@ -132,7 +132,8 @@
nextTraceDatetime
:
''
,
// 下次跟踪时间
remark
:
''
,
// 备注
},
appointTitle
:
"预约时间"
appointTitle
:
"预约时间"
,
num
:
0
,
};
},
components
:{
...
...
@@ -162,7 +163,6 @@
},
},
async
onLoad
(
e
)
{
// this.$u.vuex('vuex_token', 'RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5');
this
.
orderId
=
1
this
.
categoryId
=
88
if
(
e
)
{
...
...
@@ -173,8 +173,6 @@
title
:
"数据加载中"
,
mask
:
true
})
this
.
loadCalendar
()
this
.
loadTimerange
()
await
this
.
initPageData
()
},
methods
:
{
...
...
@@ -182,7 +180,8 @@
async
initPageData
()
{
let
self
=
this
let
params
=
{
categoryId
:
self
.
categoryId
}
let
res
=
await
self
.
$u
.
api
.
feedbackConfig
(
params
)
let
pse
=
await
Promise
.
all
([
self
.
$u
.
api
.
feedbackConfig
(
params
),
self
.
loadCalendar
(),
self
.
loadTimerange
()])
let
res
=
pse
[
0
]
if
(
res
&&
res
.
code
==
200
)
{
self
.
config
=
res
.
data
self
.
initParams
()
...
...
@@ -219,7 +218,7 @@
self
.
appointTitle
=
'预约时间'
if
(
self
.
dateList
&&
self
.
timeList
)
{
self
.
timeList
.
map
((
item
,
index
)
=>
{
if
(
data
.
item
.
timeRange
.
indexOf
(
item
.
pkey
)
>
-
1
)
{
if
(
self
.
dateList
.
indexOf
(
item
.
pkey
)
>
-
1
)
{
item
.
disabled
=
true
}
else
{
item
.
disabled
=
false
...
...
@@ -241,7 +240,7 @@
async
loadCalendar
()
{
let
self
=
this
let
params
=
{
num
:
1
num
:
this
.
num
}
let
res
=
await
this
.
$u
.
api
.
workerCalendar
(
params
)
if
(
res
&&
res
.
code
==
200
)
{
...
...
@@ -283,25 +282,11 @@
if
(
data
&&
data
.
time
)
{
let
num
=
data
.
num
let
time
=
data
.
time
this
.
num
=
num
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
:
[]},
]
this
.
loadCalendar
()
}
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
:
[]},
]
this
.
loadCalendar
()
}
}
...
...
src/pages/order/index.vue
View file @
6feded7e
This diff is collapsed.
Click to expand it.
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