From 946815ef2e06f8f2ad72989fbe41d11adaee2d20 Mon Sep 17 00:00:00 2001 From: xvv Date: Wed, 29 May 2024 15:34:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?pos=20=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pos-uni/pages/index/index.vue | 170 +++++++++++++++++++++- pos-uni/pagesHome/orderList/orderList.vue | 26 ++-- 2 files changed, 184 insertions(+), 12 deletions(-) diff --git a/pos-uni/pages/index/index.vue b/pos-uni/pages/index/index.vue index c7a4faf5f..635f93c98 100644 --- a/pos-uni/pages/index/index.vue +++ b/pos-uni/pages/index/index.vue @@ -66,6 +66,28 @@ 您有新的交易日报生成,请点击查看 --> + + + + 已支付 + 已退款 + 未支付 + + + + 订单号: {{item.orderNo}} + + 油号:{{item.oilName}} + 升数:{{item.shengshu}}L + 下单时间:{{item.payTime}} + + 应付:¥{{item.goodsMoney}} + 优惠:¥0.00 + + + + 实付:¥{{item.payMoney}} + @@ -83,16 +105,26 @@ List: [], show: false, status: 'loading', + orderList: [], indexData: { totalPayMoney: '0', totalCount: '0', totalRefund: '0', - } + }, + form: { + page: 1, + pageSize: 10, + status: '', + startTime: '', + endTime: '', + payType: '' + }, } }, onShow() { // this.actList = ["1", "1", "1", "1", "1", ] // this.status = "nomore" 底部刷新结束 + this.getPageListByPos() this.getIndexData(); }, onPullDownRefresh() { @@ -110,6 +142,24 @@ tabbar }, methods: { + getPageListByPos() { + + + request({ + url: 'business/allOrderInfo/getPageListByPos', + method: 'get', + params: this.form + }).then((res) => { + if (res.code == 200) { + this.orderList = res.data.records; + } else { + uni.showToast({ + title: res.data, + icon: "none" + }) + } + }) + }, goRecharge() { uni.navigateTo({ url: "/pagesHome/MemberRecharge/MemberRecharge" @@ -294,4 +344,122 @@ overflow: hidden; margin-left: 10px; } + + .box_ { + width: 95%; + border-radius: 8px; + background: #fff; + box-sizing: border-box; + padding: 15px; + margin: 15px auto; + + } + + .b-bx { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 10px; + } + + .title_ { + font-weight: bold; + font-size: 16px; + color: #333333; + } + + .zt-size { + font-weight: bold; + font-size: 16px; + color: #FD504E; + } + + .centne { + display: flex; + } + + .touxiang { + width: 60px; + height: 60px; + border-radius: 50%; + background: #D9D9D9; + margin-right: 15px; + } + + .right-centne { + width: 100%; + font-size: 14px; + } + + .h_ { + width: 100%; + margin-bottom: 5px; + } + + .end-box { + width: 100%; + text-align: right; + font-weight: bold; + font-size: 16px; + color: #0864E9; + } + + .time { + font-weight: 500; + font-size: 14px; + color: #333333; + margin: 0px auto; + margin-top: 15px; + } + + .time-bs { + width: 100%; + box-sizing: border-box; + background: #FFFFFF; + padding: 15px; + display: flex; + align-items: center; + justify-content: space-around; + } + + .time-bs2 { + width: 100%; + box-sizing: border-box; + background: #FFFFFF; + padding: 30px; + // display: flex; + align-items: center; + justify-content: space-around; + } + + .time-box { + border: 1px solid #0864E9; + box-sizing: border-box; + padding: 5px 15px; + border-radius: 8px; + font-size: 14px; + color: #333; + display: flex; + align-items: center; + justify-content: center; + } + + .time-box2 { + border: 1px solid #0864E9; + box-sizing: border-box; + padding: 5px 15px; + border-radius: 8px; + font-size: 14px; + color: #333; + display: flex; + align-items: center; + justify-content: center; + } + + .hao_ { + width: 30%; + font-weight: bold; + margin-right: 5px; + } \ No newline at end of file diff --git a/pos-uni/pagesHome/orderList/orderList.vue b/pos-uni/pagesHome/orderList/orderList.vue index 5dd6a4ae3..72f05cf5e 100644 --- a/pos-uni/pagesHome/orderList/orderList.vue +++ b/pos-uni/pagesHome/orderList/orderList.vue @@ -22,18 +22,15 @@ 未支付 - - - - - 订单号:{{item.orderNo}} - 油号:{{item.oilName}} - 升数:{{item.shengshu}}L - 下单时间:{{item.payTime}} + 订单号: {{item.orderNo}} + + 油号:{{item.oilName}} + 升数:{{item.shengshu}}L + 下单时间:{{item.payTime}} - 应付:¥{{item.goodsMoney}} - 优惠:¥0.00 + 应付:¥{{item.goodsMoney}} + 优惠:¥0.00 @@ -348,11 +345,12 @@ } .right-centne { - width: 70%; + width: 100%; font-size: 14px; } .h_ { + width: 100%; margin-bottom: 5px; } @@ -415,4 +413,10 @@ align-items: center; justify-content: center; } + + .hao_ { + width: 30%; + font-weight: bold; + margin-right: 5px; + } \ No newline at end of file From 827cb66e35376351e3c3abeda6dab3eab0f859f0 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 29 May 2024 17:24:00 +0800 Subject: [PATCH 2/4] bug --- .../MemberRecharge/MemberRecharge.vue | 66 +++++++++++++++++-- 1 file changed, 59 insertions(+), 7 deletions(-) diff --git a/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue b/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue index 4309839da..044a67053 100644 --- a/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue +++ b/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue @@ -43,7 +43,13 @@ - {{item}} + {{item.rechargeBalance}}元 + + + + + + @@ -56,7 +62,7 @@ 微信扫码支付 - + @@ -69,7 +75,7 @@ 支付宝扫码支付 - + @@ -82,7 +88,7 @@ 银联扫码支付 - + @@ -95,7 +101,7 @@ 现金支付 - + @@ -131,6 +137,12 @@ isChooseUser: false, userId: "", userInfo: "", + order: { + paymentType: "WECHAT" + }, + value: "", + realyPayBills: 0, + authCode: "", } }, onLoad(e) { @@ -143,6 +155,7 @@ onShow() { // this.actList = ["1", "1", "1", "1", "1", ] // this.status = "nomore" 底部刷新结束 + this.getRechargeAmount() }, onPullDownRefresh() { console.log("刷新"); @@ -158,9 +171,26 @@ headers }, methods: { - getmemberId(num) { + // 自定义金额 + custom(val) { + this.order.amount = val + }, + // 获取充值金额列表 + getRechargeAmount() { + request({ + url: 'business/marketingActivity/cardFuelDiesel', + method: 'get', + params: { + pageNo: 1, + pageSize: 10000 + } + }).then((res) => { + this.numList = res.data.records + }) + }, + getmemberId(num, payType) { this.memberId = num - console.log(this.memberId); + this.order.paymentType = payType }, // 获取用户信息 getUser() { @@ -180,6 +210,28 @@ this.listindex = index }, govipjs() { + let actualPayment = 0 + if (!this.userInfo) { + uni.showToast({ + title: "请先选择会员", + icon: "none" + }) + } + if (this.order.paymentType == "CASH") actualPayment = this.authCode + // 会员id 会员名字会员手机号码 + this.order.mtUserId = this.userInfo.id + this.order.name = this.userInfo.name + this.order.mobile = this.userInfo.mobile + // 支付码 + 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' // }) 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 3/4] 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() From 49666799a45c2a51a1832c85cfc6f9b74bd4dead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Wed, 29 May 2024 17:42:11 +0800 Subject: [PATCH 4/4] bug --- pos-uni/pages/index/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pos-uni/pages/index/index.vue b/pos-uni/pages/index/index.vue index 635f93c98..b37f0c6e8 100644 --- a/pos-uni/pages/index/index.vue +++ b/pos-uni/pages/index/index.vue @@ -89,6 +89,7 @@ 实付:¥{{item.payMoney}} + @@ -146,7 +147,7 @@ request({ - url: 'business/allOrderInfo/getPageListByPos', + url: 'business/allOrderInfo/getPageListByPosRecentThree', method: 'get', params: this.form }).then((res) => {