2024-09-23 13:41:19 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<view class="container">
|
2024-09-23 17:39:15 +08:00
|
|
|
<view class="box-hang">
|
2024-09-28 18:04:43 +08:00
|
|
|
<input v-model="value" @input="queryList()" placeholder="输入姓名/手机号"></input>
|
2024-09-23 17:39:15 +08:00
|
|
|
<u-icon name="search" size="20"></u-icon>
|
2024-09-23 13:41:19 +08:00
|
|
|
</view>
|
|
|
|
|
2024-09-28 18:04:43 +08:00
|
|
|
<view class="top-box" v-for="(item,index) in memberList" :key="index" @click="goMemberInfo(item.id)">
|
2024-09-23 17:39:15 +08:00
|
|
|
<view class="t-db">
|
|
|
|
<view class="d-s">
|
2024-09-27 17:33:11 +08:00
|
|
|
<view style="margin-right: 10px;font-size: 14px;">{{item.name}}</view>
|
2024-09-28 18:04:43 +08:00
|
|
|
<view class="icon_" v-if="item.secondaryCardType && item.secondaryCardType==1">共享副卡-不限额</view>
|
|
|
|
<view class="icon_" v-if="item.secondaryCardType && item.secondaryCardType==2">共享副卡-限额</view>
|
|
|
|
<view class="icon_" v-if="item.secondaryCardType && item.secondaryCardType==3">独立副卡</view>
|
2024-09-27 17:33:11 +08:00
|
|
|
<view class="icon_" v-if="item.carNum">{{item.carNum}}</view>
|
2024-09-23 17:39:15 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2024-09-27 17:33:11 +08:00
|
|
|
<view class="on-title">{{item.remainingCreditLimit}}</view>
|
2024-09-23 17:39:15 +08:00
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="but-sub" @click="goAddFleet()">添加成员</view>
|
2024-09-23 13:41:19 +08:00
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import request from '../../utils/request';
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
title: '',
|
|
|
|
List: [],
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
totalPage: '',
|
2024-09-23 17:39:15 +08:00
|
|
|
value: '',
|
2024-09-28 18:04:43 +08:00
|
|
|
memberList: [],
|
|
|
|
fleetId: '',
|
|
|
|
list: []
|
2024-09-23 13:41:19 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onPullDownRefresh() {
|
|
|
|
//下拉刷新
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
},
|
|
|
|
onReachBottom() {
|
|
|
|
// 触底加载
|
|
|
|
if (this.pageNo >= this.totalPage) {
|
2024-09-23 17:39:15 +08:00
|
|
|
|
2024-09-23 13:41:19 +08:00
|
|
|
} else {
|
|
|
|
this.pageNo++
|
|
|
|
}
|
|
|
|
},
|
2024-09-28 18:04:43 +08:00
|
|
|
onLoad(e) {
|
|
|
|
if (e.fleetId) {
|
|
|
|
this.fleetId = e.fleetId
|
|
|
|
this.getList()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onShow() {
|
|
|
|
if (this.fleetId) {
|
|
|
|
this.getList()
|
|
|
|
}
|
|
|
|
},
|
2024-09-23 13:41:19 +08:00
|
|
|
components: {
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
2024-09-28 18:04:43 +08:00
|
|
|
goMemberInfo(id) {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pagesMy/fleetMember/member?memberId=' + id
|
|
|
|
})
|
|
|
|
},
|
|
|
|
queryList() {
|
|
|
|
if (this.value) {
|
|
|
|
let lists = []
|
|
|
|
this.list.forEach(item => {
|
|
|
|
if (item.name.includes(this.value)) {
|
|
|
|
lists.push(item);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (item.mobile.includes(this.value)) {
|
|
|
|
lists.push(item);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
this.memberList = lists
|
|
|
|
} else {
|
|
|
|
this.memberList = this.list
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getList() {
|
2024-09-27 17:33:11 +08:00
|
|
|
request({
|
|
|
|
url: '/fleetMember/nameOrMobile',
|
|
|
|
method: 'get',
|
2024-09-28 18:04:43 +08:00
|
|
|
params: {
|
|
|
|
fleetId: this.fleetId,
|
|
|
|
page: 1,
|
|
|
|
pageSize: 1000
|
2024-09-27 17:33:11 +08:00
|
|
|
}
|
|
|
|
}).then(res => {
|
|
|
|
this.memberList = res.data.records
|
2024-09-28 18:04:43 +08:00
|
|
|
this.list = res.data.records
|
2024-09-27 17:33:11 +08:00
|
|
|
})
|
|
|
|
},
|
2024-09-23 17:39:15 +08:00
|
|
|
goAddFleet() {
|
|
|
|
uni.navigateTo({
|
2024-09-28 18:04:43 +08:00
|
|
|
url: '/pagesMy/fleetMember/addMember?fleetId=' + this.fleetId
|
2024-09-23 17:39:15 +08:00
|
|
|
})
|
|
|
|
},
|
2024-09-23 13:41:19 +08:00
|
|
|
goback() {
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.content {
|
|
|
|
background: #f4f5f6;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
width: 100%;
|
|
|
|
height: 100vh;
|
|
|
|
box-sizing: border-box;
|
2024-09-23 17:39:15 +08:00
|
|
|
padding: 10px;
|
2024-09-23 13:41:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.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;
|
|
|
|
}
|
2024-09-23 17:39:15 +08:00
|
|
|
|
|
|
|
.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;
|
2024-09-24 08:52:56 +08:00
|
|
|
bottom: 40px;
|
|
|
|
left: 11%;
|
2024-09-23 17:39:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.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_ {
|
2024-09-28 18:04:43 +08:00
|
|
|
width: 80px;
|
2024-09-23 17:39:15 +08:00
|
|
|
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;
|
|
|
|
}
|
2024-09-23 13:41:19 +08:00
|
|
|
</style>
|