征信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

448 lines
11 KiB

3 months ago
<template>
<view class="search">
<view class="hd">
<view class="l">
3 months ago
<image class="icon-search" src="https://zhengxin.njrenzhou.cn/static/search.png"></image>
3 months ago
<input type="text" v-model="filter.keyword" placeholder="支持姓名/公司/手机号/标签搜索"/>
<image class="icon-del" @click="toSearch(4)" v-if="filter.keyword" src="https://zhengxin.njrenzhou.cn/static/icon-close.png"></image>
<image class="icon-filter" @click="show = true" src="https://zhengxin.njrenzhou.cn/static/icon-filter.png"></image>
3 months ago
</view>
3 months ago
<view class="btn" @click="toSearch(2)">搜索</view>
3 months ago
</view>
3 months ago
<view class="bd" v-if="token">
<view class="l" v-if="info.list && info.list.length> 0">搜索历史<text @click="delsearch()">清除记录</text></view>
<view class="info" v-if="info.list && info.list.length> 0">
<view class="item" v-for="(a,i) in info.list" :key="i" @click="toSearch(3,a.title)">{{a.title}}</view>
3 months ago
</view>
3 months ago
<view class="l" v-if="info.lixiang && info.lixiang.length> 0">猜你想搜</view>
<view class="info" v-if="info.lixiang && info.lixiang.length> 0">
<view class="item" v-for="(a,i) in info.lixiang" :key="i" @click="toSearch(3,a.title)">{{a.title}}</view>
3 months ago
</view>
</view>
<u-popup :show="show" mode="top" @close="close" @open="open" :overlayStyle="overlayStyle" zIndex="10">
<view class="form">
<view class="hd">
<view class="l">
3 months ago
<image class="icon-search" src="https://zhengxin.njrenzhou.cn/static/search.png"></image>
3 months ago
<input type="text" v-model="filter.keyword" disabled placeholder="支持姓名/公司/手机号/标签搜索"/>
3 months ago
<image class="icon-filter" src="https://zhengxin.njrenzhou.cn/static/icon-filter.png"></image>
3 months ago
</view>
3 months ago
<view class="btn" @click="toSearch(2)">搜索</view>
3 months ago
</view>
<view class="l">当事人身份信息筛选</view>
<view class="info">
<view class="item">
<view class="fl">姓名<text>*</text></view>
<view class="fr">
3 months ago
<input v-model="filter.main_realname" placeholder="请输入当事人姓名" type="text" />
3 months ago
</view>
</view>
<view class="item">
<view class="fl">身份证号</view>
<view class="fr">
3 months ago
<input v-model="filter.main_cardno" placeholder="请输入当事人身份证号" type="text" />
3 months ago
</view>
</view>
<view class="item">
<view class="fl">手机号码</view>
<view class="fr">
3 months ago
<input v-model="filter.main_phone" placeholder="请输入手机号码" type="number" />
3 months ago
</view>
</view>
2 months ago
<view class="item" v-if="systembasicInfoopen.qq">
3 months ago
<view class="fl">QQ号</view>
<view class="fr">
3 months ago
<input v-model="filter.main_qq" placeholder="请输入当事人QQ号" type="text" />
3 months ago
</view>
</view>
2 months ago
<view class="item" v-if="systembasicInfoopen.wechat">
3 months ago
<view class="fl">微信号</view>
<view class="fr">
3 months ago
<input v-model="filter.main_wechat" placeholder="请输入微信号" type="text" />
3 months ago
</view>
</view>
<view class="item">
<view class="fl">居住地址</view>
<view class="fr">
3 months ago
<picker mode="region" @change="changePicker1" :value="filter.main_addressArr">
3 months ago
<view class="picker">
3 months ago
{{filter.main_address?filter.main_address:'请选择 省/市/区'}}
3 months ago
<image src="https://zhengxin.njrenzhou.cn/static/icon-arrow.png"></image>
3 months ago
</view>
</picker>
</view>
</view>
<view class="item">
<view class="fl">籍贯</view>
<view class="fr">
3 months ago
<input v-model="filter.main_jiguan" placeholder="请输入籍贯" type="text" />
3 months ago
</view>
</view>
<view class="item">
<view class="fl">公司</view>
<view class="fr">
3 months ago
<input v-model="filter.main_company" placeholder="请输入当事人所在公司" type="text" />
3 months ago
</view>
</view>
<view class="btns">
3 months ago
<view class="reset" @click="toSearch(1)">重置</view>
<view class="sure" @click="toSearch(5)">确定</view>
3 months ago
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
overlayStyle: {
'zIndex': 9
},
statusBarHeight: 0,
3 months ago
info: "",
3 months ago
show: false,
3 months ago
token: "",
filter: {
main_addressArr: [],
content_type_id: "",
main_realname: "",
main_phone: "",
main_cardno: "",
main_qq: "",
main_wechat: "",
main_address: "",
main_jiguan: "",
main_company: "",
keyword: "",
2 months ago
systembasicInfoopen: {}
3 months ago
}
3 months ago
};
},
3 months ago
onShow() {
2 months ago
this.systembasicInfoopen = uni.getStorageSync("systembasicInfoopen")
3 months ago
this.token = uni.getStorageSync("token")
this.getsearchlist();
},
methods: {
changePicker1(e){
this.filter.main_addressArr = e.detail.value;
this.filter.main_address = e.detail.value.join(",");
},
async getsearchlist(){
const { code, data } = await this.$api.getsearchlist({
token: uni.getStorageSync("token")
})
if(code == 1){
this.info = data;
}
},
async delsearch() {
const { code, data } = await this.$api.delsearch({
token: uni.getStorageSync("token")
})
if(code == 1){
uni.showToast({
icon: "none",
title: "清除成功"
})
this.getsearchlist();
}
},
toSearch(index,title) {
if(index == 1){
this.filter = {
content_type_id: "",
main_realname: "",
main_phone: "",
main_cardno: "",
main_qq: "",
main_wechat: "",
main_address: "",
main_jiguan: "",
main_company: "",
keyword: "",
}
}else if(index == 2){
uni.setStorageSync("filterInfo",this.filter)
uni.navigateTo({
url: "/pages/index/searchList"
})
}else if(index == 4){
this.filter.keyword = ""
}else if(index == 5){
if(!this.filter.main_realname){
uni.showToast({
icon: "none",
title: "姓名不能为空!"
})
return ;
}
uni.setStorageSync("filterInfo",this.filter)
uni.navigateTo({
url: "/pages/index/searchList"
})
}else if(index == 3){
this.filter.keyword = title
uni.setStorageSync("filterInfo",this.filter)
uni.navigateTo({
url: "/pages/index/searchList"
})
}
},
3 months ago
}
}
</script>
<style scoped lang="scss">
.search{
3 months ago
min-height: 100vh;
background-color: #fff;
3 months ago
overflow: hidden;
.content{
width: 100%;
background: #F3F7F8;
.l{
padding: 25rpx 25rpx 0;
font-weight: 500;
font-size: 30rpx;
color: #222222;
}
.list{
padding: 0 25rpx;
.li{
min-height: 100rpx;
background: #FFFFFF;
box-shadow: 0px 3rpx 10rpx 0px rgba(9,44,39,0.05);
border-radius: 20rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
margin-top: 20rpx;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
flex-wrap: wrap;
.a{
width: 100%;
font-weight: 500;
font-size: 28rpx;
color: #666666;
line-height: 50rpx;
}
.c{
width: 80rpx;
line-height: 56rpx;
background: #00C6A9;
border-radius: 0px 20rpx 0px 20rpx;
font-weight: 400;
font-size: 32rpx;
text-align: center;
color: #FFFFFF;
position: absolute;
right: 0;
top: 0;
z-index: 2;
&-on{
background: #333333;
}
}
}
}
}
.form{
padding: 0 0 25rpx;
background-color: #fff;
overflow: hidden;
.btns{
padding: 40rpx 35rpx 20rpx 55rpx;
display: flex;
align-items: center;
justify-content: space-between;
.reset{
width: 300rpx;
line-height: 90rpx;
background: #E3F4F1;
border-radius: 90rpx;
text-align: center;
font-weight: 500;
font-size: 28rpx;
color: #00C6A9;
}
.sure{
width: 300rpx;
line-height: 90rpx;
background: #00C6A9;
border-radius: 90rpx;
text-align: center;
font-weight: 500;
font-size: 28rpx;
color: #fff;
}
}
.l{
padding: 0 25rpx;
font-weight: 500;
font-size: 30rpx;
color: #222222;
}
.info{
margin-top: 10rpx;
padding: 0 25rpx 0 0;
overflow: hidden;
.item{
margin-top: 20rpx;
overflow: hidden;
display: flex;
align-items: center;
.fl{
font-weight: 500;
font-size: 28rpx;
color: #222222;
width: 140rpx;
text-align: right;
margin-right: 20rpx;
3 months ago
text{
color: red;
}
3 months ago
}
.fr{
flex: 1;
picker{
width: 100%;
line-height: 80rpx;
height: 80rpx;
background: #F6F6F6;
padding: 0 20rpx;
box-sizing: border-box;
border-radius: 10rpx;
font-weight: 500;
.picker{
width: 100%;
font-size: 28rpx;
color: #212121;
display: flex;
align-items: center;
justify-content: space-between;
image{
width: 45rpx;
height: 45rpx;
}
}
}
input{
width: 100%;
line-height: 80rpx;
height: 80rpx;
background: #F6F6F6;
padding: 0 20rpx;
box-sizing: border-box;
border-radius: 10rpx;
font-weight: 500;
font-size: 28rpx;
color: #212121;
}
}
}
}
}
.bd{
background-color: #fff;
overflow: hidden;
.empty{
margin-top: 139rpx;
text-align: center;
font-weight: 500;
font-size: 32rpx;
color: #222222;
image{
width: 460rpx;
height: 400rpx;
margin-bottom: 15rpx;
}
}
.l{
padding: 5rpx 25rpx;
font-weight: 500;
font-size: 30rpx;
color: #333333;
overflow: hidden;
text{
font-weight: 500;
font-size: 24rpx;
color: #999999;
float: right;
}
}
.info{
padding: 0 25rpx 0 0;
overflow: hidden;
margin-bottom: 30rpx;
.item{
padding: 0 20rpx;
line-height: 52rpx;
background: #F6F6F6;
border-radius: 52rpx;
font-weight: 500;
font-size: 24rpx;
color: #666666;
float: left;
margin-top: 25rpx;
margin-left: 25rpx;
}
}
}
.hd{
background-color: #fff;
padding: 30rpx 25rpx;
display: flex;
align-items: center;
justify-content: space-between;
.l{
flex: 1;
width: 620rpx;
line-height: 70rpx;
height: 70rpx;
background: #F6F6F6;
border-radius: 70rpx;
border: 1px solid #EAEAEA;
padding: 15rpx 30rpx;
overflow: hidden;
box-sizing: border-box;
display: flex;
align-items: center;
.icon-search{
width: 24rpx;
height: 27rpx;
margin-right: 15rpx;
}
.icon-filter{
width: 35rpx;
height: 33rpx;
margin-left: 15rpx;
}
.icon-del{
width: 50rpx;
height: 50rpx;
margin-left: 15rpx;
}
input{
flex: 1;
font-weight: 500;
font-size: 24rpx;
color: #212121;
}
}
.btn{
font-weight: 500;
font-size: 30rpx;
color: #222222;
margin-left: 25rpx;
}
}
}
</style>