This commit is contained in:
cun-nan 2024-09-20 09:07:19 +08:00
parent 5f5ff96bb9
commit e28b9e48bb
7 changed files with 169 additions and 45 deletions

View File

@ -3,7 +3,9 @@ package com.fuint.business.order.dto;
import com.fuint.business.order.entity.CardBalanceChange; import com.fuint.business.order.entity.CardBalanceChange;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
public class CardBalanceChangeDto extends CardBalanceChange { public class CardBalanceChangeDto extends CardBalanceChange {
private String startTime; private Date startTime;
} }

View File

@ -354,7 +354,7 @@ public class ClientBalanceController extends BaseController {
lambdaQueryWrapper.eq(CardBalanceChange::getChangeType, order.getChangeType()); lambdaQueryWrapper.eq(CardBalanceChange::getChangeType, order.getChangeType());
} }
if (ObjectUtil.isNotEmpty(order.getStartTime())) { if (ObjectUtil.isNotEmpty(order.getStartTime())) {
DateTime parse = DateUtil.parse(order.getStartTime(), DatePattern.NORM_MONTH_FORMATTER); DateTime parse = new DateTime(order.getStartTime());
DateTime dateTime = DateUtil.beginOfMonth(parse); DateTime dateTime = DateUtil.beginOfMonth(parse);
DateTime end = DateUtil.endOfMonth(parse); DateTime end = DateUtil.endOfMonth(parse);
lambdaQueryWrapper.between(CardBalanceChange::getCreateTime, dateTime, end); lambdaQueryWrapper.between(CardBalanceChange::getCreateTime, dateTime, end);

View File

@ -206,7 +206,6 @@
let staffId = ""; let staffId = "";
let userId = ""; let userId = "";
let type = ""; let type = "";
console.log(111);
if (str.includes("&")) { if (str.includes("&")) {
let arr = str.split("&"); let arr = str.split("&");
arr.forEach(item => { arr.forEach(item => {
@ -364,7 +363,7 @@
method: 'get', method: 'get',
params: params params: params
}).then(res => { }).then(res => {
console.log("11111" + res) console.log("366" + res)
if (res.code == 200 && res.data == 1) { if (res.code == 200 && res.data == 1) {
this.shows = true this.shows = true
} else { } else {
@ -383,7 +382,7 @@
chainStoreId: this.chainStoreId, chainStoreId: this.chainStoreId,
} }
}).then(res => { }).then(res => {
console.log("11111" + res) console.log("385" + res)
if (res.code == 200 && res.data == true) { if (res.code == 200 && res.data == true) {
this.shows = false this.shows = false
uni.showToast({ uni.showToast({
@ -413,7 +412,7 @@
url: 'business/marketingActivity/activeNewlyweds/applet', url: 'business/marketingActivity/activeNewlyweds/applet',
method: 'get', method: 'get',
}).then(res => { }).then(res => {
console.log("11111" + res) console.log("415" + res)
}) })
}, },
isExistStoreId() { isExistStoreId() {
@ -440,13 +439,13 @@
} }
}, },
fail(err) { fail(err) {
console.log('jujuel', err); console.log('jujuel,442', err);
}, },
complete(ress) { complete(ress) {
}, },
withSubscriptions(resx) { withSubscriptions(resx) {
console.log('4', resx); console.log('448', resx);
} }
}) })
@ -486,9 +485,6 @@
let that = this; let that = this;
uni.getStorageInfo({ uni.getStorageInfo({
success(res) { success(res) {
console.log(res)
console.log(res.keys);
console.log(res.limitSize);
let size = res.currentSize; let size = res.currentSize;
if (size < 1024) { if (size < 1024) {
that.storageSize = size + ' B'; that.storageSize = size + ' B';
@ -502,7 +498,7 @@
}, },
// tokenid // tokenid
async getTheJudgmentIsTheSame() { async getTheJudgmentIsTheSame() {
console.log(this.AppToken, 547); console.log(this.AppToken, 501);
// //
if (!this.AppToken) { if (!this.AppToken) {
return; return;
@ -549,7 +545,6 @@
scopes: 'auth_base', scopes: 'auth_base',
success: res => { success: res => {
const authCode = res.authCode; const authCode = res.authCode;
console.log(res)
request({ request({
url: "clientApi/sign/alipayLogin/getUserid2", url: "clientApi/sign/alipayLogin/getUserid2",
method: 'post', method: 'post',
@ -558,7 +553,6 @@
storeId: uni.getStorageSync("storeId"), storeId: uni.getStorageSync("storeId"),
}, },
}).then((resp) => { }).then((resp) => {
console.log(resp, 85412);
if (!resp.data) { if (!resp.data) {
uni.removeStorageSync("App-Token"); uni.removeStorageSync("App-Token");
} }
@ -629,7 +623,6 @@
}, },
}).then((response) => { }).then((response) => {
console.log(response, "2154");
// uni.showToast({ // uni.showToast({
// title:"121984:"+storeId // title:"121984:"+storeId
// }) // })
@ -639,7 +632,6 @@
_this.store = response.data.store _this.store = response.data.store
uni.setStorageSync("storeId", response.data.store.id) uni.setStorageSync("storeId", response.data.store.id)
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId) uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
console.log(uni.getStorageSync("chainStoreId"));
if (response.data.store.welfare) { if (response.data.store.welfare) {
if (response.data.store.welfare.includes(",")) { if (response.data.store.welfare.includes(",")) {
_this.welfare = response.data.store.welfare _this.welfare = response.data.store.welfare
@ -690,7 +682,6 @@
let params = { let params = {
storeId: uni.getStorageSync("storeId") storeId: uni.getStorageSync("storeId")
} }
console.log(uni.getStorageSync("storeId"));
request({ request({
url: 'business/petrolStationManagement/oilNumber/getList2', url: 'business/petrolStationManagement/oilNumber/getList2',
method: 'get', method: 'get',
@ -698,14 +689,12 @@
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.oilTypeList = res.data.records this.oilTypeList = res.data.records
// console.log("aaabbb", this.oilTypeList)
if (this.oilTypeList.length > 0) { if (this.oilTypeList.length > 0) {
this.oilInfo.oilName = this.oilTypeList[0].oilName, this.oilInfo.oilName = this.oilTypeList[0].oilName,
this.oilInfo.oilPrice = this.oilTypeList[0].oilPrice, this.oilInfo.oilPrice = this.oilTypeList[0].oilPrice,
this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice
} }
let oilData = [] let oilData = []
console.log(this.oilTypeList);
this.oilTypeList.forEach(res => { this.oilTypeList.forEach(res => {
let data = { let data = {
id: res.numberId, id: res.numberId,
@ -717,14 +706,14 @@
}) })
this.columns = [oilData] this.columns = [oilData]
console.log(this.oilTypeList, '728'); console.log(this.oilTypeList, '710');
} }
}) })
}, },
confirm(e) { confirm(e) {
console.log('选中的油号', e); console.log('选中的油号', e);
this.oilInfo.oilName = e.value[0].label, this.oilInfo.oilName = e.value[0].label
this.oilInfo.oilPrice = e.value[0].oilPrice, this.oilInfo.oilPrice = e.value[0].oilPrice
this.oilInfo.gbPrice = e.value[0].gbPrice this.oilInfo.gbPrice = e.value[0].gbPrice
this.show = false this.show = false

View File

@ -79,7 +79,7 @@
}, },
onShow() { onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId'); this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getCardFuleRecords(); // this.getCardFuleRecords();
this.getUserBalance() this.getUserBalance()
}, },
methods: { methods: {

View File

@ -4,38 +4,45 @@
<view class="card_box"> <view class="card_box">
<view class="r-size">储值卡</view> <view class="r-size">储值卡</view>
<view style="margin-bottom: 10px;">当前余额</view> <view style="margin-bottom: 10px;">当前余额</view>
<view class="r-num">123456.98</view> <view class="r-num">{{cardBalance.cardBalance || 0}}</view>
</view> </view>
<view class="tab-bs"> <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="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 class="w_box" @click="show = true">全部时间 <u-icon name="arrow-down-fill"></u-icon> </view>
</view> </view>
<view class="bai_box"> <view class="bai_box" v-for="(item,index) in orderList" :key="index">
<view class="left-img"> <view class="left-img">
<image src="../../static/icon/hyxf.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>
<view style="width: 85%;"> <view style="width: 85%;">
<view class="right-box"> <view class="right-box">
<view class="l-text">会员消费</view> <view class="l-text" v-if="item.changeType==0">会员消费</view>
<view class="r-text">-199.00</view> <view class="l-text" v-if="item.changeType==1">会员充值</view>
<view class="r-text">{{item.giveBalance ? (item.balance + item.giveBalance) : item.balance}}
</view>
</view> </view>
<view class="right-box"> <view class="right-box">
<view class="">储值卡</view> <view class="">储值卡</view>
<view class="">余额123456.98</view> <view class="">余额{{item.afterTheChange}}</view>
</view> </view>
<view class="right-box"> <view class="right-box">
<view class="">中建锦绣二期站</view> <view class="">{{item.storeName}}</view>
<view class="">2024-09-09 16:45:09</view> <view class="">{{item.createTime}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="bai_box"> <view v-if="!orderList || orderList.length==0">
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
</u-empty>
</view>
<!-- <view class="bai_box">
<view class="left-img"> <view class="left-img">
<image src="../../static/icon/hycz.png" mode=""></image> <image src="../../static/icon/hycz.png" mode=""></image>
</view> </view>
<view style="width: 85%;"> <view style="width: 85%;">
<view class="right-box"> <view class="right-box">
<view class="l-text">会员消费</view> <view class="l-text">会员充值</view>
<view class="r-text">-199.00</view> <view class="r-text">-199.00</view>
</view> </view>
<view class="right-box"> <view class="right-box">
@ -47,29 +54,124 @@
<view class="">2024-09-09 16:45:09</view> <view class="">2024-09-09 16:45:09</view>
</view> </view>
</view> </view>
</view> </view> -->
<u-datetime-picker :show="show" v-model="value1" mode="datetime" @cancel="cancel1"></u-datetime-picker> <u-datetime-picker :show="show" v-model="value1" mode="date" @cancel="cancel1"
<u-picker :show="show1" :columns="columns" @cancel="cancel"></u-picker> @confirm="confirm1"></u-datetime-picker>
<u-picker :show="show1" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import request from "../../utils/request";
export default { export default {
data() { data() {
return { return {
query: {
chainStoreId: '',
couponType: '',
useStatus: 0,
pageNo: 1,
pageSize: 10
},
cardBalance: {},
show: false, show: false,
show1: false, show1: false,
value1: Number(new Date()), value1: Number(new Date()),
columns: [ columns: [
['中国', '美国', '日本'] ['全部类型', '消费有礼', '会员充值']
], ],
queryParams: {
page: 1,
pageSize: 30,
storeId: uni.getStorageSync('storeId'),
changeType: '',
startTime: ''
},
orderList: [],
total: 0
}
},
onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance()
this.getOrderList()
},
onPullDownRefresh() {
console.log("刷新");
this.orderList = []
this.queryParams = {
page: 1,
pageSize: 30,
storeId: uni.getStorageSync('storeId'),
changeType: '',
startTime: ''
}
this.getOrderList()
},
onReachBottom() {
//
if (this.orderList.length < this.total) {
this.queryParams.page++
this.getOrderList()
} }
}, },
methods: { methods: {
//
getOrderList() {
request({
url: '/clientApi/balance/detail',
method: 'get',
params: this.queryParams
}).then(res => {
if (res.code == 200) {
this.orderList = res.data.content
this.total = res.data.totalElements
}
})
},
//
getUserBalance() {
request({
url: '/business/userManager/user/getUserBalanceApplet',
method: 'get',
params: this.query
}).then(res => {
if (res.code == 200) {
this.cardBalance = res.data
}
})
},
confirm(e) {
this.queryParams.page = 1
if (e.indexs[0] == 1) {
this.queryParams.changeType = 0
} else if (e.indexs[0] == 2) {
this.queryParams.changeType = 1
} else {
this.queryParams.changeType = ""
}
this.getOrderList()
this.show1 = false
},
cancel() { cancel() {
this.show1 = false this.show1 = false
}, },
timestampToString(timestamp) {
// Date
const date = new Date(timestamp);
// 使toLocaleDateStringtoLocaleTimeString
const dateString = date.toLocaleDateString()
const timeString = date.toLocaleTimeString();
//
return dateString;
},
confirm1(e) {
this.queryParams.startTime = this.timestampToString(e.value)
this.queryParams.page = 1
this.getOrderList()
this.show = false
},
cancel1() { cancel1() {
this.show = false this.show = false
} }

View File

@ -9,20 +9,21 @@
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image> <image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image>
</view> </view>
<view class="on-title">可用余额</view> <view class="on-title">可用余额</view>
<view class="on-num">¥123456.98</view> <view class="on-num">¥{{cardBalance.cardBalance || 0}}</view>
<view class="d-a"> <view class="d-a">
<view class="_dj"> <view class="_dj">
<view class="">10909.00</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 style="font-size: 14px;">本金金额</view>
</view> </view>
<view class="_dj"> <view class="_dj">
<view class="">10909.00</view> <view class="">¥{{cardBalance.giveAmount || 0}}</view>
<view style="font-size: 14px;">赠送金额</view> <view style="font-size: 14px;">赠送金额</view>
</view> </view>
</view> </view>
</view> </view>
<view class="bottom-box"> <view class="bottom-box">
<view class="or-aniu">立即充值</view> <view class="or-aniu" @click="goMemberRecharge()">立即充值</view>
</view> </view>
<view class="b_box"> <view class="b_box">
<view class="g-box" @click="godetail()"> <view class="g-box" @click="godetail()">
@ -114,15 +115,45 @@
</template> </template>
<script> <script>
import request from "../../utils/request";
export default { export default {
data() { data() {
return { return {
query: {
chainStoreId: '',
couponType: '',
useStatus: 0,
pageNo: 1,
pageSize: 10
},
ruleShow: false, ruleShow: false,
equityShow: false, equityShow: false,
windex: 0 windex: 0,
cardBalance:{}
} }
}, },
onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance()
},
methods: { methods: {
//
goMemberRecharge() {
uni.navigateTo({
url: '/pagesHome/memberRecharge/index'
})
},
getUserBalance() {
request({
url: '/business/userManager/user/getUserBalanceApplet',
method: 'get',
params: this.query
}).then(res => {
if (res.code == 200) {
this.cardBalance = res.data
}
})
},
ruleclose() { ruleclose() {
this.ruleShow = false this.ruleShow = false
}, },

View File

@ -5,10 +5,10 @@
<view class="t-title">当前余额</view> <view class="t-title">当前余额</view>
<view class="t-num">123456.98</view> <view class="t-num">123456.98</view>
</view> </view>
<view class="vip-title"> <!-- <view class="vip-title">
<view class="">中建锦绣二期站</view> <view class="">中建锦绣二期站</view>
<image src="../../static/new/qh.png" style="width: 18px; height: 18px;" @click="show = true"></image> <image src="../../static/new/qh.png" style="width: 18px; height: 18px;" @click="show = true"></image>
</view> </view> -->
<view class="input-box"> <view class="input-box">
<view class="i-title">充值金额</view> <view class="i-title">充值金额</view>
<view class="n_input"> <view class="n_input">