This commit is contained in:
cun-nan 2024-10-09 17:48:51 +08:00
parent 89fe6b7fa8
commit 7fec6165b5
6 changed files with 113 additions and 26 deletions

View File

@ -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

View File

@ -38,7 +38,7 @@
<view class="card_2">
<view class="top_card">
<view class="">礼品卡</view>
<view class="">
<view class="" @click="goGiftDetails()">
兑换记录
</view>
</view>
@ -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
}
})

View File

@ -5,7 +5,8 @@
<view class="f-box" v-for="(item,index) in list" :key="index" @click="goDetails(item.id)">
<view class="f-top">{{item.storeName}}可用</view>
<view class="f-bs">
<image :src="item.backgroundImage" v-if="item.backgroundImage" style="width: 60px; height: 60px; "></image>
<image :src="item.backgroundImage" v-if="item.backgroundImage" style="width: 60px; height: 60px; ">
</image>
<image src="../../static/logo.png" v-else style="width: 60px; height: 60px; "></image>
<view class="r-box">
<view class="">
@ -23,6 +24,11 @@
</view>
</view>
</view>
<view v-if="list.length==0" style="margin-top: 20vh;">
<u-empty mode="car" icon="http://47.94.122.58:83/queshengye.png" text="您当前没有优惠券~">
</u-empty>
</view>
</view>
</view>
</template>
@ -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
})
}
}

View File

@ -57,7 +57,7 @@
<view class="input-box">
<view class="i-title">充值金额</view>
<view class="n_input">
<input type="text" v-model="rechargeOrder.balance" :disabled="isEdit">
<input type="text" v-model="rechargeCardOrder.rechargeBalance" :disabled="isEdit">
<view class="r-title">
{{staff.realName || "--"}}
</view>
@ -94,7 +94,7 @@
立即充值{{rechargeOrder.balance}}
</view>
<view class="anniu_" v-if="type=='oilCard'" @click="addFuleCarRecords()">
立即充值{{rechargeOrder.balance}}
立即充值{{rechargeCardOrder.rechargeBalance}}
</view>
</view>
<u-popup :show="show" :closeable="true" :round="10" mode="bottom" @close="close">
@ -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
}
}
}

View File

@ -56,16 +56,16 @@
<view class="si_t">
<view style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; ">
<view class="title_">适用门店</view>
<view class="d-s" style=" color: #FF2828; margin: 0px; ">
<view class="d-s" style=" color: #FF2828; margin: 0px; " @click="goGoGo()">
<image src="../../static/icon/reddh.png" style="width: 14px; height: 14px; "></image> 导航
</view>
</view>
<view class="">中建锦绣广场二期站</view>
<view class="">山东省济南市槐荫区 | 3.0km</view>
<view class="">{{store.name}}</view>
<view class="">{{store.address}} | {{distance}}km</view>
</view>
<!-- 顶部区域 -->
<u-overlay :show="show" @click="show = false">
<u-overlay :show="show" @click="show = !show">
<view class="warp">
<view class="warp-cent" @tap.stop>
<view class="title_or">扫码领会员</view>
@ -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, // 460460rpx
},
//
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'

View File

@ -46,7 +46,7 @@
</view>
<view class="box-hang" @click="show=!show">
<view class="">生日</view>
<view class="dis"> <text>{{user.birthday}}</text> <uni-icons type="right" size="16"></uni-icons> </view>
<view class="dis"> <text>{{user.birthday || '--'}}</text> <uni-icons type="right" size="16"></uni-icons> </view>
</view>
<!-- <view class="box-hang">
<view class="">手机号</view>