团队管理和下级用户抽佣明细的输入框搜索功能
This commit is contained in:
@ -22,9 +22,8 @@
|
|||||||
|
|
||||||
<!-- 手机号输入 -->
|
<!-- 手机号输入 -->
|
||||||
<view class="flex-col self-stretch">
|
<view class="flex-col self-stretch">
|
||||||
<view class="flex-col justify-start relative section parentstyle ">
|
<view class="flex-col justify-start relative section">
|
||||||
<view class='centerStyle'>
|
<input
|
||||||
<input style="font-size: 30.25rpx;"
|
|
||||||
class="flex-col justify-start items-start text-wrapper view input"
|
class="flex-col justify-start items-start text-wrapper view input"
|
||||||
placeholder="请输入手机号"
|
placeholder="请输入手机号"
|
||||||
maxlength="11"
|
maxlength="11"
|
||||||
@ -32,13 +31,11 @@
|
|||||||
model:value="{{phone}}"
|
model:value="{{phone}}"
|
||||||
bindinput="onPhoneInput"
|
bindinput="onPhoneInput"
|
||||||
/>
|
/>
|
||||||
<image src='{{defaultType? "": ""}}' class='imageStyle' bindtap='eyeStatus'></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 密码 / 验证码 输入 + 获取验证码按钮 -->
|
<!-- 密码 / 验证码 输入 + 获取验证码按钮 -->
|
||||||
<view class="flex-row items-center section_2 mt-21">
|
<view class="flex-row items-center section_2 mt-21">
|
||||||
<input
|
<input
|
||||||
class="flex-col justify-start items-start text-wrapper_2 view_2 input_1"
|
class="flex-col justify-start items-start text-wrapper_2 view_2 input_1"
|
||||||
placeholder="{{ loginType==='password' ? '请输入密码' : '请输入验证码' }}"
|
placeholder="{{ loginType==='password' ? '请输入密码' : '请输入验证码' }}"
|
||||||
password="{{ loginType==='password' }}"
|
password="{{ loginType==='password' }}"
|
||||||
|
@ -63,10 +63,13 @@
|
|||||||
margin-left: 16.88rpx;
|
margin-left: 16.88rpx;
|
||||||
margin-right: 16.88rpx;
|
margin-right: 16.88rpx;
|
||||||
}
|
}
|
||||||
|
.view {
|
||||||
|
padding: 15.92rpx 0 12.64rpx;
|
||||||
|
background-color: #ffffff00;
|
||||||
|
}
|
||||||
.section_2 {
|
.section_2 {
|
||||||
margin-right: 4.93rpx;
|
margin-right: 4.93rpx;
|
||||||
padding: 12.63rpx 16.88rpx 9.75rpx;
|
padding: 20.63rpx 16.88rpx 18.75rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 9.38rpx;
|
border-radius: 9.38rpx;
|
||||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||||
@ -157,29 +160,4 @@
|
|||||||
.checkbox .wx-checkbox-input {
|
.checkbox .wx-checkbox-input {
|
||||||
width: 37.5rpx;
|
width: 37.5rpx;
|
||||||
height: 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;
|
|
||||||
}
|
|
||||||
|
|
@ -42,14 +42,13 @@ Page({
|
|||||||
success(res) {
|
success(res) {
|
||||||
// console.log('后端返回---->',res.data);
|
// console.log('后端返回---->',res.data);
|
||||||
// 成功的回调
|
// 成功的回调
|
||||||
wx.showToast({
|
if (res.data.code === 1) {
|
||||||
title: '更新成功',
|
wx.showToast({
|
||||||
icon: 'success',
|
title: '更新成功',
|
||||||
});
|
icon: 'success',
|
||||||
// 这里可以跳转到其他页面
|
});
|
||||||
wx.navigateTo({
|
wx.navigateBack({});
|
||||||
url: '/pages/personCenter/withdrawalAccount/withdrawalAccount',
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
// 失败的回调
|
// 失败的回调
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
.text_3 {
|
.text_3 {
|
||||||
|
width: 90%;
|
||||||
margin-left: 27.52rpx;
|
margin-left: 27.52rpx;
|
||||||
}
|
}
|
||||||
.font {
|
.font {
|
||||||
@ -60,13 +61,14 @@
|
|||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
.text_12 {
|
.text_12 {
|
||||||
|
width: 90%;
|
||||||
margin-left: 25.8rpx;
|
margin-left: 25.8rpx;
|
||||||
}
|
}
|
||||||
.group_4 {
|
.group_4 {
|
||||||
line-height: 28.09rpx;
|
line-height: 28.09rpx;
|
||||||
}
|
}
|
||||||
.text_1 {
|
.text_1 {
|
||||||
width: 400rpx;
|
width: 90%;
|
||||||
margin-left: 27.82rpx;
|
margin-left: 27.82rpx;
|
||||||
}
|
}
|
||||||
.group_5 {
|
.group_5 {
|
||||||
@ -76,6 +78,7 @@
|
|||||||
line-height: 28.21rpx;
|
line-height: 28.21rpx;
|
||||||
}
|
}
|
||||||
.text_5 {
|
.text_5 {
|
||||||
|
width: 90%;
|
||||||
margin-left: 26.74rpx;
|
margin-left: 26.74rpx;
|
||||||
}
|
}
|
||||||
.font_4 {
|
.font_4 {
|
||||||
@ -98,5 +101,6 @@
|
|||||||
width: 248.09rpx;
|
width: 248.09rpx;
|
||||||
}
|
}
|
||||||
.text_8 {
|
.text_8 {
|
||||||
|
line-height: 100%;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
@ -18,8 +18,29 @@ Page({
|
|||||||
nowAgentUnitPrice: 0, // 现在的‘代理单价’,用于传给弹窗
|
nowAgentUnitPrice: 0, // 现在的‘代理单价’,用于传给弹窗
|
||||||
nowProjectDetailName: '', // 现在的‘项目详细名称’,用于传给弹窗
|
nowProjectDetailName: '', // 现在的‘项目详细名称’,用于传给弹窗
|
||||||
isSub: true, // 用于区分是项目抽佣页面还是单个用户抽佣页面
|
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) {
|
showCommissionRatePop(e) {
|
||||||
console.log('弹窗传值----->',e);
|
console.log('弹窗传值----->',e);
|
||||||
@ -59,7 +80,8 @@ Page({
|
|||||||
console.log('下级抽佣列表----->',res.data.data);
|
console.log('下级抽佣列表----->',res.data.data);
|
||||||
if (res.data.code === 1) {
|
if (res.data.code === 1) {
|
||||||
this.setData({
|
this.setData({
|
||||||
subCommissionList: res.data.data
|
subCommissionList: res.data.data,
|
||||||
|
tempSubCommissionList: res.data.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
class="image"
|
class="image"
|
||||||
src="./images/ss.png"
|
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>
|
</view>
|
||||||
<view class="flex-col mt-16">
|
<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>
|
<text class="self-start font_2 text_3">结算标准:{{ item.subUserNickName }}</text>
|
||||||
<view class="flex-col self-stretch section_3 mt-17">
|
<view class="flex-col self-stretch section_3 mt-17">
|
||||||
<view class="flex-row justify-between items-center">
|
<view class="flex-row justify-between items-center">
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
height: 35.63rpx;
|
height: 35.63rpx;
|
||||||
}
|
}
|
||||||
.text_2 {
|
.text_2 {
|
||||||
color: #999999;
|
color: #323232;
|
||||||
line-height: 27.96rpx;
|
line-height: 27.96rpx;
|
||||||
}
|
}
|
||||||
.list-item_1 {
|
.list-item_1 {
|
||||||
|
@ -8,10 +8,12 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
directAgentSize: 0, // 直接代理人数
|
directAgentSize: 0, // 直接代理人数
|
||||||
teamSize: null, // 团队人数
|
teamSize: '', // 团队人数
|
||||||
teamEarnings: null, // 团队收益
|
teamEarnings: '', // 团队收益
|
||||||
invitationCode: "", // 邀请码
|
invitationCode: "", // 邀请码
|
||||||
userMemberInfoVOList: [] // 成员列表
|
userMemberInfoVOList: [], // 成员列表
|
||||||
|
searchText: '',
|
||||||
|
tempUserMemberInfoVOList: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取团队成员信息
|
// 获取团队成员信息
|
||||||
@ -23,19 +25,39 @@ Page({
|
|||||||
Authorization: wx.getStorageSync('token')
|
Authorization: wx.getStorageSync('token')
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log('团队成员信息---->',res.data.data);
|
// console.log('团队成员信息---->',res.data.data);
|
||||||
let result = res.data.data
|
let result = res.data.data
|
||||||
this.setData({
|
this.setData({
|
||||||
directAgentSize: result.directAgentSize,
|
directAgentSize: result.directAgentSize,
|
||||||
teamSize: result.teamSize,
|
teamSize: result.teamSize,
|
||||||
teamEarnings: result.teamEarnings,
|
teamEarnings: result.teamEarnings,
|
||||||
invitationCode: result.invitationCode,
|
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() {
|
copyInvitationCode() {
|
||||||
wx.setClipboardData({
|
wx.setClipboardData({
|
||||||
|
@ -44,13 +44,13 @@
|
|||||||
class="image_4"
|
class="image_4"
|
||||||
src="./images/ss.png"
|
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>
|
</view>
|
||||||
<view class="flex-col list mt-13">
|
<view class="flex-col list mt-13">
|
||||||
<view
|
<view
|
||||||
class="flex-row items-center relative group_6"
|
class="flex-row items-center relative group_6"
|
||||||
wx:for="{{userMemberInfoVOList}}"
|
wx:for="{{tempUserMemberInfoVOList}}"
|
||||||
wx:for-item="item"
|
wx:for-item="item"
|
||||||
wx:for-index="index"
|
wx:for-index="index"
|
||||||
wx:key="index"
|
wx:key="index"
|
||||||
|
Reference in New Issue
Block a user