|
|
@@ -1,6 +1,8 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
+ <!-- 家长代缴费与查看订单页面 -->
|
|
|
<view class="content1" v-if="content1">
|
|
|
+ <!-- 遮罩层 -->
|
|
|
<view class="mark" v-show="showSearch" @click="close1"></view>
|
|
|
<view class="messageBg1"></view>
|
|
|
<view class="messageBg2"></view>
|
|
|
@@ -10,6 +12,7 @@
|
|
|
<button hover-class="button-hover" @click="toSearch">帮人代缴</button>
|
|
|
<button hover-class="button-hover" @click="toOrder">查询订单</button>
|
|
|
</view>
|
|
|
+ <!-- 代缴费学生信息查询弹窗 -->
|
|
|
<view class="pop-up" v-show="showSearch">
|
|
|
<view class="top">
|
|
|
<text>代缴人信息</text>
|
|
|
@@ -46,7 +49,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!-- 学生详情信息页面 -->
|
|
|
<view class="content2" v-if="showMess">
|
|
|
+ <!-- 遮罩层 -->
|
|
|
<view class="mark" v-show="showLeaveMess" @click="toLeaveMess()"></view>
|
|
|
<view class="messageBg1"></view>
|
|
|
<view class="messageBg2"></view>
|
|
|
@@ -76,21 +81,26 @@
|
|
|
<text class="ite">缴费学年 </text>
|
|
|
<text class="content">{{ years }}</text>
|
|
|
</view>
|
|
|
- <!-- <template v-if="(itemArr.length = 0)"> -->
|
|
|
<view class="item-pay" v-for="item in Arr">
|
|
|
<text class="ite">{{ item.id }} </text>
|
|
|
<text class="content">¥{{ item.money }}</text>
|
|
|
</view>
|
|
|
- <!-- </template> -->
|
|
|
<view class="item">
|
|
|
<text class="ite">总金额 </text>
|
|
|
<text class="content">¥{{ realPayAmount }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <button @click="getPay()" hover-class="button-hover" v-if="payStatu1">
|
|
|
+ <!-- 未支付时显示 -->
|
|
|
+ <button
|
|
|
+ @click="getPay()"
|
|
|
+ hover-class="button-hover"
|
|
|
+ :disabled="btDisabled"
|
|
|
+ :style="bgColor"
|
|
|
+ v-if="payStatu1"
|
|
|
+ >
|
|
|
支付
|
|
|
</button>
|
|
|
+ <!-- 已支付时显示 -->
|
|
|
<text class="okPay" v-if="payStatu2">已支付</text>
|
|
|
<view class="bottom-a">
|
|
|
<navigator
|
|
|
@@ -103,6 +113,7 @@
|
|
|
</navigator>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!-- 信息有误,反馈弹窗 -->
|
|
|
<view class="leaveMess" v-show="showLeaveMess">
|
|
|
<view class="top">
|
|
|
<text>信息反馈</text>
|
|
|
@@ -145,31 +156,31 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- content1: true,
|
|
|
- showMess: false,
|
|
|
- showSearch: false,
|
|
|
- showLeaveMess: false,
|
|
|
- studentName: "",
|
|
|
- studentNo: "",
|
|
|
- SeaStudentName: "",
|
|
|
- SeaStudentNo: "",
|
|
|
- majorName: "",
|
|
|
- className: "",
|
|
|
- years: "",
|
|
|
- realPayAmount: "",
|
|
|
- Arr: [],
|
|
|
- payStatu1: true,
|
|
|
- payStatu2: false,
|
|
|
- feedbackPersonName: "",
|
|
|
- feedbackPersonPhone: "",
|
|
|
- feedbackInfo: "",
|
|
|
- // homeUrl: "http://3mb8i8.natappfree.cc ",
|
|
|
- homeUrl: "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi",
|
|
|
+ content1: true, //家长代缴费与查看订单页面
|
|
|
+ showMess: false, //代缴查询弹窗
|
|
|
+ showSearch: false, //代缴查询弹窗
|
|
|
+ showLeaveMess: false, //信息有误反馈弹窗
|
|
|
+ studentName: "", //姓名
|
|
|
+ studentNo: "", //学号
|
|
|
+ SeaStudentName: "", //代缴查询页面姓名
|
|
|
+ SeaStudentNo: "", //代缴查询页面学号
|
|
|
+ majorName: "", //专业
|
|
|
+ className: "", //班级
|
|
|
+ years: "", //缴费学年
|
|
|
+ realPayAmount: "", //总金额
|
|
|
+ Arr: [], //缴费明细数组
|
|
|
+ payStatu1: true, //支付按钮
|
|
|
+ payStatu2: false, //已支付按钮
|
|
|
+ btDisabled: false,
|
|
|
+ bgColor: "background: #298def;",
|
|
|
+ feedbackPersonName: "", //信息有误反馈提交者姓名
|
|
|
+ feedbackPersonPhone: "", //信息有误反馈提交者联系电话
|
|
|
+ feedbackInfo: "", //反馈信息
|
|
|
+ homeUrl: "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi", //线上服务器域名
|
|
|
notifyUrl:
|
|
|
- "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/pay/jxnxs/notify/",
|
|
|
- cardNumber: "",
|
|
|
+ "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/pay/jxnxs/notify/", //农商行回跳地址
|
|
|
orderNo: "", //订单号
|
|
|
- //微信支付参数
|
|
|
+ //以下为微信支付参数
|
|
|
appId: "",
|
|
|
timeStamp: "",
|
|
|
nonceStr: "",
|
|
|
@@ -180,15 +191,19 @@ export default {
|
|
|
},
|
|
|
onLoad(options) {},
|
|
|
methods: {
|
|
|
+ //显示或关闭信息有误反馈弹窗
|
|
|
toLeaveMess() {
|
|
|
this.showLeaveMess = !this.showLeaveMess;
|
|
|
},
|
|
|
+ //代缴查询学生信息弹窗
|
|
|
toSearch() {
|
|
|
this.showSearch = !this.showSearch;
|
|
|
},
|
|
|
+ //关闭代缴查询学生信息弹窗
|
|
|
close1() {
|
|
|
this.showSearch = !this.showSearch;
|
|
|
},
|
|
|
+ //显示学生详细信息页面关闭代缴与查看订单页面
|
|
|
toShowMess() {
|
|
|
this.showMess = !this.showMess;
|
|
|
this.content1 = false;
|
|
|
@@ -229,7 +244,7 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
let that = this;
|
|
|
- let cardNumber = sessionStorage.getItem("cardNumber");
|
|
|
+ let cardNumber = localStorage.getItem("cardNumber");
|
|
|
let url =
|
|
|
that.homeUrl +
|
|
|
`/tuitionpayment/payableinfo/payableInfo/${that.SeaStudentNo}/${that.SeaStudentName}`;
|
|
|
@@ -268,6 +283,7 @@ export default {
|
|
|
that.className = res.className;
|
|
|
that.realPayAmount = res.realPayAmount;
|
|
|
that.getPayDetail(res.payItemDetail);
|
|
|
+ //清空代缴查询学生信息姓名与学号
|
|
|
that.SeaStudentNo = "";
|
|
|
that.SeaStudentName = "";
|
|
|
if (res.pay) {
|
|
|
@@ -308,11 +324,17 @@ export default {
|
|
|
|
|
|
//支付
|
|
|
getPay() {
|
|
|
+ this.btDisabled = !this.btDisabled;
|
|
|
+ this.bgColor = " background: #b3b3b3;";
|
|
|
+ setTimeout(() => {
|
|
|
+ this.btDisabled = !this.btDisabled;
|
|
|
+ this.bgColor = " background: #298def;";
|
|
|
+ }, 4000);
|
|
|
uni.showToast({
|
|
|
title: "支付中,请稍等",
|
|
|
icon: "loading",
|
|
|
mask: true,
|
|
|
- duration: 1500,
|
|
|
+ duration: 2000,
|
|
|
});
|
|
|
this.getOrderNo(); //获取订单号
|
|
|
},
|
|
|
@@ -321,7 +343,17 @@ export default {
|
|
|
getOrderNo() {
|
|
|
let that = this;
|
|
|
|
|
|
- let cardNumber = sessionStorage.getItem("cardNumber");
|
|
|
+ let cardNumber = localStorage.getItem("cardNumber");
|
|
|
+
|
|
|
+ if (cardNumber == null) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "cardNumber为空,请重新授权",
|
|
|
+ icon: "error",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ setTimeout(() => this.toBlank, 3000);
|
|
|
+ }
|
|
|
|
|
|
let url =
|
|
|
that.homeUrl + `/tuitionpayment/payorder/${that.studentNo}/create`;
|
|
|
@@ -332,7 +364,7 @@ export default {
|
|
|
header: {
|
|
|
card_number: cardNumber,
|
|
|
Accept: "application/json",
|
|
|
- "Content-Type": "application/json",
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
|
|
|
"X-Requested-With": "XMLHttpRequest",
|
|
|
},
|
|
|
method: "POST",
|
|
|
@@ -340,15 +372,16 @@ export default {
|
|
|
success: ({ data, statusCode, header }) => {
|
|
|
let res = data.data;
|
|
|
that.orderNo = res.orderNo;
|
|
|
- if (!data.success) {
|
|
|
+ if (data.success) {
|
|
|
+ that.getPayMethod(); //获取支付方式
|
|
|
+ } else {
|
|
|
+ //接口错误提示框
|
|
|
uni.showToast({
|
|
|
title: data.message,
|
|
|
icon: "error",
|
|
|
mask: true,
|
|
|
duration: 2000,
|
|
|
});
|
|
|
- } else {
|
|
|
- that.getPayMethod();
|
|
|
}
|
|
|
},
|
|
|
fail: (error) => {},
|
|
|
@@ -373,12 +406,13 @@ export default {
|
|
|
let res = data.data;
|
|
|
if (data.success) {
|
|
|
if (res.currentPayMethod === "1") {
|
|
|
- this.getwxParam();
|
|
|
+ this.getwxParam(); //建行支付
|
|
|
} else {
|
|
|
- this.nsPay();
|
|
|
+ this.nsPay(); //农商行支付
|
|
|
}
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
+ //接口错误提示框
|
|
|
title: data.message,
|
|
|
icon: "error",
|
|
|
mask: true,
|
|
|
@@ -409,7 +443,7 @@ export default {
|
|
|
getwxParam() {
|
|
|
let that = this;
|
|
|
|
|
|
- let cardNumber = sessionStorage.getItem("cardNumber");
|
|
|
+ let cardNumber = localStorage.getItem("cardNumber");
|
|
|
|
|
|
let openId = localStorage.getItem("openId");
|
|
|
|
|
|
@@ -424,13 +458,14 @@ export default {
|
|
|
header: {
|
|
|
card_number: cardNumber,
|
|
|
Accept: "application/json",
|
|
|
- "Content-Type": "application/json",
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
|
|
|
"X-Requested-With": "XMLHttpRequest",
|
|
|
},
|
|
|
method: "GET",
|
|
|
sslVerify: true,
|
|
|
success: ({ data, statusCode, header }) => {
|
|
|
if (!data.success) {
|
|
|
+ //接口错误提示框
|
|
|
uni.showToast({
|
|
|
title: data.message,
|
|
|
icon: "error",
|
|
|
@@ -509,7 +544,7 @@ export default {
|
|
|
putMess() {
|
|
|
let that = this;
|
|
|
|
|
|
- let cardNumber = sessionStorage.getItem("cardNumber");
|
|
|
+ let cardNumber = localStorage.getItem("cardNumber");
|
|
|
|
|
|
let url = that.homeUrl + "/tuitionpayment/feedbackmsg/save";
|
|
|
|
|
|
@@ -541,6 +576,7 @@ export default {
|
|
|
that.feedbackPersonPhone = "";
|
|
|
that.feedbackInfo = "";
|
|
|
} else {
|
|
|
+ //接口错误提示框
|
|
|
uni.showToast({
|
|
|
title: data.message,
|
|
|
icon: "error",
|
|
|
@@ -557,6 +593,9 @@ export default {
|
|
|
toOrder() {
|
|
|
uni.navigateTo({ url: "/pages/order/order" });
|
|
|
},
|
|
|
+ toBlank() {
|
|
|
+ uni.navigateTo({ url: "/pages/blankIndex/blankIndex" });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|