Compare commits

...

2 Commits

Author SHA1 Message Date
liutong a2bbf0856b Merge remote-tracking branch 'origin/master' 10 months ago
liutong 43c7301cbb feat(market): 我的客户页面增加搜索功能 10 months ago
  1. 165
      pages/market/clue/index.vue

165
pages/market/clue/index.vue

@ -11,12 +11,12 @@
@scrolltolower="loadMoreData_1" @scrolltolower="loadMoreData_1"
style="height: 100vh;" style="height: 100vh;"
> >
<view class="search_section"> <view class="search_section" >
<view class="item"> <view class="item">
<view class="input_box"> <view class="input_box" @click="openShowDrawer()">
<fui-input :clearable="true" label="时间筛选" borderTop placeholder="开始时间-结束时间" @click="openDatePicker" v-model="filteredData_1.shared_at_str"></fui-input> <view class="input_box_text">用户名/手机号/时间范围</view>
</view> </view>
<view class="button" @click="searchData()">搜索</view> <view class="button" @click="openShowDrawer()">搜索</view>
</view> </view>
</view> </view>
<view class="card" v-for="(v,k) in tableList_1" :key="k"> <view class="card" v-for="(v,k) in tableList_1" :key="k">
@ -79,10 +79,10 @@
> >
<view class="search_section"> <view class="search_section">
<view class="item"> <view class="item">
<view class="input_box"> <view class="input_box" @click="openShowDrawer()">
<fui-input :clearable="true" label="时间筛选" borderTop placeholder="开始时间-结束时间" @click="openDatePicker" v-model="filteredData_2.shared_at_str"></fui-input> <view class="input_box_text">用户名/手机号/时间范围</view>
</view> </view>
<view class="button" @click="searchData()">搜索</view> <view class="button" @click="openShowDrawer()">搜索</view>
</view> </view>
</view> </view>
<view class="card" v-for="(v,k) in tableList_2" :key="k"> <view class="card" v-for="(v,k) in tableList_2" :key="k">
@ -132,10 +132,54 @@
</view> </view>
</scroll-view> </scroll-view>
<!--下拉选择器-->
<fui-select :show="select_show" :options="select_options" title="请选择员工" @confirm="getSales" @close="closeAssign"></fui-select> <fui-select :show="select_show" :options="select_options" title="请选择员工" @confirm="getSales" @close="closeAssign"></fui-select>
<!-- 时间范围选择器-->
<fui-date-picker range :show="date_picker_show" type="3" @change="changeDatePicker" @cancel="cancelDatePicker"></fui-date-picker> <fui-date-picker range :show="date_picker_show" type="3" @change="changeDatePicker" @cancel="cancelDatePicker"></fui-date-picker>
<!-- 我的客户搜索条件栏目-->
<fui-drawer :show="showDrawer" direction="left" :maskClosable="true">
<view class="fui-scroll__view">
<view class="fui-title">筛选</view>
<scroll-view scroll-y style="height: 720rpx;">
<view class="drawer_box">
<fui-list-cell>
<view class="item">
<view class="title">时间筛选</view>
<view class="input_box">
<fui-input :clearable="true" borderTop placeholder="开始时间-结束时间" @click="openDatePicker" v-model="showDrawerForm.shared_at_str"></fui-input>
</view>
</view>
</fui-list-cell>
<fui-list-cell>
<view class="item">
<view class="title">姓名筛选</view>
<view class="input_box">
<fui-input :clearable="true" borderTop placeholder="姓名筛选" v-model="showDrawerForm.name"></fui-input>
</view>
</view>
</fui-list-cell>
<fui-list-cell>
<view class="item">
<view class="title">电话筛选</view>
<view class="input_box">
<fui-input :clearable="true" borderTop placeholder="电话筛选" v-model="showDrawerForm.phone_number"></fui-input>
</view>
</view>
</fui-list-cell>
</view>
</scroll-view>
<view class="fui-btn__box">
<fui-button type="success" width="400rpx" height="84rpx" text="搜索" bold @click="searchData()">
</fui-button>
<fui-button type="warning" width="400rpx" height="84rpx" text="关闭" bold @click="closeShowDrawer()">
</fui-button>
</view>
</view>
</fui-drawer>
<view style="height: 170rpx;"></view> <view style="height: 170rpx;"></view>
<AQTabber/> <AQTabber/>
@ -166,9 +210,6 @@ export default {
is_gh: '2',//1=,2= is_gh: '2',//1=,2=
}, },
//Tab //Tab
values: [ values: [
{ {
@ -191,6 +232,8 @@ export default {
total:10,// total:10,//
shared_by:'',//ID|0= shared_by:'',//ID|0=
shared_at_str:'',//|(Y-m-d)-(Y-m-d) shared_at_str:'',//|(Y-m-d)-(Y-m-d)
phone_number:'',//-
name:'',//-
}, },
// //
tableList_1:[],// tableList_1:[],//
@ -203,6 +246,8 @@ export default {
total:10,// total:10,//
shared_by:'0',//ID|0= shared_by:'0',//ID|0=
shared_at_str:'',//|[(Y-m-d),(Y-m-d)] shared_at_str:'',//|[(Y-m-d),(Y-m-d)]
phone_number:'',//-
name:'',//-
}, },
// //
tableList_2:[],// tableList_2:[],//
@ -220,6 +265,15 @@ export default {
// //
date_picker_show:false,// date_picker_show:false,//
//
showDrawer:false,//|false=
showDrawerForm:{
shared_at_str:'',//|[(Y-m-d),(Y-m-d)]
phone_number:'',//-
name:'',//-
},
} }
}, },
onLoad(options) {}, onLoad(options) {},
@ -435,12 +489,25 @@ export default {
//tag //tag
async segmented(param) { async segmented(param) {
this.segmented_type = param.id//1=,2= this.segmented_type = param.id//1=,2=
//
this.showDrawerForm.shared_at_str = ''//|[(Y-m-d),(Y-m-d)]
this.showDrawerForm.phone_number = ''//-
this.showDrawerForm.name = ''//-
if(this.segmented_type == 1){ if(this.segmented_type == 1){
this.filteredData_1.shared_at_str = ''//|[(Y-m-d),(Y-m-d)]
this.filteredData_1.phone_number = ''//-
this.filteredData_1.name = ''//-
// //
// //
await this.resetFilteredData_1() await this.resetFilteredData_1()
await this.getList_1() await this.getList_1()
}else{ }else{
this.filteredData_2.shared_at_str = ''//|[(Y-m-d),(Y-m-d)]
this.filteredData_2.phone_number = ''//-
this.filteredData_2.name = ''//-
// //
// //
await this.resetFilteredData_2() await this.resetFilteredData_2()
@ -557,14 +624,7 @@ export default {
changeDatePicker(e){ changeDatePicker(e){
console.log('时间',e) console.log('时间',e)
let shared_at_str = `${e.startDate.result} ~ ${e.endDate.result}` let shared_at_str = `${e.startDate.result} ~ ${e.endDate.result}`
this.showDrawerForm.shared_at_str = shared_at_str
if (this.segmented_type == 1) {
//
this.filteredData_1.shared_at_str = shared_at_str
} else {
//
this.filteredData_2.shared_at_str = shared_at_str
}
this.cancelDatePicker() this.cancelDatePicker()
}, },
// //
@ -579,14 +639,30 @@ export default {
// //
async searchData(){ async searchData(){
if(this.segmented_type == 1){ if(this.segmented_type == 1){
this.filteredData_1.shared_at_str = this.showDrawerForm.shared_at_str//|[(Y-m-d),(Y-m-d)]
this.filteredData_1.phone_number = this.showDrawerForm.phone_number//-
this.filteredData_1.name = this.showDrawerForm.name//-
// //
await this.resetFilteredData_1() await this.resetFilteredData_1()
await this.getList_1() await this.getList_1()
}else{ }else{
this.filteredData_2.shared_at_str = this.showDrawerForm.shared_at_str//|[(Y-m-d),(Y-m-d)]
this.filteredData_2.phone_number = this.showDrawerForm.phone_number//-
this.filteredData_2.name = this.showDrawerForm.name//-
// //
await this.resetFilteredData_2() await this.resetFilteredData_2()
await this.getList_2() await this.getList_2()
} }
this.closeShowDrawer()
},
//
openShowDrawer(){
this.showDrawer = true
},
//
closeShowDrawer(){
this.showDrawer = false
} }
} }
} }
@ -609,8 +685,13 @@ export default {
justify-content: center; justify-content: center;
.input_box { .input_box {
width: 75%; width: 75%;
::v-deep .fui-input__wrap{ .input_box_text{
height: 100%; height: 60rpx;
line-height: 60rpx;
background-color: #fff;
padding-left: 20rpx;
color: #cccccc;
font-size: 28rpx;
} }
} }
.button{ .button{
@ -723,4 +804,48 @@ export default {
height: 50rpx; height: 50rpx;
background-color: #F59A23; background-color: #F59A23;
} }
//
.fui-scroll__view {
margin-top: 60rpx;
width: 520rpx;
flex: 1;
overflow: hidden;
.fui-title {
padding: 40rpx 32rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
font-weight: bold;
}
.drawer_box{
border: 1px solid red;
.item{
display: flex;
flex-direction: column;
gap: 15rpx;
.title{}
.input_box {
border: 1px solid #292929;
width: 450rpx;
::v-deep .fui-input__wrap{
padding: 10rpx !important;
height: 100%;
}
}
}
}
.fui-btn__box {
padding: 40rpx 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 30rpx;
}
}
</style> </style>

Loading…
Cancel
Save