Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
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
pseer
gxpt_wechat
Commits
3ac6ccf4
Commit
3ac6ccf4
authored
Nov 15, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123213
parent
400b7ae5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
53 deletions
+68
-53
cleanRoom.js
api/cleanRoom.js
+2
-2
cleanManage.vue
pages/cleanManage/cleanManage.vue
+1
-1
cleanOrderInfo.vue
pages/cleanOrderInfo/cleanOrderInfo.vue
+30
-11
index.vue
pages/cleanRecord/index.vue
+35
-39
No files found.
api/cleanRoom.js
View file @
3ac6ccf4
...
@@ -6,8 +6,8 @@ export const getListStore=()=>{
...
@@ -6,8 +6,8 @@ export const getListStore=()=>{
return
http
.
get
(
url
)
return
http
.
get
(
url
)
}
}
export
const
getInfoBy
RoomId
=
(
roomI
d
)
=>
{
export
const
getInfoBy
Id
=
(
i
d
)
=>
{
let
url
=
`/cleanRecords/
getByRoomId/
${
roomI
d
}
`
let
url
=
`/cleanRecords/
${
i
d
}
`
return
http
.
get
(
url
)
return
http
.
get
(
url
)
}
}
...
...
pages/cleanManage/cleanManage.vue
View file @
3ac6ccf4
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
align-items
:
center
;
align-items
:
center
;
width
:
30%
;
width
:
30%
;
margin
:
12
upx
1.6%
;
margin
:
12
upx
1.6%
;
padding
:
2
0
upx
0
;
padding
:
3
0
upx
0
;
border-radius
:
20
upx
;
border-radius
:
20
upx
;
}
}
}
}
...
...
pages/cleanOrderInfo/cleanOrderInfo.vue
View file @
3ac6ccf4
...
@@ -4,25 +4,25 @@
...
@@ -4,25 +4,25 @@
<form>
<form>
<view
class=
"cu-form-group margin-top"
>
<view
class=
"cu-form-group margin-top"
>
<view
class=
"title"
>
门店名称
</view>
<view
class=
"title"
>
门店名称
</view>
<text>
测试一号店
</text>
<text>
{{
orderInfo
.
storeName
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
门店地址
</view>
<view
class=
"title"
>
门店地址
</view>
<text>
武汉市印象国际8楼802
</text>
<text>
{{
orderInfo
.
address
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
房间名称
</view>
<view
class=
"title"
>
房间名称
</view>
<text>
一帆风顺
</text>
<text>
{{
orderInfo
.
roomName
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
<!--
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
房间号
</view>
<view
class=
"title"
>
房间号
</view>
<text>
111
</text>
<text>
111
</text>
</view>
</view>
-->
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
保洁状态
</view>
<view
class=
"title"
>
保洁状态
</view>
<text>
待保洁
</text>
<text>
{{
cleanStatusEnum
[
orderInfo
.
status
]
}}
</text>
</view>
</view>
<view
class=
"cu-bar bg-white margin-top"
>
<view
class=
"cu-bar bg-white margin-top"
>
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
</form>
</form>
</view>
</view>
<view
class=
"confirm-box"
>
<view
v-if=
"orderInfo.status !='2' "
class=
"confirm-box"
>
<view
class=
"confirm-btn"
>
<view
class=
"confirm-btn"
>
<button
class=
"cu-btn block bg-blue margin-tb-sm lg"
type=
""
>
提交并开始保洁
</button>
<button
class=
"cu-btn block bg-blue margin-tb-sm lg"
type=
""
>
提交并开始保洁
</button>
</view>
</view>
...
@@ -70,21 +70,40 @@
...
@@ -70,21 +70,40 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getInfoByRoomId
,
openDoorByCleaner
,
startClean
,
endClean
}
from
"@/api/cleanRoom.js"
;
import
{
getInfoById
,
openDoorByCleaner
,
startClean
,
endClean
}
from
"@/api/cleanRoom.js"
;
import
{
getDictItem
}
from
"@/utils/tools.js"
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
imgList
:[],
imgList
:[],
orderInfo
:{},
orderInfo
:{},
cleanStatusEnum
:{},
orderId
:
''
};
};
},
},
onLoad
()
{
onLoad
(
option
)
{
this
.
onLoading
();
this
.
orderId
=
option
.
id
;
this
.
onGetDicts
()
},
},
methods
:{
methods
:{
onGetDicts
()
{
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
this
.
cleanStatusEnum
=
getDictItem
(
dicts
,
"clean_records_status"
);
this
.
onLoading
()
}
else
{
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
cleanStatusEnum
=
getDictItem
(
dicts
,
"clean_records_status"
);
this
.
onLoading
()
})
}
},
onLoading
(){
onLoading
(){
getInfoBy
RoomId
(
this
.
room
Id
).
then
(
res
=>
{
getInfoBy
Id
(
this
.
order
Id
).
then
(
res
=>
{
console
.
log
(
res
,
90909090
)
console
.
log
(
res
,
90909090
)
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
code
===
200
){
this
.
orderInfo
=
res
.
data
.
data
;
this
.
orderInfo
=
res
.
data
.
data
;
...
...
pages/cleanRecord/index.vue
View file @
3ac6ccf4
<
template
>
<
template
>
<view
class=
"order-record"
>
<view
class=
"order-record"
>
<scroll-view
v-if=
"loginStatus"
scroll-x
class=
"bg-white nav"
>
<!--
<scroll-view
v-if=
"loginStatus"
scroll-x
class=
"bg-white nav"
>
<view
class=
"flex text-center"
>
<view
class=
"flex text-center"
>
<view
class=
"cu-item flex-sub"
:class=
"index==statusIndex?'text-orange cur':''"
<view
class=
"cu-item flex-sub"
:class=
"index==statusIndex?'text-orange cur':''"
v-for=
"(item,index) in statusList"
:key=
"index"
@
tap=
"tabSelect(index)"
>
v-for=
"(item,index) in statusList"
:key=
"index"
@
tap=
"tabSelect(index)"
>
<text>
{{
item
.
label
}}
</text>
<text>
{{
item
.
label
}}
</text>
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
-->
<view
v-if=
"loginStatus"
class=
"content-box"
>
<view
v-if=
"loginStatus"
class=
"content-box"
>
<view
class=
"list-content"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
class=
"flex-between part-1"
>
<view
class=
"flex-between part-1"
>
<text
class=
"text-title text-bold text-xl"
>
{{
item
.
roomName
||
'房间名称'
}}
</text>
<text
class=
"text-title text-bold text-xl"
>
{{
item
.
roomName
||
'房间名称'
}}
</text>
<text
class=
"text-pink"
>
{{
order
StatusEnum
[
item
.
status
]
}}
</text>
<text
class=
"text-pink"
>
{{
clean
StatusEnum
[
item
.
status
]
}}
</text>
</view>
</view>
<view
class=
"flex-between part-1"
>
<view
class=
"flex-between part-1"
>
<view
class=
""
>
<view
class=
""
>
<text>
{{
item
.
payType
==
1
?
'微信支付'
:
'余额支付'
}}
:
</text>
<text>
所属门店:
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
payPrice
}}
元
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
storeName
}}
</text>
</view>
<view
class=
"flex-row"
>
<text>
{{
item
.
orderType
==
1
?
'房间预定'
:
'房间续订'
}}
</text>
</view>
</view>
</view>
</view>
<view
v-if=
"item.couponId"
class=
"flex-between
part-1"
>
<view
class=
"flex-row
part-1"
>
<text>
优惠券抵扣
</text>
<text>
创建时间
</text>
<text>
{{
item
.
c
ouponName
}}
</text>
<text>
{{
item
.
c
reateTime
||
'-'
}}
</text>
</view>
</view>
<view
class=
"flex-row part-1"
>
<view
class=
"flex-row part-1"
>
<text>
订单编号
:
</text>
<text>
开始时间
:
</text>
<text>
{{
item
.
orderNo
}}
</text>
<text>
{{
item
.
startDate
||
'-'
}}
</text>
</view>
</view>
<view
class=
"flex-
between
part-1"
>
<view
class=
"flex-
row
part-1"
>
<text>
使用
时间:
</text>
<text>
完成
时间:
</text>
<text>
{{
item
.
preStartDate
}}
-
{{
item
.
preEndDate
}}
</text>
<text>
{{
item
.
endDate
||
'-'
}}
</text>
</view>
</view>
<view
class=
"flex-
between
part-1"
>
<view
class=
"flex-
row
part-1"
>
<text>
下单时间
:
</text>
<text>
备注
:
</text>
<text>
{{
item
.
createTime
}}
</text>
<text>
{{
item
.
remark
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<u-empty
v-if=
"loginStatus && list.length == 0"
text=
"未查询到相关
订单
"
textColor=
'#C1C1C1'
></u-empty>
<u-empty
v-if=
"loginStatus && list.length == 0"
text=
"未查询到相关
记录
"
textColor=
'#C1C1C1'
></u-empty>
<view
v-if=
"loginStatus && list.length"
style=
"padding: 12px 6% 0;"
>
<view
v-if=
"loginStatus && list.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
...
@@ -73,27 +70,27 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -73,27 +70,27 @@ import NoLogin from "@/components/noLogin/noLogin"
nomoreText
:
'到底啦'
,
nomoreText
:
'到底啦'
,
statusIndex
:
0
,
statusIndex
:
0
,
list
:
[],
list
:
[],
statusList
:
[
//
statusList: [
{
//
{
label
:
"待保洁"
,
//
label: "待保洁",
value
:
""
,
//
value: "",
},
//
},
{
//
{
label
:
"保洁中"
,
//
label: "保洁中",
value
:
"1"
,
//
value: "1",
},
//
},
{
//
{
label
:
"已保洁"
,
//
label: "已保洁",
value
:
"2"
,
//
value: "2",
}
//
}
],
//
],
queryParams
:
{
queryParams
:
{
status
:
""
,
status
:
""
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
pageSize
:
10
},
},
loginStatus
:
true
,
loginStatus
:
true
,
order
StatusEnum
:{}
clean
StatusEnum
:{}
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -113,13 +110,13 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -113,13 +110,13 @@ import NoLogin from "@/components/noLogin/noLogin"
let
dicts
=
[]
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
if
(
uni
.
getStorageSync
(
'dicts'
))
{
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order
_status"
);
this
.
cleanStatusEnum
=
getDictItem
(
dicts
,
"clean_records
_status"
);
this
.
onLoading
()
this
.
onLoading
()
}
else
{
}
else
{
dictList
().
then
(
res
=>
{
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order
_status"
);
this
.
cleanStatusEnum
=
getDictItem
(
dicts
,
"clean_records
_status"
);
this
.
onLoading
()
this
.
onLoading
()
})
})
}
}
...
@@ -129,7 +126,6 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -129,7 +126,6 @@ import NoLogin from "@/components/noLogin/noLogin"
title
:
'加载中'
title
:
'加载中'
})
})
this
.
status
=
'loading'
this
.
status
=
'loading'
this
.
queryParams
.
status
=
this
.
statusList
[
this
.
statusIndex
].
value
;
cleanList
(
this
.
queryParams
).
then
(
res
=>
{
cleanList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -158,7 +154,7 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -158,7 +154,7 @@ import NoLogin from "@/components/noLogin/noLogin"
},
},
onNavToOrderInfo
(
val
){
onNavToOrderInfo
(
val
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/
orderResult/orderResult?orderNo="
+
val
.
orderNo
url
:
"/pages/
cleanOrderInfo/cleanOrderInfo?id="
+
val
.
id
})
})
}
}
}
}
...
...
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