Commit ebadde84 authored by lizhishu's avatar lizhishu

1.提交更新;

parent 2adb68f5
<template> <template>
<view class="ConsumptIoninfo container"> <view class="ConsumptIoninfo container">
<view class="nav"> <van-tabs color="#04B871" @click="changeAct" title-inactive-color="#969799" title-active-color="#323233">
<view class="nav-list" v-for="(item,index) in list" :key="item.id" @tap="changeAct(item,index)"> <van-tab :title='item.name' :name="index" v-for="(item,index) in list" :key="index">
<view :class="[act==index?'name':'']"> </van-tab>
{{item.name}} </van-tabs>
</view>
<view :class="[act==index?'line':'']">
</view>
</view>
</view>
<view class="" style="border-bottom: 1rpx solid #E5E5E5;height: 1rpx;margin-top: 1rpx;"></view> <view class="" style="border-bottom: 1rpx solid #E5E5E5;height: 1rpx;margin-top: 1rpx;"></view>
<!-- 条件选择 --> <!-- 条件选择 -->
<view class="condition"> <view class="condition">
...@@ -28,7 +23,7 @@ ...@@ -28,7 +23,7 @@
<!-- 内容的改变 --> <!-- 内容的改变 -->
<view class="content"> <view class="content">
<view class="orderList" v-if="orderList.length>0"> <view class="orderList" v-if="orderList.length>0">
<view class="orderitem" v-for="(item,index) in orderList" :key="index" @tap="getOrderDetai(item)"> <view class="orderitem" v-for="(item,index) in orderList" :key="index">
<view class="row rowlin1"> <view class="row rowlin1">
<view class="left name"> <view class="left name">
{{item.storeName}} {{item.storeName}}
...@@ -61,9 +56,12 @@ ...@@ -61,9 +56,12 @@
</view> </view>
<!-- 没有数据 --> <!-- 没有数据 -->
<view class="nodata" v-else> <view class="nodata" v-else>
<image :src="ImgUrl2+'nodata.png'" mode="aspectFit"></image> <image :src="ImgUrl3+'xzf/noData-01.png'" mode="aspectFit"></image>
<view>无明细数据</view> <view>无明细数据</view>
</view> </view>
<view class="answeringQuestion" @click="goToPage(1)" v-if="act==3">
为什么有待支付订单?
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -82,6 +80,7 @@ ...@@ -82,6 +80,7 @@
data() { data() {
const currentDate = this.getDate() const currentDate = this.getDate()
return { return {
ImgUrl3: this.$ImgUrl,
ImgUrl2: this.$ImgUrl + 'xzfalipay/', ImgUrl2: this.$ImgUrl + 'xzfalipay/',
ImgUrl: this.$ImgUrl + '/static/weapp/', ImgUrl: this.$ImgUrl + '/static/weapp/',
// 默认激活样式是第一个 // 默认激活样式是第一个
...@@ -147,8 +146,24 @@ ...@@ -147,8 +146,24 @@
}].concat(this.userList) }].concat(this.userList)
}, },
methods: { methods: {
// 跳转页面
async goToPage(value) {
switch (value) {
case 1:
uni.navigateTo({
url: '../OrderClearSuspicions/OrderClearSuspicions'
})
break;
case 2:
break;
case 3:
break;
default:
break;
}
},
// nav // nav
async changeAct(item, index) { async changeAct(index, item) {
// 激活样式是当前点击的对应下标--list中对应id // 激活样式是当前点击的对应下标--list中对应id
this.act = index; this.act = index;
// 可以根据点击事件改变内容 // 可以根据点击事件改变内容
...@@ -183,6 +198,20 @@ ...@@ -183,6 +198,20 @@
} }
this.orderList = tmp this.orderList = tmp
this.totalAmount = (respes.data.totalAmount / 100).toFixed(2) this.totalAmount = (respes.data.totalAmount / 100).toFixed(2)
// this.orderList = Array(10).fill(1).map((v, index) => {
// return {
// accountId: index, // integer刷脸用户账户id,该id为绑定用户id
// amount: 100, // integer消费金额 单位分
// dealTime: '2023-08-09 08:02:01', // string消费时间
// debt: 1, // integer是否垫资 1支付宝垫资 0未垫资
// devflowNo: 'sdfasdfsdfsd', // string终端消费流水号
// mealType: 1, // integer餐别:1早餐,2中餐,3晚餐,4夜宵,5夜夜宵
// schoolName: '学校名称', // string学校名称
// status: 1, //integer订单状态 0待扣款 1已付款 2已撤销 3已退款 4异常订单
// storeName: '商家名称', // string商家名称
// userName: '用户姓名', // string用户姓名
// }
// })
} else { } else {
this.orderList = [] this.orderList = []
} }
...@@ -263,11 +292,26 @@ ...@@ -263,11 +292,26 @@
height: 100%; height: 100%;
} }
.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;
}
.orderList { .orderList {
width: 725rpx; width: 725rpx;
float: right; float: right;
padding-bottom: 126rpx; padding-bottom: 126rpx;
.orderitem { .orderitem {
height: 172rpx; height: 172rpx;
background-color: #FFFEFF; background-color: #FFFEFF;
......
...@@ -134,7 +134,26 @@ ...@@ -134,7 +134,26 @@
<text>· 消费限额仅在学校消费机联网状态下生效</text> <text>· 消费限额仅在学校消费机联网状态下生效</text>
</view> </view>
</view> </view>
<!-- 消费会员限制弹框 -->
<van-dialog v-model="contractMenber" :show-confirm-button="false">
<view class="modalDlgBox">
<view class="modalDlgHeader">
<text>温馨提示</text>
</view>
<view class="contentt">
<view class="line1">
<text>您还未开通消费会员,</text>
</view>
<view class="line2">
成为会员即可开启消费限额,自定义设置单日限额与场景限额
</view>
</view>
<view class="btngroup">
<button @tap="BtnEvent(1)">取消</button>
<button @tap="BtnEvent(2)">马上开通</button>
</view>
</view>
</van-dialog>
<!-- 设置保存按钮 --> <!-- 设置保存按钮 -->
<view class="savebtn" @tap="ConsumptionQuota" v-if="schoolConsumeLimit.parentConsumeLimit == 1"> <view class="savebtn" @tap="ConsumptionQuota" v-if="schoolConsumeLimit.parentConsumeLimit == 1">
<text>保存</text> <text>保存</text>
...@@ -190,56 +209,45 @@ ...@@ -190,56 +209,45 @@
otherTip: false, otherTip: false,
superTip: false, superTip: false,
// 消费会员弹框 // 消费会员弹框
showDlgModal: false, contractMenber: false,
SchoolInfo: null
}; };
}, },
onLoad: function() { onLoad: function() {
this.getConsumeLimitData() this.getConsumeLimitData()
// this.MySchoolInfo()
}, },
methods: { methods: {
// 我的学校信息 // 弹框点击事情
async MySchoolInfo() { async BtnEvent(type) {
try { if (type == 1) {
uni.showLoading({ setTimeout(() => {
title: "请稍后", uni.navigateBack()
// #ifndef MP-ALIPAY }, 1000)
mask: true, }
// #endif if (type == 2) {
}) jWeixin.miniProgram.navigateTo({
await new Promise((res, rej) => { url: '/pages/nationalCenterForLesbianRights/index'
setTimeout(() => {
res()
}, 300);
})
let respes = await this.$httpWX.post({
url: '/cgi-xpay/app/user/MySchoolInfo'
}, {
"accountId": this.ConsumptionQuotaUser.id,
})
uni.hideLoading()
if (respes.code != 200) {
uni.showToast({
icon: "error",
title: respes.message
})
return
}
this.SchoolInfo = respes.data || {}
console.log(this.SchoolInfo, 'MySchoolInfoMySchoolInfo');
} catch (error) {
uni.showToast({
icon: "error",
title: error.message
}) })
} }
this.contractMenber = false
}, },
// 弹框点击事情 // 查询消费会员权益项
async BtnEvent(type) { async QueryProductContractItem(serviceItemCode = '1008') {
console.warn(type) const data = await requestPost('/cgi-xpay/app/h5/QueryProductContractItem', {
this.showDlgModal = false accountId: sessionStorage.getItem('accountId') * 1,
uni.navigateBack() serviceItemCode
})
if (data['code'] != 200) {
await Dialog({
title: '温馨提示',
message: data['message'],
confirmButtonText: "知道了"
})
return
}
if (data.data['result'] == "fail") {
this.contractMenber = true
throw ('您还未开通消费会员,')
}
}, },
handleInput_0(e) { handleInput_0(e) {
let price = e.detail.value; let price = e.detail.value;
...@@ -337,6 +345,7 @@ ...@@ -337,6 +345,7 @@
}, },
async switchChange(e) { async switchChange(e) {
console.warn("开启限额", e.detail.value) console.warn("开启限额", e.detail.value)
await this.QueryProductContractItem()
this.parentConsumeLimit.switch = e.detail.value this.parentConsumeLimit.switch = e.detail.value
if (this.parentConsumeLimit.singleLimit == 0) { if (this.parentConsumeLimit.singleLimit == 0) {
this.parentConsumeLimit.singleLimit = '50.00'; this.parentConsumeLimit.singleLimit = '50.00';
...@@ -613,6 +622,89 @@ ...@@ -613,6 +622,89 @@
background: #F3F3F3; background: #F3F3F3;
} }
.modalDlgBox {
width: 622rpx;
height: 467rpx;
top: 480rpx;
background-color: #FFFFFF;
border-radius: 26rpx;
margin: 0 auto;
.modalDlgHeader {
width: 100%;
height: 124rpx;
background: linear-gradient(270deg, #FFF9E7 0%, #FFFAEB 100%);
border-radius: 20rpx 20rpx 0rpx 0rpx;
// filter: blur(21rpx);
line-height: 124rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #512C19;
text-align: center;
background-image: url(https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/user/mengban.png);
background-size: cover;
background-repeat: no-repeat;
}
.contentt {
width: 512rpx;
margin: 0 auto;
text-align: center;
margin-top: 28rpx;
line-height: 45rpx;
.line1 {
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
.line2 {
margin-top: 14rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
}
}
.btngroup {
display: flex;
position: absolute;
left: 0;
right: 0;
bottom: 40rpx;
justify-content: space-around;
button {
width: 254rpx;
height: 88rpx;
border-radius: 12rpx;
line-height: 88rpx;
text-align: center;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
}
button:nth-child(1) {
color: rgba(0, 0, 0, 0.85);
background-color: #EBEBEB;
}
button:nth-child(2) {
color: #512C19;
background: linear-gradient(270deg, #EEC16F 0%, #FADCA9 100%);
}
}
}
.ConsumptionQuota { .ConsumptionQuota {
padding-top: 23rpx; padding-top: 23rpx;
padding-bottom: 200rpx; padding-bottom: 200rpx;
......
...@@ -68,21 +68,12 @@ ...@@ -68,21 +68,12 @@
3: '已退款', 3: '已退款',
4: '异常订单' 4: '异常订单'
}, },
Record: { Record: uni.getStorageSync('rechargeDetail')
amount: '', // integer金额 单位分
className: '', // string班级
gradeName: '', // string年级
id: 0, // integer
optionName: '', // string操作名称 示例:线上充值
outTradeNo: '', // string交易订单号
payTime: '', // string消费时间
serviceFee: '', // string服务费 格式¥0.02
tradeNo: '', // string支付订单号
}
} }
}, },
onLoad(options) { onLoad(options) {},
this.QueryRechargeRecord(options['month'] || '', options['id'] || ''); onUnload: function() {
uni.removeStorageSync('rechargeDetail')
}, },
computed: { computed: {
itemAmount() { itemAmount() {
...@@ -96,48 +87,6 @@ ...@@ -96,48 +87,6 @@
}, },
}, },
methods: { methods: {
// 充值明细列表
async QueryRechargeRecord(month, id) {
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/QueryRechargeRecord', {
accountId: sessionStorage.getItem('accountId') * 1,
month: month,
id
})
uni.hideLoading()
if (data['code'] != 200) {
await Dialog({
title: '温馨提示',
message: data['message'],
confirmButtonText: "知道了"
})
return
}
this.expenditure = data.data['expenditure'] || 0
this.Record = 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支付订单号
}
})
},
// 跳转页面 // 跳转页面
async goToPage(value) { async goToPage(value) {
switch (value) { switch (value) {
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
<view class="pannels" v-if="list.length>0"> <view class="pannels" v-if="list.length>0">
<view class="item" v-for="(item,index) in list" :key="index" @tap="rechargeRecordDetai(item)"> <view class="item" v-for="(item,index) in list" :key="index" @tap="rechargeRecordDetai(item)">
<view class="p1"> <view class="p1">
<view>{{item.recordName||''}}</view> <view>{{item.optionName||''}}</view>
<view class="num">{{itemAmount(item.amount||0)}}</view> <view class="num">{{itemAmount(item.amount||0)}}</view>
</view> </view>
<view class="p2">{{itemTimeFormat(item.recordTime)}}</view> <view class="p2">{{itemTimeFormat(item.payTime)}}</view>
</view> </view>
</view> </view>
<view v-if='list.length==0' class="noCostInfo"> <view v-if='list.length==0' class="noCostInfo">
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
onLoad(options) { 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.currentDate_ = moment(new Date()).format('YYYY-MM');
this.QueryAccountExchangeList(); this.QueryRechargeRecord();
}, },
computed: { computed: {
itemAmount() { itemAmount() {
...@@ -106,9 +106,10 @@ ...@@ -106,9 +106,10 @@
res() res()
}, 200); }, 200);
}) })
uni.setStorageSync('rechargeDetail', item)
uni.hideLoading() uni.hideLoading()
uni.navigateTo({ uni.navigateTo({
url: `../rechargeDetail/rechargeDetail?id=${item.id || ''}&month=${this.currentDate_}` url: `../rechargeDetail/rechargeDetail`
}) })
} catch (error) { } catch (error) {
uni.showToast({ uni.showToast({
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
} }
}, },
// 充值明细列表 // 充值明细列表
async QueryAccountExchangeList() { async QueryRechargeRecord() {
uni.showLoading({ uni.showLoading({
title: "请稍后", title: "请稍后",
// #ifndef MP-ALIPAY // #ifndef MP-ALIPAY
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
res() res()
}, 200); }, 200);
}) })
const data = await requestPost('/cgi-xpay/app/h5/QueryAccountExchangeList', { const data = await requestPost('/cgi-xpay/app/h5/QueryRechargeRecord', {
accountId: sessionStorage.getItem('accountId') * 1, accountId: sessionStorage.getItem('accountId') * 1,
month: this.currentDate_ month: this.currentDate_
}) })
...@@ -166,6 +167,19 @@ ...@@ -166,6 +167,19 @@
// recordTime string操作时间 // recordTime string操作时间
this.list = data.data['list'] || [] this.list = data.data['list'] || []
this.expenditure = data.data['expenditure'] || 0 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: 'd3456345', // string支付订单号
// }
// })
}, },
formatter(type, val) { formatter(type, val) {
if (type === 'year') { if (type === 'year') {
...@@ -179,7 +193,7 @@ ...@@ -179,7 +193,7 @@
this.currentDate = moment(val).format('YYYY年M月') this.currentDate = moment(val).format('YYYY年M月')
this.currentDate_ = moment(val).format('YYYY-MM'); this.currentDate_ = moment(val).format('YYYY-MM');
this.show = false this.show = false
this.QueryAccountExchangeList() this.QueryRechargeRecord()
}, },
onCancel() { onCancel() {
this.show = false this.show = false
......
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