From 7fec6165b51a053f793691ac236c41ffba352573 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 9 Oct 2024 17:48:51 +0800 Subject: [PATCH] 10.9 --- .../views/cashier/NewComponents/homeindex.vue | 2 - gasStation-uni/pagesHome/MyCard/MyCard.vue | 15 ++- .../pagesHome/certificate/index.vue | 12 ++- .../pagesHome/memberRecharge/index.vue | 17 +++- gasStation-uni/pagesMy/invite/invite.vue | 91 +++++++++++++++++-- gasStation-uni/pagesMy/setup/index.vue | 2 +- 6 files changed, 113 insertions(+), 26 deletions(-) diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 5cf3d4a60..fbd97fcd4 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -4052,8 +4052,6 @@ this.map.authCode = this.authCode; this.map.allAmount = +this.oilActualPay + +this.goodsActualPay this.map.consumeAmount = this.consumeAmount; - // if (this.consumeRefuelMoney>0) this.updateRefuelMoney(); - // this.map.refuelMoney = JSON.stringify(this.refuelMoney) this.map.couponId = this.useCouponIds if (this.staff) { this.map.staffId = this.staff.id diff --git a/gasStation-uni/pagesHome/MyCard/MyCard.vue b/gasStation-uni/pagesHome/MyCard/MyCard.vue index fc11dfe46..051718d2a 100644 --- a/gasStation-uni/pagesHome/MyCard/MyCard.vue +++ b/gasStation-uni/pagesHome/MyCard/MyCard.vue @@ -38,7 +38,7 @@ 礼品卡 - + 兑换记录 @@ -117,19 +117,16 @@ } }) }, - goFleetDetails() { - + goGiftDetails() { + uni.navigateTo({ + url: '/pagesHome/RechargeRecords/RechargeRecords' + }) }, goCode() { uni.navigateTo({ url: '/pagesHome/QRcode/QRcode' }) }, - gocard(id) { - uni.navigateTo({ - url: '/pagesHome/oilRecharge/oilRecharge?id=' + id - }) - }, goDetails(val, fleetId) { if (fleetId) { uni.navigateTo({ @@ -159,7 +156,7 @@ }).then(res => { if (res.code == 200) { this.cardBalance = res.data - console.log(res,163); + console.log(res, 163); this.cardsList = res.data.userFuel } }) diff --git a/gasStation-uni/pagesHome/certificate/index.vue b/gasStation-uni/pagesHome/certificate/index.vue index 4270c0c92..630458082 100644 --- a/gasStation-uni/pagesHome/certificate/index.vue +++ b/gasStation-uni/pagesHome/certificate/index.vue @@ -5,7 +5,8 @@ {{item.storeName}}可用 - + + @@ -23,6 +24,11 @@ + + + + + @@ -63,7 +69,7 @@ method: 'get', params: this.queryParams }).then(res => { - console.log(res,66); + console.log(res, 66); if (res.code == 200) { this.list = res.data.records this.total = res.data.total @@ -77,7 +83,7 @@ }, goDetails(id) { uni.navigateTo({ - url: '/pagesHome/certificate/details?certificateId='+id + url: '/pagesHome/certificate/details?certificateId=' + id }) } } diff --git a/gasStation-uni/pagesHome/memberRecharge/index.vue b/gasStation-uni/pagesHome/memberRecharge/index.vue index 1ddab597a..4a1726a24 100644 --- a/gasStation-uni/pagesHome/memberRecharge/index.vue +++ b/gasStation-uni/pagesHome/memberRecharge/index.vue @@ -57,7 +57,7 @@ 充值金额 - + {{staff.realName || "--"}} @@ -94,7 +94,7 @@ 立即充值{{rechargeOrder.balance}}元 - 立即充值{{rechargeOrder.balance}}元 + 立即充值{{rechargeCardOrder.rechargeBalance}}元 @@ -173,6 +173,7 @@ methods: { //囤油卡充值 addFuleCarRecords() { + this.rechargeCardOrder.mtStaffId = this.staff.id let _this = this request({ url: 'business/marketingActivity/cardFuelRecord/addFuleCarRecords', @@ -180,7 +181,6 @@ data: _this.rechargeCardOrder, }).then(res => { if (res.code == 200) { - console.log(res, _this.appltType) if (_this.appltType == "WECHAT") { if (!res.data.reservedPayInfo) { uni.showToast({ @@ -262,8 +262,9 @@ } }) }, - // 调用充值接口 + // 调用储值卡充值接口 goRecharge() { + this.rechargeOrder.mtStaffId = this.staff.id let _this = this request({ url: 'business/marketingActivity/cardValueRecord', @@ -395,7 +396,11 @@ }, }).then((res) => { this.oilRechargeList = res.data.records - console.log(res, 271); + if (res.data.records.length>0){ + this.rechargeCardOrder.rechargeBalance = res.data.records[0].rechargeBalance + this.rechargeCardOrder.id = res.data.records[0].id + } + }) }, getUserBalance() { @@ -433,6 +438,8 @@ } } if (this.type == 'oilCard') { + this.rechargeCardOrder.rechargeBalance = data.rechargeBalance + this.rechargeCardOrder.id =data.id } } } diff --git a/gasStation-uni/pagesMy/invite/invite.vue b/gasStation-uni/pagesMy/invite/invite.vue index a0ba378a6..ab0b21344 100644 --- a/gasStation-uni/pagesMy/invite/invite.vue +++ b/gasStation-uni/pagesMy/invite/invite.vue @@ -56,16 +56,16 @@ 适用门店 - + 导航 - 中建锦绣广场二期站 - 山东省济南市槐荫区 | 3.0km + {{store.name}} + {{store.address}} | {{distance}}km - + 扫码领会员 @@ -134,7 +134,7 @@ title: '', userId: '', storeId: '', - show: true, + show: false, options: { code: 'https://oilapi.youkerr.com/oily?storeId=' + uni.getStorageSync('storeId') + '&userId=' + uni .getStorageSync('userId') + '&type=yaoqingyouli', @@ -142,7 +142,21 @@ // .getStorageSync('userId'), // 生成二维码的值 size: 400, // 460代表生成的二维码的宽高均为460rpx }, - + // 当前经度信息 + longitude: "", + // 当前纬度信息 + latitude: "", + // 店铺经度信息 + lon: "", + // 店铺纬度信息 + lat: "", + // 店铺信息 + store: { + name: "测试油站", + description: "济南分店", + address: "济南槐荫区" + }, + distance: 0, } }, onLoad() { @@ -208,8 +222,73 @@ onShow() { this.getAllAmount(); this.getActiveRecommendRecords(); + this.getAddress(uni.getStorageSync("storeId")) }, methods: { + goGoGo() { + let lat = Number(this.lat) + let lon = Number(this.lon) + uni.openLocation({ + latitude: lat, + longitude: lon, + name: this.store.name, + address: this.store.address, + + success: function() { + console.log('success'); + }, + complete: function(res) { + console.log(res); + } + }); + }, + // 获取当前位置 + getAddress(storeId) { + let _this = this; + uni.getLocation({ + // 谷歌使用wgs84 其他使用gcj02 + type: 'gcj02', // 使用国测局坐标系 + success: function(res) { + if (_this.longitude == "" && _this.latitude == "") { + + _this.longitude = res.longitude; + _this.latitude = res.latitude + } + console.log('经度: ' + _this.longitude); + console.log('纬度: ' + _this.latitude); + request({ + url: 'business/storeInformation/store/recentlyStore', + method: 'post', + data: { + "lon": _this.longitude, + "lat": _this.latitude, + "storeId": storeId, + "isLogin": _this.AppToken ? "0" : "1", // 0为登录 + + }, + }).then((response) => { + if (response.data.store) { + _this.distance = (Math.ceil(response.data.distance)) + .toFixed(1) + _this.store = response.data.store + + _this.lon = _this.store.longitude + _this.lat = _this.store.latitude + console.log(_this.store, 129); + } else { + uni.showToast({ + title: "当前店铺已关闭!!!", + icon: "none" + }) + } + + }).catch(err => {}) + }, + fail: function(err) { + console.log('获取位置信息失败: ' + err.errMsg); + } + }); + }, goList() { uni.navigateTo({ url: '/pagesMy/invite/list' diff --git a/gasStation-uni/pagesMy/setup/index.vue b/gasStation-uni/pagesMy/setup/index.vue index f591cfbdd..3276b4313 100644 --- a/gasStation-uni/pagesMy/setup/index.vue +++ b/gasStation-uni/pagesMy/setup/index.vue @@ -46,7 +46,7 @@ 生日 - {{user.birthday}} + {{user.birthday || '--'}}