From a7792e4b20a381e7b9581567a2f32828c1a9b059 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 29 May 2024 17:37:23 +0800 Subject: [PATCH] bug --- .../impl/CardFuelRecordServiceImpl.java | 1 + .../MemberRecharge/MemberRecharge.vue | 58 ++++++++++++++----- 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java index 9a42ce94e..d85e75b9a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java @@ -211,6 +211,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { cardFuelRecordDTO.setStoreId(nowAccountInfo.getStoreId()); cardFuelRecordDTO.setChainStoreId(nowAccountInfo.getChainStoreId()); cardFuelRecordDTO.setPayAmount(cardFuelRecordDTO.getRechargeBalance()); + cardFuelRecordDTO.setMtStaffId(nowAccountInfo.getStaffId()); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); diff --git a/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue b/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue index 044a67053..456c8ad7a 100644 --- a/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue +++ b/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue @@ -41,12 +41,12 @@ 充值记录 - + {{item.rechargeBalance}}元 - + @@ -174,6 +174,7 @@ // 自定义金额 custom(val) { this.order.amount = val + this.realyPayBills = this.order.amount }, // 获取充值金额列表 getRechargeAmount() { @@ -206,17 +207,44 @@ url: "/pagesHome/searchVip/searchVip?type=1" }) }, - getindex(index) { + getindex(index,data) { this.listindex = index + if (data){ + this.order.amount = data.rechargeBalance + this.order.rechargeBalance = data.rechargeBalance + this.order.points = data.points + this.realyPayBills = data.rechargeBalance + } }, - govipjs() { - let actualPayment = 0 + // 二维码 + scanQrcode() { if (!this.userInfo) { uni.showToast({ title: "请先选择会员", icon: "none" }) } + if (!this.order.amount){ + uni.showToast({ + title:"请先选择充值金额", + icon:"none" + }) + } + let _this = this + uni.scanCode({ + onlyFromCamera: true, + success: (res) => { + console.log('扫描二维码成功,结果:' + JSON.stringify(res) + res.result); + _this.authCode = res.result + _this.govipjs() + }, + error: (res) => { + console.log('扫描二维码出现错误') + } + }) + }, + govipjs() { + let actualPayment = 0 if (this.order.paymentType == "CASH") actualPayment = this.authCode // 会员id 会员名字会员手机号码 this.order.mtUserId = this.userInfo.id @@ -226,15 +254,17 @@ this.order.authCode = this.authCode this.order.realyPayBills = this.realyPayBills this.order.actualPayment = actualPayment - // if (!this.userInfo){ - // uni.showToast({ - // title:"请先选择会员", - // icon:"none" - // }) - // } - // uni.navigateTo({ - // url: '/pagesHome/MemberRecharge/list' - // }) + + request({ + url: 'business/marketingActivity/cardFuelRecord/prepaidFuelTopUp', + method: 'post', + data:this.order + }).then((res) => { + // uni.navigateTo({ + // url: '/pagesHome/PaymentResults/PaymentResults' + // }) + }) + }, goback() { uni.navigateBack()