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
b86e799e
Commit
b86e799e
authored
Dec 10, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完工页 照片选取
parent
3adcf201
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
469 additions
and
75 deletions
+469
-75
App.vue
take-order/App.vue
+12
-1
pages.json
take-order/pages.json
+22
-6
index.vue
take-order/pages/index/index.vue
+27
-3
protocol.vue
take-order/pages/index/protocol.vue
+38
-0
record.vue
take-order/pages/index/record.vue
+62
-2
wxlogin.vue
take-order/pages/login/wxlogin.vue
+8
-3
detail.vue
take-order/pages/take/detail.vue
+69
-4
finish.vue
take-order/pages/take/finish.vue
+119
-11
index.vue
take-order/pages/take/index.vue
+86
-38
measure.vue
take-order/pages/take/measure.vue
+9
-4
rob.vue
take-order/pages/take/rob.vue
+6
-3
web.vue
take-order/pages/take/web.vue
+11
-0
No files found.
take-order/App.vue
View file @
b86e799e
...
@@ -61,6 +61,8 @@
...
@@ -61,6 +61,8 @@
//工单完工
//工单完工
configCompletion
:
''
,
configCompletion
:
''
,
protocolContent
:
''
},
},
...
@@ -80,6 +82,8 @@
...
@@ -80,6 +82,8 @@
}
}
})
})
this
.
getProtocolContent
()
},
},
onShow
:
function
()
{
onShow
:
function
()
{
console
.
log
(
'App Show'
)
console
.
log
(
'App Show'
)
...
@@ -149,12 +153,19 @@
...
@@ -149,12 +153,19 @@
},
},
getProtocolContent
:
function
()
{
this
.
protocolContent
},
},
},
onHide
:
function
()
{
onHide
:
function
()
{
console
.
log
(
'App Hide'
)
console
.
log
(
'App Hide'
)
}
},
}
}
</
script
>
</
script
>
...
...
take-order/pages.json
View file @
b86e799e
...
@@ -7,29 +7,45 @@
...
@@ -7,29 +7,45 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/
take
/index"
,
"path"
:
"pages/
index
/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
接
单"
"navigationBarTitleText"
:
"
下
单"
}
}
},
},
{
{
"path"
:
"pages/
index/index
"
,
"path"
:
"pages/
take/finish
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
下单
"
"navigationBarTitleText"
:
"
完工信息
"
}
}
},
{
"path"
:
"pages/take/index"
,
"style"
:
{
"navigationBarTitleText"
:
"接单"
}
},
},
{
"path"
:
"pages/index/protocol"
,
"style"
:
{
"navigationBarTitleText"
:
"服务协议"
}
},
{
{
"path"
:
"pages/take/
finish
"
,
"path"
:
"pages/take/
web
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
完工信息
"
"navigationBarTitleText"
:
"
网页
"
}
}
},
},
{
{
"path"
:
"pages/take/measure"
,
"path"
:
"pages/take/measure"
,
"style"
:
{
"style"
:
{
...
...
take-order/pages/index/index.vue
View file @
b86e799e
...
@@ -193,6 +193,15 @@
...
@@ -193,6 +193,15 @@
//查看历史订单
//查看历史订单
recordClick
:
function
()
{
recordClick
:
function
()
{
if
(
!
getApp
().
globalData
.
token
){
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
})
return
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/index/record'
url
:
'/pages/index/record'
})
})
...
@@ -207,11 +216,20 @@
...
@@ -207,11 +216,20 @@
if
(
this
.
isAllInput
==
false
){
if
(
this
.
isAllInput
==
false
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'请填写所有必填项'
title
:
'请填写所有必填项'
})
})
return
return
}
}
if
(
this
.
isAgree
==
false
){
uni
.
showToast
({
icon
:
'none'
,
title
:
'请阅读并同意服务协议'
})
return
}
if
(
!
getApp
().
globalData
.
token
){
if
(
!
getApp
().
globalData
.
token
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
url
:
'/pages/login/wxlogin'
...
@@ -234,8 +252,7 @@
...
@@ -234,8 +252,7 @@
&&
this
.
address
.
length
>
0
&&
this
.
address
.
length
>
0
&&
this
.
activeProduct
.
length
>
0
&&
this
.
activeProduct
.
length
>
0
&&
this
.
activeService
.
length
>
0
&&
this
.
activeService
.
length
>
0
&&
this
.
demandContent
.
length
>
0
&&
this
.
demandContent
.
length
>
0
){
&&
this
.
isAgree
==
true
){
this
.
isAllInput
=
true
this
.
isAllInput
=
true
}
}
/*
/*
...
@@ -299,11 +316,17 @@
...
@@ -299,11 +316,17 @@
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'下单成功'
icon
:
'none'
,
title
:
res
.
data
.
message
//'下单成功'
})
})
this
.
showSubscribeModal
()
this
.
showSubscribeModal
()
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
message
})
}
}
...
@@ -311,6 +334,7 @@
...
@@ -311,6 +334,7 @@
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'下单失败'
title
:
'下单失败'
})
})
console
.
log
(
'客户报单接口 失败'
)
console
.
log
(
'客户报单接口 失败'
)
...
...
take-order/pages/index/protocol.vue
0 → 100644
View file @
b86e799e
<
template
>
<view
class=
""
>
<text></text>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
protocolContent
:
''
}
},
onLoad
(
e
)
{
if
(
e
&&
e
.
activeService
&&
e
.
activeService
.
length
>
0
){
console
.
log
(
e
.
activeService
)
this
.
activeService
=
e
.
activeService
}
},
methods
:
{
//拨打客服 点击
phoneCallClick
:
function
(
phone
)
{
uni
.
makePhoneCall
({
phoneNumber
:
phone
});
},
}
}
</
script
>
<
style
>
</
style
>
take-order/pages/index/record.vue
View file @
b86e799e
...
@@ -60,6 +60,9 @@
...
@@ -60,6 +60,9 @@
<text
class=
"noDataText"
>
暂无数据
</text>
<text
class=
"noDataText"
>
暂无数据
</text>
</view>
</view>
</view>
</view>
<view
class=
"bottomView"
@
click=
"bottomClick()"
>
<text
class=
"u-font-28 whiteColor"
>
查看接单列表
</text>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -86,11 +89,34 @@
...
@@ -86,11 +89,34 @@
// })
// })
// return
// return
// }
// }
this
.
createOrderList
()
this
.
getToken
()
},
},
methods
:
{
methods
:
{
async
getToken
()
{
let
that
=
this
await
uni
.
getStorage
({
key
:
'token'
,
success
:
function
(
res
)
{
console
.
log
(
'本地获取token成功'
)
console
.
log
(
res
.
data
);
getApp
().
globalData
.
token
=
res
.
data
that
.
createOrderList
()
},
fail
()
{
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
})
}
})
//await this.getData()
},
//'/wxh-worker-rest/rest/order/revision/applets/'
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/customer'
//+this.globalData.token+'/order/customer'
...
@@ -112,6 +138,13 @@
...
@@ -112,6 +138,13 @@
console
.
log
(
'获取下单列表 成功'
)
console
.
log
(
'获取下单列表 成功'
)
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
401
){
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
})
return
}
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
console
.
log
(
'code=200'
)
console
.
log
(
'code=200'
)
//未完工
//未完工
...
@@ -127,7 +160,8 @@
...
@@ -127,7 +160,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -136,6 +170,10 @@
...
@@ -136,6 +170,10 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'获取下单列表失败'
})
console
.
log
(
'获取下单列表 失败'
)
console
.
log
(
'获取下单列表 失败'
)
console
.
log
(
e
)
console
.
log
(
e
)
}
}
...
@@ -167,6 +205,12 @@
...
@@ -167,6 +205,12 @@
},
},
bottomClick
:
function
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/take/index'
,
})
},
}
}
}
}
...
@@ -361,5 +405,21 @@
...
@@ -361,5 +405,21 @@
font-size
:
28
rpx
;
font-size
:
28
rpx
;
}
}
.bottomView
{
background-color
:
#2272FF
;
width
:
100%
;
height
:
104
rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
bottom
:
0
;
}
.whiteColor
{
color
:
#FFFFFF
;
}
</
style
>
</
style
>
take-order/pages/login/wxlogin.vue
View file @
b86e799e
...
@@ -144,12 +144,14 @@
...
@@ -144,12 +144,14 @@
if
(
res
.
data
.
data
.
token
){
if
(
res
.
data
.
data
.
token
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'登陆成功'
title
:
'登陆成功'
})
})
this
.
saveUserInfo
(
res
)
this
.
saveUserInfo
(
res
)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'新用户请授权登录'
title
:
'新用户请授权登录'
})
})
this
.
isNewUser
=
true
this
.
isNewUser
=
true
...
@@ -159,7 +161,8 @@
...
@@ -159,7 +161,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -245,13 +248,15 @@
...
@@ -245,13 +248,15 @@
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'登陆成功'
icon
:
'none'
,
title
:
'登录成功'
})
})
this
.
saveUserInfo
(
res
)
this
.
saveUserInfo
(
res
)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
...
take-order/pages/take/detail.vue
View file @
b86e799e
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
<text
class=
"u-font-28 gray66"
>
退单
</text>
<text
class=
"u-font-28 gray66"
>
退单
</text>
</view>
</view>
<view
class=
"bottomRightView"
@
click=
"finishClick()"
>
<view
class=
"bottomRightView"
@
click=
"finishClick()"
>
<text
class=
"bottomTitle whiteColor"
>
完工
</text>
<text
class=
"bottomTitle whiteColor"
>
{{
bottomTitle
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -102,7 +102,8 @@
...
@@ -102,7 +102,8 @@
photoList
:[
photoList
:[
{
image
:
''
},{
image
:
''
},{
image
:
''
},{
image
:
''
},
{
image
:
''
},{
image
:
''
},{
image
:
''
},{
image
:
''
},
],
],
domain_name
:
''
domain_name
:
''
,
bottomTitle
:
''
}
}
},
},
...
@@ -128,6 +129,9 @@
...
@@ -128,6 +129,9 @@
//getApp().globalData.workOrderDetail
//getApp().globalData.workOrderDetail
//获取工单详情
//获取工单详情
getOrderDetail
:
function
()
{
getOrderDetail
:
function
()
{
console
.
log
(
'获取工单详情:'
)
console
.
log
(
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
workOrderDetail
)
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
...
@@ -142,14 +146,15 @@
...
@@ -142,14 +146,15 @@
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
this
.
orderInfo
=
res
.
data
.
data
this
.
orderInfo
=
res
.
data
.
data
this
.
setBottomTitle
(
res
)
if
(
res
.
data
.
data
.
images
){
if
(
res
.
data
.
data
.
images
){
this
.
adjustPhotoList
(
res
.
data
.
data
.
images
)
this
.
adjustPhotoList
(
res
.
data
.
data
.
images
)
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -164,6 +169,17 @@
...
@@ -164,6 +169,17 @@
})
})
},
},
//底部按钮标题
setBottomTitle
:
function
(
res
){
if
(
res
.
data
.
data
.
statusText
==
'待接单'
){
this
.
bottomTitle
=
'接单'
}
else
{
this
.
bottomTitle
=
'完工'
}
},
//https://system.banshouhui.com/wxh-sts-rest/rest/file/image/order/13767/1442887919988.jpg
//https://system.banshouhui.com/wxh-sts-rest/rest/file/image/order/13767/1442887919988.jpg
adjustPhotoList
:
function
(
images
)
{
adjustPhotoList
:
function
(
images
)
{
var
photoArray
=
images
.
split
(
','
)
var
photoArray
=
images
.
split
(
','
)
...
@@ -210,6 +226,7 @@
...
@@ -210,6 +226,7 @@
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'退单成功'
,
title
:
'退单成功'
,
})
})
uni
.
navigateBack
({
uni
.
navigateBack
({
...
@@ -217,6 +234,7 @@
...
@@ -217,6 +234,7 @@
})
})
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
message
title
:
res
.
data
.
message
})
})
...
@@ -229,6 +247,7 @@
...
@@ -229,6 +247,7 @@
console
.
log
(
'退单 失败'
)
console
.
log
(
'退单 失败'
)
console
.
log
(
e
)
console
.
log
(
e
)
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'退单失败'
,
title
:
'退单失败'
,
})
})
}
}
...
@@ -236,7 +255,12 @@
...
@@ -236,7 +255,12 @@
},
},
finishClick
:
function
()
{
finishClick
:
function
()
{
if
(
this
.
bottomTitle
==
'接单'
){
this
.
robPost
()
return
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/take/finish'
url
:
'/pages/take/finish'
+
'?orderId='
+
this
.
orderId
+
'?orderId='
+
this
.
orderId
...
@@ -252,6 +276,47 @@
...
@@ -252,6 +276,47 @@
})
})
},
},
//抢单请求
////%@/worker/%@/order/%@/accept
robPost
:
function
()
{
console
.
log
(
'抢单请求'
)
// /wxh-worker-rest/rest/order/revision/applets/{token}/order/acceptAppletsOrder
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/revision/applets/'
+
getApp
().
globalData
.
token
+
'/order/acceptAppletsOrder'
,
//%@/worker/%@/order/%@/receive
method
:
'POST'
,
data
:
{
orderId
:
this
.
orderId
},
header
:{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
success
:
(
res
)
=>
{
console
.
log
(
'抢单请求 成功'
)
console
.
log
(
res
)
if
(
res
.
data
.
code
==
200
){
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
message
})
}
},
fail
:
(
e
)
=>
{
console
.
log
(
'抢单请求 失败'
)
console
.
log
(
e
)
}
})
},
}
}
}
}
</
script
>
</
script
>
...
...
take-order/pages/take/finish.vue
View file @
b86e799e
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
</view>
</view>
<view
class=
"photoBackView u-p-b-30"
v-if=
"
item.fieldsValue
"
>
<view
class=
"photoBackView u-p-b-30"
v-if=
"
photoList
"
>
<view
class=
"photoItemView"
@
click=
"photoClick(item,ikey)"
v-for=
"(item,ikey) in photoList"
:key=
"ikey"
>
<view
class=
"photoItemView"
@
click=
"photoClick(item,ikey)"
v-for=
"(item,ikey) in photoList"
:key=
"ikey"
>
<image
class=
"photoImage"
:src=
"item.image"
mode=
"aspectFill"
></image>
<image
class=
"photoImage"
:src=
"item.image"
mode=
"aspectFill"
></image>
</view>
</view>
...
@@ -191,6 +191,7 @@
...
@@ -191,6 +191,7 @@
//照片相关
//照片相关
photoList
:[],
photoList
:[],
photo_fieldsValue
:
''
,
photo_fieldsValue
:
''
,
photo_tempFilePaths
:[]
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -215,7 +216,7 @@
...
@@ -215,7 +216,7 @@
getTopInfo
:
function
(
e
)
{
getTopInfo
:
function
(
e
)
{
this
.
icon_arrow_right
=
getApp
().
globalData
.
icon_arrow_right
this
.
icon_arrow_right
=
getApp
().
globalData
.
icon_arrow_right
this
.
icon_photo_add
=
getApp
().
globalData
.
icon_photo_add
this
.
icon_photo_add
=
getApp
().
globalData
.
icon_photo_add
this
.
photoList
=
[{
image
:
this
.
icon_photo_add
}]
if
(
e
&&
e
.
orderId
){
if
(
e
&&
e
.
orderId
){
this
.
orderId
=
e
.
orderId
this
.
orderId
=
e
.
orderId
}
}
...
@@ -259,8 +260,8 @@
...
@@ -259,8 +260,8 @@
//测试
//测试
/*
/*
getApp().globalData.token = 'RTOKEN
9336b56cffb3c2bafec54b3687f86c38bfaa364a
'
getApp().globalData.token = 'RTOKEN
c8a2a8c196ab702b3fb1594647f46737a5332206
'
this.orderId = '1
0704464
'
this.orderId = '1
1877725
'
this.categoryId = '88',
this.categoryId = '88',
this.brandId = '1000000171',
this.brandId = '1000000171',
this.partnerCompanyId = '1814',
this.partnerCompanyId = '1814',
...
@@ -328,7 +329,8 @@
...
@@ -328,7 +329,8 @@
//照片
//照片
if
(
item
.
fieldsType
==
'PHOTOS'
){
if
(
item
.
fieldsType
==
'PHOTOS'
){
this
.
photoList
=
[{
image
:
'111'
},{
image
:
'222'
},{
image
:
'333'
},{
image
:
'444'
}]
//this.photoList = [{image:this.icon_photo_add},{image:'222'},{image:'333'},{image:'444'}]
// console.log('处理前 的 照片数组:')
// console.log('处理前 的 照片数组:')
// console.log(item.fieldsValue)
// console.log(item.fieldsValue)
// var photoList = [{image:'111'},{image:'222'},{image:'333'},{image:'444'}]
// var photoList = [{image:'111'},{image:'222'},{image:'333'},{image:'444'}]
...
@@ -584,7 +586,8 @@
...
@@ -584,7 +586,8 @@
this
.
is_PRODUCT_NUMBER_picker_show
=
true
this
.
is_PRODUCT_NUMBER_picker_show
=
true
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -663,6 +666,7 @@
...
@@ -663,6 +666,7 @@
if
(
this
.
current_SPECIFICATIONS_specificationId
.
length
==
0
){
if
(
this
.
current_SPECIFICATIONS_specificationId
.
length
==
0
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'请先选择产品规格'
title
:
'请先选择产品规格'
})
})
return
return
...
@@ -737,6 +741,113 @@
...
@@ -737,6 +741,113 @@
},
},
//照片 点击
photoClick
:
function
(
item
,
ikey
)
{
console
.
log
(
'照片点击'
)
console
.
log
(
ikey
)
if
(
ikey
==
0
){
this
.
addPhoto
()
}
},
//照片 添加
addPhoto
:
function
(){
let
that
=
this
uni
.
chooseImage
({
count
:
9
,
sizeType
:
[
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
],
//从相册选择
success
:
function
(
res
)
{
console
.
log
(
'照片添加成功'
)
that
.
getImageInfo
(
res
)
},
error
:
function
(
e
){
uni
.
showToast
({
icon
:
"none"
,
title
:
'选取照片失败'
})
}
})
},
//获取照片信息
getImageInfo
:
function
(
res
)
{
this
.
photo_tempFilePaths
=
res
.
tempFilePaths
let
that
=
this
const
tempFilePaths
=
res
.
tempFilePaths
;
//官方仅支持单张获取 循环多张获取
for
(
let
i
=
0
;
i
<
tempFilePaths
.
length
;
i
++
)
{
uni
.
getImageInfo
({
src
:
res
.
tempFilePaths
[
0
],
success
:
function
(
image
)
{
console
.
log
(
'获取照片信息 成功:'
)
console
.
log
(
image
.
width
);
console
.
log
(
image
.
height
);
console
.
log
(
image
.
path
);
console
.
log
(
image
.
orientation
);
console
.
log
(
image
.
type
);
var
imageDic
=
{
image
:
image
.
path
}
that
.
photoList
.
push
(
imageDic
)
}
});
}
},
//照片上传
photoUpload
:
function
(
res
){
let
that
=
this
const
tempFilePaths
=
res
.
tempFilePaths
;
//官方仅支持单张上传 循环多张上传
for
(
let
i
=
0
;
i
<
tempFilePaths
.
length
;
i
++
)
{
uni
.
showLoading
({
mask
:
true
,
title
:
'上传中'
});
//http://system.banshouhui.com/wxh-worker-rest/rest/RTOKEN01d7a2f3de4f86313745d71f2c1be73b8bae7850/order/11885888/guarantee/image
uni
.
uploadFile
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/'
+
getApp
().
globalData
.
token
+
/order/
+
this
.
orderId
+
'/guarantee/image'
,
filePath
:
tempFilePaths
[
i
],
name
:
'yore'
+
i
,
formData
:
{
//'qiniutoken': resToken.data.token
},
success
:
function
(
uploadFileRes
)
{
console
.
log
(
'照片上传成功'
)
console
.
log
(
uploadFileRes
)
uni
.
hideLoading
();
// let upRes = JSON.parse(uploadFileRes.data);
// var photo = {
// image:upRes.data.fullurl,
// }
// that.photoList.push(photo)
},
fail
()
{
console
.
log
(
'照片上传失败'
)
}
});
}
},
//输入类 事件处理
//输入类 事件处理
...
@@ -842,10 +953,7 @@
...
@@ -842,10 +953,7 @@
},
},
photoClick
:
function
(
item
,
ikey
)
{
console
.
log
(
'照片点击'
)
console
.
log
(
ikey
)
},
confirmClick
:
function
()
{
confirmClick
:
function
()
{
console
.
log
(
'确认完工 点击'
)
console
.
log
(
'确认完工 点击'
)
...
...
take-order/pages/take/index.vue
View file @
b86e799e
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<view
class=
"activeItemBottom"
v-if=
"activeTop == 0"
></view>
<view
class=
"activeItemBottom"
v-if=
"activeTop == 0"
></view>
</view>
</view>
<view
class=
"topItemView"
@
click=
"topClick(1)"
>
<view
class=
"topItemView"
@
click=
"topClick(1)"
>
<text
:class=
"activeTop == 1 ? 'activeItemText' : 'topItemText' "
>
全部未完工
</text>
<text
:class=
"activeTop == 1 ? 'activeItemText' : 'topItemText' "
>
{{
currentOrderTypeTitle
}}
▼
</text>
<view
class=
"activeItemBottom"
v-if=
"activeTop == 1"
></view>
<view
class=
"activeItemBottom"
v-if=
"activeTop == 1"
></view>
</view>
</view>
<view
class=
"topItemView"
@
click=
"topClick(2)"
>
<view
class=
"topItemView"
@
click=
"topClick(2)"
>
...
@@ -78,7 +78,17 @@
...
@@ -78,7 +78,17 @@
<text
class=
"noDataText"
>
暂无数据
</text>
<text
class=
"noDataText"
>
暂无数据
</text>
</view>
</view>
</view>
</view>
<w-picker
:visible
.
sync=
"isOrderTypeShow"
mode=
"selector"
value=
""
default-type=
"label"
:default-props=
"orderType_defaultProps"
:options=
"orderTypeList"
@
confirm=
"orderTypeOnConfirm($event,'selector')"
@
cancel=
"orderTypeOnCancel"
ref=
"selector"
></w-picker>
</view>
</view>
...
@@ -104,33 +114,25 @@
...
@@ -104,33 +114,25 @@
icon_noData
:
''
,
icon_noData
:
''
,
grabList
:[],
grabList
:[],
unfinishList
:[],
unfinishList
:[],
finishList
:[
finishList
:[],
/*{
isOrderTypeShow
:
false
,
allocateWorkerDatetime: null,
result
:{
appointmentDatetime: null,
result
:
""
appointmentType: "未预约",
},
brandName: "小米",
orderType_defaultProps
:{
categoryName: "开水机",
label
:
"title"
,
contactAddress: "1",
value
:
"type"
contactMobilephone: "13631612077",
},
contactName: "郭小清",
orderTypeList
:[
createDatetime: 1607308416000,
{
title
:
'全部'
,
type
:
0
},
guaranteeExplain: null,
{
title
:
'待接单'
,
type
:
1
},
images: null,
{
title
:
'今日预约'
,
type
:
2
},
inGuaranteePeriod: true,
{
title
:
'明日预约'
,
type
:
3
},
inGuaranteePeriodText: "保内",
{
title
:
'未预约'
,
type
:
4
},
maintainWorkerName: null,
//{title:'已完成',type:5},
maintainWorkerPhone: null,
orderFinishDatetime: null,
orderId: 10704469,
orderServiceType: "维修",
orderTypeText: "抢单工单",
serviceContent: "1",
status: 5,
statusText: "待接单",
userType: "师傅用户",
}*/
],
],
currentOrderType
:
0
,
currentOrderTypeTitle
:
'全部'
}
}
},
},
...
@@ -166,6 +168,7 @@
...
@@ -166,6 +168,7 @@
methods
:
{
methods
:
{
async
getToken
()
{
async
getToken
()
{
let
that
=
this
await
uni
.
getStorage
({
await
uni
.
getStorage
({
key
:
'token'
,
key
:
'token'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
...
@@ -173,13 +176,56 @@
...
@@ -173,13 +176,56 @@
console
.
log
(
res
.
data
);
console
.
log
(
res
.
data
);
getApp
().
globalData
.
token
=
res
.
data
getApp
().
globalData
.
token
=
res
.
data
this
.
getData
()
that
.
getData
()
},
fail
()
{
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
})
}
}
})
})
//await this.getData()
//await this.getData()
},
},
topClick
:
function
(
active
)
{
if
(
this
.
activeTop
!=
active
){
this
.
activeTop
=
active
//中间未完工
if
(
active
==
1
){
this
.
isOrderTypeShow
=
true
}
this
.
getData
()
}
else
if
(
active
==
1
){
this
.
isOrderTypeShow
=
true
}
},
//工单类型切换 确认选择
orderTypeOnConfirm
(
res
,
type
){
this
.
result
=
res
;
console
.
log
(
'工单类型切换 确认选择'
)
console
.
log
(
res
.
result
)
console
.
log
(
res
.
value
)
this
.
currentOrderTypeTitle
=
res
.
result
this
.
currentOrderType
=
res
.
value
this
.
getData
()
},
//产品规格 取消选择
orderTypeOnCancel
(){
console
.
log
(
'工单类型切换 取消选择'
)
},
//获取数据
//获取数据
getData
:
function
()
{
getData
:
function
()
{
...
@@ -195,7 +241,7 @@
...
@@ -195,7 +241,7 @@
//全部未完工
//全部未完工
if
(
this
.
activeTop
==
1
){
if
(
this
.
activeTop
==
1
){
//0 全部
//0 全部
this
.
getOrderList
(
0
)
this
.
getOrderList
(
this
.
currentOrderType
)
}
}
//已完工
//已完工
...
@@ -240,7 +286,8 @@
...
@@ -240,7 +286,8 @@
this
.
grabList
=
res
.
data
.
data
this
.
grabList
=
res
.
data
.
data
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -280,7 +327,8 @@
...
@@ -280,7 +327,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -289,18 +337,17 @@
...
@@ -289,18 +337,17 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'获取工单列表失败'
})
console
.
log
(
'获取工单列表 失败'
)
console
.
log
(
'获取工单列表 失败'
)
console
.
log
(
e
)
console
.
log
(
e
)
}
}
})
})
},
},
topClick
:
function
(
active
)
{
if
(
this
.
activeTop
!=
active
){
this
.
activeTop
=
active
this
.
getData
()
}
},
bookClick
:
function
(
item
)
{
bookClick
:
function
(
item
)
{
console
.
log
(
item
.
address
)
console
.
log
(
item
.
address
)
...
@@ -407,6 +454,7 @@
...
@@ -407,6 +454,7 @@
if
(
res
.
statusCode
==
200
){
if
(
res
.
statusCode
==
200
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'预约成功'
title
:
'预约成功'
})
})
that
.
getOrderList
(
0
)
that
.
getOrderList
(
0
)
...
...
take-order/pages/take/measure.vue
View file @
b86e799e
...
@@ -135,7 +135,8 @@
...
@@ -135,7 +135,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -180,7 +181,8 @@
...
@@ -180,7 +181,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -223,7 +225,8 @@
...
@@ -223,7 +225,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -265,6 +268,7 @@
...
@@ -265,6 +268,7 @@
if
(
res
.
statusCode
==
200
){
if
(
res
.
statusCode
==
200
){
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
title
:
'请求成功'
title
:
'请求成功'
})
})
...
@@ -272,7 +276,8 @@
...
@@ -272,7 +276,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
...
take-order/pages/take/rob.vue
View file @
b86e799e
...
@@ -80,7 +80,8 @@
...
@@ -80,7 +80,8 @@
this
.
orderInfo
=
res
.
data
.
data
this
.
orderInfo
=
res
.
data
.
data
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -119,7 +120,8 @@
...
@@ -119,7 +120,8 @@
this
.
checkShowModal
(
res
.
data
.
data
)
this
.
checkShowModal
(
res
.
data
.
data
)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
@@ -248,7 +250,8 @@
...
@@ -248,7 +250,8 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
icon
:
'none'
,
title
:
res
.
data
.
message
})
})
...
...
take-order/pages/take/web.vue
0 → 100644
View file @
b86e799e
<
template
>
<view
class=
""
>
网页
</view>
</
template
>
<
script
>
</
script
>
<
style
>
</
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