团队管理和下级用户抽佣明细的输入框搜索功能

This commit is contained in:
2025-06-10 09:14:39 +08:00
parent c0c6b5b61a
commit 7d63133f54
9 changed files with 76 additions and 54 deletions

View File

@ -22,9 +22,8 @@
<!-- 手机号输入 -->
<view class="flex-col self-stretch">
<view class="flex-col justify-start relative section parentstyle ">
<view class='centerStyle'>
<input style="font-size: 30.25rpx;"
<view class="flex-col justify-start relative section">
<input
class="flex-col justify-start items-start text-wrapper view input"
placeholder="请输入手机号"
maxlength="11"
@ -32,8 +31,6 @@
model:value="{{phone}}"
bindinput="onPhoneInput"
/>
<image src='{{defaultType? "": ""}}' class='imageStyle' bindtap='eyeStatus'></image>
</view>
</view>
<!-- 密码 / 验证码 输入 + 获取验证码按钮 -->

View File

@ -63,10 +63,13 @@
margin-left: 16.88rpx;
margin-right: 16.88rpx;
}
.view {
padding: 15.92rpx 0 12.64rpx;
background-color: #ffffff00;
}
.section_2 {
margin-right: 4.93rpx;
padding: 12.63rpx 16.88rpx 9.75rpx;
padding: 20.63rpx 16.88rpx 18.75rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
@ -158,28 +161,3 @@
width: 37.5rpx;
height: 37.5rpx;
}
.parentstyle {
/* display: flex; */
/* align-items: center; */
/* border: 1rpx solid #e0e0e0; */
border-radius: 10rpx;
/* box-shadow: 0 0 5rpx #e0e0e0; */
/* margin: 30rpx 38px; */
/* padding: 20rpx; */
}
.parentstyle .imageStyle {
width: 41rpx;
height: 41rpx;
margin-right: 20rpx;
}
.parentstyle .centerStyle {
display: flex;
flex: 1;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
}

View File

