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
576befe7
Commit
576befe7
authored
Dec 14, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
13432ee2
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
494 additions
and
73 deletions
+494
-73
App.vue
take-order/App.vue
+5
-0
index.vue
take-order/pages/index/index.vue
+67
-6
record.vue
take-order/pages/index/record.vue
+7
-0
wxlogin.vue
take-order/pages/login/wxlogin.vue
+3
-1
detail.vue
take-order/pages/take/detail.vue
+9
-8
finish.vue
take-order/pages/take/finish.vue
+226
-42
index.vue
take-order/pages/take/index.vue
+49
-5
measure.vue
take-order/pages/take/measure.vue
+15
-1
rob.vue
take-order/pages/take/rob.vue
+113
-10
No files found.
take-order/App.vue
View file @
576befe7
...
...
@@ -9,9 +9,14 @@
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',
token
:
''
,
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
...
...
take-order/pages/index/index.vue
View file @
576befe7
...
...
@@ -8,14 +8,14 @@
<text
class=
"itemTitle"
>
联系人
</text>
<text
class=
"itemRedStar"
>
*
</text>
</view>
<input
class=
"itemInput"
v-model=
"name"
type=
""
value=
""
placeholder=
"请输入联系人姓名"
placeholder-style=
'color:#CCCCCC;font-size:32rpx;'
/>
<input
class=
"itemInput"
@
input=
"nameInput"
maxlength=
"50"
v-model=
"name"
type=
""
value=
""
placeholder=
"请输入联系人姓名"
placeholder-style=
'color:#CCCCCC;font-size:32rpx;'
/>
</view>
<view
class=
"itemView"
>
<view
class=
"itemTitleView"
>
<text
class=
"itemTitle"
>
联系电话
</text>
<text
class=
"itemRedStar"
>
*
</text>
</view>
<input
class=
"itemInput"
v-model=
"phone"
type=
""
value=
""
placeholder=
"请输入联系电话"
placeholder-style=
'color:#CCCCCC;font-size:32rpx;'
/>
<input
class=
"itemInput"
maxlength=
"30"
v-model=
"phone"
type=
""
value=
""
placeholder=
"请输入联系电话"
placeholder-style=
'color:#CCCCCC;font-size:32rpx;'
/>
</view>
<view
class=
"locationView"
@
click=
"locationClick()"
>
<view
class=
"locationTitleView"
>
...
...
@@ -33,7 +33,7 @@
<text
class=
"itemTitle"
>
详细地址
</text>
<text
class=
"itemRedStar"
>
*
</text>
</view>
<input
class=
"itemInput"
v-model=
"address"
type=
""
value=
""
placeholder=
"请输入详细服务地址"
placeholder-style=
'color:#CCCCCC;font-size:32rpx;'
/>
<input
class=
"itemInput"
maxlength=
"200"
v-model=
"address"
type=
""
value=
""
placeholder=
"请输入详细服务地址"
placeholder-style=
'color:#CCCCCC;font-size:32rpx;'
/>
</view>
<view
class=
"selectItemView"
>
<view
class=
"itemTitleView"
>
...
...
@@ -72,7 +72,7 @@
</view>
<view
class=
"textAreaView"
>
<view
class=
"textAreaBoxView"
>
<textarea
class=
"textArea"
v-model=
"demandContent"
value=
""
placeholder=
"请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等"
placeholder-style=
'color:#CCCCCC;font-size:28rpx;'
/>
<textarea
class=
"textArea"
maxlength=
"500"
v-model=
"demandContent"
value=
""
placeholder=
"请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等"
placeholder-style=
'color:#CCCCCC;font-size:28rpx;'
/>
</view>
</view>
</view>
...
...
@@ -148,6 +148,27 @@
},
methods
:
{
nameInput
(
e
){
// console.log('联系人 监听:')
// console.log(e.detail.value)
// console.log('name:')
// console.log(this.name)
// if(e.detail.value.length>5){
// uni.showToast({
// icon:'none',
// title:'联系人姓名不能大于50字'
// })
// e.detail.value = e.detail.value.substr(0,5)
// this.name = e.detail.value
// }
// console.log('限制字数后的name:')
// console.log(this.name)
},
//定位点击
locationClick
:
function
(){
let
that
=
this
...
...
@@ -186,9 +207,49 @@
console
.
log
(
this
.
isAgree
)
},
//服务协议点击
//服务协议
点击
protocolClick
:
function
()
{
console
.
log
(
'服务协议 点击'
)
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
downloadFile
({
url
:
'https://system.dev.banshouhui.com/pdfjs/web/用户注册协议.pdf'
,
success
:
(
res
)
=>
{
uni
.
hideLoading
()
if
(
res
.
statusCode
===
200
)
{
uni
.
showLoading
({
title
:
'打开中'
})
console
.
log
(
'下载成功'
);
var
filePath
=
res
.
tempFilePath
;
uni
.
openDocument
({
filePath
:
filePath
,
success
()
{
uni
.
hideLoading
()
console
.
log
(
'打开成功'
);
},
fail
()
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'打开失败'
})
}
})
}
},
fail
()
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'打开服务协议失败'
})
}
});
},
//查看历史订单
...
...
take-order/pages/index/record.vue
View file @
576befe7
...
...
@@ -123,6 +123,11 @@
//getApp().globalData.createOrderList
//获取下单列表
createOrderList
:
function
()
{
uni
.
showLoading
({
title
:
'请稍候'
})
let
that
=
this
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
...
...
@@ -135,6 +140,7 @@
pageSize
:
20
,
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取下单列表 成功'
)
console
.
log
(
res
)
...
...
@@ -170,6 +176,7 @@
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'获取下单列表失败'
...
...
take-order/pages/login/wxlogin.vue
View file @
576befe7
...
...
@@ -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
:
''
,
...
...
@@ -127,6 +127,8 @@
uni
.
showLoading
({
title
:
'加载中'
})
//getApp().globalData.domain_Name
//domain_name
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
getUsersByCode
,
...
...
take-order/pages/take/detail.vue
View file @
576befe7
...
...
@@ -4,7 +4,7 @@
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
联系人:
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"orderInfo.contactName"
>
{{
orderInfo
.
contactName
}}
</text>
<text
class=
"contentText u-m-l-20
underLine
"
v-if=
"orderInfo.contactMobilephone"
>
{{
orderInfo
.
contactMobilephone
}}
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"orderInfo.contactMobilephone"
>
{{
orderInfo
.
contactMobilephone
}}
</text>
</view>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
地址:
</text>
...
...
@@ -32,14 +32,14 @@
</view>
<view
class=
"divideLine"
></view>
</view>
<view
class=
"willTakeView"
v-if=
"orderInfo.statusText == '待接单'"
>
<
!--
view class="willTakeView" v-if="orderInfo.statusText == '待接单'">
<view
class=
"itemView u-m-t-50"
>
<text
class=
"titleText u-m-l-30"
>
预约时间:
</text>
<text
class=
"blueContentText u-m-l-20"
v-if=
"!orderInfo.appointmentDatetime"
>
接单后可预约上门服务时间
</text>
<text
class=
"blueContentText u-m-l-20"
v-if=
"orderInfo.appointmentDatetime"
>
{{
formatDate
(
orderInfo
.
appointmentDatetime
)
}}
</text>
</view>
<mx-date-picker
:show=
"showPicker"
:type=
"type"
:value=
"value"
:show-tips=
"true"
:begin-text=
"'入住'"
:end-text=
"'离店'"
:show-seconds=
"true"
@
confirm=
"onSelected"
@
cancel=
"onSelected"
/>
</view>
</view
--
>
<view
class=
"willFinishView"
v-if=
"orderInfo.statusText == '待完工'"
>
<view
class=
"itemView u-m-t-50"
>
<text
class=
"titleText u-m-l-30"
>
预约时间:
</text>
...
...
@@ -75,7 +75,7 @@
</view>
<view
class=
"photoBackView u-p-b-24"
v-if=
"orderInfo.images"
>
<view
class=
"photoItemView"
v-for=
"(item,ikey) in photoList"
:key=
"ikey"
>
<image
class=
"photoImage"
:src=
"
domain_name +'/wxh-sts-rest' + item.image
"
mode=
"aspectFill"
></image>
<image
class=
"photoImage"
:src=
"
item
"
mode=
"aspectFill"
></image>
</view>
</view>
<view
class=
"itemView u-m-t-30 padding_bottom_180"
>
...
...
@@ -150,7 +150,8 @@
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
workOrderDetail
,
+
'/wxh-worker-rest/rest/order/revision/applets/'
+
getApp
().
globalData
.
token
+
'/order/detail'
,
method
:
'GET'
,
data
:
{
orderId
:
this
.
orderId
...
...
@@ -456,7 +457,7 @@
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
...
...
@@ -567,11 +568,11 @@
}
.photoImage
{
background-color
:
#F
AFAFA
;
background-color
:
#F
3F3F3
;
margin-left
:
24
rpx
;
margin-right
:
24
rpx
;
margin-top
:
24
rpx
;
height
:
2
6
0
rpx
;
height
:
2
0
0
rpx
;
}
.bottomView
{
...
...
take-order/pages/take/finish.vue
View file @
576befe7
This diff is collapsed.
Click to expand it.
take-order/pages/take/index.vue
View file @
576befe7
...
...
@@ -56,7 +56,7 @@
</view>
<view
class=
"noDataView"
v-if=
"activeTop == 1 && unfinishList.length==0"
>
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<text
class=
"noDataText"
>
暂无数据
</text>
<text
class=
"noDataText"
>
{{
noDataTitle
}}
</text>
</view>
<view
class=
"itemView"
v-if=
"activeTop == 2"
@
click=
"itemClick(item)"
v-for=
"(item,ikey) in finishList"
:key=
"ikey"
>
<view
class=
"nameView"
>
...
...
@@ -75,7 +75,7 @@
</view>
<view
class=
"noDataView"
v-if=
"activeTop == 2 && finishList.length==0"
>
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<text
class=
"noDataText"
>
暂无数据
</text>
<text
class=
"noDataText"
>
{{
noDataTitle
}}
</text>
</view>
</view>
<w-picker
...
...
@@ -112,6 +112,7 @@
type
:
''
,
value
:
''
,
icon_noData
:
''
,
noDataTitle
:
'暂无数据'
,
grabList
:[],
unfinishList
:[],
finishList
:[],
...
...
@@ -289,11 +290,18 @@
})
},
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/worker',
//getApp().globalData.workOrderList
//获取工单列表
getOrderList
:
function
(
type
)
{
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
workOrderList
,
+
'/wxh-worker-rest/rest/order/revision/applets/'
+
getApp
().
globalData
.
token
+
'/order/worker'
,
method
:
'GET'
,
data
:
{
type
:
type
,
...
...
@@ -301,9 +309,14 @@
pageSize
:
10
,
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取工单列表 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
403
){
this
.
noDataTitle
=
'您没有权限操作'
}
if
(
res
.
data
.
code
==
200
){
if
(
type
==
5
){
this
.
finishList
=
res
.
data
.
data
...
...
@@ -323,6 +336,7 @@
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'获取工单列表失败'
...
...
@@ -355,8 +369,33 @@
if
(
this
.
activeTop
==
0
){
//抢单市场
if
(
item
.
statusText
==
'待抢单'
){
/*
contactName:'',
contactMobilephone:'',
contactAddress:'',
inGuaranteePeriodText:'',
orderServiceType:'',
brandName:'',
categoryName:'',
statusText:'',
serviceContent:'',
createDatetime:'',
*/
uni
.
navigateTo
({
url
:
'/pages/take/rob'
+
'?orderId='
+
item
.
orderId
url
:
'/pages/take/rob'
+
'?orderId='
+
item
.
orderId
+
'&contactName='
+
item
.
contactName
+
'&contactMobilephone='
+
item
.
contactMobilephone
+
'&contactAddress='
+
item
.
contactAddress
+
'&inGuaranteePeriodText='
+
item
.
inGuaranteePeriodText
+
'&orderServiceType='
+
item
.
orderServiceType
+
'&brandName='
+
item
.
brandName
+
'&categoryName='
+
item
.
categoryName
+
'&statusText='
+
item
.
statusText
+
'&serviceContent='
+
item
.
serviceContent
+
'&createDatetime='
+
item
.
createDatetime
})
}
else
{
uni
.
navigateTo
({
...
...
@@ -418,6 +457,9 @@
dateTime
=
dateTime
.
replace
(
"/"
,
"-"
)
//2020/12/25 15:00:12
console
.
log
(
'预约请求 dateTime'
+
dateTime
)
uni
.
showLoading
({
title
:
'加载中'
})
let
that
=
this
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
...
...
@@ -435,6 +477,7 @@
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'预约请求 成功'
)
console
.
log
(
res
)
...
...
@@ -456,6 +499,7 @@
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'预约请求 失败'
)
console
.
log
(
e
)
}
...
...
@@ -495,7 +539,7 @@
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
...
...
take-order/pages/take/measure.vue
View file @
576befe7
...
...
@@ -113,6 +113,9 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKENa8f4a27fef05fbcc27d473f32694e51a68101242/price/newsymptoms/V2/11885888
//左边 获取 故障现象 数据
getLeftData
:
function
()
{
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
...
...
@@ -157,6 +160,9 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/cause/V2/11885888/10000
//中间 获取 查询故障现象 关联的 故障原因 数据
getMidData
:
function
(){
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
...
...
@@ -201,6 +207,11 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/measure/V2/11885888/10001
//右边 获取 查询故障原因 关联的 服务措施详情以及价格 数据
getRightData
:
function
(){
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
...
...
@@ -246,6 +257,10 @@
//http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN6c30a6be9e59f428455abd2fdb38fbaf360b4ae0/price/11634/charge/10001/measure/11885888
//最终请求
getFinalData
:
function
()
{
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
...
...
@@ -324,7 +339,6 @@
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
row
;
}
...
...
take-order/pages/take/rob.vue
View file @
576befe7
...
...
@@ -3,32 +3,32 @@
<view
class=
"topView"
>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
联系人:
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
orderInfo.contactName"
>
{{
orderInfo
.
contactName
}}
</text>
<text
class=
"contentText u-m-l-20 underLine"
v-if=
"
orderInfo.contactMobilephone"
>
{{
orderInfo
.
contactMobilephone
}}
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
contactName"
>
{{
contactName
}}
</text>
<text
class=
"contentText u-m-l-20 underLine"
v-if=
"
contactMobilephone"
>
{{
contactMobilephone
}}
</text>
</view>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
地址:
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
orderInfo.contactAddress"
>
{{
orderInfo
.
contactAddress
}}
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
contactAddress"
>
{{
contactAddress
}}
</text>
</view>
<view
class=
"itemView u-m-t-60"
>
<text
class=
"titleText u-m-l-30"
>
类型:
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
orderInfo.inGuaranteePeriodText"
>
(
{{
orderInfo
.
inGuaranteePeriodText
}}
)
{{
orderInfo
.
orderServiceType
}}
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
inGuaranteePeriodText"
>
(
{{
inGuaranteePeriodText
}}
)
{{
orderServiceType
}}
</text>
</view>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
产品:
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
orderInfo.brandName"
>
{{
orderInfo
.
brandName
}}
-
{{
orderInfo
.
categoryName
}}
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
brandName"
>
{{
brandName
}}
-
{{
categoryName
}}
</text>
</view>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
状态:
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
orderInfo.statusText"
>
{{
orderInfo
.
statusText
}}
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
statusText"
>
{{
statusText
}}
</text>
</view>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
描述:
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
orderInfo.serviceContent"
>
{{
orderInfo
.
serviceContent
}}
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
serviceContent"
>
{{
serviceContent
}}
</text>
</view>
<view
class=
"itemView u-m-t-60 padding_bottom_180"
>
<text
class=
"titleText u-m-l-30"
>
下单时间:
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
orderInfo.createDatetime"
>
{{
orderInfo
.
createDatetime
}}
</text>
<text
class=
"contentText u-m-l-20"
v-if=
"
createDatetime"
>
{{
formatDate
(
createDatetime
)
}}
</text>
</view>
</view>
<view
class=
"bottomView"
>
...
...
@@ -59,7 +59,18 @@
popTitle
:
''
,
popBtnTitle
:
''
,
userType
:
0
,
icon_close
:
''
icon_close
:
''
,
contactName
:
''
,
contactMobilephone
:
''
,
contactAddress
:
''
,
inGuaranteePeriodText
:
''
,
orderServiceType
:
''
,
brandName
:
''
,
categoryName
:
''
,
statusText
:
''
,
serviceContent
:
''
,
createDatetime
:
''
,
}
},
onLoad
(
e
)
{
...
...
@@ -67,20 +78,83 @@
if
(
e
&&
e
.
orderId
){
this
.
orderId
=
e
.
orderId
}
this
.
getTopInfo
(
e
)
//this.orderId ='10704469'
this
.
icon_rob
=
getApp
().
globalData
.
icon_rob
this
.
icon_close
=
getApp
().
globalData
.
icon_close
},
onShow
()
{
this
.
getOrderDetail
()
//
this.getOrderDetail()
},
methods
:
{
getTopInfo
:
function
(
e
)
{
/*
contactName:'',
contactMobilephone:'',
contactAddress:'',
inGuaranteePeriodText:'',
brandName:'',
categoryName:'',
statusText:'',
serviceContent:'',
createDatetime:'',
*/
if
(
e
&&
e
.
contactName
&&
e
.
contactName
.
length
>
0
){
this
.
contactName
=
e
.
contactName
}
if
(
e
&&
e
.
contactMobilephone
&&
e
.
contactMobilephone
.
length
>
0
){
this
.
contactMobilephone
=
e
.
contactMobilephone
}
if
(
e
&&
e
.
contactAddress
&&
e
.
contactAddress
.
length
>
0
){
this
.
contactAddress
=
e
.
contactAddress
}
if
(
e
&&
e
.
inGuaranteePeriodText
&&
e
.
inGuaranteePeriodText
.
length
>
0
){
this
.
inGuaranteePeriodText
=
e
.
inGuaranteePeriodText
}
if
(
e
&&
e
.
orderServiceType
&&
e
.
orderServiceType
.
length
>
0
){
this
.
orderServiceType
=
e
.
orderServiceType
}
if
(
e
&&
e
.
brandName
&&
e
.
brandName
.
length
>
0
){
this
.
brandName
=
e
.
brandName
}
if
(
e
&&
e
.
categoryName
&&
e
.
categoryName
.
length
>
0
){
this
.
categoryName
=
e
.
categoryName
}
if
(
e
&&
e
.
statusText
&&
e
.
statusText
.
length
>
0
){
this
.
statusText
=
e
.
statusText
}
if
(
e
&&
e
.
serviceContent
&&
e
.
serviceContent
.
length
>
0
){
this
.
serviceContent
=
e
.
serviceContent
}
if
(
e
&&
e
.
createDatetime
&&
e
.
createDatetime
.
length
>
0
){
this
.
createDatetime
=
e
.
createDatetime
}
},
//获取工单详情
getOrderDetail
:
function
()
{
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
workOrderDetail
,
...
...
@@ -89,6 +163,7 @@
orderId
:
this
.
orderId
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取工单详情 成功'
)
console
.
log
(
res
)
...
...
@@ -106,6 +181,7 @@
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取工单详情 失败'
)
console
.
log
(
e
)
}
...
...
@@ -121,6 +197,9 @@
//检查用户状态
checkUserStatus
:
function
(
item
)
{
console
.
log
(
'检查用户状态'
)
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
checkRobStatus
,
...
...
@@ -129,6 +208,7 @@
orderId
:
this
.
orderId
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'检查用户状态 成功'
)
console
.
log
(
res
)
...
...
@@ -146,6 +226,7 @@
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'检查用户状态 失败'
)
console
.
log
(
e
)
}
...
...
@@ -269,6 +350,9 @@
//抢单请求
////%@/worker/%@/order/%@/accept
robPost
:
function
()
{
uni
.
showLoading
({
title
:
'请稍候'
})
console
.
log
(
'抢单请求'
)
// /wxh-worker-rest/rest/order/revision/applets/{token}/order/acceptAppletsOrder
uni
.
request
({
...
...
@@ -284,6 +368,7 @@
'Content-Type'
:
'application/x-www-form-urlencoded'
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'抢单请求 成功'
)
console
.
log
(
res
)
...
...
@@ -304,6 +389,7 @@
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'抢单请求 失败'
)
console
.
log
(
e
)
}
...
...
@@ -311,6 +397,23 @@
},
//时间戳转换成日期时间
formatDate
:
function
(
value
)
{
var
date
=
new
Date
();
//date.setTime(value);
var
month
=
date
.
getMonth
()
+
1
;
var
hours
=
date
.
getHours
();
if
(
hours
<
10
)
hours
=
"0"
+
hours
;
var
minutes
=
date
.
getMinutes
();
if
(
minutes
<
10
)
minutes
=
"0"
+
minutes
;
var
time
=
date
.
getFullYear
()
+
"-"
+
month
+
"-"
+
date
.
getDate
()
+
" "
+
hours
+
":"
+
minutes
;
return
time
;
}
}
}
...
...
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