H5端齐采药项目,uniapp框架
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.
 
 
 
 
 

357 lines
9.1 KiB

<template>
<u-popup :show="show" @close="show=false" bgColor="#fff" mode="top">
<view class="selectPopup">
<div class="content">
<u-input v-model="keywords" shape="circle" placeholder="姓名/登录名/联系方式"
border="surround" >
<u-icon name="search" slot="prefixIcon" size="22"></u-icon>
</u-input>
<u-form labelPosition="left" :model="form" ref="form1" labelWidth="auto" style="margin: 20rpx 0 40rpx;">
<u-form-item label="部门" prop="userInfo.name" borderBottom ref="item1" @click="btn">
<u-input v-if="position_name.length==0" disabled disabledColor="#ffffff" placeholder="请选择部门" border="none" inputAlign="right">
</u-input>
<u-input v-if="position_name.length!=0" disabled disabledColor="#ffffff" :placeholder=position_name border="none" inputAlign="right">
</u-input>
<u-icon slot="right" name="arrow-right" color="#c0c4cc"></u-icon>
</u-form-item>
<u-form-item label="职位" prop="userInfo.name" borderBottom ref="item1" @click="show2=true">
<u-input v-if="depart_name.length==0" disabled disabledColor="#ffffff" placeholder="请选择职位" border="none" inputAlign="right">
</u-input>
<u-input v-if="depart_name.length!=0" disabled disabledColor="#ffffff" :placeholder=depart_name border="none" inputAlign="right">
</u-input>
<u-icon slot="right" name="arrow-right" color="#c0c4cc"></u-icon>
</u-form-item>
<u-form-item label="业务员等级" prop="userInfo.name" borderBottom ref="item1" @click="show3=true">
<u-input v-if="auth_name.length==0" disabled disabledColor="#ffffff" placeholder="请选择等级" border="none" inputAlign="right">
</u-input>
<u-input v-if="auth_name.length!=0" disabled disabledColor="#ffffff" :placeholder=auth_name border="none" inputAlign="right">
</u-input>
<u-icon slot="right" name="arrow-right" color="#c0c4cc"></u-icon>
</u-form-item>
</u-form>
</div>
<!-- <button @click="childMethod()">点击按钮</button> -->
<div class="btns">
<div class="btn1" @click="qingkongsin">清空筛选</div>
<div class="btn2" @click="childMethod">确定</div>
</div>
</view>
<!-- <image :src="$util.img(`/upload/weapp/user/gou.png`)" v-if="index==isRadio"></image>
<image :src="$util.img(`/upload/weapp/user/un_gou.png`)" v-else></image> -->
<u-overlay :show="show1">
<view class="connection-type">
<div v-for="(item,index) in radiolist1" :key="index">
<div class="arr df aic jcsb" @click="time(index)">
<div class="df aic">
<text>{{item.label}}</text>
</div>
<image v-if="index==indexa" :src="$util.img(`/upload/weapp/user/gou.png`)" mode=""></image>
<image v-else :src="$util.img(`/upload/weapp/user/un_gou.png`)" mode=""></image>
</div>
</div>
<view class="df Type-confirmation">
<div class="df aic jcsa btn1" @click="show1 = false">返回</div>
<div class="df aic jcsa btn2" @click="tment(indexa)">确定</div>
</view>
</view>
</u-overlay>
<u-overlay :show="show2">
<view class="connection-type">
<div v-for="(item,index) in radiolist2" :key="index">
<div class="arr df aic jcsb" @click="timeone(index)">
<div class="df aic">
<text>{{item.label}}</text>
</div>
<image v-if="index==indexb" :src="$util.img(`/upload/weapp/user/gou.png`)" mode=""></image>
<image v-else :src="$util.img(`/upload/weapp/user/un_gou.png`)" mode=""></image>
</div>
</div>
<view class="df Type-confirmation">
<div class="df aic jcsa btn1" @click="show2 = false">返回</div>
<div class="df aic jcsa btn2" @click="tmenttwo(indexb)">确定</div>
</view>
</view>
</u-overlay>
<u-overlay :show="show3">
<view class="connection-type">
<div v-for="(item,index) in radiolist3" :key="index">
<div class="arr df aic jcsb" @click="timetwo(index)">
<div class="df aic">
<text>{{item.label}}</text>
</div>
<image v-if="index==indexc" :src="$util.img(`/upload/weapp/user/gou.png`)" mode=""></image>
<image v-else :src="$util.img(`/upload/weapp/user/un_gou.png`)" mode=""></image>
</div>
</div>
<view class="df Type-confirmation">
<div class="df aic jcsa btn1" @click="show3 = false">返回</div>
<div class="df aic jcsa btn2" @click="tmentsui(indexc)">确定</div>
</view>
</view>
</u-overlay>
</u-popup>
</template>
<script>
export default {
data() {
return {
form: {},
show: false,
show1: false,
show2: false,
show3: false,
indexa:0,
keywords:'',
depart_id:'',
auth_level:'',
position_id:'',
position_name:'',
depart_name:'',
auth_name:'',
indexb:0,
indexc:0,
suoone:[],
suotwo:[],
radiolist1:[],
radiolist2:[],
radiolist3:[
{
id:1,
label:'一类'
},
{
id:2,
label:'二类'
}
]
};
},
props: {
fatherMethod: {
type: Function,
default: null
}
},
created() {
this.$api.sendRequest({
url: '/api/salasman/departlists',
data: {},
success: (res) => {
console.log(res.data, '部门列表');
this.suoone=res.data
for(let i=0;i<res.data.length;i++){
this.radiolist1.push({label:res.data[i].name})
}
},
})
this.$api.sendRequest({
url: '/api/salasman/positionlists',
data: {},
success: (res) => {
console.log(res.data, '职位列表');
this.suotwo=res.data
for(let i=0;i<res.data.length;i++){
this.radiolist2.push({label:res.data[i].name})
}
},
})
},
methods: {
qingkongsin(){
this.show = false
this.auth_level=''
this.position_id=''
this.depart_id=''
this.keywords=''
this.position_name=''
this.depart_name=''
this.auth_name=''
this.fatherMethod(this.auth_level,this.position_id,this.depart_id,this.keywords);
},
childMethod() {
this.show = false
this.fatherMethod(this.auth_level,this.position_id,this.depart_id,this.keywords);
},
tment(indexa){
this.depart_id=this.suoone[indexa].id
this.position_name=this.suoone[indexa].name
this.show1=false
console.log(this.suoone[indexa].id);
},
tmenttwo(indexa){
this.position_id=this.suotwo[indexa].id
this.depart_name=this.suotwo[indexa].name
this.show2=false
console.log(this.suotwo[indexa].id);
},
tmentsui(indexa){
this.auth_level=this.radiolist3[indexa].id
this.auth_name=this.radiolist3[indexa].label
this.show3=false
// console.log(this.suotwo[indexa].id);
},
start() {
this.show = true
},
btn(){
this.show1=true
},
time(index){
this.indexa=index
},
timeone(index){
this.indexb=index
},
timetwo(index){
this.indexc=index
}
}
}
</script>
<style lang="scss">
.connection-type{
width: 596rpx;
height: 1430rpx;
background: #F8F6F6;
border-radius: 2rpx;
position: fixed;
right: 0;
bottom: 88rpx;
.Add-label{
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #222222;
line-height: 44rpx;
margin: 32rpx 0 0 34rpx;
}
.add-name{
padding: 0 32rpx;
box-sizing: border-box;
margin-top: 32rpx;
div{
width: 166rpx;
height: 60rpx;
background: #FFFFFF;
border-radius: 12rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
line-height: 34rpx;
}
div:nth-child(2){
margin-left: 18rpx;
margin-right: 18rpx;
}
div:nth-child(5){
margin: 0 18rpx;
}
div:nth-child(n+4){
margin-top: 40rpx;
}
}
.arr{
margin-right: 16rpx;
margin-bottom: 32rpx;
margin: 0 32rpx;
margin-top: 32rpx;
image{
width: 40rpx;
height: 40rpx;
}
text{
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #222222;
line-height: 40rpx;
}
}
.Type-confirmation{
position: fixed;
bottom: 0;
.btn1{
width: 172rpx;
height: 88rpx;
background: #DDDDDD;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
line-height: 40rpx;
}
.btn2{
width: 424rpx;
height: 88rpx;
background: #21BBF3;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
}
}
}
.selectPopup {
.content {
padding: 32rpx;
}
.btns {
display: flex;
align-items: center;
.btn1 {
text-align: center;
line-height: 88rpx;
min-width: 216rpx;
height: 88rpx;
background: #F6F6F6;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
}
.btn2 {
text-align: center;
line-height: 88rpx;
width: 100%;
height: 88rpx;
background: #21BBF3;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fff;
}
}
}
</style>