@ -42,14 +42,13 @@ Page({
success(res) {
// console.log('后端返回---->',res.data);
// 成功的回调
wx.showToast({
title: '更新成功',
icon: 'success',
});
// 这里可以跳转到其他页面
wx.navigateTo({
url: '/pages/personCenter/withdrawalAccount/withdrawalAccount',
});
if (res.data.code === 1) {
wx.showToast({
title: '更新成功',
icon: 'success',
});
wx.navigateBack({});
}
},
fail(err) {
// 失败的回调

View File

@ -37,6 +37,7 @@
border-radius: 10rpx;
}
.text_3 {
width: 90%;
margin-left: 27.52rpx;
}
.font {
@ -60,13 +61,14 @@
border-radius: 10rpx;
}
.text_12 {
width: 90%;
margin-left: 25.8rpx;
}
.group_4 {
line-height: 28.09rpx;
}
.text_1 {
width: 400rpx;
width: 90%;
margin-left: 27.82rpx;
}
.group_5 {
@ -76,6 +78,7 @@
line-height: 28.21rpx;
}
.text_5 {
width: 90%;
margin-left: 26.74rpx;
}
.font_4 {
@ -98,5 +101,6 @@
width: 248.09rpx;
}
.text_8 {
line-height: 100%;
color: #ffffff;
}

View File

@ -18,8 +18,29 @@ Page({
nowAgentUnitPrice: 0, // 现在的‘代理单价’,用于传给弹窗
nowProjectDetailName: '', // 现在的‘项目详细名称’,用于传给弹窗
isSub: true, // 用于区分是项目抽佣页面还是单个用户抽佣页面
searchText: '',
tempSubCommissionList: []
},
// 输入框内容变化时更新数据
onInput(e) {
this.setData({
searchText: e.detail.value, // 获取用户输入的关键字
});
},
onSearch() {
let searchValue = this.data.searchText; // 获取输入框的值
let subCommissionList = this.data.subCommissionList
// 筛选出 salespersonName 包含 searchText 的项
let filtered = subCommissionList.filter(item =>
item.subUserNickName.includes(searchValue)
);
this.setData({
tempSubCommissionList: filtered
})
},
// 点击“设价”按钮,显示弹窗
showCommissionRatePop(e) {
console.log('弹窗传值----->',e);
@ -59,7 +80,8 @@ Page({
console.log('下级抽佣列表----->',res.data.data);
if (res.data.code === 1) {
this.setData({
subCommissionList: res.data.data
subCommissionList: res.data.data,
tempSubCommissionList: res.data.data
})
}
}

View File

@ -7,11 +7,11 @@
class="image"
src="./images/ss.png"
/>
<input class="font text_2 ml-7" placeholder="请输入关键字" />
<input class="font text_2 ml-7" placeholder="请输入关键字" bindinput="onInput" confirm-type="search" bindconfirm="onSearch" value="{{searchText}}"/>
</view>
</view>
<view class="flex-col mt-16">
<view class="flex-col list-item_1 mt-23" wx:for="{{ subCommissionList }}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-col list-item_1 mt-23" wx:for="{{ tempSubCommissionList }}" wx:for-item="item" wx:for-index="index" wx:key="index">
<text class="self-start font_2 text_3">结算标准:{{ item.subUserNickName }}</text>
<view class="flex-col self-stretch section_3 mt-17">
<view class="flex-row justify-between items-center">

View File

@ -41,7 +41,7 @@
height: 35.63rpx;
}
.text_2 {
color: #999999;
color: #323232;
line-height: 27.96rpx;
}
.list-item_1 {

View File

@ -8,10 +8,12 @@ Page({
*/
data: {
directAgentSize: 0, // 直接代理人数
teamSize: null, // 团队人数
teamEarnings: null, // 团队收益
teamSize: '', // 团队人数
teamEarnings: '', // 团队收益
invitationCode: "", // 邀请码
userMemberInfoVOList: [] // 成员列表
userMemberInfoVOList: [], // 成员列表
searchText: '',
tempUserMemberInfoVOList: [],
},
// 获取团队成员信息
@ -23,19 +25,39 @@ Page({
Authorization: wx.getStorageSync('token')
},
success: res => {
console.log('团队成员信息---->',res.data.data);
// console.log('团队成员信息---->',res.data.data);
let result = res.data.data
this.setData({
directAgentSize: result.directAgentSize,
teamSize: result.teamSize,
teamEarnings: result.teamEarnings,
invitationCode: result.invitationCode,
userMemberInfoVOList: result.userMemberInfoVOList
userMemberInfoVOList: result.userMemberInfoVOList,
tempUserMemberInfoVOList: result.userMemberInfoVOList
})
}
})
},
// 输入框内容变化时更新数据
onInput(e) {
this.setData({
searchText: e.detail.value, // 获取用户输入的关键字
});
},
onSearch() {
let searchValue = this.data.searchText; // 获取输入框的值
let userMemberList = this.data.userMemberInfoVOList
// 筛选出 salespersonName 包含 searchText 的项
let filtered = userMemberList.filter(item =>
item.nickName.includes(searchValue)
);
this.setData({
tempUserMemberInfoVOList: filtered
})
},
// 复制邀请码到剪贴板
copyInvitationCode() {
wx.setClipboardData({

View File

@ -44,13 +44,13 @@
class="image_4"
src="./images/ss.png"
/>
<input class="font text_8 ml-4" placeholder="请输入关键字"/>
<input class="font text_8 ml-4" placeholder="请输入关键字" bindinput="onInput" confirm-type="search" bindconfirm="onSearch" value="{{searchText}}"/>
</view>
</view>
<view class="flex-col list mt-13">
<view
class="flex-row items-center relative group_6"
wx:for="{{userMemberInfoVOList}}"
wx:for="{{tempUserMemberInfoVOList}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"