Merge remote-tracking branch 'origin/main'

This commit is contained in:
xvv 2024-09-23 17:42:03 +08:00
commit 5e8783b763
8 changed files with 690 additions and 16 deletions

View File

@ -0,0 +1,372 @@
<template>
<view class="centenr">
<view class="Candywrapper">
<view class="tab-box">
<view class="tab_" :class="{active:index== type }" @click="getindex(index)"
v-for="(item,index) in tabs" :key="index">
{{ item.name }}
</view>
</view>
<view v-if="type==0">
<view class="card_box">
<view style="margin: 13px 0px;">可用余额</view>
<view class="r-num">1299.00</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 class="bai_box">
<view class="left-img">
<!-- <image src="../../static/icon/hyxf.png" mode=""></image> -->
<image src="../../static/icon/jfdh.png" mode=""></image>
</view>
<view style="width: 85%;">
<view class="right-box">
<view class="l-text">积分兑换</view>
<view class="r-text">900</view>
</view>
<view class="right-box">
<view class="">储值卡</view>
<view class="">余额120000.00</view>
</view>
<view class="right-box">
<view class="">中建锦绣二期店</view>
<view class="">2024-09-09 16:54:09</view>
</view>
</view>
</view>
<view class="bai_box">
<view class="left-img">
<image src="../../static/icon/hycz.png" mode=""></image>
</view>
<view style="width: 85%;">
<view class="right-box">
<view class="l-text">会员充值</view>
<view class="r-text">900</view>
</view>
<view class="right-box">
<view class="">储值卡</view>
<view class="">余额120000.00</view>
</view>
<view class="right-box">
<view class="">中建锦绣二期店</view>
<view class="">2024-09-09 16:54:09</view>
</view>
</view>
</view>
<view class="bai_box">
<view class="left-img">
<image src="../../static/icon/yp.png" mode=""></image>
</view>
<view style="width: 85%;">
<view class="right-box">
<view class="l-text">油品</view>
<view class="r-text">900</view>
</view>
<view class="right-box">
<view class="">储值卡</view>
<view class="">余额120000.00</view>
</view>
<view class="right-box">
<view class="">中建锦绣二期店</view>
<view class="">2024-09-09 16:54:09</view>
</view>
</view>
</view>
<!-- <view v-if="!pointsList || pointsList.length==0">
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
</u-empty>
</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>
</view>
<view v-if="type==1">
<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 class="bai_box">
<view class="left-img">
<image src="../../static/icon/hyxf.png" mode=""></image>
</view>
<view style="width: 85%;">
<view class="right-box">
<view class="l-text">额度增加</view>
<view class="r-text">+2000.00</view>
</view>
<view class="right-box">
<view class="">小小156****6655</view>
<view class="">当前额度0.00</view>
</view>
<view class="right-box">
<view class="">操作人问问</view>
<view class="">2024-09-09 16:54:09</view>
</view>
</view>
</view>
<!-- <view v-if="!pointsList || pointsList.length==0">
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
</u-empty>
</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>
</view>
</view>
</view>
</template>
<script>
import request from '../../utils/request'
export default {
data() {
return {
tabs: [{
name: '余额明细',
}, {
name: '额度明细',
}, ],
type: 0,
query: {
chainStoreId: '',
couponType: '',
useStatus: 0,
pageNo: 1,
pageSize: 10
},
cardBalance: {},
show: false,
show1: false,
value1: Number(new Date()),
columns: [
['全部类型', '油品', '积分兑换', '会员充值']
],
queryParams: {
pageNo: 1,
pageSize: 30,
type: "",
storeId: uni.getStorageSync("storeId"),
changeReason: "",
startTime: ""
},
pointsList: [],
total: 0
}
},
onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance()
this.getList()
},
onPullDownRefresh() {
console.log("刷新");
this.pointsList = []
this.queryParams = {
pageNo: 1,
pageSize: 30,
type: "",
storeId: uni.getStorageSync("storeId"),
changeReason: "",
startTime: ""
}
this.getList()
},
onReachBottom() {
//
if (this.pointsList.length < this.total) {
this.queryParams.pageNo++
this.getList()
}
},
methods: {
getindex(index) {
this.type = index
},
//
getUserBalance() {
request({
url: '/business/userManager/user/getUserBalanceApplet',
method: 'get',
params: this.query
}).then(res => {
if (res.code == 200) {
this.cardBalance = res.data
}
})
},
getList() {
request({
url: '/business/integral/integralDetail/queryByPageUni',
method: 'get',
params: this.queryParams
}).then(res => {
if (res.code == 200) {
this.pointsList = res.data.records
this.total = res.data.total
}
})
},
confirm(e) {
this.queryParams.pageNo = 1
if (e.value[0] == '全部类型') {
this.queryParams.type = ""
} else {
this.queryParams.type = e.value[0]
}
this.getList()
this.show1 = false
},
cancel() {
this.show1 = false
},
timestampToString(timestamp) {
// Date
const date = new Date(timestamp);
// 使toLocaleDateStringtoLocaleTimeString
const dateString = date.toLocaleDateString()
const timeString = date.toLocaleTimeString();
//
return date.getFullYear() + '-' + (date.getMonth() + 1);
},
confirm1(e) {
this.queryParams.startTime = this.timestampToString(e.value)
this.queryParams.pageNo = 1
this.getList()
this.show = false
},
cancel1() {
this.show = false
}
}
}
</script>
<style scoped lang="scss">
.centenr {
width: 100%;
height: 100vh;
background: #F9F9F9;
}
.Candywrapper {
background: #F9F9F9;
box-sizing: border-box;
padding: 10px;
}
.card_box {
width: 100%;
height: 90px;
background: url('../../static/imgs/zj.png') no-repeat;
background-size: 100% 100%;
box-sizing: border-box;
padding: 10px;
color: #fff;
font-size: 14px;
}
.r-size {
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.r-num {
font-weight: 600;
font-size: 20px;
color: #FFFFFF;
}
.tab-bs {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
margin: 15px auto;
}
.w_box {
width: 50%;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 15px;
}
.bai_box {
width: 100%;
box-sizing: border-box;
padding: 15px 10px;
background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
}
.left-img {
margin-right: 10px;
image {
width: 40px;
height: 40px;
}
}
.right-box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 12px;
color: #666666;
}
.l-text {
font-size: 16px;
color: #333333;
margin-bottom: 5px;
font-weight: bold;
}
.r-text {
font-size: 16px;
color: #333333;
margin-bottom: 5px;
font-weight: bold;
}
.tab-box {
width: 100%;
height: 40px;
background: #fff;
display: flex;
box-sizing: border-box;
margin-bottom: 25px;
justify-content: center;
}
.tab_ {
width: 75px;
height: 100%;
//border-bottom: 2px solid #FF770F;
display: flex;
font-weight: 500;
font-size: 14px;
color: #999999;
align-items: center;
justify-content: center;
margin-left: 50px;
cursor: pointer;
}
.active {
border-bottom: 2px solid #FF770F !important;
color: #FF770F !important;
}
</style>

