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
7fe0bfe8
Commit
7fe0bfe8
authored
Apr 15, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能完善
parent
9a599823
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
86 additions
and
11 deletions
+86
-11
cleanRoom.js
api/cleanRoom.js
+6
-0
store.js
api/store.js
+6
-0
public.css
common/public.css
+6
-0
cleanManage.vue
pages/cleanManage/cleanManage.vue
+42
-4
cleanOrderInfo.vue
pages/cleanOrderInfo/cleanOrderInfo.vue
+0
-0
index.vue
pages/couponList/index.vue
+0
-0
order.vue
pages/order/order.vue
+6
-2
index.vue
pages/useCoupon/index.vue
+20
-5
No files found.
api/cleanRoom.js
View file @
7fe0bfe8
...
@@ -36,3 +36,9 @@ export const cleanList=(data)=>{
...
@@ -36,3 +36,9 @@ export const cleanList=(data)=>{
let
url
=
`/cleanRecords/myCleanList`
let
url
=
`/cleanRecords/myCleanList`
return
http
.
get
(
url
,
data
)
return
http
.
get
(
url
,
data
)
}
}
//领取全部的待保洁的任务
export
const
getAllByStoreId
=
(
data
)
=>
{
let
url
=
`/cleanRecords/startCleanByStore`
return
http
.
get
(
url
,
data
)
}
api/store.js
View file @
7fe0bfe8
...
@@ -36,3 +36,8 @@ export const deviceCtrlAuth=()=>{
...
@@ -36,3 +36,8 @@ export const deviceCtrlAuth=()=>{
let
url
=
`/store/storeListByConsumer`
let
url
=
`/store/storeListByConsumer`
return
http
.
get
(
url
)
return
http
.
get
(
url
)
}
}
export
const
getListByIds
=
(
data
)
=>
{
let
url
=
`/store/queryByStoreIds`
return
http
.
post
(
url
,
data
)
}
\ No newline at end of file
common/public.css
View file @
7fe0bfe8
...
@@ -24,3 +24,8 @@
...
@@ -24,3 +24,8 @@
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
}
.flex-row-center
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
\ No newline at end of file
pages/cleanManage/cleanManage.vue
View file @
7fe0bfe8
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</view>
</view>
</view>
</view>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"card-box"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"card-box
card-box-item
"
>
<view
class=
"store-info"
>
<view
class=
"store-info"
>
...
@@ -38,9 +38,13 @@
...
@@ -38,9 +38,13 @@
</view>
</view>
<view
class=
"flex-col part-right"
>
<view
class=
"flex-col part-right"
>
<view
class=
"flex-between"
>
<view
class=
"flex-between"
>
<text
class=
"text-black text-bold text-xl"
>
{{
item
.
name
}}
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
name
}}
</text>
<view
class=
"flex-row-center"
>
<button
v-if=
"item.cleanOrderNum"
class=
"cu-btn bg-pink sm margin-right-sm"
@
tap=
"onGetAllByStoreId(item)"
>
一键领取
</button>
<image
:src=
"assetsPath+'/map_icon.png'"
mode=
"widthFix"
@
tap=
"onNavLocation(item)"
></image>
<image
:src=
"assetsPath+'/map_icon.png'"
mode=
"widthFix"
@
tap=
"onNavLocation(item)"
></image>
</view>
</view>
</view>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<image
:src=
"assetsPath+'/location_icon.png'"
mode=
"widthFix"
></image>
<image
:src=
"assetsPath+'/location_icon.png'"
mode=
"widthFix"
></image>
<view
class=
""
>
<view
class=
""
>
...
@@ -93,7 +97,7 @@
...
@@ -93,7 +97,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getListStore
,
getStarOrder
}
from
"@/api/cleanRoom.js"
;
import
{
getListStore
,
getStarOrder
,
getAllByStoreId
}
from
"@/api/cleanRoom.js"
;
import
config
from
"@/config/index.config"
import
config
from
"@/config/index.config"
import
{
import
{
getDictItem
getDictItem
...
@@ -189,8 +193,15 @@ import moment from "@/common/moment";
...
@@ -189,8 +193,15 @@ import moment from "@/common/moment";
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
code
===
200
){
let
list
=
res
.
data
.
data
&&
res
.
data
.
data
.
length
?
res
.
data
.
data
:[];
let
list
=
res
.
data
.
data
&&
res
.
data
.
data
.
length
?
res
.
data
.
data
:[];
this
.
list
=
list
.
map
(
item
=>
{
this
.
list
=
list
.
map
(
item
=>
{
let
cleanOrderNum
=
0
item
.
roolList
.
forEach
(
room
=>
{
if
(
room
.
recordsStatus
===
0
){
cleanOrderNum
+=
1
}
})
return
{
return
{
...
item
,
...
item
,
cleanOrderNum
:
cleanOrderNum
,
roolList
:
item
.
roolList
&&
item
.
roolList
.
length
?
item
.
roolList
.
map
(
val
=>
{
roolList
:
item
.
roolList
&&
item
.
roolList
.
length
?
item
.
roolList
.
map
(
val
=>
{
return
{
return
{
...
val
,
...
val
,
...
@@ -247,11 +258,31 @@ import moment from "@/common/moment";
...
@@ -247,11 +258,31 @@ import moment from "@/common/moment";
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
val
.
recordsId
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
val
.
recordsId
})
})
}
}
},
onGetAllByStoreId
(
val
){
uni
.
showLoading
(
"领取中..."
)
getAllByStoreId
({
storeId
:
val
.
id
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"操作成功"
})
this
.
onLoading
();
}
console
.
log
(
res
,
9999
)
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
page
{
background
:
#f1f1f1
;
}
</
style
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.clean-manage
{
.clean-manage
{
display
:
flex
;
display
:
flex
;
...
@@ -265,6 +296,13 @@ import moment from "@/common/moment";
...
@@ -265,6 +296,13 @@ import moment from "@/common/moment";
width
:
94%
;
width
:
94%
;
margin-top
:
10
upx
;
margin-top
:
10
upx
;
}
}
.card-box-item
{
width
:
100%
;
background-color
:
#ffffff
;
padding
:
20
upx
3%
;
border-radius
:
4
upx
;
margin-top
:
24
upx
;
}
.title-box
{
.title-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
...
...
pages/cleanOrderInfo/cleanOrderInfo.vue
View file @
7fe0bfe8
This diff is collapsed.
Click to expand it.
pages/couponList/index.vue
View file @
7fe0bfe8
This diff is collapsed.
Click to expand it.
pages/order/order.vue
View file @
7fe0bfe8
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
<view
class=
"flex-between price use-coupon-box"
>
<view
class=
"flex-between price use-coupon-box"
>
<text
<text
class=
"text-black text-left"
>
{{
useCouponList
[
selectCouponIndex
].
couponType
==
2
?
'团购券'
:
'优惠券'
}}
</text>
class=
"text-black text-left"
>
{{
useCouponList
[
selectCouponIndex
].
couponType
==
2
?
'团购券'
:
'优惠券'
}}
</text>
<view
class=
"flex-row"
@
tap=
"onNavToSelectCoupon"
>
<view
class=
"flex-
1 flex-
row"
@
tap=
"onNavToSelectCoupon"
>
<text
class=
""
:class=
"useCouponList.length?'text-pink':'text-gray'"
>
<text
class=
""
:class=
"useCouponList.length?'text-pink':'text-gray'"
>
{{
useCouponList
.
length
&&
selectCouponIndex
>=
0
?
useCouponList
[
selectCouponIndex
].
name
:
couponList
.
length
?
'请选择'
:
'暂无可用'
}}
</text>
{{
useCouponList
.
length
&&
selectCouponIndex
>=
0
?
useCouponList
[
selectCouponIndex
].
name
:
couponList
.
length
?
'请选择'
:
'暂无可用'
}}
</text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
...
@@ -2092,7 +2092,11 @@
...
@@ -2092,7 +2092,11 @@
.use-coupon-box
{
.use-coupon-box
{
.flex-row
{
.flex-row
{
max-width
:
70%
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
//
max-width
:
70%
;
margin-left
:
12
upx
;
}
}
}
}
...
...
pages/useCoupon/index.vue
View file @
7fe0bfe8
...
@@ -34,7 +34,13 @@
...
@@ -34,7 +34,13 @@
</view>
</view>
<view
class=
"part-left"
>
<view
class=
"part-left"
>
<view
class=
"select-btn"
:class=
"
{active: selectId === item.id }">
<view
class=
"surplus-days"
>
<view
v-if=
"item.surplusDays>=0"
class=
"flex-row-center"
>
<text
class=
"cuIcon-countdown text-red"
></text>
<text
class=
"text-red"
>
{{
item
.
surplusDays
}}
天后过期
</text>
</view>
</view>
<view
class=
"select-btn margin-top-sm"
:class=
"
{active: selectId === item.id }">
<radio-group
v-if=
"item.isAvailable != 1"
class=
"radio-group"
>
<radio-group
v-if=
"item.isAvailable != 1"
class=
"radio-group"
>
<radio
class=
'brown'
:class=
"selectId === item.id?'checked':''"
:checked=
"selectId === item.id?true:false"
color=
"#AF7117"
></radio>
<radio
class=
'brown'
:class=
"selectId === item.id?'checked':''"
:checked=
"selectId === item.id?true:false"
color=
"#AF7117"
></radio>
</radio-group>
</radio-group>
...
@@ -62,6 +68,7 @@
...
@@ -62,6 +68,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
moment
from
"@/common/moment.js"
import
{
dictList
}
from
"@/api/index.js"
;
import
{
dictList
}
from
"@/api/index.js"
;
import
{
getDictItem
}
from
"@/utils/tools.js"
import
{
getDictItem
}
from
"@/utils/tools.js"
import
config
from
"@/config/index.config"
import
config
from
"@/config/index.config"
...
@@ -131,9 +138,14 @@
...
@@ -131,9 +138,14 @@
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
if
(
res
.
data
&&
res
.
data
.
data
.
length
)
{
let
list
=
res
.
data
.
data
.
map
(
item
=>
{
let
list
=
res
.
data
.
data
.
map
(
item
=>
{
let
endTime
=
moment
(
item
.
endDate
).
valueOf
();
let
nowTime
=
moment
().
valueOf
();
let
surplusDays
=
parseInt
(
moment
.
duration
(
endTime
-
nowTime
).
asDays
())
return
{
return
{
...
item
,
...
item
,
subPrice
:
item
.
subPrice
||
0
subPrice
:
item
.
subPrice
||
0
,
surplusDays
:
surplusDays
<=
30
?
surplusDays
:
-
10000
}
}
})
})
...
@@ -210,7 +222,10 @@
...
@@ -210,7 +222,10 @@
}
}
.part-left
{
.part-left
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
column
;
.surplus-days{
height
:
40
upx
;
}
.select-btn
{
.select-btn
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
...
@@ -265,9 +280,9 @@
...
@@ -265,9 +280,9 @@
filter
:
grayscale
(
100%
);
filter
:
grayscale
(
100%
);
.select-btn{
.select-btn{
background
:
#ffffff
!important
;
background
:
#ffffff
!important
;
height
:
32
px
!important
;
height
:
26
px
!important
;
border-radius
:
16px
!important
;
border-radius
:
16px
!important
;
padding
:
12
upx
24
upx
!important
;
padding
:
0
12
upx
!important
;
text{
text{
color
:
#929292
!important
;
color
:
#929292
!important
;
}
}
...
...
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