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
ec522dfb
Commit
ec522dfb
authored
Dec 28, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享问题
parent
c867ae69
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
192 additions
and
116 deletions
+192
-116
index.vue
take-order/pages/index/index.vue
+17
-2
detail.vue
take-order/pages/take/detail.vue
+165
-114
index.vue
take-order/pages/take/index.vue
+10
-0
No files found.
take-order/pages/index/index.vue
View file @
ec522dfb
...
@@ -164,7 +164,13 @@
...
@@ -164,7 +164,13 @@
}
}
},
},
onLoad
()
{
onLoad
(
e
)
{
//+ '?orderId=' + this.orderId + '&toWhere=detail'
if
(
e
&&
e
.
toWhere
){
this
.
toWhere
(
e
)
}
this
.
icon_location
=
getApp
().
globalData
.
icon_location
this
.
icon_location
=
getApp
().
globalData
.
icon_location
this
.
icon_notice
=
getApp
().
globalData
.
icon_index_notice
this
.
icon_notice
=
getApp
().
globalData
.
icon_index_notice
this
.
icon_agree_yes
=
getApp
().
globalData
.
icon_agree_yes
this
.
icon_agree_yes
=
getApp
().
globalData
.
icon_agree_yes
...
@@ -225,7 +231,16 @@
...
@@ -225,7 +231,16 @@
doNothing
:
function
(){},
doNothing
:
function
(){},
toWhere
:
function
(
e
){
if
(
e
.
toWhere
==
detail
&&
e
.
orderId
){
uni
.
navigateTo
({
url
:
'/pages/take/detail'
+
'?orderId='
+
e
.
orderId
,
})
}
},
nameInput
(
e
){
nameInput
(
e
){
this
.
name
=
e
.
detail
.
value
this
.
name
=
e
.
detail
.
value
...
...
take-order/pages/take/detail.vue
View file @
ec522dfb
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<view
class=
"topView"
>
<view
class=
""
v-if=
"isContentShow"
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.contactName"
>
<view
class=
"topView"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.contactName"
>
<text
class=
"titleText"
>
联系人:
</text>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
contactName
}}
</text>
<text
class=
"titleText"
>
联系人:
</text>
<text
class=
"contentText u-m-l-10"
v-if=
"orderInfo.contactMobilephone"
>
{{
orderInfo
.
contactMobilephone
}}
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
contactName
}}
</text>
<text
class=
"contentText u-m-l-10"
v-if=
"orderInfo.contactMobilephone"
>
{{
orderInfo
.
contactMobilephone
}}
</text>
</view>
</view>
</view>
</view
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.contactAddress"
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.contactAddress
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
地址:
</text
>
<text
class=
"titleText"
>
地址:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
contactAddress
}}
</text>
<
text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
contactAddress
}}
</text
>
<
/view
>
</view>
</view>
</view
>
<view
class=
"itemView u-m-t-60"
>
<view
class=
"itemView u-m-t-6
0"
>
<view
class=
"u-p-l-30 u-p-r-3
0"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
类型:
</text
>
<text
class=
"titleText"
>
类型:
</text>
<text
class=
"contentText u-m-l-10"
v-if=
"orderInfo.inGuaranteePeriodText"
>
(
{{
orderInfo
.
inGuaranteePeriodText
}}
)
{{
orderInfo
.
orderServiceType
}}
</text>
<
text
class=
"contentText u-m-l-10"
v-if=
"orderInfo.inGuaranteePeriodText"
>
(
{{
orderInfo
.
inGuaranteePeriodText
}}
)
{{
orderInfo
.
orderServiceType
}}
</text
>
<
/view
>
</view>
</view>
</view
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.brandName"
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.brandName
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
产品:
</text
>
<text
class=
"titleText"
>
产品:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
brandName
}}
-
{{
orderInfo
.
categoryName
}}
</text>
<
text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
brandName
}}
-
{{
orderInfo
.
categoryName
}}
</text
>
<
/view
>
</view>
</view>
</view
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.statusText"
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.statusText
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
状态:
</text
>
<text
class=
"titleText"
>
状态:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
statusText
}}
</text>
<
text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
statusText
}}
</text
>
<
/view
>
</view>
</view>
</view
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.serviceContent"
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.serviceContent
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
描述:
</text
>
<text
class=
"titleText"
>
描述:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
serviceContent
}}
</text>
<
text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
serviceContent
}}
</text
>
<
/view
>
</view>
</view>
</view
>
<view
class=
"itemView u-m-t-60 u-p-b-40"
v-if=
"orderInfo.createDatetime"
>
<view
class=
"itemView u-m-t-60 u-p-b-40"
v-if=
"orderInfo.createDatetime
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
下单时间:
</text
>
<text
class=
"titleText"
>
下单时间:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
formatDate
(
orderInfo
.
createDatetime
)
}}
</text>
<
text
class=
"contentText u-m-l-10"
>
{{
formatDate
(
orderInfo
.
createDatetime
)
}}
</text
>
<
/view
>
</view>
</view>
<view
class=
"divideLine"
></view>
</view>
</view>
<view
class=
"divideLine"
></view>
<view
class=
"willFinishView"
v-if=
"orderInfo.statusText == '待完工'"
>
</view>
<view
class=
"itemView u-m-t-50"
v-if=
"orderInfo.appointmentDatetime"
>
<view
class=
"willFinishView"
v-if=
"orderInfo.statusText == '待完工'"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<view
class=
"itemView u-m-t-50"
v-if=
"orderInfo.appointmentDatetime"
>
<text
class=
"titleText"
>
预约时间:
</text>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"blueContentText underLine u-m-l-10"
@
click
.
stop=
"onShowDatePicker('datetime',orderInfo)"
>
{{
formatDate
(
orderInfo
.
appointmentDatetime
)
}}
</text>
<text
class=
"titleText"
>
预约时间:
</text>
</view>
<text
class=
"blueContentText underLine u-m-l-10"
@
click
.
stop=
"onShowDatePicker('datetime',orderInfo)"
>
{{
formatDate
(
orderInfo
.
appointmentDatetime
)
}}
</text>
</view>
</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
class=
"itemView u-m-t-30"
v-if=
"orderInfo.maintainWorkerName"
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.maintainWorkerName
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
接单师傅:
</text
>
<text
class=
"titleText"
>
接单师傅:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
maintainWorkerName
}}
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
maintainWorkerNam
e
}}
</text>
<text
class=
"blueContentText underLine u-m-l-10"
@
click=
"phoneCallClick(orderInfo.maintainWorkerPhone)"
v-if=
"orderInfo.maintainWorkerPhone"
>
{{
orderInfo
.
maintainWorkerPhon
e
}}
</text>
<
text
class=
"blueContentText underLine u-m-l-10"
@
click=
"phoneCallClick(orderInfo.maintainWorkerPhone)"
v-if=
"orderInfo.maintainWorkerPhone"
>
{{
orderInfo
.
maintainWorkerPhone
}}
</text
>
<
/view
>
</view>
</view>
</view>
<view
class=
"itemView u-m-t-30 padding_bottom_130"
v-if=
"orderInfo.allocateWorkerDatetime"
>
<view
class=
"itemView u-m-t-30 padding_bottom_130"
v-if=
"orderInfo.allocateWorkerDatetime
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
接单时间:
</text
>
<text
class=
"titleText"
>
接单时间:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
formatDate
(
orderInfo
.
allocateWorkerDatetime
)
}}
</text>
<
text
class=
"contentText u-m-l-10"
>
{{
formatDate
(
orderInfo
.
allocateWorkerDatetime
)
}}
</text
>
<
/view
>
</view>
</view>
</view>
</view>
</view
>
<view
class=
"finishView"
v-if=
"orderInfo.statusText == '已完工'"
>
<view
class=
"finishView"
v-if=
"orderInfo.statusText == '已完工'
"
>
<view
class=
"itemView u-m-t-50"
v-if=
"orderInfo.maintainWorkerName
"
>
<view
class=
"itemView u-m-t-50"
v-if=
"orderInfo.maintainWorkerName
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
接单师傅:
</text
>
<text
class=
"titleText"
>
接单师傅:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
maintainWorkerName
}}
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
maintainWorkerNam
e
}}
</text>
<text
class=
"blueContentText underLine u-m-l-10"
@
click=
"phoneCallClick(orderInfo.maintainWorkerPhone)"
v-if=
"orderInfo.maintainWorkerPhone"
>
{{
orderInfo
.
maintainWorkerPhon
e
}}
</text>
<
text
class=
"blueContentText underLine u-m-l-10"
@
click=
"phoneCallClick(orderInfo.maintainWorkerPhone)"
v-if=
"orderInfo.maintainWorkerPhone"
>
{{
orderInfo
.
maintainWorkerPhone
}}
</text
>
<
/view
>
</view>
</view>
</view
>
<view
class=
"itemView u-m-t-30 u-p-b-50"
v-if=
"orderInfo.allocateWorkerDatetime"
>
<view
class=
"itemView u-m-t-30 u-p-b-50"
v-if=
"orderInfo.allocateWorkerDatetime
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
接单时间:
</text
>
<text
class=
"titleText"
>
接单时间:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
formatDate
(
orderInfo
.
allocateWorkerDatetime
)
}}
</text>
<
text
class=
"contentText u-m-l-10"
>
{{
formatDate
(
orderInfo
.
allocateWorkerDatetime
)
}}
</text
>
<
/view
>
</view>
</view>
</view>
<view
class=
"divideLine"
>
</view>
<view
class=
"divideLine"
></view
>
<view
class=
"itemView u-m-t-50"
v-if=
"orderInfo.orderFinishDatetime"
>
<view
class=
"itemView u-m-t-50"
v-if=
"orderInfo.orderFinishDatetime
"
>
<view
class=
"u-p-l-30 u-p-r-30
"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
完工时间:
</text
>
<text
class=
"titleText"
>
完工时间:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
formatDate
(
orderInfo
.
orderFinishDatetime
)
}}
</text>
<
text
class=
"contentText u-m-l-10"
>
{{
formatDate
(
orderInfo
.
orderFinishDatetime
)
}}
</text
>
<
/view
>
</view>
</view>
</view>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.images"
>
<view
class=
"itemView u-m-t-30"
v-if=
"orderInfo.images"
>
<text
class=
"titleText u-m-l-30"
>
完工凭证:
</text>
<text
class=
"titleText u-m-l-30"
>
完工凭证:
</text>
</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"
@
click=
"photoClick(item,ikey)"
:src=
"item"
mode=
"aspectFill"
></image>
</view>
</view>
</view>
<view
class=
"photoBackView u-p-b-24"
v-if=
"orderInfo.images"
>
<view
class=
"itemView u-m-t-30 padding_bottom_180"
v-if=
"orderInfo.guaranteeExplain"
>
<view
class=
"photoItemView"
v-for=
"(item,ikey) in photoList"
:key=
"ikey"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<image
class=
"photoImage"
@
click=
"photoClick(item,ikey)"
:src=
"item"
mode=
"aspectFill"
></image>
<text
class=
"titleText"
>
完工描述:
</text>
</view>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
guaranteeExplain
}}
</text>
</view>
<view
class=
"itemView u-m-t-30 padding_bottom_180"
v-if=
"orderInfo.guaranteeExplain"
>
<view
class=
"u-p-l-30 u-p-r-30"
>
<text
class=
"titleText"
>
完工描述:
</text>
<text
class=
"contentText u-m-l-10"
>
{{
orderInfo
.
guaranteeExplain
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view
>
<view
class=
"bottomView"
v-if=
"orderInfo.statusText != '已完工' && isBottomShow == true"
>
<view
class=
"bottomView"
v-if=
"orderInfo.statusText != '已完工' && isBottomShow == true
"
>
<view
class=
"bottomLeftView"
@
click=
"cancelClick()
"
>
<view
class=
"bottomLeftView"
@
click=
"cancelClick()"
>
<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"
>
{{
bottomTitle
}}
</text
>
<
text
class=
"bottomTitle whiteColor"
>
{{
bottomTitle
}}
</text
>
<
/view
>
</view>
</view>
<w-picker
:visible
.
sync=
"isCancelShow"
mode=
"selector"
value=
""
default-type=
"label"
:default-props=
"cancel_defaultProps"
:options=
"cancelReasonList"
@
confirm=
"cancelReasonOnConfirm($event,'selector')"
@
cancel=
"cancelReasonOnCancel"
ref=
"selector"
></w-picker>
</view>
</view>
<w-picker
:visible
.
sync=
"isCancelShow"
mode=
"selector"
value=
""
default-type=
"label"
:default-props=
"cancel_defaultProps"
:options=
"cancelReasonList"
@
confirm=
"cancelReasonOnConfirm($event,'selector')"
@
cancel=
"cancelReasonOnCancel"
ref=
"selector"
></w-picker>
<view
class=
"noDataView"
v-if=
"isContentShow == false"
>
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<text
class=
"noDataText"
>
无查看权限
</text>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -148,6 +155,8 @@
...
@@ -148,6 +155,8 @@
type
:
''
,
type
:
''
,
value
:
''
,
value
:
''
,
TimeID
:
-
1
,
TimeID
:
-
1
,
userType
:
''
,
isContentShow
:
false
,
//退单弹窗相关
//退单弹窗相关
isCancelShow
:
false
,
isCancelShow
:
false
,
...
@@ -270,7 +279,9 @@
...
@@ -270,7 +279,9 @@
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
this
.
orderInfo
=
res
.
data
.
data
this
.
orderInfo
=
res
.
data
.
data
this
.
userType
=
res
.
data
.
data
.
userType
this
.
setBottomTitle
(
res
)
this
.
setBottomTitle
(
res
)
this
.
checkUserType
()
if
(
res
.
data
.
data
.
images
){
if
(
res
.
data
.
data
.
images
){
this
.
adjustPhotoList
(
res
.
data
.
data
.
images
)
this
.
adjustPhotoList
(
res
.
data
.
data
.
images
)
}
}
...
@@ -298,6 +309,32 @@
...
@@ -298,6 +309,32 @@
})
})
},
},
//底部按钮标题
setBottomTitle
:
function
(
res
){
if
(
res
.
data
.
data
.
statusText
==
'待接单'
){
this
.
bottomTitle
=
'接单'
}
else
{
this
.
bottomTitle
=
'完工'
}
},
//检查用户状态
checkUserType
:
function
(){
//下单用户/师傅用户/后台用户/非法用户
console
.
log
(
'当前用户类型:'
+
this
.
userType
)
if
(
this
.
userType
!=
'师傅用户'
){
this
.
isBottomShow
=
false
}
if
(
this
.
userType
==
'非法用户'
){
this
.
isContentShow
=
false
}
},
//照片 点击
//照片 点击
photoClick
:
function
(
item
,
ikey
)
{
photoClick
:
function
(
item
,
ikey
)
{
// console.log('照片 点击')
// console.log('照片 点击')
...
@@ -324,16 +361,7 @@
...
@@ -324,16 +361,7 @@
});
});
},
},
//底部按钮标题
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
)
{
...
@@ -869,6 +897,29 @@
...
@@ -869,6 +897,29 @@
align-items
:
center
;
align-items
:
center
;
}
}
.noDataView
{
background-color
:
#FFFFFF
;
width
:
100%
;
height
:
1112
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.noDataIcon
{
background-color
:
#FFFFFF
;
margin-top
:
280
rpx
;
width
:
200
rpx
;
height
:
160
rpx
;
}
.noDataText
{
color
:
#999999
;
margin-top
:
32
rpx
;
font-size
:
28
rpx
;
}
</
style
>
</
style
>
take-order/pages/take/index.vue
View file @
ec522dfb
...
@@ -231,6 +231,16 @@
...
@@ -231,6 +231,16 @@
},
},
onShareAppMessage
(
res
)
{
let
shareObj
=
{
title
:
''
,
path
:
'/pages/take/index'
,
success
(){},
fail
(){}
}
return
shareObj
},
methods
:
{
methods
:
{
...
...
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