|
|
@@ -16,12 +16,13 @@
|
|
|
<view class="bill">
|
|
|
<!-- 筛选框区域 -->
|
|
|
<view class="choose">
|
|
|
- <view class="time">
|
|
|
- <uni-data-select :clear="false" placeholder="请选择时间" :localdata="time_range" @change="changeTime">
|
|
|
+ <view class="time" v-if="isShow">
|
|
|
+ <uni-data-select :clear="false" :placeholder="time_value+''" :localdata="time_range"
|
|
|
+ @change="changeTime">
|
|
|
</uni-data-select>
|
|
|
</view>
|
|
|
- <view class="type">
|
|
|
- <uni-data-select :clear="false" placeholder="请选择支付状态" :localdata="type_range" @change="changeType">
|
|
|
+ <view class="type" v-if="isShow">
|
|
|
+ <uni-data-select :clear="false" placeholder="全部" :localdata="type_range" @change="changeType">
|
|
|
</uni-data-select>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -29,7 +30,7 @@
|
|
|
<!-- 没有账单时展示的内容 -->
|
|
|
<view class="null" v-if="!list.length">
|
|
|
<img src="../../static/null.png">
|
|
|
- <span>暂无账单,请选择条件查询</span>
|
|
|
+ <span>暂无账单</span>
|
|
|
</view>
|
|
|
|
|
|
<!-- 有账单时展示的内容 -->
|
|
|
@@ -105,7 +106,7 @@
|
|
|
|
|
|
<!-- 悬浮按钮区域 -->
|
|
|
<view v-if="roomSelect!='请选择宿舍'" class="suspend_button" @click="goBill" @touchstart="down"
|
|
|
- @touchmove.prevent="move" @touchend="end">
|
|
|
+ @touchmove.prevent.stop="move" @touchend="end">
|
|
|
订单查询
|
|
|
</view>
|
|
|
|
|
|
@@ -272,9 +273,14 @@
|
|
|
},
|
|
|
//农商行地址
|
|
|
notifyUrl: "https://chtech.ncjti.edu.cn/jiaofei/jiaofei-api/tuitionpayment/pay/jxnxs/notify/",
|
|
|
+ // 反馈提交图片参数
|
|
|
+ imgs: []
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
+ // 判断是否存在card_number,不存在则重新授权
|
|
|
+ this.getAuthorization();
|
|
|
+
|
|
|
// 如果之前已经选择过宿舍,则从缓存中读取
|
|
|
if (localStorage.room) {
|
|
|
this.roomSelect = "黄家湖" + localStorage.room
|
|
|
@@ -282,7 +288,25 @@
|
|
|
this.getTimeList()
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
+ getAuthorization() {
|
|
|
+ let card_number = localStorage.getItem("card_number");
|
|
|
+ let studentName = localStorage.getItem("studentName");
|
|
|
+ let openId = localStorage.getItem("openId");
|
|
|
+ if (!card_number || !studentName || !openId) {
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "请先领取校园卡或授权后再进行相关操作",
|
|
|
+ showCancel: false,
|
|
|
+ success: () => {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/index/index",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取账单列表数据
|
|
|
async getData() {
|
|
|
if (!this.time_value) {
|
|
|
@@ -320,8 +344,6 @@
|
|
|
select(e) {
|
|
|
e.tempFiles.forEach((item) => {
|
|
|
TranslateImage.translate(item.path, ((res) => {
|
|
|
- // 先清空图片数组
|
|
|
- this.valiFormData.feedbackImg = []
|
|
|
// 判断图片大小是否过大
|
|
|
if (Number(res.size) > 1000000) {
|
|
|
uni.showModal({
|
|
|
@@ -336,10 +358,13 @@
|
|
|
});
|
|
|
// 上传图片
|
|
|
uni.uploadFile({
|
|
|
- url: `http://192.168.161.34:9999/tuitionpayment/feedbackmsg/uploadImage`,
|
|
|
+ url: `https://chtech.ncjti.edu.cn/jiaofei/jiaofei-api/tuitionpayment/feedbackmsg/uploadImage`,
|
|
|
filePath: res.url,
|
|
|
name: 'images',
|
|
|
success: (uploadFileRes) => {
|
|
|
+ // 收集提交请求所需要的图片参数数据
|
|
|
+ this.imgs.push((JSON.parse(uploadFileRes.data).data))
|
|
|
+ // 处理前端页面预览图片的数据
|
|
|
const path = item.path;
|
|
|
this.valiFormData.feedbackImg.push({
|
|
|
url: path,
|
|
|
@@ -358,7 +383,7 @@
|
|
|
handleDelete(e) {
|
|
|
const num = this.valiFormData.feedbackImg.findIndex(v => v.path === e.tempFilePath);
|
|
|
this.valiFormData.feedbackImg.splice(num, 1);
|
|
|
- // console.log(this.valiFormData.feedbackImg);
|
|
|
+ this.imgs.splice(num, 1);
|
|
|
},
|
|
|
// 订单反馈按钮弹窗
|
|
|
async handleFeedback(item) {
|
|
|
@@ -368,11 +393,12 @@
|
|
|
this.valiFormData.feedbackRoom = "";
|
|
|
this.valiFormData.feedbackInfo = "";
|
|
|
this.valiFormData.feedbackImg = [];
|
|
|
+ this.imgs = [];
|
|
|
|
|
|
let res = await this.$myRequest({
|
|
|
url: "/wechat/getUserNameTele",
|
|
|
data: {
|
|
|
- cardNumber: localStorage.card_number || "360721199802141618",
|
|
|
+ cardNumber: localStorage.card_number,
|
|
|
},
|
|
|
});
|
|
|
// console.log(res);
|
|
|
@@ -391,11 +417,7 @@
|
|
|
.then(async (res) => {
|
|
|
// 如果上传了图片,处理图片参数字段
|
|
|
if (res.feedbackImg.length) {
|
|
|
- let temList = []
|
|
|
- res.feedbackImg.forEach((ele) => {
|
|
|
- temList.push(ele.url)
|
|
|
- })
|
|
|
- res.image = temList.join(";")
|
|
|
+ res.image = this.imgs.join(";")
|
|
|
}
|
|
|
res.feedbackItemName = "水费缴纳"
|
|
|
|
|
|
@@ -480,8 +502,8 @@
|
|
|
payCount: "1",
|
|
|
notPaySize: 0,
|
|
|
nowRealPayAmount: item.realPayAmount,
|
|
|
- payerCardNumber: localStorage.card_number || "360721199802141618",
|
|
|
- payerName: localStorage.studentName || "陈志斌"
|
|
|
+ payerCardNumber: localStorage.card_number,
|
|
|
+ payerName: localStorage.studentName
|
|
|
}
|
|
|
})
|
|
|
// console.log(res);
|
|
|
@@ -507,8 +529,8 @@
|
|
|
payCount: "1",
|
|
|
notPaySize: 0,
|
|
|
nowRealPayAmount: item.realPayAmount,
|
|
|
- payerCardNumber: localStorage.card_number || "360721199802141618",
|
|
|
- payerName: localStorage.studentName || "陈志斌"
|
|
|
+ payerCardNumber: localStorage.card_number,
|
|
|
+ payerName: localStorage.studentName
|
|
|
},
|
|
|
});
|
|
|
// console.log(res);
|
|
|
@@ -532,6 +554,7 @@
|
|
|
orderNo: this.orderNo,
|
|
|
openId: localStorage.openId,
|
|
|
secondOrderNo: "",
|
|
|
+ payment: "2"
|
|
|
},
|
|
|
});
|
|
|
// console.log(res);
|
|
|
@@ -662,14 +685,35 @@
|
|
|
phoneNumber: '82293462'
|
|
|
});
|
|
|
},
|
|
|
- }
|
|
|
+ // 下拉刷新
|
|
|
+ onPullDownRefresh() {
|
|
|
+ if (localStorage.room) {
|
|
|
+ this.roomSelect = "黄家湖" + localStorage.room
|
|
|
+ this.getData()
|
|
|
+ this.getTimeList()
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }, 1500)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // 计算出缓存中是否存在宿舍号
|
|
|
+ isShow() {
|
|
|
+ if (localStorage.room) {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.container {
|
|
|
overflow: auto;
|
|
|
- height: 100vh;
|
|
|
+ min-height: 100vh;
|
|
|
background-image: url(../../static/bg.png);
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
@@ -900,7 +944,8 @@
|
|
|
}
|
|
|
|
|
|
::v-deep .uni-select__input-placeholder {
|
|
|
- color: #fff;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #3a3a3a;
|
|
|
}
|
|
|
|
|
|
::v-deep .uniui-bottom::before {
|