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() {
@ -165,12 +222,16 @@
const dateString = date.toLocaleDateString()
const timeString = date.toLocaleTimeString();
//
return date.getFullYear() + '-' + (date.getMonth()+1);
return date.getFullYear() + '-' + (date.getMonth() + 1);
},
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>
@ -121,10 +123,11 @@
</template>
<script>
import request from "../../utils/request";
export default {
import request from "../../utils/request";
export default {
data() {
return {
type: "balance",
query: {
chainStoreId: '',
couponType: '',
@ -135,33 +138,45 @@ export default {
ruleShow: false,
equityShow: false,
windex: 0,
cardBalance:{},
equity:{}
cardBalance: {},
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(){
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
console.log(res,'151');
console.log(res, '151');
}
})
},
//
goMemberRecharge() {
uni.navigateTo({
url: '/pagesHome/memberRecharge/index'
url: '/pagesHome/memberRecharge/index?type=' + this.type
})
},
getUserBalance() {
@ -186,21 +201,21 @@ export default {
},
godetail() {
uni.navigateTo({
url: '/pagesHome/cardDetails/detailed'
url: '/pagesHome/cardDetails/detailed?type=' + this.type
})
}
}
}
}
</script>
<style scoped lang="scss">
.centenr {
.centenr {
background: #F9F9F9;
width: 100%;
height: 100vh;
}
}
.top-box {
.top-box {
width: 95%;
height: 150px;
background: linear-gradient(135deg, #F77955 0%, #FFA360 100%, #F9C58C 100%);
@ -208,9 +223,9 @@ export default {
padding: 10px;
margin: 0 auto;
color: #fff;
}
}
.bottom-box {
.bottom-box {
width: 95%;
height: 70px;
background: #fff;
@ -218,24 +233,24 @@ export default {
align-items: center;
justify-content: center;
margin: 0 auto;
}
}
.t-db {
.t-db {
width: 100%;
color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
}
}
.b_box {
.b_box {
width: 95%;
margin: 15px auto;
background: #fff;
}
}
.g-box {
.g-box {
width: 100%;
box-sizing: border-box;
padding: 15px 10px;
@ -243,14 +258,14 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
}
}
.d-s {
.d-s {
display: flex;
align-items: center;
}
}
.or-aniu {
.or-aniu {
font-size: 14px;
color: #FA6400;
width: 195px;
@ -259,9 +274,9 @@ export default {
display: flex;
align-items: center;
justify-content: center;
}
}
.icon_ {
.icon_ {
width: 30px;
height: 16px;
background: rgba(255, 255, 255, 0.48);
@ -272,44 +287,44 @@ export default {
color: #fff;
font-weight: 500;
font-size: 10px;
}
}
.d-a {
.d-a {
width: 100%;
display: flex;
align-items: center;
justify-content: space-around;
}
}
.on-title {
.on-title {
font-size: 14px;
color: #FFFFFF;
width: 100%;
text-align: center;
}
}
.on-num {
.on-num {
font-size: 24px;
color: #FFFFFF;
width: 100%;
text-align: center;
margin: 10px auto;
}
}
._dj {
._dj {
font-size: 14px;
}
}
._tbox {
._tbox {
border-radius: 10px;
background: #fff;
width: 100%;
}
}
._btop {
._btop {
box-sizing: border-box;
padding: 15px;
border-bottom: 1px solid #EEEEEE;
@ -317,27 +332,27 @@ export default {
font-weight: 600;
font-size: 14px;
color: #333333;
}
}
._bbox {
._bbox {
box-sizing: border-box;
padding: 15px;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 18px;
}
}
.b_title {
.b_title {
font-weight: bold;
}
}
.b-cen {
.b-cen {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>

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> -->
@ -75,10 +80,11 @@
</template>
<script>
import request from '../../utils/request'
export default {
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',
@ -273,13 +286,13 @@ export default {
}
}
}
}
}
</script>
<style scoped lang="scss">
.centenr {}
.centenr {}
.vip-top {
.vip-top {
width: 95%;
height: 90px;
background: url('../../static/imgs/topback.png') no-repeat;
@ -290,28 +303,28 @@ export default {
color: #fff;
box-sizing: border-box;
padding: 10px;
}
}
.t-right {
.t-right {
display: flex;
width: 100%;
align-items: center;
justify-content: flex-end;
font-size: 14px;
}
}
.t-title {
.t-title {
font-size: 14px;
color: #FFFFFF;
margin-bottom: 5px;
}
}
.t-num {
.t-num {
font-size: 20px;
color: #FFFFFF;
}
}
.vip-title {
.vip-title {
width: 95%;
margin: 15px auto;
font-weight: bold;
@ -320,9 +333,9 @@ export default {
justify-content: space-between;
font-size: 16px;
color: #333333;
}
}
.n_input {
.n_input {
width: 95%;
height: 40px;
background: #FAFAFA;
@ -333,9 +346,9 @@ export default {
justify-content: space-between;
box-sizing: border-box;
padding-left: 10px;
}
}
.b_input {
.b_input {
width: 95%;
height: 40px;
background: #fff;
@ -344,21 +357,21 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
}
}
.input-box {
.input-box {
width: 95%;
margin: 15px auto;
}
}
.title-box {
.title-box {
border-top: 1px solid #EEEEEE;
border-bottom: 1px solid #EEEEEE;
box-sizing: border-box;
padding: 15px 10px;
}
}
.bottom_ {
.bottom_ {
width: 100%;
position: fixed;
bottom: 0px;
@ -368,17 +381,17 @@ export default {
display: flex;
align-items: center;
justify-content: center;
}
}
.wrap_box {
.wrap_box {
width: 95%;
margin: 15px auto;
display: flex;
flex-wrap: wrap;
}
}
.w_box {
.w_box {
width: 31%;
border: 1px solid #EEEEEE;
border-radius: 4px;
@ -389,9 +402,9 @@ export default {
font-size: 14px;
margin-bottom: 15px;
margin-right: 1%;
}
}
.anniu_ {
.anniu_ {
width: 80%;
height: 35px;
background: #FF9655;
@ -401,27 +414,27 @@ export default {
color: #fff;
border-radius: 50px;
color: #fff;
}
}
.i-title {
.i-title {
font-weight: 600;
font-size: 14px;
color: #333333;
margin-bottom: 15px;
}
}
.k-box {
.k-box {
width: 100%;
box-sizing: border-box;
padding: 15px 10px;
}
}
.acvit {
.acvit {
background: #FF9655 !important;
color: #fff !important;
}
}
.r-title {
.r-title {
border-left: 1px solid #eee;
width: 60px;
height: 100%;
@ -431,17 +444,17 @@ export default {
font-size: 14px;
color: #333333;
}
}
._tbox {
._tbox {
border-radius: 10px;
background: #fff;
width: 100%;
}
}
._btop {
._btop {
box-sizing: border-box;
padding: 15px;
border-bottom: 1px solid #EEEEEE;
@ -449,9 +462,9 @@ export default {
font-weight: 600;
font-size: 14px;
color: #333333;
}
}
.input_sou {
.input_sou {
width: 95%;
border: 1px solid #EEEEEE;
border-radius: 50px;
@ -461,9 +474,9 @@ export default {
box-sizing: border-box;
padding: 5px 10px;
margin: 15px auto;
}
}
.h_box {
.h_box {
border-bottom: 1px solid #EEEEEE;
box-sizing: border-box;
padding: 5px 15px;
@ -471,5 +484,5 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
}
}
</style>