Commit 27f59ec4 authored by 李智书's avatar 李智书

Merge branch 'v1.6.5_feature' into develop

parents badafd8d c0da685e
......@@ -350,6 +350,36 @@
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/StudentPayment/PayProjectHistoryDetails/PayProjectHistoryDetails",
"style" :
{
"navigationBarTitleText": "缴费详情单",
"navigationStyle":"custom",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/StudentPayment/PayProgress/PayProgress",
"style" :
{
"navigationBarTitleText": "缴费进度",
"navigationStyle":"custom",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/StudentPayment/PayProgressDetails/PayProgressDetails",
"style" :
{
"navigationStyle":"custom",
"navigationBarTitleText": "缴费进度",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
......
......@@ -36,7 +36,7 @@
<text class="name">年级班级:</text>
<text class="value">{{ChargeProDetail.userGrade||""}} {{ChargeProDetail.userClass||""}}</text>
</view>
<view class="rowInfo">
<view class="rowInfo" v-if="false">
<text class="name">订单编号:</text>
<text class="value">{{ChargeProDetail.tradeId||""}}</text>
</view>
......@@ -164,6 +164,12 @@
if (options.PaymentRsults) {
this_.dialogShow = true
this.PaymentRsults = parseInt(options.PaymentRsults);
if (this.PaymentRsults == 1) {
// 支付成功返回交费项目列表
setTimeout(() => {
this_.dialogClosed()
}, 3000)
}
// 上报支付结果
this.returnPaymentResult(uni.getStorageSync("prepayId").tradeId, this.PaymentRsults)
}
......
<template>
<view class="tainer">
<van-tabs ref="tabs" title-inactive-color="#999999" title-active-color="#333333" sticky animated
v-model:active="active" swipeable color="#01CB88" background="#FFFFFF" line-width="30px" line-height="4px"
@change="PayProjectTab">
<van-tab :title="vanTab[0]" title-class="PayProjectTab PayProjectList">
<!-- 收费项目 -->
<view class="ListBox">
<view class="" v-if="ChargePaymentPageList.length>0">
<view class="container ProjectList" v-for="(item,index) in ChargePaymentPageList" :key="index"
@tap="PayProgressDetails(item)">
<view class="listitem top">
<view class="title">
{{item.chargeName}}
</view>
<view class="money">
{{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">{{item.diffTime}}收费结束</text>
</view>
</view>
<view class="bottomtxt">已经到底啦~</view>
</view>
<!-- 没有数据 -->
<view class="noData" v-else>
<image style="width: 301rpx;height: 258rpx;" :src="ImgUrl+'StudentPayment/NoRecord.png'"
mode='widthFix'></image>
<view>暂无数据</view>
</view>
</view>
</van-tab>
<van-tab :title="vanTab[1]" title-class="PayProjectTab PayProjectHistory">
<!-- 缴费历史 -->
<view class="ListBox">
<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">
{{item.chargeName}}
</view>
<view class="money" v-if="false">
{{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>
</view>
</view>
<view class="bottomtxt">已经到底啦~</view>
</view>
<!-- 没有数据 -->
<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>
</van-tab>
</van-tabs>
</view>
</template>
<script>
// 时间处理模块
import dayjs from 'dayjs'
let orderApi = window.location.origin
export default {
name: "PayProgress",
data() {
return {
ImgUrl: this.$ImgUrl,
active: 0,
vanTab: ['交费中', '已结束'],
ChargePaymentPageList: [],
ChargeEndPageList: [],
pageCurrent: 1,
pageSize: 10,
total: 0,
allData: {}
}
},
onLoad: function(options) {
console.log("PayProject", options);
if (options.seesionID && options.userID && options.schoolId) {
uni.setStorageSync("personalInfo", {
userId: options.userID || '',
seesionID: options.seesionID || '',
schoolId: options.schoolId || '',
openId: options.openId
})
this.allData = options
} else {
let personalInfo = uni.getStorageSync("personalInfo")
this.allData = Object.assign(options, personalInfo)
}
this.queryChargePaymentPage()
},
onPullDownRefresh: function(e) {
console.log("onPullDownRefresh", e);
},
onReachBottom: function(e) {
console.log("onReachBottom", e);
this.pageCurrent = this.pageCurrent + 1
if (this.active == 0) {
this.queryChargePaymentPage()
return
}
this.queryChargeEndPage()
},
methods: {
// 切换tab
async PayProjectTab(index) {
try {
if (index > 0) {
this.queryChargeEndPage(index)
return
}
this.queryChargePaymentPage(index)
} catch (e) {
//TODO handle the exception
console.log(e);
}
},
// 交费中项目信息分页查询
async queryChargePaymentPage(index) {
try {
let data = await this.$http.post({
url: orderApi + '/order-charge/teacher/charge/queryChargePaymentPage'
}, {
"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.ChargePaymentPageList = []
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.ChargePaymentPageList = newArr
return
}
if (this.pageCurrent > 1) {
this.ChargePaymentPageList.push(...newArr)
return
}
} else {
this.ChargePaymentPageList = []
}
} catch (e) {
//TODO handle the exception
console.log(e);
uni.showToast({
icon: "none",
mask: true,
title: e.message
})
}
},
// 交费项目已结束信息分页查询
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.ChargeEndPageList = newArr
return
}
if (this.pageCurrent > 1) {
this.ChargeEndPageList.push(...newArr)
return
}
} else {
this.ChargeEndPageList = [1, 2, 3, 4, 5]
}
} catch (e) {
//TODO handle the exception
console.log(e);
uni.showToast({
icon: "none",
mask: true,
title: e.message
})
}
},
// 收费项目详情
async PayProgressDetails(data) {
try {
console.log(data);
uni.setStorageSync("PayProgressDetails", data)
uni.navigateTo({
url: "../PayProgressDetails/PayProgressDetails?chargeId=" + data.id || ''
})
} catch (e) {
//TODO handle the exception
console.log(e);
}
}
}
}
</script>
<style lang="scss">
page {
background: #F3F5F6;
}
.noData {
text-align: center;
margin-top: 316rpx;
image {
position: relative;
}
}
.ListBox {
width: 750rpx;
min-height: 100%;
background: #F3F5F6;
padding-top: 12rpx;
padding-bottom: 100rpx;
.container {
width: 686rpx;
height: 250rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 0 auto;
margin-top: 20rpx;
}
.container {
font-family: PingFang SC;
.top {
.title {
width: 266rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 36rpx;
padding-left: 31rpx;
padding-top: 30rpx;
word-break: break-all;
white-space: nowrap;
text-overflow: ellipsis;
}
.money {
font-size: 36rpx;
font-family: DIN;
font-weight: bold;
color: #01CB88;
line-height: 36rpx;
padding-left: 230rpx;
padding-top: 30rpx;
}
.money::before {
content: "¥";
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #01CB88;
}
}
.center {
.describe {
width: 614rpx;
height: 63rpx;
font-size: 28rpx;
font-weight: 500;
color: #666666;
line-height: 36rpx;
padding-top: 38rpx;
padding-left: 32rpx;
overflow-y: auto;
}
}
.botto {
padding-top: 30rpx;
padding-left: 32rpx;
font-size: 24rpx;
font-weight: 500;
color: #BABABA;
.Tips {
padding-left: 10rpx;
}
}
}
.ProjectHistory {}
.listitem {
display: flex;
align-items: center;
}
.bottomtxt {
height: 21rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
line-height: 90rpx;
text-align: center;
}
}
.van-tabs__content {
width: 100%;
height: 100%;
position: fixed;
left: 0;
z-index: 999;
overflow: scroll
}
.van-tabs {
.PayProjectTab {
height: 200rpx;
}
}
</style>
<template>
<view class="contaner">
缴费进度详情
</view>
</template>
<script>
export default {
name: "PayProgressDetails",
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
......@@ -44,20 +44,24 @@
@tap="PayOrderDetails(item)">
<view class="listitem top">
<view class="title">
2022高一春季收费
{{item.chargeName}}
</view>
<view class="money">
100.00
<view class="money" v-if="false">
{{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>
......@@ -66,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>
......@@ -116,13 +120,18 @@
onReachBottom: function(e) {
console.log("onReachBottom", e);
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)
......@@ -131,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 {
......@@ -188,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
......@@ -299,6 +364,11 @@
.Tips {
padding-left: 10rpx;
}
span {
color: #333333;
font-size: 30rpx;
}
}
}
......
<template>
<view class="container">
缴费历史详情
</view>
</template>
<script>
export default {
name: "PayProjectHistoryDetails",
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment