添加:在线买单消费记录

文字修改:兑换商品页面确认支付修改为确认兑换
优化:兑换记录优化 - 显示内容优化,内容更加详细
This commit is contained in:
wuhui_zzw 2024-01-15 10:17:19 +08:00
parent 7454d7924b
commit 962ded33f9
7 changed files with 216 additions and 19 deletions

View File

@ -7,6 +7,10 @@ export function searchMer(data) {
export function onlinePayment(data) {
return request.get("onlinePayment/createOrder",data);
}
// 提货处理 - 提货记录
export function onlinePaymentRecord(data) {
return request.get("onlinePayment/record",data);
}
// 提货处理 - 获取用户信息
export function pointUserInfo() {
return request.get("exchange/userHold");

View File

@ -7,9 +7,13 @@ let openPlantGrass = '-openPlantGrass-'
// 网络接口修改此字符 小程序域名要求https
let httpApi = 'https://bt.test.cdlfjy.com/' // 开发
// let httpApi = 'https://mp.scwmbh.cn/' // 生产
// 聊天接口修改此字符 小程序聊天要求wss 例如:
let wsApi = 'wss://bt.test.cdlfjy.com'
// let wsApi = 'wss://mp.scwmbh.cn'
module.exports = {
// 请求域名 格式: https://您的域名

View File

@ -528,6 +528,12 @@
"navigationBarTitleText": "在线买单"
}
},
{
"path": "online_payment/payment/record",
"style": {
"navigationBarTitleText": "消费记录"
}
},
{
"path": "online_payment/exchange/index",
"style": {
@ -541,8 +547,6 @@
}
}
]
},
{

View File

@ -50,8 +50,8 @@
</view>
</view>
<!--提交按钮-->
<view class="pay-btn" v-if="pay_info.total_money > 0 && point_info.id > 0 && staff_info.uid > 0" @click="confirmPayment">确认支付</view>
<view class="pay-btn not-btn" v-else>确认支付</view>
<view class="pay-btn" v-if="pay_info.total_money > 0 && point_info.id > 0 && staff_info.uid > 0" @click="confirmPayment">确认兑换</view>
<view class="pay-btn not-btn" v-else>确认兑换</view>
</view>
<!--授权登录-->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>

View File

@ -3,8 +3,19 @@
<view class='content-box'>
<view v-if="Object.values(list).length > 0" class="content-list">
<view class="list-box" v-for="(item,index) in list" :key="index">
<view class="title">{{ item.total_money }}</view>
<view class="time">{{ item.create_time }}</view>
<view class="top-info">
<view class="left">
<view class="title">{{ item.point_title }}</view>
<view class="time">{{ item.create_time }}</view>
</view>
<view class="right">{{ item.total_money }}</view>
</view>
<view class="other-info">
<view class="other-info-line">操作员{{ item.staff_nickname || item.staff_uid }}</view>
<view class="other-info-line">使用积分{{ item.use_integral }}</view>
<view class="other-info-line" v-if="item.diff_money > 0">差价{{ item.diff_money }}</view>
<view class="other-info-line" v-if="item.diff_money_pay > 0">差价实付金额{{ item.diff_money_pay }}</view>
</view>
</view>
</view>
<emptyPage v-else title="暂无记录~"></emptyPage>
@ -37,7 +48,7 @@ export default {
this.getPointList();
},
onReachBottom: function () {
this.exchangeRecord();
this.getPointList();
},
methods: {
//
@ -67,21 +78,57 @@ export default {
<style scoped lang="scss">
.list-box{
width: 100%;
padding: 20rpx;
height: 120rpx;
padding: 30rpx 20rpx;
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-start;
.title{
font-size: 30rpx;
font-weight: bold;
align-items: center;
.top-info{
width: 100%;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
.left{
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-start;
.title{
font-size: 30rpx;
font-weight: bold;
width: 100%;
text-align: left;
}
.time{
width: 100%;
text-align: left;
font-size: 26rpx;
color: #C1C1C1;
}
}
.right{
font-size: 40rpx;
}
}
.time{
font-size: 26rpx;
color: #C1C1C1;
.other-info{
width: 100%;
display: inline-flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: center;
align-content: center;
.other-info-line{
width: 50%;
height: 35rpx;
line-height: 35rpx;
font-size: 24rpx;
}
}
}
</style>

View File

@ -9,7 +9,7 @@
<view class="name" @click="merShowPopup">{{ mer_info.mer_name || '请选择门店' }}</view>
<view class="change-btn" @click="merShowPopup" v-if="mer_info.mer_id > 0">切换</view>
</view>
<!--<view class="right">消费记录</view>-->
<view class="right" @click="goMenuPage('/pages/users/online_payment/payment/record')">消费记录</view>
</view>
<!--买单金额-->
<view class="money">
@ -459,7 +459,18 @@ export default {
title: err
});
});
}
},
//
goMenuPage(url) {
console.log(url)
if (this.isLogin) {
uni.navigateTo({
url
})
} else {
this.openAuto()
}
},
},
// #ifdef MP

View File

@ -0,0 +1,127 @@
<template>
<view :style="viewColor">
<view class='content-box'>
<view v-if="Object.values(list).length > 0" class="content-list">
<view class="list-box" v-for="(item,index) in list" :key="index">
<view class="left">
<view class="title">
{{ item.mer_name }}
<view :class="['status',(item.status == 3 ? 'status-success' : 'status-error' )]">
{{ item.status == 3 ? '已完成' : '已失效' }}
</view>
</view>
<view class="time">{{ item.create_time }}</view>
</view>
<view class="right">-{{ item.pay_price }}</view>
</view>
</view>
<emptyPage v-else title="暂无记录~"></emptyPage>
</view>
</view>
</template>
<script>
import { onlinePaymentRecord } from '@/api/exchange.js';
import {mapGetters} from "vuex";
import emptyPage from '@/components/emptyPage.vue';
const app = getApp();
export default {
components: {
emptyPage,
},
data() {
return {
list: [],
page: 1,
total_page: 1,
};
},
computed: {
...mapGetters(['isLogin', 'userInfo', 'viewColor'])
},
onLoad(options) {
this.getPointList();
},
onReachBottom: function () {
this.getPointList();
},
methods: {
//
getPointList() {
let _this = this;
onlinePaymentRecord({page: _this.page})
.then(res => {
let list = res.data.list || {};
if (Object.values(list).length > 0) {
_this.list = _this.$util.SplitArray(list, _this.list);
_this.$set(_this, 'list', _this.list);
_this.page++;
}
})
.catch(err => {
this.$util.Tips({
title: err
});
});
},
},
}
</script>
<style scoped lang="scss">
.list-box{
width: 100%;
padding: 20rpx;
height: 120rpx;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
.left{
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-start;
.title{
font-size: 30rpx;
font-weight: bold;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
.status{
font-size: 24rpx;
font-weight: initial;
margin-left: 20rpx;
height: 35rpx;
line-height: 35rpx;
padding: 0 15rpx;
border-radius: 50rpx;
}
.status-success{
background-color: #13ce66;
color: #fff;
}
.status-error{
background-color: #ff4949;
color: #fff;
}
}
.time{
font-size: 26rpx;
color: #C1C1C1;
}
}
.right{
font-size: 40rpx;
color: #ff4949;
}
}
</style>