This commit is contained in:
cun-nan 2024-09-21 17:35:37 +08:00
parent 1f6b51ae20
commit 774f328ea6
5 changed files with 857 additions and 768 deletions

View File

@ -100,7 +100,7 @@
<img src="@/assets/menu_icon/chedui.png" v-if="!activeMenu.includes('/fleet')" style="width: 21px;height: 21px;"/>
<img src="@/assets/menu_icon/chedui_b.png" v-else style="width: 21px;height: 21px;"/>
</span>
<span style="margin-right: 10px;" v-if="item.meta.title=='便利店'">
<span style="margin-right: 10px;" v-if="item.meta.title=='便利店管理'">
<img src="@/assets/menu_icon/car.png" v-if="!activeMenu.includes('/convenience')" style="width: 25px;height: 25px;"/>
<img src="@/assets/menu_icon/car_b.png" v-else style="width: 25px;height: 25px;"/>
</span>

View File

@ -1,6 +1,6 @@
<template>
<view class="content">
<view class="card_" @click="goDetails()">
<view class="card_" @click="goDetails('balance')">
<view class="top_card">
<view class="">储值卡</view>
<view class="" @click="goCode()">
@ -17,10 +17,10 @@
NO.xxxxxxxxxxxxxxxxxx
</view> -->
</view>
<view class="card_1">
<view class="card_1" @click="goDetails('oilCard')">
<view class="top_card">
<view class="">囤油卡</view>
<view style="display: flex;">
<view style="display: flex;" @click="goCode()">
<view style="margin-right: 5px;">汽油92# 7.28/L</view>
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image>
</view>
@ -94,9 +94,9 @@
url: '/pagesHome/oilRecharge/oilRecharge?id=' + id
})
},
goDetails() {
goDetails(val) {
uni.navigateTo({
url: '/pagesHome/cardDetails/index'
url: '/pagesHome/cardDetails/index?type='+val
})
},
s_() {

View File

@ -1,15 +1,22 @@
<template>
<view class="centenr">
<view class="Candywrapper">
<view class="card_box">
<view class="card_box" v-if="type=='balance'">
<view class="r-size">储值卡</view>
<view style="margin-bottom: 10px;">当前余额</view>
<view class="r-num">{{cardBalance.cardBalance || 0}}</view>
</view>
<view class="card_box" v-if="type=='oilCard'">
<view class="r-size">囤油卡</view>
<view style="margin-bottom: 10px;">剩余升数L</view>
<view class="r-num">{{cardBalance.cardBalance || 0}}</view>
</view>
<view class="tab-bs">
<view class="w_box" @click="show1 = true">类型筛选 <u-icon name="arrow-down-fill"></u-icon> </view>
<view class="w_box" @click="show = true">全部时间 <u-icon name="arrow-down-fill"></u-icon> </view>
</view>
<!-- 储值卡 -->
<view v-if="type=='balance'">
<view class="bai_box" v-for="(item,index) in orderList" :key="index">
<view class="left-img">
<image src="../../static/icon/hyxf.png" mode="" v-if="item.changeType==0"></image>
@ -24,7 +31,7 @@
</view>
<view class="right-box">
<view class="">储值卡</view>
<view class="">余额{{item.afterTheChange}}</view>
<view class="">余额{{item.afterTheChange || 0}}</view>
</view>
<view class="right-box">
<view class="">{{item.storeName}}</view>
@ -36,25 +43,36 @@
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
</u-empty>
</view>
<!-- <view class="bai_box">
</view>
<!-- 囤油卡 -->
<view v-if="type=='oilCard'">
<view class="bai_box" v-for="(item,index) in oilCardList" :key="index">
<view class="left-img">
<image src="../../static/icon/hycz.png" mode=""></image>
<image src="../../static/icon/hyxf.png" mode="" v-if="item.changeType==0"></image>
<image src="../../static/icon/hycz.png" mode="" v-if="item.changeType==1"></image>
</view>
<view style="width: 85%;">
<view class="right-box">
<view class="l-text">会员充值</view>
<view class="r-text">-199.00</view>
<view class="l-text" v-if="item.changeType==0">会员消费</view>
<view class="l-text" v-if="item.changeType==1">会员充值</view>
<view class="r-text">{{item.balance || 0}}
</view>
</view>
<view class="right-box">
<view class="">储值</view>
<view class="">余额123456.98</view>
<view class="">囤油</view>
<view class="">余额{{item.afterTheChange || 0}}</view>
</view>
<view class="right-box">
<view class="">中建锦绣二期站</view>
<view class="">2024-09-09 16:45:09</view>
<view class="">{{item.storeName}}</view>
<view class="">{{item.createTime}}</view>
</view>
</view>
</view>
<view v-if="!oilCardList || oilCardList.length==0">
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
</u-empty>
</view>
</view>
</view> -->
<u-datetime-picker :show="show" v-model="value1" mode="year-month" @cancel="cancel1"
@confirm="confirm1"></u-datetime-picker>
<u-picker :show="show1" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
@ -67,6 +85,7 @@
export default {
data() {
return {
type: "balance",
query: {
chainStoreId: '',
couponType: '',
@ -86,37 +105,72 @@
pageSize: 30,
storeId: uni.getStorageSync('storeId'),
changeType: '',
startTime: ''
startTime: '',
createTime: ''
},
orderList: [],
total: 0
total: 0,
oilCardList: []
}
},
onLoad(e) {
this.type = e.type
if (this.type == 'oilCard') {
this.getOilCardList()
} else {
this.getOrderList()
}
},
onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance()
this.getOrderList()
},
onPullDownRefresh() {
console.log("刷新");
this.orderList = []
this.oilCardList = []
this.queryParams = {
pageNo: 1,
pageSize: 30,
storeId: uni.getStorageSync('storeId'),
changeType: '',
startTime: ''
startTime: '',
createTime: ''
}
if (this.type == 'oilCard') {
this.getOilCardList()
} else {
this.getOrderList()
}
},
onReachBottom() {
//
if (this.type == 'oilCard') {
if (this.oilCardList.length < this.total) {
this.queryParams.pageNo++
this.getOilCardList()
}
} else {
if (this.orderList.length < this.total) {
this.queryParams.pageNo++
this.getOrderList()
}
}
},
methods: {
getOilCardList() {
request({
url: '/business/marketingActivity/cardFuelChange/queryByPageUni',
method: 'get',
params: this.queryParams
}).then(res => {
if (res.code == 200) {
this.oilCardList = res.data.records
this.total = res.data.total
console.log(res, 130);
}
})
},
//
getOrderList() {
request({
@ -127,7 +181,6 @@
if (res.code == 200) {
this.orderList = res.data.records
this.total = res.data.total
console.log(res,130);
}
})
},
@ -152,7 +205,11 @@
} else {
this.queryParams.changeType = ""
}
if (this.type == 'oilCard') {
this.getOilCardList()
} else {
this.getOrderList()
}
this.show1 = false
},
cancel() {
@ -170,7 +227,11 @@
confirm1(e) {
this.queryParams.startTime = this.timestampToString(e.value)
this.queryParams.pageNo = 1
if (this.type == 'oilCard') {
this.getOilCardList()
} else {
this.getOrderList()
}
this.show = false
},
cancel1() {

View File

@ -3,16 +3,18 @@
<view class="top-box">
<view class="t-db">
<view class="d-s">
<view style="margin-right: 10px;">储值卡</view>
<view class="icon_">主卡</view>
<view style="margin-right: 10px;" v-if="type=='balance'">储值卡</view>
<view style="margin-right: 10px;" v-if="type=='oilCard'">囤油卡</view>
<view class="icon_" v-if="type=='balance'">主卡</view>
</view>
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image>
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; " @click="goCode()"></image>
</view>
<view class="on-title">可用余额</view>
<view class="on-num">¥{{cardBalance.cardBalance || 0}}</view>
<view class="d-a">
<view class="d-a" v-if="type=='balance'">
<view class="_dj">
<view class="" v-if="cardBalance.giveAmount">¥{{cardBalance.cardBalance - cardBalance.giveAmount}}</view>
<view class="" v-if="cardBalance.giveAmount">¥{{cardBalance.cardBalance - cardBalance.giveAmount}}
</view>
<view class="" v-else>¥{{cardBalance.cardBalance || 0}}</view>
<view style="font-size: 14px;">本金金额</view>
</view>
@ -125,6 +127,7 @@ import request from "../../utils/request";
export default {
data() {
return {
type: "balance",
query: {
chainStoreId: '',
couponType: '',
@ -139,18 +142,30 @@ export default {
equity: {}
}
},
onLoad(e) {
this.type = e.type
},
onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance()
this.getEquity()
},
methods: {
goCode() {
uni.navigateTo({
url: '/pagesHome/QRcode/QRcode'
})
},
//
getEquity() {
let type = this.type == 'oilCard' ? 1 : 0
request({
url: '/cardValueRule/getQyAndGz',
method: 'get',
params: {storeId:uni.getStorageSync("storeId")}
params: {
storeId: uni.getStorageSync("storeId"),
type: type
}
}).then(res => {
if (res.code == 200) {
this.equity = res.data
@ -161,7 +176,7 @@ export default {
//
goMemberRecharge() {
uni.navigateTo({
url: '/pagesHome/memberRecharge/index'
url: '/pagesHome/memberRecharge/index?type=' + this.type
})
},
getUserBalance() {
@ -186,7 +201,7 @@ export default {
},
godetail() {
uni.navigateTo({
url: '/pagesHome/cardDetails/detailed'
url: '/pagesHome/cardDetails/detailed?type=' + this.type
})
}
}

View File

@ -1,10 +1,15 @@
<template>
<view class="centenr">
<view class="vip-top">
<view class="vip-top" v-if="type=='balance'">
<view class="t-right">储值卡 <u-icon name="arrow-down-fill" color="#fff" size="12"></u-icon> </view>
<view class="t-title">当前余额</view>
<view class="t-num">{{cardBalance.cardBalance || 0}}</view>
</view>
<view class="vip-top" v-if="type=='oilCard'">
<view class="t-right">囤油卡 <u-icon name="arrow-down-fill" color="#fff" size="12"></u-icon> </view>
<view class="t-title">剩余油量L</view>
<view class="t-num">{{cardBalance.cardBalance || 0}}</view>
</view>
<view class="vip-title">
<view class="">{{storeName || "--"}}</view>
<!-- <image src="../../static/new/qh.png" style="width: 18px; height: 18px;" @click="show = true"></image> -->
@ -79,6 +84,7 @@ import request from '../../utils/request'
export default {
data() {
return {
type: 'balance',
show: false,
windex: 0,
storeId: uni.getStorageSync("storeId"),
@ -120,6 +126,13 @@ export default {
methods: {
//
goRecharge() {
if (this.type=='oilCard'){
uni.showToast({
icon:'error',
title:"暂未开发!"
})
return;
}
let _this = this
request({
url: 'business/marketingActivity/cardValueRecord',