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
c0da685e
Commit
c0da685e
authored
Apr 07, 2022
by
李智书
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.缴费进度;
parent
d9ae1c4c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
151 additions
and
38 deletions
+151
-38
src/pages/StudentPayment/PayProgress/PayProgress.vue
src/pages/StudentPayment/PayProgress/PayProgress.vue
+73
-29
src/pages/StudentPayment/PayProject/PayProject.vue
src/pages/StudentPayment/PayProject/PayProject.vue
+78
-9
No files found.
src/pages/StudentPayment/PayProgress/PayProgress.vue
View file @
c0da685e
...
...
@@ -6,8 +6,8 @@
<van-tab
:title=
"vanTab[0]"
title-class=
"PayProjectTab PayProjectList"
>
<!-- 收费项目 -->
<view
class=
"ListBox"
>
<view
class=
""
v-if=
"
PayProject
List.length>0"
>
<view
class=
"container ProjectList"
v-for=
"(item,index) in
PayProject
List"
:key=
"index"
<view
class=
""
v-if=
"
ChargePaymentPage
List.length>0"
>
<view
class=
"container ProjectList"
v-for=
"(item,index) in
ChargePaymentPage
List"
:key=
"index"
@
tap=
"PayProgressDetails(item)"
>
<view
class=
"listitem top"
>
<view
class=
"title"
>
...
...
@@ -39,20 +39,20 @@
<van-tab
:title=
"vanTab[1]"
title-class=
"PayProjectTab PayProjectHistory"
>
<!-- 缴费历史 -->
<view
class=
"ListBox"
>
<view
class=
""
v-if=
"
PayProjectHistory
.length>0"
>
<view
class=
"container ProjectHistory"
v-for=
"(item,index) in
PayProjectHistory
"
:key=
"index"
<view
class=
""
v-if=
"
ChargeEndPageList
.length>0"
>
<view
class=
"container ProjectHistory"
v-for=
"(item,index) in
ChargeEndPageList
"
:key=
"index"
@
tap=
"PayProgressDetails(item)"
>
<view
class=
"listitem top"
>
<view
class=
"title"
>
2022高一春季收费
{{
item
.
chargeName
}}
</view>
<view
class=
"money"
v-if=
"false"
>
100.00
{{
item
.
amountMust
}}
</view>
</view>
<view
class=
"listitem center"
>
<text
class=
"describe"
>
本次收费需要收取高一春季开学相关费用,并根据
{{
item
.
descInfo
||
""
}}
</text>
</view>
<view
class=
"listitem botto"
style=
"align-items: baseline;"
>
...
...
@@ -65,8 +65,8 @@
<view
class=
"noData"
v-else
>
<image
style=
"width: 290rpx;height: 242rpx;"
:src=
"ImgUrl+'StudentPayment/development.png'"
mode=
'widthFix'
></image>
<view>
程序员正在玩命
开发
</view>
<view
class=
"bottomtxt"
>
详情请联系客服
</view>
<view>
程序员正在玩命
加载
</view>
<view
class=
"bottomtxt"
>
暂无数据
</view>
</view>
</view>
</van-tab>
...
...
@@ -85,8 +85,8 @@
ImgUrl
:
this
.
$ImgUrl
,
active
:
0
,
vanTab
:
[
'
交费中
'
,
'
已结束
'
],
PayProject
List
:
[],
PayProjectHistory
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
],
ChargePaymentPage
List
:
[],
ChargeEndPageList
:
[
],
pageCurrent
:
1
,
pageSize
:
10
,
total
:
0
,
...
...
@@ -107,7 +107,7 @@
let
personalInfo
=
uni
.
getStorageSync
(
"
personalInfo
"
)
this
.
allData
=
Object
.
assign
(
options
,
personalInfo
)
}
this
.
getPayProject
()
this
.
queryChargePaymentPage
()
},
onPullDownRefresh
:
function
(
e
)
{
console
.
log
(
"
onPullDownRefresh
"
,
e
);
...
...
@@ -116,27 +116,30 @@
console
.
log
(
"
onReachBottom
"
,
e
);
this
.
pageCurrent
=
this
.
pageCurrent
+
1
if
(
this
.
active
==
0
)
{
this
.
getPayProject
()
this
.
queryChargePaymentPage
()
return
}
this
.
queryChargeEndPage
()
},
methods
:
{
// 切换tab
async
PayProjectTab
(
index
)
{
try
{
if
(
index
>
0
)
{
this
.
queryChargeEndPage
(
index
)
return
}
this
.
getPayProject
(
index
)
this
.
queryChargePaymentPage
(
index
)
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
}
},
// 交费项目信息分页查询
async
getPayProject
(
index
)
{
// 交费
中
项目信息分页查询
async
queryChargePaymentPage
(
index
)
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/
app/charge/project/queryChargeProjec
tPage
'
url
:
orderApi
+
'
/order-charge/
teacher/charge/queryChargePaymen
tPage
'
},
{
"
pageCurrent
"
:
this
.
pageCurrent
,
"
pageSize
"
:
this
.
pageSize
,
...
...
@@ -149,7 +152,7 @@
mask
:
true
,
title
:
data
.
msg
})
this
.
PayProject
List
=
[]
this
.
ChargePaymentPage
List
=
[]
return
}
...
...
@@ -157,26 +160,67 @@
let
tmp
=
data
.
data
.
records
;
let
newArr
=
[]
for
(
let
s
of
tmp
)
{
let
diffTime
=
dayjs
(
s
.
endTime
).
diff
(
new
Date
(),
'
hour
'
);
if
(
diffTime
>
24
)
{
diffTime
=
dayjs
(
s
.
endTime
).
diff
(
new
Date
(),
'
day
'
);
s
.
diffTime
=
diffTime
+
'
天后
'
newArr
.
push
(
s
)
}
if
(
this
.
pageCurrent
==
1
)
{
this
.
ChargePaymentPageList
=
newArr
return
}
if
(
this
.
pageCurrent
>
1
)
{
this
.
ChargePaymentPageList
.
push
(...
newArr
)
return
}
}
else
{
s
.
diffTime
=
1
+
'
天后
'
this
.
ChargePaymentPageList
=
[]
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
s
.
amountMust
=
(
s
.
amountMust
/
100
).
toFixed
(
2
)
},
// 交费项目已结束信息分页查询
async
queryChargeEndPage
(
index
)
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/teacher/charge/queryChargeEndPage
'
},
{
"
pageCurrent
"
:
this
.
pageCurrent
,
"
pageSize
"
:
this
.
pageSize
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
||
this
.
allData
.
userID
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
this
.
ChargeEndPageList
=
[]
return
}
if
(
data
.
data
.
records
&&
Array
.
isArray
(
data
.
data
.
records
))
{
let
tmp
=
data
.
data
.
records
;
let
newArr
=
[]
for
(
let
s
of
tmp
)
{
newArr
.
push
(
s
)
}
if
(
this
.
pageCurrent
==
1
)
{
this
.
PayProject
List
=
newArr
this
.
ChargeEndPage
List
=
newArr
return
}
if
(
this
.
pageCurrent
>
1
)
{
this
.
PayProject
List
.
push
(...
newArr
)
this
.
ChargeEndPage
List
.
push
(...
newArr
)
return
}
}
else
{
this
.
PayProjectList
=
[
]
this
.
ChargeEndPageList
=
[
1
,
2
,
3
,
4
,
5
]
}
}
catch
(
e
)
{
...
...
src/pages/StudentPayment/PayProject/PayProject.vue
View file @
c0da685e
...
...
@@ -44,19 +44,24 @@
@
tap=
"PayOrderDetails(item)"
>
<view
class=
"listitem top"
>
<view
class=
"title"
>
2022高一春季收费
{{
item
.
chargeName
}}
</view>
<view
class=
"money"
v-if=
"false"
>
100.00
{{
item
.
amountMust
}}
</view>
</view>
<view
class=
"listitem center"
>
<text
class=
"describe"
>
本次收费需要收取高一春季开学相关费用,并根据
{{
item
.
descInfo
||
""
}}
</text>
</view>
<view
class=
"listitem botto"
style=
"align-items: baseline;"
>
<van-icon
name=
"clock-o"
/>
<text
class=
"Tips"
>
5天后收费结束
</text>
<span>
实交金额:
</span>
<view
style=
"margin-left: 26rpx;margin-right: 26rpx;width: 50rpx;text-align: center;"
>
{{
item
.
realAmount
/
100
||
""
}}
</view>
<span>
交费时间:
</span>
<view
style=
"margin-left: 26rpx;margin-right: 26rpx;"
>
{{
item
.
payTime
||
""
}}
</view>
</view>
</view>
<view
class=
"bottomtxt"
>
已经到底啦~
</view>
...
...
@@ -65,8 +70,8 @@
<view
class=
"noData"
v-else
>
<image
style=
"width: 290rpx;height: 242rpx;"
:src=
"ImgUrl+'StudentPayment/development.png'"
mode=
'widthFix'
></image>
<view>
程序员正在玩命开发
</view>
<view
class=
"bottomtxt"
>
详情请联系客服
</view>
<view>
正在玩命加载
</view>
<view
class=
"bottomtxt"
>
暂无历交费项目
</view>
</view>
</view>
</van-tab>
...
...
@@ -86,7 +91,7 @@
active
:
0
,
vanTab
:
[
'
收费项目
'
,
'
交费历史
'
],
PayProjectList
:
[],
PayProjectHistory
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
],
PayProjectHistory
:
[],
pageCurrent
:
1
,
pageSize
:
10
,
total
:
0
,
...
...
@@ -117,13 +122,16 @@
this
.
pageCurrent
=
this
.
pageCurrent
+
1
if
(
this
.
active
==
0
)
{
this
.
getPayProject
()
return
}
this
.
queryChargeHistoryPage
()
},
methods
:
{
// 切换tab
async
PayProjectTab
(
index
)
{
try
{
if
(
index
>
0
)
{
this
.
queryChargeHistoryPage
(
index
)
return
}
this
.
getPayProject
(
index
)
...
...
@@ -132,6 +140,56 @@
console
.
log
(
e
);
}
},
// 交费历史记录分页查询
async
queryChargeHistoryPage
()
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/app/charge/project/queryChargeHistoryPage
'
},
{
"
pageCurrent
"
:
this
.
pageCurrent
,
"
pageSize
"
:
this
.
pageSize
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
||
this
.
allData
.
userID
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
this
.
PayProjectHistory
=
[]
return
}
if
(
data
.
data
.
records
&&
Array
.
isArray
(
data
.
data
.
records
))
{
let
tmp
=
data
.
data
.
records
;
let
newArr
=
[]
for
(
let
s
of
tmp
)
{
s
.
payTime
=
dayjs
(
s
.
payTime
).
format
(
"
YYYY-MM-DD HH:mm:ss
"
);
newArr
.
push
(
s
)
}
if
(
this
.
pageCurrent
==
1
)
{
this
.
PayProjectHistory
=
newArr
return
}
if
(
this
.
pageCurrent
>
1
)
{
this
.
PayProjectHistory
.
push
(...
newArr
)
return
}
}
else
{
this
.
PayProjectHistory
=
[]
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 交费项目信息分页查询
async
getPayProject
(
index
)
{
try
{
...
...
@@ -189,13 +247,19 @@
})
}
},
// 收费项目详情
// 收费项目详情
/历史详情
async
PayOrderDetails
(
data
)
{
try
{
console
.
log
(
data
);
uni
.
setStorageSync
(
"
PayOrderDetails
"
,
data
)
let
url
=
"
../PayOrderDetails/PayOrderDetails?chargeId=
"
+
data
.
id
||
''
if
(
this
.
active
==
0
)
{
url
=
"
../PayOrderDetails/PayOrderDetails?chargeId=
"
+
data
.
id
||
''
}
else
{
url
=
"
../PayProjectHistoryDetails/PayProjectHistoryDetails?chargeId=
"
+
data
.
id
||
''
}
uni
.
navigateTo
({
url
:
"
../PayOrderDetails/PayOrderDetails?chargeId=
"
+
data
.
id
||
''
url
})
}
catch
(
e
)
{
//TODO handle the exception
...
...
@@ -300,6 +364,11 @@
.Tips
{
padding-left
:
10rpx
;
}
span
{
color
:
#333333
;
font-size
:
30rpx
;
}
}
}
...
...
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