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
Show 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 @@
...
@@ -9,9 +9,14 @@
globalData
:
{
globalData
:
{
//https://system.banshouhui.com
//https://system.banshouhui.com
//https://system.dev.banshouhui.com
//https://system.dev.banshouhui.com
//测试环境
domain_Name
:
'https://system.dev.banshouhui.com'
,
domain_Name
:
'https://system.dev.banshouhui.com'
,
//http://192.168.0.208:8192
//http://192.168.0.208:8192
//小青本地环境
//domain_Name: 'http://192.168.0.208:37080',
//domain_Name: 'http://192.168.0.208:37080',
token
:
''
,
token
:
''
,
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
...
...
take-order/pages/index/index.vue
View file @
576befe7
...
@@ -8,14 +8,14 @@
...
@@ -8,14 +8,14 @@
<text
class=
"itemTitle"
>
联系人
</text>
<text
class=
"itemTitle"
>
联系人
</text>
<text
class=
"itemRedStar"
>
*
</text>
<text
class=
"itemRedStar"
>
*
</text>
</view>
</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>
<view
class=
"itemView"
>
<view
class=
"itemView"
>
<view
class=
"itemTitleView"
>
<view
class=
"itemTitleView"
>
<text
class=
"itemTitle"
>
联系电话
</text>
<text
class=
"itemTitle"
>
联系电话
</text>
<text
class=
"itemRedStar"
>
*
</text>
<text
class=
"itemRedStar"
>
*
</text>
</view>
</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>
<view
class=
"locationView"
@
click=
"locationClick()"
>
<view
class=
"locationView"
@
click=
"locationClick()"
>
<view
class=
"locationTitleView"
>
<view
class=
"locationTitleView"
>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<text
class=
"itemTitle"
>
详细地址
</text>
<text
class=
"itemTitle"
>
详细地址
</text>
<text
class=
"itemRedStar"
>
*
</text>
<text
class=
"itemRedStar"
>
*
</text>
</view>
</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>
<view
class=
"selectItemView"
>
<view
class=
"selectItemView"
>
<view
class=
"itemTitleView"
>
<view
class=
"itemTitleView"
>
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
</view>
</view>
<view
class=
"textAreaView"
>
<view
class=
"textAreaView"
>
<view
class=
"textAreaBoxView"
>
<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>
</view>
</view>
</view>
...
@@ -148,6 +148,27 @@
...
@@ -148,6 +148,27 @@
},
},
methods
:
{
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
(){
locationClick
:
function
(){
let
that
=
this
let
that
=
this
...
@@ -186,9 +207,49 @@
...
@@ -186,9 +207,49 @@
console
.
log
(
this
.
isAgree
)
console
.
log
(
this
.
isAgree
)
},
},
//服务协议点击
//服务协议
点击
protocolClick
:
function
()
{
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 @@
...
@@ -123,6 +123,11 @@
//getApp().globalData.createOrderList
//getApp().globalData.createOrderList
//获取下单列表
//获取下单列表
createOrderList
:
function
()
{
createOrderList
:
function
()
{
uni
.
showLoading
({
title
:
'请稍候'
})
let
that
=
this
let
that
=
this
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
...
@@ -135,6 +140,7 @@
...
@@ -135,6 +140,7 @@
pageSize
:
20
,
pageSize
:
20
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取下单列表 成功'
)
console
.
log
(
'获取下单列表 成功'
)
console
.
log
(
res
)
console
.
log
(
res
)
...
@@ -170,6 +176,7 @@
...
@@ -170,6 +176,7 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
title
:
'获取下单列表失败'
title
:
'获取下单列表失败'
...
...
take-order/pages/login/wxlogin.vue
View file @
576befe7
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
//
domain_name:'http://192.168.0.208:8192',
domain_name
:
'http://192.168.0.208:8192'
,
isNewUser
:
false
,
isNewUser
:
false
,
unionID
:
''
,
unionID
:
''
,
openID
:
''
,
openID
:
''
,
...
@@ -127,6 +127,8 @@
...
@@ -127,6 +127,8 @@
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
//getApp().globalData.domain_Name
//domain_name
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
getUsersByCode
,
+
getApp
().
globalData
.
getUsersByCode
,
...
...
take-order/pages/take/detail.vue
View file @
576befe7
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<view
class=
"itemView u-m-t-30"
>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
联系人:
</text>
<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"
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>
<view
class=
"itemView u-m-t-30"
>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
地址:
</text>
<text
class=
"titleText u-m-l-30"
>
地址:
</text>
...
@@ -32,14 +32,14 @@
...
@@ -32,14 +32,14 @@
</view>
</view>
<view
class=
"divideLine"
></view>
<view
class=
"divideLine"
></view>
</view>
</view>
<view
class=
"willTakeView"
v-if=
"orderInfo.statusText == '待接单'"
>
<
!--
view class="willTakeView" v-if="orderInfo.statusText == '待接单'">
<view
class=
"itemView u-m-t-50"
>
<view
class=
"itemView u-m-t-50"
>
<text
class=
"titleText u-m-l-30"
>
预约时间:
</text>
<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"
>
接单后可预约上门服务时间
</text>
<text
class=
"blueContentText u-m-l-20"
v-if=
"orderInfo.appointmentDatetime"
>
{{
formatDate
(
orderInfo
.
appointmentDatetime
)
}}
</text>
<text
class=
"blueContentText u-m-l-20"
v-if=
"orderInfo.appointmentDatetime"
>
{{
formatDate
(
orderInfo
.
appointmentDatetime
)
}}
</text>
</view>
</view>
<mx-date-picker
:show=
"showPicker"
:type=
"type"
:value=
"value"
:show-tips=
"true"
:begin-text=
"'入住'"
:end-text=
"'离店'"
:show-seconds=
"true"
@
confirm=
"onSelected"
@
cancel=
"onSelected"
/>
<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=
"willFinishView"
v-if=
"orderInfo.statusText == '待完工'"
>
<view
class=
"itemView u-m-t-50"
>
<view
class=
"itemView u-m-t-50"
>
<text
class=
"titleText u-m-l-30"
>
预约时间:
</text>
<text
class=
"titleText u-m-l-30"
>
预约时间:
</text>
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
</view>
</view>
<view
class=
"photoBackView u-p-b-24"
v-if=
"orderInfo.images"
>
<view
class=
"photoBackView u-p-b-24"
v-if=
"orderInfo.images"
>
<view
class=
"photoItemView"
v-for=
"(item,ikey) in photoList"
:key=
"ikey"
>
<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>
</view>
<view
class=
"itemView u-m-t-30 padding_bottom_180"
>
<view
class=
"itemView u-m-t-30 padding_bottom_180"
>
...
@@ -150,7 +150,8 @@
...
@@ -150,7 +150,8 @@
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
workOrderDetail
,
+
'/wxh-worker-rest/rest/order/revision/applets/'
+
getApp
().
globalData
.
token
+
'/order/detail'
,
method
:
'GET'
,
method
:
'GET'
,
data
:
{
data
:
{
orderId
:
this
.
orderId
orderId
:
this
.
orderId
...
@@ -456,7 +457,7 @@
...
@@ -456,7 +457,7 @@
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
@@ -567,11 +568,11 @@
...
@@ -567,11 +568,11 @@
}
}
.photoImage
{
.photoImage
{
background-color
:
#F
AFAFA
;
background-color
:
#F
3F3F3
;
margin-left
:
24
rpx
;
margin-left
:
24
rpx
;
margin-right
:
24
rpx
;
margin-right
:
24
rpx
;
margin-top
:
24
rpx
;
margin-top
:
24
rpx
;
height
:
2
6
0
rpx
;
height
:
2
0
0
rpx
;
}
}
.bottomView
{
.bottomView
{
...
...
take-order/pages/take/finish.vue
View file @
576befe7
...
@@ -19,16 +19,9 @@
...
@@ -19,16 +19,9 @@
<template
v-for=
"(item,ikey) in orderInfo.fieldsItems"
>
<template
v-for=
"(item,ikey) in orderInfo.fieldsItems"
>
<view
class=
"clickTypeView"
<view
class=
"clickTypeView"
v-if=
"
v-if=
"
item.fieldsType=='SPECIFICATIONS' ||
item.fieldsType=='PRODUCT_NUMBER' ||
item.fieldsType=='PRODUCT_NUMBER' ||
item.fieldsType=='MACHINE_CODE' ||
item.fieldsType=='MACHINE_CODE' ||
item.fieldsType=='DATE' ||
item.fieldsType=='DATE'
item.fieldsType=='SERVICE_MEASURES' ||
item.fieldsType=='WEBPAGE' ||
item.fieldsType=='RADIO' ||
item.fieldsType=='CHECKBOX' ||
item.fieldsType=='RADIO_BIG' ||
item.fieldsType=='CHECKBOX_BIG'
"
@
click=
"clickTypeClick(item,ikey)"
>
"
@
click=
"clickTypeClick(item,ikey)"
>
<view
class=
"itemTitleView borderBottom"
>
<view
class=
"itemTitleView borderBottom"
>
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
...
@@ -39,20 +32,45 @@
...
@@ -39,20 +32,45 @@
<text
class=
"clickContent"
v-if=
"item.fieldsValue"
>
{{
item
.
fieldsValue
}}
</text>
<text
class=
"clickContent"
v-if=
"item.fieldsValue"
>
{{
item
.
fieldsValue
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"clickTypeView"
v-if=
"
item.fieldsType=='SPECIFICATIONS'
"
@
click=
"clickTypeClick(item,ikey)"
>
<view
class=
"itemTitleView borderBottom"
>
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
</view>
<view
class=
"clickRightView"
>
<image
class=
"arrowIcon u-m-r-30"
:src=
"icon_arrow_right"
mode=
""
></image>
<text
class=
"clickContent"
v-if=
"item.fieldsValue"
>
{{
SPECIFICATIONS_showContent
}}
</text>
</view>
</view>
<view
class=
"clickTypeView"
v-if=
"
item.fieldsType=='SERVICE_MEASURES'
"
@
click=
"clickTypeClick(item,ikey)"
>
<view
class=
"itemTitleView borderBottom"
>
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
</view>
<view
class=
"clickRightView"
>
<image
class=
"arrowIcon u-m-r-30"
:src=
"icon_arrow_right"
mode=
""
></image>
<text
class=
"clickContent"
v-if=
"item.fieldsValue"
>
{{
measure_showContent
}}
</text>
</view>
</view>
<view
class=
"inputTypeView"
<view
class=
"inputTypeView"
v-if=
"
v-if=
"
item.fieldsType=='INTEGER' ||
item.fieldsType=='INTEGER' ||
item.fieldsType=='DECIMAL' ||
item.fieldsType=='DECIMAL' ||
item.fieldsType=='DOUBLE' ||
item.fieldsType=='DOUBLE' ||
item.fieldsType=='STRING' ||
item.fieldsType=='STRING'
item.fieldsType=='FILE' ||
item.fieldsType=='ICN'
"
>
"
>
<view
class=
"itemTitleView borderBottom"
>
<view
class=
"itemTitleView borderBottom"
>
<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>
<input
class=
"input u-m-r-30"
@
input=
"inputTypeInput($event,item,ikey)"
type=
"text"
value=
""
:placeholder=
"'请输入'+item.fieldsTitle"
/>
<input
class=
"input u-m-r-30"
maxlength=
"500"
@
input=
"inputTypeInput($event,item,ikey)"
type=
"text"
value=
""
:placeholder=
"'请输入'+item.fieldsTitle"
/>
</view>
</view>
<view
class=
"photoTypeView"
<view
class=
"photoTypeView"
v-if=
"item.fieldsType=='PHOTOS'
v-if=
"item.fieldsType=='PHOTOS'
...
@@ -63,7 +81,7 @@
...
@@ -63,7 +81,7 @@
</view>
</view>
<view
class=
"photoBackView u-p-b-30"
v-if=
"photoList"
>
<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"
mode=
"aspectFill"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -77,7 +95,7 @@
...
@@ -77,7 +95,7 @@
</view>
</view>
<view
class=
"textAreaView"
>
<view
class=
"textAreaView"
>
<view
class=
"textAreaBoxView"
>
<view
class=
"textAreaBoxView"
>
<textarea
class=
"textArea"
v-model=
"demandContent"
value=
""
:placeholder=
"'请输入'+item.fieldsTitle"
placeholder-style=
'color:#CCCCCC;font-size:28rpx;'
/>
<textarea
class=
"textArea"
@
confirm=
"textAreaInput"
maxlength=
"500"
v-model=
"demandContent"
value=
""
:placeholder=
"'请输入'+item.fieldsTitle"
placeholder-style=
'color:#CCCCCC;font-size:28rpx;'
/>
</view>
</view>
</view>
</view>
...
@@ -188,6 +206,7 @@
...
@@ -188,6 +206,7 @@
measure_inGuaranteeCommission
:
''
,
measure_inGuaranteeCommission
:
''
,
measure_outGuaranteeCharge
:
''
,
measure_outGuaranteeCharge
:
''
,
measure_fieldsValue
:
''
,
measure_fieldsValue
:
''
,
measure_showContent
:
''
,
//照片相关
//照片相关
photoList
:[],
photoList
:[],
...
@@ -217,7 +236,7 @@
...
@@ -217,7 +236,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
}
]
this
.
photoList
=
[
this
.
icon_photo_add
]
if
(
e
&&
e
.
orderId
){
if
(
e
&&
e
.
orderId
){
this
.
orderId
=
e
.
orderId
this
.
orderId
=
e
.
orderId
}
}
...
@@ -302,7 +321,7 @@
...
@@ -302,7 +321,7 @@
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
this
.
adjus
tData
(
res
)
this
.
handleDefaul
tData
(
res
)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -323,8 +342,8 @@
...
@@ -323,8 +342,8 @@
})
})
},
},
//
数据处理
//
处理 默认数据
adjus
tData
:
function
(
res
)
{
handleDefaul
tData
:
function
(
res
)
{
res
.
data
.
data
.
fieldsItems
.
forEach
(
item
=>
{
res
.
data
.
data
.
fieldsItems
.
forEach
(
item
=>
{
...
@@ -333,6 +352,8 @@
...
@@ -333,6 +352,8 @@
if
(
item
.
fieldsType
==
'SPECIFICATIONS'
){
if
(
item
.
fieldsType
==
'SPECIFICATIONS'
){
if
(
item
.
fieldsOptions
&&
item
.
fieldsOptions
.
length
>
0
){
if
(
item
.
fieldsOptions
&&
item
.
fieldsOptions
.
length
>
0
){
var
optionsDic
=
JSON
.
parse
(
item
.
fieldsOptions
)
var
optionsDic
=
JSON
.
parse
(
item
.
fieldsOptions
)
this
.
SPECIFICATIONS_fieldsValue
=
item
.
fieldsValue
this
.
SPECIFICATIONS_fieldsOptions
=
item
.
fieldsOptions
this
.
SPECIFICATIONS_showContent
=
optionsDic
.
specificationName
this
.
SPECIFICATIONS_showContent
=
optionsDic
.
specificationName
console
.
log
(
'之前填写过的 产品规格:'
)
console
.
log
(
'之前填写过的 产品规格:'
)
console
.
log
(
optionsDic
)
console
.
log
(
optionsDic
)
...
@@ -340,17 +361,37 @@
...
@@ -340,17 +361,37 @@
}
}
}
}
//处理措施
if
(
item
.
fieldsType
==
'SERVICE_MEASURES'
){
if
(
item
.
fieldsValue
&&
item
.
fieldsValue
.
length
>
0
){
this
.
measure_fieldsValue
=
item
.
fieldsValue
var
firstJSON
=
item
.
fieldsValue
var
valueArray
=
JSON
.
parse
(
firstJSON
)
var
valueDic
=
valueArray
[
0
]
this
.
measure_showContent
=
valueDic
.
measureName
console
.
log
(
'之前填写过的 处理措施:'
)
console
.
log
(
valueDic
)
console
.
log
(
this
.
measure_showContent
)
}
}
//照片
if
(
item
.
fieldsType
==
'PHOTOS'
){
//this.photoList = [{image:this.icon_photo_add},{image:'222'},{image:'333'},{image:'444'}]
// console.log('处理前 的 照片数组:')
//照片
// console.log(item.fieldsValue)
if
(
// var photoList = [{image:'111'},{image:'222'},{image:'333'},{image:'444'}]
item
.
fieldsType
==
'PHOTOS'
&&
// item.fieldsValue = photoList
item
.
fieldsValue
&&
// console.log('处理后 的 照片数组:')
item
.
fieldValue
.
length
>
0
// console.log(item.fieldsValue)
){
var
photoArray
=
item
.
fieldValue
.
split
(
','
)
//var newPhotoArray = []
photoArray
.
forEach
(
item
=>
{
var
imageURL
=
getApp
().
globalData
.
domain_Name
+
'/wxh-sts-rest'
+
item
this
.
photoList
.
push
(
imageURL
)
})
//this.photoList = newPhotoArray
console
.
log
(
'之前填写过的 照片数组:'
)
console
.
log
(
this
.
photoList
)
}
}
})
})
...
@@ -532,6 +573,7 @@
...
@@ -532,6 +573,7 @@
//产品规格Id
//产品规格Id
this
.
current_SPECIFICATIONS_specificationId
=
res
.
value
this
.
current_SPECIFICATIONS_specificationId
=
res
.
value
this
.
SPECIFICATIONS_showContent
=
res
.
value
this
.
updateInfo
(
''
,
'SPECIFICATIONS'
,
res
.
result
)
this
.
updateInfo
(
''
,
'SPECIFICATIONS'
,
res
.
result
)
//currentIndex,currentType,newValue
//currentIndex,currentType,newValue
this
.
handleSPECIFICATIONSinfo
(
res
.
result
,
res
.
value
)
this
.
handleSPECIFICATIONSinfo
(
res
.
result
,
res
.
value
)
...
@@ -804,6 +846,7 @@
...
@@ -804,6 +846,7 @@
getImageInfo
:
function
(
res
)
{
getImageInfo
:
function
(
res
)
{
this
.
photo_tempFilePaths
=
res
.
tempFilePaths
this
.
photo_tempFilePaths
=
res
.
tempFilePaths
//this.photo_tempFilePaths.push(res.tempFilePaths)
let
that
=
this
let
that
=
this
const
tempFilePaths
=
res
.
tempFilePaths
;
const
tempFilePaths
=
res
.
tempFilePaths
;
...
@@ -812,7 +855,7 @@
...
@@ -812,7 +855,7 @@
uni
.
getImageInfo
({
uni
.
getImageInfo
({
src
:
res
.
tempFilePaths
[
0
],
src
:
res
.
tempFilePaths
[
i
],
success
:
function
(
image
)
{
success
:
function
(
image
)
{
console
.
log
(
'获取照片信息 成功:'
)
console
.
log
(
'获取照片信息 成功:'
)
console
.
log
(
image
.
width
);
console
.
log
(
image
.
width
);
...
@@ -820,8 +863,8 @@
...
@@ -820,8 +863,8 @@
console
.
log
(
image
.
path
);
console
.
log
(
image
.
path
);
console
.
log
(
image
.
orientation
);
console
.
log
(
image
.
orientation
);
console
.
log
(
image
.
type
);
console
.
log
(
image
.
type
);
var
imageDic
=
{
image
:
image
.
path
}
//
var imageDic = {image:image.path}
that
.
photoList
.
push
(
image
Dic
)
that
.
photoList
.
push
(
image
.
path
)
}
}
});
});
...
@@ -832,15 +875,134 @@
...
@@ -832,15 +875,134 @@
//照片上传
//照片上传
photoUpload
:
function
(){
async
photoUpload
(){
let
that
=
this
let
that
=
this
console
.
log
(
'照片上传 数量 :'
)
console
.
log
(
this
.
photo_tempFilePaths
.
length
)
console
.
log
(
this
.
photo_tempFilePaths
)
console
.
log
(
this
.
photo_tempFilePaths
[
0
])
var
deleteIndexs
=
'0'
var
totalCount
=
this
.
photo_tempFilePaths
.
length
var
successCount
=
0
uni
.
showLoading
({
mask
:
true
,
title
:
'上传中'
});
for
(
let
i
=
0
;
i
<
this
.
photo_tempFilePaths
.
length
;
i
++
)
{
uni
.
uploadFile
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/'
+
getApp
().
globalData
.
token
+
/order/
+
this
.
orderId
+
'/guarantee/image'
,
//仅为示例,非真实的接口地址
filePath
:
this
.
photo_tempFilePaths
[
i
],
name
:
'file'
+
i
,
formData
:
{
//'user': 'test'
},
success
:
(
uploadFileRes
)
=>
{
uni
.
hideLoading
();
successCount
=
successCount
+
1
console
.
log
(
'totalCount:'
+
totalCount
)
console
.
log
(
'successCount:'
+
successCount
)
//if(i == (that.photo_tempFilePaths.length-1)){
if
(
successCount
==
totalCount
){
that
.
finishConfirm
()
}
console
.
log
(
'第'
+
i
+
'张 照片单张上传 成功'
);
console
.
log
(
uploadFileRes
.
data
);
},
fail
(
res
)
{
uni
.
hideLoading
();
console
.
log
(
'照片单张上传 失败'
);
console
.
log
(
res
);
uni
.
showToast
({
icon
:
'none'
,
title
:
'照片上传失败'
})
}
});
}
//await that.finishConfirm()
/*
uni.chooseImage({
success: (chooseImageRes) => {
const tempFilePaths = chooseImageRes.tempFilePaths;
for(let i = 0;i < tempFilePaths.length; i++) {
uni.uploadFile({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/'+getApp().globalData.token
+/order/+this.orderId
+'/guarantee/image', //仅为示例,非真实的接口地址
filePath: tempFilePaths[i],
name: 'file'+i,
formData: {
//'user': 'test'
},
success: (uploadFileRes) => {
if(i == photoNumber-1){
that.finishConfirm()
}
console.log('照片单张上传 成功');
console.log(uploadFileRes.data);
},fail() {
console.log('照片单张上传 失败');
}
});
}
}
})
*/
/*
//单次多张上传 微信不支持
uni.uploadFile({
url : getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/'+getApp().globalData.token
+/order/+this.orderId
+'/guarantee/image',
files:this.photo_tempFilePaths,
success: function (uploadFileRes) {
uni.hideLoading();
console.log('照片上传成功')
console.log(uploadFileRes)
that.finishConfirm()
},
fail(e) {
uni.hideLoading();
console.log('照片上传失败:'+e)
uni.showToast({
icon:'none',
title:'照片上传失败'
})
}
})
*/
/*
//官方仅支持单张上传 循环多张上传
//官方仅支持单张上传 循环多张上传
for(let i = 0;i < this.photo_tempFilePaths.length; i++) {
for(let i = 0;i < this.photo_tempFilePaths.length; i++) {
uni.showLoading({
uni.showLoading({
mask: true,
mask: true,
title: '上传中'
title: '上传中'
});
});
// if (i>0) {
// deleteIndexs = deleteIndexs + ','+i
// }
//http://system.banshouhui.com/wxh-worker-rest/rest/RTOKEN01d7a2f3de4f86313745d71f2c1be73b8bae7850/order/11885888/guarantee/image
//http://system.banshouhui.com/wxh-worker-rest/rest/RTOKEN01d7a2f3de4f86313745d71f2c1be73b8bae7850/order/11885888/guarantee/image
uni.uploadFile({
uni.uploadFile({
...
@@ -849,16 +1011,23 @@
...
@@ -849,16 +1011,23 @@
+/order/+this.orderId
+/order/+this.orderId
+'/guarantee/image',
+'/guarantee/image',
filePath: this.photo_tempFilePaths[i],
filePath: this.photo_tempFilePaths[i],
name
:
'yore'
+
i
,
name: 'image'+i,
formData: {
formData: {
//deleteIndexs :i
//deleteIndexs = "0,1,2";
//'qiniutoken': resToken.data.token
//'qiniutoken': resToken.data.token
},
},
success: function (uploadFileRes) {
success: function (uploadFileRes) {
uni.hideLoading();
uni.hideLoading();
console.log('照片上传成功')
console.log('照片上传成功')
console.log(uploadFileRes)
console.log(uploadFileRes)
console.log('photoNumber:'+photoNumber)
console.log('i:'+i)
if(i == photoNumber-1){
that.finishConfirm()
that.finishConfirm()
}
// let upRes = JSON.parse(uploadFileRes.data);
// let upRes = JSON.parse(uploadFileRes.data);
...
@@ -867,9 +1036,9 @@
...
@@ -867,9 +1036,9 @@
// }
// }
// that.photoList.push(photo)
// that.photoList.push(photo)
},
},
fail
()
{
fail(
e
) {
uni.hideLoading();
uni.hideLoading();
console
.
log
(
'照片上传失败
'
)
console.log('照片上传失败
:'+e
)
uni.showToast({
uni.showToast({
icon:'none',
icon:'none',
title:'照片上传失败'
title:'照片上传失败'
...
@@ -879,6 +1048,8 @@
...
@@ -879,6 +1048,8 @@
}
}
*/
},
},
...
@@ -933,6 +1104,12 @@
...
@@ -933,6 +1104,12 @@
},
},
//输入框完成
textAreaInput
:
function
(
e
){
console
.
log
(
'输入框完成:'
)
console
.
log
(
e
.
detail
.
value
)
},
//更新完工信息
//更新完工信息
updateInfo
:
function
(
currentIndex
,
currentType
,
newValue
)
{
updateInfo
:
function
(
currentIndex
,
currentType
,
newValue
)
{
console
.
log
(
'更新的选项:'
)
console
.
log
(
'更新的选项:'
)
...
@@ -997,7 +1174,7 @@
...
@@ -997,7 +1174,7 @@
//判断所有必填项
//判断所有必填项
checkAllRequired
:
function
(){
checkAllRequired
:
function
(){
console
.
log
(
判断所有必填项
)
console
.
log
(
'判断所有必填项'
)
var
isAllDone
=
true
var
isAllDone
=
true
...
@@ -1152,13 +1329,15 @@
...
@@ -1152,13 +1329,15 @@
if
(
res
.
statusCode
==
200
){
if
(
res
.
statusCode
==
200
){
if
(
that
.
photo
List
.
length
>
0
){
if
(
that
.
photo
_tempFilePaths
.
length
>
0
){
that
.
photoUpload
()
that
.
photoUpload
()
console
.
log
(
'
11111111111111111111
'
)
console
.
log
(
'
用户有选图片
'
)
return
return
}
}
console
.
log
(
'用户没选图片'
)
that
.
finishConfirm
()
that
.
finishConfirm
()
console
.
log
(
'222222222222222'
)
}
else
{
}
else
{
...
@@ -1222,6 +1401,11 @@
...
@@ -1222,6 +1401,11 @@
console
.
log
(
res
.
statusCode
)
console
.
log
(
res
.
statusCode
)
if
(
res
.
statusCode
==
200
){
if
(
res
.
statusCode
==
200
){
uni
.
showToast
({
icon
:
'none'
,
title
:
'确认完工成功'
})
uni
.
navigateBack
({})
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -1299,7 +1483,7 @@
...
@@ -1299,7 +1483,7 @@
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
...
take-order/pages/take/index.vue
View file @
576befe7
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
</view>
</view>
<view
class=
"noDataView"
v-if=
"activeTop == 1 && unfinishList.length==0"
>
<view
class=
"noDataView"
v-if=
"activeTop == 1 && unfinishList.length==0"
>
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<text
class=
"noDataText"
>
暂无数据
</text>
<text
class=
"noDataText"
>
{{
noDataTitle
}}
</text>
</view>
</view>
<view
class=
"itemView"
v-if=
"activeTop == 2"
@
click=
"itemClick(item)"
v-for=
"(item,ikey) in finishList"
:key=
"ikey"
>
<view
class=
"itemView"
v-if=
"activeTop == 2"
@
click=
"itemClick(item)"
v-for=
"(item,ikey) in finishList"
:key=
"ikey"
>
<view
class=
"nameView"
>
<view
class=
"nameView"
>
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
</view>
</view>
<view
class=
"noDataView"
v-if=
"activeTop == 2 && finishList.length==0"
>
<view
class=
"noDataView"
v-if=
"activeTop == 2 && finishList.length==0"
>
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<text
class=
"noDataText"
>
暂无数据
</text>
<text
class=
"noDataText"
>
{{
noDataTitle
}}
</text>
</view>
</view>
</view>
</view>
<w-picker
<w-picker
...
@@ -112,6 +112,7 @@
...
@@ -112,6 +112,7 @@
type
:
''
,
type
:
''
,
value
:
''
,
value
:
''
,
icon_noData
:
''
,
icon_noData
:
''
,
noDataTitle
:
'暂无数据'
,
grabList
:[],
grabList
:[],
unfinishList
:[],
unfinishList
:[],
finishList
:[],
finishList
:[],
...
@@ -289,11 +290,18 @@
...
@@ -289,11 +290,18 @@
})
})
},
},
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/worker',
//getApp().globalData.workOrderList
//获取工单列表
//获取工单列表
getOrderList
:
function
(
type
)
{
getOrderList
:
function
(
type
)
{
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
workOrderList
,
+
'/wxh-worker-rest/rest/order/revision/applets/'
+
getApp
().
globalData
.
token
+
'/order/worker'
,
method
:
'GET'
,
method
:
'GET'
,
data
:
{
data
:
{
type
:
type
,
type
:
type
,
...
@@ -301,9 +309,14 @@
...
@@ -301,9 +309,14 @@
pageSize
:
10
,
pageSize
:
10
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取工单列表 成功'
)
console
.
log
(
'获取工单列表 成功'
)
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
403
){
this
.
noDataTitle
=
'您没有权限操作'
}
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
if
(
type
==
5
){
if
(
type
==
5
){
this
.
finishList
=
res
.
data
.
data
this
.
finishList
=
res
.
data
.
data
...
@@ -323,6 +336,7 @@
...
@@ -323,6 +336,7 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
title
:
'获取工单列表失败'
title
:
'获取工单列表失败'
...
@@ -355,8 +369,33 @@
...
@@ -355,8 +369,33 @@
if
(
this
.
activeTop
==
0
){
//抢单市场
if
(
this
.
activeTop
==
0
){
//抢单市场
if
(
item
.
statusText
==
'待抢单'
){
if
(
item
.
statusText
==
'待抢单'
){
/*
contactName:'',
contactMobilephone:'',
contactAddress:'',
inGuaranteePeriodText:'',
orderServiceType:'',
brandName:'',
categoryName:'',
statusText:'',
serviceContent:'',
createDatetime:'',
*/
uni
.
navigateTo
({
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
{
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -418,6 +457,9 @@
...
@@ -418,6 +457,9 @@
dateTime
=
dateTime
.
replace
(
"/"
,
"-"
)
dateTime
=
dateTime
.
replace
(
"/"
,
"-"
)
//2020/12/25 15:00:12
//2020/12/25 15:00:12
console
.
log
(
'预约请求 dateTime'
+
dateTime
)
console
.
log
(
'预约请求 dateTime'
+
dateTime
)
uni
.
showLoading
({
title
:
'加载中'
})
let
that
=
this
let
that
=
this
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
...
@@ -435,6 +477,7 @@
...
@@ -435,6 +477,7 @@
'Content-Type'
:
'application/x-www-form-urlencoded'
,
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'预约请求 成功'
)
console
.
log
(
'预约请求 成功'
)
console
.
log
(
res
)
console
.
log
(
res
)
...
@@ -456,6 +499,7 @@
...
@@ -456,6 +499,7 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'预约请求 失败'
)
console
.
log
(
'预约请求 失败'
)
console
.
log
(
e
)
console
.
log
(
e
)
}
}
...
@@ -495,7 +539,7 @@
...
@@ -495,7 +539,7 @@
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
...
take-order/pages/take/measure.vue
View file @
576befe7
...
@@ -113,6 +113,9 @@
...
@@ -113,6 +113,9 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKENa8f4a27fef05fbcc27d473f32694e51a68101242/price/newsymptoms/V2/11885888
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKENa8f4a27fef05fbcc27d473f32694e51a68101242/price/newsymptoms/V2/11885888
//左边 获取 故障现象 数据
//左边 获取 故障现象 数据
getLeftData
:
function
()
{
getLeftData
:
function
()
{
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
'/wxh-worker-rest/rest/order/'
...
@@ -157,6 +160,9 @@
...
@@ -157,6 +160,9 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/cause/V2/11885888/10000
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/cause/V2/11885888/10000
//中间 获取 查询故障现象 关联的 故障原因 数据
//中间 获取 查询故障现象 关联的 故障原因 数据
getMidData
:
function
(){
getMidData
:
function
(){
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
'/wxh-worker-rest/rest/order/'
...
@@ -201,6 +207,11 @@
...
@@ -201,6 +207,11 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/measure/V2/11885888/10001
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/measure/V2/11885888/10001
//右边 获取 查询故障原因 关联的 服务措施详情以及价格 数据
//右边 获取 查询故障原因 关联的 服务措施详情以及价格 数据
getRightData
:
function
(){
getRightData
:
function
(){
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
'/wxh-worker-rest/rest/order/'
...
@@ -246,6 +257,10 @@
...
@@ -246,6 +257,10 @@
//http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN6c30a6be9e59f428455abd2fdb38fbaf360b4ae0/price/11634/charge/10001/measure/11885888
//http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN6c30a6be9e59f428455abd2fdb38fbaf360b4ae0/price/11634/charge/10001/measure/11885888
//最终请求
//最终请求
getFinalData
:
function
()
{
getFinalData
:
function
()
{
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
'/wxh-worker-rest/rest/order/'
...
@@ -324,7 +339,6 @@
...
@@ -324,7 +339,6 @@
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
}
}
...
...
take-order/pages/take/rob.vue
View file @
576befe7
...
@@ -3,32 +3,32 @@
...
@@ -3,32 +3,32 @@
<view
class=
"topView"
>
<view
class=
"topView"
>
<view
class=
"itemView u-m-t-30"
>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
联系人:
</text>
<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"
v-if=
"
contactName"
>
{{
contactName
}}
</text>
<text
class=
"contentText u-m-l-20 underLine"
v-if=
"
orderInfo.contactMobilephone"
>
{{
orderInfo
.
contactMobilephone
}}
</text>
<text
class=
"contentText u-m-l-20 underLine"
v-if=
"
contactMobilephone"
>
{{
contactMobilephone
}}
</text>
</view>
</view>
<view
class=
"itemView u-m-t-30"
>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
地址:
</text>
<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>
<view
class=
"itemView u-m-t-60"
>
<view
class=
"itemView u-m-t-60"
>
<text
class=
"titleText u-m-l-30"
>
类型:
</text>
<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>
<view
class=
"itemView u-m-t-30"
>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
产品:
</text>
<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>
<view
class=
"itemView u-m-t-30"
>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
状态:
</text>
<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>
<view
class=
"itemView u-m-t-30"
>
<view
class=
"itemView u-m-t-30"
>
<text
class=
"titleText u-m-l-30"
>
描述:
</text>
<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>
<view
class=
"itemView u-m-t-60 padding_bottom_180"
>
<view
class=
"itemView u-m-t-60 padding_bottom_180"
>
<text
class=
"titleText u-m-l-30"
>
下单时间:
</text>
<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>
</view>
<view
class=
"bottomView"
>
<view
class=
"bottomView"
>
...
@@ -59,7 +59,18 @@
...
@@ -59,7 +59,18 @@
popTitle
:
''
,
popTitle
:
''
,
popBtnTitle
:
''
,
popBtnTitle
:
''
,
userType
:
0
,
userType
:
0
,
icon_close
:
''
icon_close
:
''
,
contactName
:
''
,
contactMobilephone
:
''
,
contactAddress
:
''
,
inGuaranteePeriodText
:
''
,
orderServiceType
:
''
,
brandName
:
''
,
categoryName
:
''
,
statusText
:
''
,
serviceContent
:
''
,
createDatetime
:
''
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -67,20 +78,83 @@
...
@@ -67,20 +78,83 @@
if
(
e
&&
e
.
orderId
){
if
(
e
&&
e
.
orderId
){
this
.
orderId
=
e
.
orderId
this
.
orderId
=
e
.
orderId
}
}
this
.
getTopInfo
(
e
)
//this.orderId ='10704469'
//this.orderId ='10704469'
this
.
icon_rob
=
getApp
().
globalData
.
icon_rob
this
.
icon_rob
=
getApp
().
globalData
.
icon_rob
this
.
icon_close
=
getApp
().
globalData
.
icon_close
this
.
icon_close
=
getApp
().
globalData
.
icon_close
},
},
onShow
()
{
onShow
()
{
this
.
getOrderDetail
()
//
this.getOrderDetail()
},
},
methods
:
{
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
()
{
getOrderDetail
:
function
()
{
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
workOrderDetail
,
+
getApp
().
globalData
.
workOrderDetail
,
...
@@ -89,6 +163,7 @@
...
@@ -89,6 +163,7 @@
orderId
:
this
.
orderId
orderId
:
this
.
orderId
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取工单详情 成功'
)
console
.
log
(
'获取工单详情 成功'
)
console
.
log
(
res
)
console
.
log
(
res
)
...
@@ -106,6 +181,7 @@
...
@@ -106,6 +181,7 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取工单详情 失败'
)
console
.
log
(
'获取工单详情 失败'
)
console
.
log
(
e
)
console
.
log
(
e
)
}
}
...
@@ -121,6 +197,9 @@
...
@@ -121,6 +197,9 @@
//检查用户状态
//检查用户状态
checkUserStatus
:
function
(
item
)
{
checkUserStatus
:
function
(
item
)
{
console
.
log
(
'检查用户状态'
)
console
.
log
(
'检查用户状态'
)
uni
.
showLoading
({
title
:
'加载中'
})
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
checkRobStatus
,
+
getApp
().
globalData
.
checkRobStatus
,
...
@@ -129,6 +208,7 @@
...
@@ -129,6 +208,7 @@
orderId
:
this
.
orderId
orderId
:
this
.
orderId
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'检查用户状态 成功'
)
console
.
log
(
'检查用户状态 成功'
)
console
.
log
(
res
)
console
.
log
(
res
)
...
@@ -146,6 +226,7 @@
...
@@ -146,6 +226,7 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'检查用户状态 失败'
)
console
.
log
(
'检查用户状态 失败'
)
console
.
log
(
e
)
console
.
log
(
e
)
}
}
...
@@ -269,6 +350,9 @@
...
@@ -269,6 +350,9 @@
//抢单请求
//抢单请求
////%@/worker/%@/order/%@/accept
////%@/worker/%@/order/%@/accept
robPost
:
function
()
{
robPost
:
function
()
{
uni
.
showLoading
({
title
:
'请稍候'
})
console
.
log
(
'抢单请求'
)
console
.
log
(
'抢单请求'
)
// /wxh-worker-rest/rest/order/revision/applets/{token}/order/acceptAppletsOrder
// /wxh-worker-rest/rest/order/revision/applets/{token}/order/acceptAppletsOrder
uni
.
request
({
uni
.
request
({
...
@@ -284,6 +368,7 @@
...
@@ -284,6 +368,7 @@
'Content-Type'
:
'application/x-www-form-urlencoded'
'Content-Type'
:
'application/x-www-form-urlencoded'
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'抢单请求 成功'
)
console
.
log
(
'抢单请求 成功'
)
console
.
log
(
res
)
console
.
log
(
res
)
...
@@ -304,6 +389,7 @@
...
@@ -304,6 +389,7 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'抢单请求 失败'
)
console
.
log
(
'抢单请求 失败'
)
console
.
log
(
e
)
console
.
log
(
e
)
}
}
...
@@ -311,6 +397,23 @@
...
@@ -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