View File

@ -164,6 +164,8 @@
color: white;
border-radius: 50px;
text-align: center;
margin-top: 40vh;
position: absolute;
bottom: 60px;
left: 10%;
}
</style>

View File

@ -165,6 +165,8 @@
color: white;
border-radius: 50px;
text-align: center;
margin-top: 40vh;
position: absolute;
bottom: 60px;
left: 10%;
}
</style>

View File

@ -185,6 +185,8 @@
color: white;
border-radius: 50px;
text-align: center;
margin-top: 20vh;
position: absolute;
bottom: 60px;
left: 10%;
}
</style>

View File

@ -1,12 +1,23 @@
<template>
<view class="content">
<view class="container">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">样版页</view>
<view class="my-icons"></view>
<view class="box-hang">
<input v-model="value" placeholder="输入姓名/手机号"></input>
<u-icon name="search" size="20"></u-icon>
</view>
<view class="top-box">
<view class="t-db">
<view class="d-s">
<view style="margin-right: 10px;font-size: 14px;">小明</view>
<view class="icon_">共享-限制</view>
<view class="icon_">鲁A123456</view>
</view>
</view>
<view class="on-title">342.55</view>
</view>
<view class="but-sub" @click="goAddFleet()">添加成员</view>
</view>
@ -23,11 +34,10 @@
pageNo: 1,
pageSize: 10,
totalPage: '',
value: '',
}
},
onLoad() {
},
onLoad() {},
onPullDownRefresh() {
//
uni.stopPullDownRefresh()
@ -35,10 +45,7 @@
onReachBottom() {
//
if (this.pageNo >= this.totalPage) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.pageNo++
}
@ -48,7 +55,11 @@
},
methods: {
goAddFleet() {
uni.navigateTo({
url: '/pagesMy/fleetMember/addMember'
})
},
goback() {
uni.navigateBack()
}
@ -65,7 +76,7 @@
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 88px;
padding: 10px;
}
.my-header {
@ -89,4 +100,65 @@
position: fixed;
top: 0px;
}
.but-sub {
width: 305px;
height: 40px;
line-height: 40px;
margin: 0 auto;
background-color: #FF9655;
color: white;
border-radius: 50px;
text-align: center;
position: absolute;
bottom: 60px;
left: 10%;
}
.box-hang {
width: 100%;
height: 35px;
display: flex;
justify-content: space-between;
box-sizing: border-box;
align-items: center;
padding: 0 15px;
background: #ffffff;
border-radius: 40px;
}
.top-box {
width: 100%;
height: 70px;
background: linear-gradient(135deg, #F77955 0%, #FFA360 100%, #F9C58C 100%);
box-sizing: border-box;
padding: 10px;
margin: 0 auto;
color: #fff;
margin-top: 10px;
}
.icon_ {
width: 60px;
height: 16px;
background: rgba(255, 255, 255, 0.48);
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 500;
font-size: 10px;
margin-right: 10px;
}
.on-title {
font-size: 20px;
color: #fff;
margin-top: 10px;
}
.d-s {
display: flex;
}
</style>

View File

@ -0,0 +1,224 @@
<template>
<view class="content">
<view class="container">
<view class="top-box">
<view class="t-db">
<view class="d-s">
<view style="margin-right: 10px;font-size: 14px;">小明</view>
<view class="icon_">共享-限制</view>
<view class="icon_">鲁A123456</view>
</view>
</view>
<view class="on-title">342.55</view>
</view>
<view class="box-hang" style="margin-top: 10px;">
<view class="">编辑信息</view>
<view class="dis">
<uni-icons type="right" size="16"></uni-icons>
</view>
</view>
<view class="box-wai">
<view class="">副卡额度</view>
<view class="box-hang1" style="margin-top: 10px;">
<view class="">342.55</view>
<view class="tiao-z" @click="goFleetLimit()">
调整
</view>
</view>
</view>
<view class="box-hang" style="margin-top: 10px;">
<view class=""><span style="color: red;">*</span>是否开启消费通知</view>
<view class="dis">
<u-switch v-model="value1" activeColor="#6DD400" inactiveColor="rgb(230, 230, 230)"></u-switch>
</view>
</view>
<view class="box-hang">
<view class=""><span style="color: red;">*</span>是否启用</view>
<view class="dis">
<u-switch v-model="value2" activeColor="#6DD400" inactiveColor="rgb(230, 230, 230)"></u-switch>
</view>
</view>
<view class="but-sub" @click="show=!show">注销副卡</view>
<u-modal :show="show" :title="title" :content='content' :showCancelButton='true' @confirm="confirm"
@cancel="cancel" confirmColor="#FA6400"></u-modal>
</view>
</view>
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
title: '',
List: [],
pageNo: 1,
pageSize: 10,
totalPage: '',
value: '',
value1: true,
value2: true,
show: false,
title: "注销副卡",
content: '成员一经注销,将无法进行恢复,请谨慎操作,以免影响正常使用!'
}
},
onLoad() {},
onPullDownRefresh() {
//
uni.stopPullDownRefresh()
},
onReachBottom() {
//
if (this.pageNo >= this.totalPage) {
} else {
this.pageNo++
}
},
components: {
},
methods: {
goFleetLimit(){
uni.navigateTo({
url: '/pagesMy/fleetLimit/index'
})
},
confirm() {
this.show = false
},
cancel() {
this.show = false
},
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 10px;
}
.my-header {
width: 100%;
height: 88px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
z-index: 99999;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
.but-sub {
width: 305px;
height: 40px;
line-height: 40px;
margin: 0 auto;
background-color: #FF9655;
color: white;
border-radius: 50px;
text-align: center;
margin-top: 57px;
}
.box-wai {
background-color: white;
width: 100%;
box-sizing: border-box;
padding: 15px 15px;
border-bottom: 1px solid #f4f5f6;
margin-top: 10px;
}
.box-hang1 {
background-color: white;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}
.tiao-z {
background: #E02020;
color: #fff;
width: 50px;
height: 20px;
border-radius: 20px;
text-align: center;
font-size: 14px;
}
.box-hang {
background-color: white;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 15px 15px;
border-bottom: 1px solid #f4f5f6;
}
.top-box {
width: 96%;
height: 70px;
background: linear-gradient(135deg, #F77955 0%, #FFA360 100%, #F9C58C 100%);
box-sizing: border-box;
padding: 10px;
margin: 0 auto;
color: #fff;
}
.icon_ {
width: 60px;
height: 16px;
background: rgba(255, 255, 255, 0.48);
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 500;
font-size: 10px;
margin-right: 10px;
}
.on-title {
font-size: 20px;
color: #fff;
margin-top: 10px;
}
.d-s {
display: flex;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB