| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <ax-body>
- <view class="body app-hide-scrollbar">
- <view v-if="logs.data.length" class="list">
- <view v-for="(item, index) in logs.data" :key="index" class="item">
- <view class="title">
- <view class="name">{{ item.params.levelName }}</view>
- <view class="state" :style="{ backgroundColor: item.orderStatus == 2 ? '' : '#FF5D50' }">
- {{ getStatusTips(item.orderStatus) }}</view>
- </view>
- <view class="cell">
- <view>订单编号:{{ item.orderNo }}</view>
- <view>购券时间:{{ item.payTime }}</view>
- <view>实付金额:{{ item.orderMoney }}元</view>
- <view class="backTaxAmount" v-if="item.backTaxAmount && item.backTax === 0">
- <view class="">超充金额:{{ item.backTaxAmount }}元</view>
- <view>|</view>
- <view class="check-backTaxAmount" @click="topage_order(item)">查看超充订单</view>
- </view>
- <view v-if="item.ZTBackMoney">返回智停端补缴金额:{{ item.ZTBackMoney }}</view>
- <view v-if="item.backTaxAmount && item.backTax === 0">可抵扣余量:{{ item.orderMoney -
- item.backTaxAmount }}元
- </view>
- <view v-if="item.orderStatus != 2">退款时间:{{ item.refundTime }}</view>
- <view v-if="item.orderStatus != 2">退款金额:{{ item.refundMoney }}元</view>
- </view>
- </view>
- <view v-if="logs.total > logs.data.length" @click="loadData(true)" class="loadmore">
- <text>点击加载更多数据</text>
- </view>
- </view>
- <view v-else class="nothing">
- <image src="@/static/img/empty.svg" mode="widthFix" class="icon"></image>
- <view>暂无可展示数据</view>
- </view>
- </view>
- </ax-body>
- </template>
- <script>
- export default {
- onLoad() {
- this.loadData();
- },
- data() {
- return {
- logs: {
- total: 0,
- data: [],
- },
- search_data: {
- pageNum: 1,
- pageSize: 10
- }
- }
- },
- methods: {
- getStatusTips(status) {
- if (status == 2) {
- return "已到账"
- } else if (status == 4) {
- return "已退款"
- } else if (status == 5) {
- return "退款中"
- }
- },
- loadData(append) {
- const currentPage = this.search_data.pageNum;
- if (append) {
- this.search_data.pageNum++;
- } else {
- this.search_data.pageNum = 1;
- }
- this.$api.base("post", "/applet/v1/order/getTicketRecords", this.search_data, {})
- .then(res => {
- if (!append || currentPage + 1 === this.search_data.pageNum) {
- if (append) {
- this.logs.data = this.logs.data.concat(res.data.records);
- } else {
- this.logs.total = res.data.total;
- this.logs.data = res.data.records;
- }
- }
- })
- .catch(error => {
- if (append) {
- this.search_data.pageNum = currentPage;
- }
- console.error('获取充值记录失败:', error);
- });
- },
- topage_order(item) {
- this.$app.url.goto('/pages/order-detail/order-detail?orderId=' + item.chargeOrderId);
- }
- }
- }
- </script>
- <style scoped>
- @import url("recharge-log.css");
- </style>
|