Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
3adcf201
Commit
3adcf201
authored
Dec 09, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完工页面 接口对接
parent
2b061b66
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
718 additions
and
46 deletions
+718
-46
App.vue
take-order/App.vue
+4
-1
pages.json
take-order/pages.json
+25
-9
record.vue
take-order/pages/index/record.vue
+18
-3
wxlogin.vue
take-order/pages/login/wxlogin.vue
+3
-3
detail.vue
take-order/pages/take/detail.vue
+15
-3
finish.vue
take-order/pages/take/finish.vue
+279
-25
index.vue
take-order/pages/take/index.vue
+2
-2
measure.vue
take-order/pages/take/measure.vue
+372
-0
No files found.
take-order/App.vue
View file @
3adcf201
...
...
@@ -9,8 +9,9 @@
globalData
:
{
//https://system.banshouhui.com
//https://system.dev.banshouhui.com
domain_Name
:
'https://system.dev.banshouhui.com'
,
//http://192.168.0.208:8192
domain_Name
:
'http://192.168.0.208:37080'
,
//
domain_Name: 'http://192.168.0.208:37080',
token
:
''
,
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
...
...
@@ -30,6 +31,8 @@
icon_rob
:
'https://qn-static.banshouhui.com/take_order/icon/rob.png'
,
//右箭头 图标
icon_arrow_right
:
'https://qn-static.banshouhui.com/arrow_right.png'
,
//照片添加 图标
icon_photo_add
:
'https://qn-static.banshouhui.com/take_order/icon/photo_add.png'
,
//登录注册页--
//通过code获取用户信息(登录)
...
...
take-order/pages.json
View file @
3adcf201
...
...
@@ -7,36 +7,52 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/take/
finish
"
,
"path"
:
"pages/take/
index
"
,
"style"
:
{
"navigationBarTitleText"
:
"
完工信息
"
"navigationBarTitleText"
:
"
接单
"
}
},
{
"path"
:
"pages/
take
/index"
,
"path"
:
"pages/
index
/index"
,
"style"
:
{
"navigationBarTitleText"
:
"
接
单"
"navigationBarTitleText"
:
"
下
单"
}
},
{
"path"
:
"pages/take/
detail
"
,
"path"
:
"pages/take/
finish
"
,
"style"
:
{
"navigationBarTitleText"
:
"
接单详情
"
"navigationBarTitleText"
:
"
完工信息
"
}
},
{
"path"
:
"pages/
index/index
"
,
"path"
:
"pages/
take/measure
"
,
"style"
:
{
"navigationBarTitleText"
:
"下单"
"navigationBarTitleText"
:
"服务措施"
}
},
{
"path"
:
"pages/take/detail"
,
"style"
:
{
"navigationBarTitleText"
:
"接单详情"
}
},
{
"path"
:
"pages/take/rob"
,
"style"
:
{
...
...
take-order/pages/index/record.vue
View file @
3adcf201
...
...
@@ -11,7 +11,7 @@
</view>
</view>
<view
class=
"listView"
>
<view
class=
"itemView"
v-if=
"activeTop == 0"
v-for=
"(item,ikey) in unfinishList"
:key=
"ikey"
>
<view
class=
"itemView"
@
click=
"itemClick(item)"
v-if=
"activeTop == 0"
v-for=
"(item,ikey) in unfinishList"
:key=
"ikey"
>
<view
class=
"nameView"
>
<view
class=
"nameLeftView"
>
<text
class=
"nameText"
v-if=
"item.contactName"
>
{{
item
.
contactName
}}
</text>
...
...
@@ -35,7 +35,7 @@
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<text
class=
"noDataText"
>
暂无数据
</text>
</view>
<view
class=
"itemView"
v-if=
"activeTop == 1"
v-for=
"(item,ikey) in finishList"
:key=
"ikey"
>
<view
class=
"itemView"
@
click=
"itemClick(item)"
v-if=
"activeTop == 1"
v-for=
"(item,ikey) in finishList"
:key=
"ikey"
>
<view
class=
"nameView"
>
<view
class=
"nameLeftView"
>
<text
class=
"nameText"
v-if=
"item.contactName"
>
{{
item
.
contactName
}}
</text>
...
...
@@ -91,12 +91,17 @@
methods
:
{
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/customer'
//getApp().globalData.createOrderList
//获取下单列表
createOrderList
:
function
()
{
let
that
=
this
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
createOrderList
,
+
'/wxh-worker-rest/rest/order/revision/applets/'
+
getApp
().
globalData
.
token
+
'/order/customer'
,
method
:
'GET'
,
data
:
{
type
:
this
.
activeTop
,
...
...
@@ -137,6 +142,7 @@
})
},
//顶部点击
topClick
:
function
(
active
)
{
if
(
this
.
activeTop
!=
active
){
this
.
activeTop
=
active
...
...
@@ -144,6 +150,7 @@
}
},
//拨打电话
callClick
:
function
(
phone
)
{
console
.
log
(
phone
)
uni
.
makePhoneCall
({
...
...
@@ -151,6 +158,14 @@
});
},
//详情点击
itemClick
:
function
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/take/detail'
+
'?orderId='
+
item
.
orderId
,
})
},
}
...
...
take-order/pages/login/wxlogin.vue
View file @
3adcf201
...
...
@@ -21,7 +21,7 @@
export
default
{
data
()
{
return
{
domain_name
:
'http://192.168.0.208:8192'
,
//
domain_name:'http://192.168.0.208:8192',
isNewUser
:
false
,
unionID
:
''
,
openID
:
''
,
...
...
@@ -128,7 +128,7 @@
title
:
'加载中'
})
uni
.
request
({
url
:
this
.
domain_n
ame
url
:
getApp
().
globalData
.
domain_N
ame
+
getApp
().
globalData
.
getUsersByCode
,
method
:
'GET'
,
data
:
{
...
...
@@ -227,7 +227,7 @@
title
:
'加载中'
})
uni
.
request
({
url
:
this
.
domain_n
ame
url
:
getApp
().
globalData
.
domain_N
ame
+
getApp
().
globalData
.
findByMobile
,
method
:
'POST'
,
data
:
{
...
...
take-order/pages/take/detail.vue
View file @
3adcf201
...
...
@@ -144,9 +144,7 @@
this
.
orderInfo
=
res
.
data
.
data
if
(
res
.
data
.
data
.
images
){
this
.
photoList
=
res
.
data
.
data
.
images
.
split
(
','
);
console
.
log
(
'照片数组:'
)
console
.
log
(
this
.
photoList
)
this
.
adjustPhotoList
(
res
.
data
.
data
.
images
)
}
}
else
{
...
...
@@ -166,6 +164,20 @@
})
},
//https://system.banshouhui.com/wxh-sts-rest/rest/file/image/order/13767/1442887919988.jpg
adjustPhotoList
:
function
(
images
)
{
var
photoArray
=
images
.
split
(
','
)
var
newPhotoArray
=
[]
photoArray
.
forEach
(
item
=>
{
var
imageURL
=
getApp
().
globalData
.
domain_Name
+
'/wxh-sts-rest'
+
item
newPhotoArray
.
push
(
imageURL
)
})
this
.
photoList
=
newPhotoArray
console
.
log
(
'照片数组:'
)
console
.
log
(
this
.
photoList
)
},
phoneCallClick
:
function
(
phone
)
{
uni
.
makePhoneCall
({
phoneNumber
:
phone
...
...
take-order/pages/take/finish.vue
View file @
3adcf201
This diff is collapsed.
Click to expand it.
take-order/pages/take/index.vue
View file @
3adcf201
...
...
@@ -173,11 +173,11 @@
console
.
log
(
res
.
data
);
getApp
().
globalData
.
token
=
res
.
data
this
.
getData
()
}
})
await
this
.
getData
()
//
await this.getData()
},
//获取数据
...
...
take-order/pages/take/measure.vue
0 → 100644
View file @
3adcf201
<
template
>
<view
class=
"backView"
>
<view
class=
"listView border_right_2"
>
<view
class=
"itemView"
@
click=
"itemClick(0,item)"
v-for=
"(item,ikey) in leftList"
:key=
"ikey"
>
<text
:class=
"current_symptomsId == item.symptomsId ? 'selectedTitle' : 'itemTitle' "
>
{{
item
.
symptomsName
}}
</text>
<image
class=
"arrowIcon"
:src=
"icon_arrow_right"
mode=
""
></image>
</view>
</view>
<view
class=
"listView border_right_2"
v-if=
"is_mid_show"
>
<view
class=
"itemView"
@
click=
"itemClick(1,item)"
v-for=
"(item,ikey) in midList"
:key=
"ikey"
>
<text
:class=
"current_causeId == item.causeId ? 'selectedTitle' : 'itemTitle' "
>
{{
item
.
symptomsName
}}
</text>
<image
class=
"arrowIcon"
:src=
"icon_arrow_right"
mode=
""
></image>
</view>
</view>
<view
class=
"listView"
v-if=
"is_right_show"
>
<view
class=
"itemView"
@
click=
"itemClick(2,item)"
v-for=
"(item,ikey) in rightList"
:key=
"ikey"
>
<text
:class=
"current_measureId == item.measureId ? 'selectedTitle' : 'itemTitle' "
>
{{
item
.
measureName
}}
</text>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
orderId
:
''
,
serviceType
:
''
,
specificationId
:
''
,
icon_arrow_right
:
''
,
current_symptomsId
:
''
,
current_causeId
:
''
,
current_measureId
:
''
,
current_measureName
:
''
,
is_mid_show
:
false
,
is_right_show
:
false
,
leftList
:[{
title
:
'左左左1'
},{
title
:
'左左左很长很长怎么办呢很长很长怎么办呢2'
},{
title
:
'左左左3'
}],
midList
:[{
title
:
'中中中1'
},{
title
:
'中中中2'
},{
title
:
'中中中很长很长怎么办呢很长很长怎么办呢3'
}],
rightList
:[{
title
:
'右右右很长很长怎么办呢很长很长怎么办呢1'
},{
title
:
'右右右2'
},{
title
:
'右右右3'
}],
}
},
onLoad
(
e
)
{
if
(
e
&&
e
.
orderId
){
this
.
orderId
=
e
.
orderId
}
if
(
e
&&
e
.
serviceType
){
this
.
serviceType
=
e
.
serviceType
}
if
(
e
&&
e
.
specificationId
){
this
.
specificationId
=
e
.
specificationId
}
this
.
icon_arrow_right
=
getApp
().
globalData
.
icon_arrow_right
},
onShow
()
{
this
.
getConfig
()
this
.
getLeftData
()
},
methods
:
{
getConfig
:
function
(){
//测试
/*
getApp().globalData.token = 'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
this.orderId = '10704464'
this.serviceType = '维修'
this.specificationId = '10005'
*/
},
//选项点击
itemClick
:
function
(
side
,
item
)
{
console
.
log
(
'item 点击'
)
console
.
log
(
side
)
console
.
log
(
item
)
//左边 现象
if
(
side
==
0
){
this
.
current_symptomsId
=
item
.
symptomsId
this
.
getMidData
()
this
.
is_right_show
=
false
this
.
current_causeId
=
''
this
.
current_measureId
=
''
}
//中间 原因
if
(
side
==
1
){
this
.
current_causeId
=
item
.
causeId
this
.
getRightData
()
this
.
current_measureId
=
''
}
//右边 措施
if
(
side
==
2
){
this
.
current_measureId
=
item
.
measureId
this
.
current_measureName
=
item
.
measureName
this
.
getFinalData
()
}
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKENa8f4a27fef05fbcc27d473f32694e51a68101242/price/newsymptoms/V2/11885888
//左边 获取 故障现象 数据
getLeftData
:
function
()
{
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
getApp
().
globalData
.
token
+
'/price/newsymptoms/V2/'
+
this
.
orderId
,
method
:
'GET'
,
data
:
{
serviceType
:
this
.
serviceType
},
header
:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 故障现象 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
this
.
leftList
=
res
.
data
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 故障现象 失败'
)
console
.
log
(
e
)
}
})
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/cause/V2/11885888/10000
//中间 获取 查询故障现象 关联的 故障原因 数据
getMidData
:
function
(){
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
getApp
().
globalData
.
token
+
'/price/cause/V2/'
+
this
.
orderId
+
'/'
+
this
.
current_symptomsId
,
method
:
'GET'
,
data
:
{
//serviceType:this.serviceType
},
header
:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 查询故障现象 关联的 故障原因 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
this
.
midList
=
res
.
data
this
.
is_mid_show
=
true
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 查询故障现象 关联的 故障原因 失败'
)
console
.
log
(
e
)
}
})
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/measure/V2/11885888/10001
//右边 获取 查询故障原因 关联的 服务措施详情以及价格 数据
getRightData
:
function
(){
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
getApp
().
globalData
.
token
+
'/price/measure/V2/'
+
this
.
orderId
+
'/'
+
this
.
current_causeId
,
method
:
'GET'
,
data
:
{
//serviceType:this.serviceType
},
header
:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 查询故障原因 关联的 服务措施详情以及价格 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
this
.
rightList
=
res
.
data
this
.
is_right_show
=
true
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 查询故障原因 关联的 服务措施详情以及价格 失败'
)
console
.
log
(
e
)
}
})
},
//getToken,_specificationId,measuresId,_orderId
//http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN6c30a6be9e59f428455abd2fdb38fbaf360b4ae0/price/11634/charge/10001/measure/11885888
//最终请求
getFinalData
:
function
()
{
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
getApp
().
globalData
.
token
+
'/price/'
+
this
.
specificationId
+
'/charge/'
+
this
.
current_measureId
+
'/measure/'
+
this
.
orderId
,
method
:
'GET'
,
data
:
{
//serviceType:this.serviceType
},
header
:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'最终请求 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
uni
.
showToast
({
title
:
'请求成功'
})
this
.
passValueAndBack
(
res
)
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'最终请求 失败'
)
console
.
log
(
e
)
}
})
},
//传值返回
passValueAndBack
:
function
(
res
)
{
let
pages
=
getCurrentPages
();
let
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
prevPage
.
$vm
.
measure_measureTypeName
=
res
.
data
.
measureTypeName
,
prevPage
.
$vm
.
measure_measureTypeId
=
res
.
data
.
measureTypeId
,
prevPage
.
$vm
.
measure_inGuaranteeCommission
=
res
.
data
.
inGuaranteeCommission
,
prevPage
.
$vm
.
measure_outGuaranteeCharge
=
res
.
data
.
outGuaranteeCharge
,
prevPage
.
$vm
.
measure_showContent
=
this
.
current_measureName
uni
.
navigateBack
({
})
},
}
}
</
script
>
<
style
>
.backView
{
background-color
:
#FAFAFA
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
row
;
}
.listView
{
background-color
:
#FFFFFF
;
width
:
33%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.border_right_2
{
border-right
:
2
rpx
solid
#F3F3F3
;
}
.itemView
{
background-color
:
#FFFFFF
;
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
border-bottom
:
2
rpx
solid
#F3F3F3
;
}
.itemTitle
{
margin-left
:
30
rpx
;
font-size
:
28
rpx
;
color
:
#333333
;
padding-top
:
30
rpx
;
padding-bottom
:
30
rpx
;
}
.selectedTitle
{
margin-left
:
30
rpx
;
font-size
:
28
rpx
;
color
:
#2272FF
;
padding-top
:
30
rpx
;
padding-bottom
:
30
rpx
;
}
.arrowIcon
{
background-color
:
#FFFFFF
;
width
:
16
rpx
;
height
:
28
rpx
;
margin-right
:
30
rpx
;
}
</
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