Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李智书
xzf_uniapp-wechat-web
Commits
5140358a
Commit
5140358a
authored
Jul 24, 2023
by
lizhishu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.消费应用更新;
parent
c4d5aa28
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
836 additions
and
626 deletions
+836
-626
src/pages.json
src/pages.json
+10
-0
src/pages/ApplyConsumption/Home/Home.vue
src/pages/ApplyConsumption/Home/Home.vue
+7
-0
src/pages/ApplyConsumption/pendingOrder/pendingOrder.vue
src/pages/ApplyConsumption/pendingOrder/pendingOrder.vue
+226
-577
src/pages/ApplyConsumption/pendingOrderDetail/pendingOrderDetail.vue
...pplyConsumption/pendingOrderDetail/pendingOrderDetail.vue
+279
-0
src/pages/ApplyConsumption/rechargeDetail/rechargeDetail.vue
src/pages/ApplyConsumption/rechargeDetail/rechargeDetail.vue
+131
-16
src/pages/ApplyConsumption/topupDetail/topupDetail.vue
src/pages/ApplyConsumption/topupDetail/topupDetail.vue
+183
-33
No files found.
src/pages.json
View file @
5140358a
...
@@ -588,6 +588,16 @@
...
@@ -588,6 +588,16 @@
}
}
}
}
,{
"path"
:
"pages/ApplyConsumption/pendingOrderDetail/pendingOrderDetail"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"消费详情"
,
"enablePullDownRefresh"
:
false
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
...
...
src/pages/ApplyConsumption/Home/Home.vue
View file @
5140358a
...
@@ -221,14 +221,21 @@
...
@@ -221,14 +221,21 @@
async
goToPage
(
value
)
{
async
goToPage
(
value
)
{
switch
(
value
)
{
switch
(
value
)
{
case
1
:
case
1
:
uni
.
navigateTo
({
url
:
'
../pendingOrder/pendingOrder
'
})
break
;
break
;
case
2
:
case
2
:
uni
.
navigateTo
({
url
:
'
../topupDetail/topupDetail
'
})
break
;
break
;
case
3
:
case
3
:
break
;
break
;
default
:
default
:
break
;
break
;
}
}
},
},
// 跳转云平台权益中心
// 跳转云平台权益中心
async
openAzMenber
()
{
async
openAzMenber
()
{
...
...
src/pages/ApplyConsumption/pendingOrder/pendingOrder.vue
View file @
5140358a
This diff is collapsed.
Click to expand it.
src/pages/ApplyConsumption/pendingOrderDetail/pendingOrderDetail.vue
0 → 100644
View file @
5140358a
<
template
>
<view
class=
"rechargeDetail"
>
<view
class=
"contentWrapper"
>
<view
class=
"wrapper"
>
<view
class=
"topBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgTop.png'+')'"
>
<view
class=
"line"
></view>
</view>
<view
class=
"title"
>
{{
orderInfo
[
'
storeName
'
]
||
''
}}
-
{{
mealType
[
orderInfo
[
'
mealType
'
]]
}}
</view>
<view
class=
"amount"
>
-
{{
itemAmount
(
orderInfo
[
'
amount
'
]
||
0
)
}}
</view>
<!-- 订单状态 -->
<view
class=
"status"
v-if=
"orderInfo['status']==0||orderInfo['status']==1"
>
{{
[
'
待支付
'
,
'
已支付
'
][
orderInfo
[
'
status
'
]]
}}
</view>
<view
class=
"rowItem"
style=
"margin-top: 92rpx;"
>
<view
class=
"label"
>
学生姓名
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
userName
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
年级班级
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
gradeName
'
]
||
''
}}
/
{{
orderInfo
[
'
className
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
手续费
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
serviceFee
'
]
||
'
0.00
'
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费设备
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
deviceName
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费场景
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
consumeScene
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费时间
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
dealTime
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
交易订单号
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
platflowNo
'
]
||
''
}}
</view>
</view>
<view
class=
"btn"
@
click=
"goToPage(1)"
>
<view
class=
"button"
>
对此订单有疑问?
</view>
</view>
</view>
<view
class=
"bottomBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgBottom.png'+')'"
></view>
</view>
</view>
</
template
>
<
script
>
import
{
Dialog
,
Toast
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
export
default
{
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
mealType
:
{
1
:
'
早餐
'
,
2
:
'
中餐
'
,
3
:
'
晚餐
'
,
4
:
'
夜宵
'
,
5
:
'
夜夜宵
'
},
status
:
{
0
:
'
待扣款
'
,
1
:
'
已付款
'
,
2
:
'
已撤销
'
,
3
:
'
已退款
'
,
4
:
'
异常订单
'
},
orderInfo
:
{
accountId
:
''
,
// integer刷脸用户账户id,该id为绑定用户id
amount
:
''
,
// integer消费金额 单位分
dealTime
:
''
,
// string消费时间(刷脸时间)
debt
:
''
,
// integer是否垫资 1支付宝垫资 0未垫资
devflowNo
:
''
,
// string终端消费流水号
mealType
:
1
,
// integer餐别:1早餐,2中餐,3晚餐,4夜宵,5夜夜宵
payTime
:
''
,
// string支付时间
payType
:
''
,
// integer消费类型 1.刷卡 2.刷脸
platflowNo
:
''
,
// string平台交易流水(订单编号)
respMsg
:
''
,
// string响应描述 (欠款原因)
schoolName
:
''
,
// string学校名称
status
:
''
,
// integer订单状态 0待扣款 1已付款 2已撤销 3已退款 4异常订单
storeName
:
''
,
// string食堂档口名称
tradeNo
:
''
,
// string支付宝订单号(支付宝流水号)
userName
:
''
,
// string用户姓名
gradeName
:
''
,
//年级
className
:
''
,
//班级
serviceFee
:
''
,
//服务费(手续费) 格式0.02
deviceName
:
''
,
//消费设备
consumeScene
:
''
//消费场景
}
}
},
onLoad
(
options
)
{
this
.
OrderDetail
(
options
[
'
devflowNo
'
]
||
''
);
},
computed
:
{
itemAmount
()
{
return
function
(
Amount
)
{
if
(
Amount
)
{
return
(
Amount
/
100
).
toFixed
(
2
)
}
else
{
return
"
0.00
"
}
}
},
},
methods
:
{
// 订单详情
async
OrderDetail
(
devflowNo
)
{
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/OrderDetail
'
,
{
devflowNo
})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
this
.
orderInfo
=
data
.
data
[
'
data
'
]
||
{}
},
// 跳转页面
async
goToPage
(
value
)
{
switch
(
value
)
{
case
1
:
uni
.
makePhoneCall
({
phoneNumber
:
'
400-9656-210
'
})
break
;
case
2
:
break
;
case
3
:
break
;
default
:
break
;
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
.rechargeDetail
{
width
:
100%
;
height
:
100%
;
min-height
:
100vh
;
background
:
#F1F1F3
;
.status
{
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#FA6400
;
line-height
:
45rpx
;
text-align
:
center
;
}
.contentWrapper
{
padding
:
25rpx
22rpx
0
25rpx
;
display
:
flex
;
flex-direction
:
column
;
.wrapper
{
margin
:
0
8rpx
;
padding-top
:
59rpx
;
width
:
686rpx
;
display
:
flex
;
flex-direction
:
column
;
background
:
white
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
position
:
relative
;
.topBg
{
position
:
absolute
;
top
:
0
;
left
:
-8rpx
;
width
:
703rpx
;
height
:
59rpx
;
background-size
:
cover
;
background-position
:
center
center
;
z-index
:
1
;
.line
{
width
:
686rpx
;
height
:
22rpx
;
margin-top
:
9rpx
;
margin-left
:
8rpx
;
background
:
linear-gradient
(
180deg
,
#D9D9D9
0%
,
#FFFFFF
100%
);
opacity
:
0
.75
;
}
}
.title
{
margin-top
:
78rpx
;
width
:
100%
;
height
:
42rpx
;
font-size
:
30rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
text-align
:
center
;
}
.amount
{
margin-top
:
4rpx
;
width
:
100%
;
height
:
90rpx
;
font-size
:
64rpx
;
color
:
#333333
;
font-weight
:
600
;
line-height
:
90rpx
;
text-align
:
center
;
}
.rowItem
{
padding
:
0
32rpx
;
margin-bottom
:
37rpx
;
display
:
inline-flex
;
justify-content
:
space-between
;
height
:
42rpx
;
line-height
:
42rpx
;
font-size
:
30rpx
;
color
:
#333333
;
.label
{
height
:
42rpx
;
font-size
:
30rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
}
.value
{
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
.btn
{
padding
:
165rpx
0
35rpx
;
.button
{
margin
:
0
auto
;
width
:
622rpx
;
height
:
71rpx
;
line-height
:
71rpx
;
background
:
#F1F1F3
;
border-radius
:
12rpx
;
text-align
:
center
;
font-size
:
28rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
}
.bottomBg
{
width
:
686rpx
;
height
:
29rpx
;
background-size
:
cover
;
background-position
:
center
center
;
margin
:
0
8rpx
;
}
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/rechargeDetail/rechargeDetail.vue
View file @
5140358a
...
@@ -5,33 +5,41 @@
...
@@ -5,33 +5,41 @@
<view
class=
"topBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgTop.png'+')'"
>
<view
class=
"topBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgTop.png'+')'"
>
<view
class=
"line"
></view>
<view
class=
"line"
></view>
</view>
</view>
<view
class=
"title"
>
东门食堂-早餐
</view>
<view
class=
"title"
>
{{
orderInfo
[
'
storeName
'
]
||
''
}}
-
{{
mealType
[
orderInfo
[
'
mealType
'
]]
}}
</view>
<view
class=
"amount"
>
-24.50
</view>
<view
class=
"amount"
>
-
{{
itemAmount
(
orderInfo
[
'
amount
'
]
||
0
)
}}
</view>
<view
class=
"rowItem"
>
<!-- 订单状态 -->
<view
class=
"status"
v-if=
"orderInfo['status']==0||orderInfo['status']==1"
>
{{
[
'
待支付
'
,
'
已支付
'
][
orderInfo
[
'
status
'
]]
}}
</view>
<view
class=
"rowItem"
style=
"margin-top: 92rpx;"
>
<view
class=
"label"
>
学生姓名
</view>
<view
class=
"label"
>
学生姓名
</view>
<view
class=
"value"
>
安小智
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
userName
'
]
||
''
}}
</view>
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"rowItem"
>
<view
class=
"label"
>
年级班级
</view>
<view
class=
"label"
>
年级班级
</view>
<view
class=
"value"
>
三年级/101班
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
gradeName
'
]
||
''
}}
/
{{
orderInfo
[
'
className
'
]
||
''
}}
</view>
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"rowItem"
>
<view
class=
"label"
>
服务
费
</view>
<view
class=
"label"
>
手续
费
</view>
<view
class=
"value"
>
0.02
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
serviceFee
'
]
||
'
0.00
'
}}
</view>
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费
时间
</view>
<view
class=
"label"
>
消费
设备
</view>
<view
class=
"value"
>
2022-06-11 07:00.00
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
deviceName
'
]
||
''
}}
</view>
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"rowItem"
>
<view
class=
"label"
>
交易订单号
</view>
<view
class=
"label"
>
消费场景
</view>
<view
class=
"value"
>
4202000000000000000000
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
consumeScene
'
]
||
''
}}
</view>
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"rowItem"
>
<view
class=
"label"
>
支付订单号
</view>
<view
class=
"label"
>
消费时间
</view>
<view
class=
"value"
>
4202000000000000000000
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
dealTime
'
]
||
''
}}
</view>
</view>
</view>
<view
class=
"btn"
>
<view
class=
"rowItem"
>
<view
class=
"label"
>
交易订单号
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
platflowNo
'
]
||
''
}}
</view>
</view>
<view
class=
"btn"
@
click=
"goToPage(1)"
>
<view
class=
"button"
>
对此订单有疑问?
</view>
<view
class=
"button"
>
对此订单有疑问?
</view>
</view>
</view>
</view>
</view>
...
@@ -41,14 +49,103 @@
...
@@ -41,14 +49,103 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Dialog
,
Toast
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
ImgUrl
:
this
.
$ImgUrl
,
mealType
:
{
1
:
'
早餐
'
,
2
:
'
中餐
'
,
3
:
'
晚餐
'
,
4
:
'
夜宵
'
,
5
:
'
夜夜宵
'
},
status
:
{
0
:
'
待扣款
'
,
1
:
'
已付款
'
,
2
:
'
已撤销
'
,
3
:
'
已退款
'
,
4
:
'
异常订单
'
},
orderInfo
:
{
accountId
:
''
,
// integer刷脸用户账户id,该id为绑定用户id
amount
:
''
,
// integer消费金额 单位分
dealTime
:
''
,
// string消费时间(刷脸时间)
debt
:
''
,
// integer是否垫资 1支付宝垫资 0未垫资
devflowNo
:
''
,
// string终端消费流水号
mealType
:
1
,
// integer餐别:1早餐,2中餐,3晚餐,4夜宵,5夜夜宵
payTime
:
''
,
// string支付时间
payType
:
''
,
// integer消费类型 1.刷卡 2.刷脸
platflowNo
:
''
,
// string平台交易流水(订单编号)
respMsg
:
''
,
// string响应描述 (欠款原因)
schoolName
:
''
,
// string学校名称
status
:
''
,
// integer订单状态 0待扣款 1已付款 2已撤销 3已退款 4异常订单
storeName
:
''
,
// string食堂档口名称
tradeNo
:
''
,
// string支付宝订单号(支付宝流水号)
userName
:
''
,
// string用户姓名
gradeName
:
''
,
//年级
className
:
''
,
//班级
serviceFee
:
''
,
//服务费(手续费) 格式0.02
deviceName
:
''
,
//消费设备
consumeScene
:
''
//消费场景
}
}
},
onLoad
(
options
)
{
this
.
OrderDetail
(
options
[
'
devflowNo
'
]
||
''
);
},
computed
:
{
itemAmount
()
{
return
function
(
Amount
)
{
if
(
Amount
)
{
return
(
Amount
/
100
).
toFixed
(
2
)
}
else
{
return
"
0.00
"
}
}
}
},
},
},
methods
:
{
methods
:
{
// 订单详情
async
OrderDetail
(
devflowNo
)
{
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/OrderDetail
'
,
{
devflowNo
})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
this
.
orderInfo
=
data
.
data
[
'
data
'
]
||
{}
},
// 跳转页面
async
goToPage
(
value
)
{
switch
(
value
)
{
case
1
:
uni
.
makePhoneCall
({
phoneNumber
:
'
400-9656-210
'
})
break
;
case
2
:
break
;
case
3
:
break
;
default
:
break
;
}
},
}
}
}
}
</
script
>
</
script
>
...
@@ -60,6 +157,16 @@
...
@@ -60,6 +157,16 @@
min-height
:
100vh
;
min-height
:
100vh
;
background
:
#F1F1F3
;
background
:
#F1F1F3
;
.status
{
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#FA6400
;
line-height
:
45rpx
;
text-align
:
center
;
}
.contentWrapper
{
.contentWrapper
{
padding
:
25rpx
22rpx
0
25rpx
;
padding
:
25rpx
22rpx
0
25rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -117,7 +224,6 @@
...
@@ -117,7 +224,6 @@
font-weight
:
600
;
font-weight
:
600
;
line-height
:
90rpx
;
line-height
:
90rpx
;
text-align
:
center
;
text-align
:
center
;
margin-bottom
:
87rpx
;
}
}
.rowItem
{
.rowItem
{
...
@@ -130,6 +236,15 @@
...
@@ -130,6 +236,15 @@
font-size
:
30rpx
;
font-size
:
30rpx
;
color
:
#333333
;
color
:
#333333
;
.label
{
height
:
42rpx
;
font-size
:
30rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
}
.value
{
.value
{
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
...
...
src/pages/ApplyConsumption/topupDetail/topupDetail.vue
View file @
5140358a
...
@@ -7,46 +7,46 @@
...
@@ -7,46 +7,46 @@
</view>
</view>
<view
class=
"right"
>
<view
class=
"right"
>
<view
class=
"font28"
>
¥
</view>
<view
class=
"font28"
>
¥
</view>
<view
class=
"font40"
>
40.00
</view>
<view
class=
"font40"
>
{{
itemAmount
(
expenditure
||
0
)
}}
</view>
</view>
</view>
</view>
</view>
<scroll-view
scroll-y=
"true"
class=
"scrollY"
>
<scroll-view
scroll-y=
"true"
class=
"scrollY"
>
<view
class=
"pannels"
>
<view
class=
"pannels"
v-if=
"list.length>0"
>
<view
class=
"item"
>
<view
class=
"item"
v-for=
"(item,index) in list"
:key=
"index"
@
tap=
"rechargeRecordDetai(item)"
>
<view
class=
"p1"
>
<view
class=
"p1"
>
<view>
线下充值
</view>
<view>
{{
item
.
optionName
||
''
}}
</view>
<view
class=
"num"
>
10.00
</view>
<view
class=
"num"
>
{{
itemAmount
(
item
.
amount
||
0
)
}}
</view>
</view>
</view>
<view
class=
"p2"
>
08-09 08:02:01
</view>
<view
class=
"p2"
>
{{
itemTimeFormat
(
item
.
payTime
)
}}
</view>
</view>
</view>
<view
class=
"item"
>
<view
class=
"p1"
>
<view>
线下充值
</view>
<view
class=
"num"
>
10.00
</view>
</view>
<view
class=
"p2"
>
08-09 08:02:01
</view>
</view>
<view
class=
"item"
>
<view
class=
"p1"
>
<view>
线下充值
</view>
<view
class=
"num"
>
10.00
</view>
</view>
<view
class=
"p2"
>
08-09 08:02:01
</view>
</view>
</view>
<view
v-if=
'list.length==0'
class=
"noCostInfo"
>
<image
:src=
"ImgUrl+'xzf/noData-01.png'"
mode=
'widthFix'
/>
<p>
没有更多数据~
</p>
</view>
</view>
<view
class=
"bottomTip"
>
— 已展示全部数据 —
</view>
<view
class=
"bottomTip"
v-if=
"list.length>0"
>
— 已展示全部数据 —
</view>
</scroll-view>
<view
class=
"popup"
v-if=
"show"
>
<view
class=
"popup"
v-if=
"show"
>
<van-datetime-picker
:value=
"currentDate"
type=
"year-month"
title=
"选择年月"
:min-date=
"minDate"
<van-datetime-picker
:value=
"currentDate"
type=
"year-month"
title=
"选择年月"
:min-date=
"minDate"
position=
"bottom"
:max-date=
"maxDate"
:formatter=
"formatter"
@
confirm=
"onConfirm"
@
cancel=
"onCancel"
position=
"bottom"
:max-date=
"maxDate"
:formatter=
"formatter"
@
confirm=
"onConfirm"
@
cancel=
"onCancel"
/>
/>
</view>
<view
class=
"answeringQuestion"
@
click=
"goToPage(1)"
>
为什么有待支付订单?
</view>
</view>
</scroll-view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
moment
from
"
moment
"
;
import
moment
from
"
moment
"
;
import
{
Dialog
,
Toast
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
import
{
import
{
DatetimePicker
DatetimePicker
}
from
'
vant
'
;
}
from
'
vant
'
;
...
@@ -57,13 +57,133 @@
...
@@ -57,13 +57,133 @@
minDate
:
new
Date
(
2022
,
10
,
0
),
minDate
:
new
Date
(
2022
,
10
,
0
),
maxDate
:
new
Date
(
2999
,
10
,
1
),
maxDate
:
new
Date
(
2999
,
10
,
1
),
currentDate
:
''
,
currentDate
:
''
,
currentDate_
:
''
,
show
:
false
,
show
:
false
,
list
:
[],
// 支出 单位分
expenditure
:
0
,
// 收入 单位分
revenue
:
0
}
}
},
},
created
(
)
{
onLoad
(
options
)
{
this
.
currentDate
=
moment
(
new
Date
()).
format
(
'
YYYY年M月
'
);
this
.
currentDate
=
moment
(
new
Date
()).
format
(
'
YYYY年M月
'
);
this
.
currentDate_
=
moment
(
new
Date
()).
format
(
'
YYYY-MM
'
);
this
.
QueryAccountExchangeList
();
},
computed
:
{
itemAmount
()
{
return
function
(
Amount
)
{
if
(
Amount
)
{
return
(
Amount
/
100
).
toFixed
(
2
)
}
else
{
return
"
0.00
"
}
}
},
itemTimeFormat
()
{
return
function
(
time
)
{
if
(
time
)
{
return
moment
(
time
).
format
(
'
MM-DD HH:mm:ss
'
)
}
else
{
return
time
}
}
},
},
},
methods
:
{
methods
:
{
// 充值详情
async
rechargeRecordDetai
(
item
)
{
try
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
200
);
})
uni
.
hideLoading
()
uni
.
navigateTo
({
url
:
`../rechargeDetail/rechargeDetail?devflowNo=`
+
item
.
devflowNo
||
''
})
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
// 跳转页面
async
goToPage
(
value
)
{
switch
(
value
)
{
case
1
:
uni
.
navigateTo
({
url
:
'
../OrderClearSuspicions/OrderClearSuspicions
'
})
break
;
case
2
:
break
;
case
3
:
break
;
default
:
break
;
}
},
// 充值明细列表
async
QueryAccountExchangeList
()
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
200
);
})
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/QueryAccountExchangeList
'
,
{
accountId
:
sessionStorage
.
getItem
(
'
accountId
'
)
*
1
,
month
:
this
.
currentDate_
})
uni
.
hideLoading
()
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
// amount integer金额 单位分
// className string班级
// gradeName string年级
// id integer
// optionName string操作名称 示例:线上充值
// outTradeNo string交易订单号
// payTime string消费时间
// serviceFee string服务费 格式¥0.02
// tradeNo string支付订单号
this
.
list
=
data
.
data
[
'
list
'
]
||
[]
this
.
expenditure
=
data
.
data
[
'
expenditure
'
]
||
0
// this.list = Array(10).fill(1).map((v, index) => {
// return {
// amount: 100, // integer金额 单位分
// className: '班级', // string班级
// gradeName: '年级', // string年级
// id: index + 1, // integer
// optionName: '线上充值', // string操作名称 示例:线上充值
// outTradeNo: '易订单号', // string交易订单号
// payTime: '2023-09-10 08:22:56', // string消费时间
// serviceFee: '0.02', // string服务费 格式¥0.02
// tradeNo: '支付订单号', // string支付订单号
// }
// })
},
formatter
(
type
,
val
)
{
formatter
(
type
,
val
)
{
if
(
type
===
'
year
'
)
{
if
(
type
===
'
year
'
)
{
return
`
${
val
}
年`
;
return
`
${
val
}
年`
;
...
@@ -74,7 +194,9 @@
...
@@ -74,7 +194,9 @@
},
},
onConfirm
(
val
)
{
onConfirm
(
val
)
{
this
.
currentDate
=
moment
(
val
).
format
(
'
YYYY年M月
'
)
this
.
currentDate
=
moment
(
val
).
format
(
'
YYYY年M月
'
)
this
.
currentDate_
=
moment
(
val
).
format
(
'
YYYY-MM
'
);
this
.
show
=
false
this
.
show
=
false
this
.
QueryAccountExchangeList
()
},
},
onCancel
()
{
onCancel
()
{
this
.
show
=
false
this
.
show
=
false
...
@@ -87,10 +209,36 @@
...
@@ -87,10 +209,36 @@
.topupDetail
{
.topupDetail
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
min-height
:
calc
(
100vh
-
calc
(
44px
+
env
(
safe-area-inset-top
)))
;
min-height
:
100vh
;
background
:
#F1F1F3
;
background
:
#F1F1F3
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
.noCostInfo
{
width
:
500rpx
;
margin
:
10vh
auto
;
text-align
:
center
;
color
:
#484C54
;
font-size
:
30rpx
;
image
{
width
:
500rpx
;
height
:
255rpx
;
margin-bottom
:
3vh
;
}
}
.answeringQuestion
{
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#858585
;
line-height
:
45rpx
;
text-align
:
center
;
margin-top
:
30rpx
;
padding-bottom
:
50rpx
;
}
.firstLine
{
.firstLine
{
display
:
inline-flex
;
display
:
inline-flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
@@ -133,18 +281,20 @@
...
@@ -133,18 +281,20 @@
}
}
.scrollY
{
.scrollY
{
position
:
fixed
;
//
position: fixed;
height
:
calc
(
100vh
-
91rpx
-
calc
(
44px
+
env
(
safe-area-inset-top
)));
//
height: calc(100vh - 91rpx - calc(44px + env(safe-area-inset-top)));
bottom
:
0
;
//
bottom: 0;
left
:
0
;
//
left: 0;
right
:
0
;
//
right: 0;
}
}
.popup
{
.popup
{
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
}
}
.pannels
{
.pannels
{
width
:
100%
;
width
:
100%
;
...
...
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