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.
 
 
 
 
 

482 lines
12 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="业务员" v-if="group_id==2" 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="show4=true">
<u-input v-if="province_name.length==0" disabled disabledColor="#ffffff" placeholder="请选择归属地"
border="none" inputAlign="right">
</u-input>
<u-input v-if="province_name.length!=0" disabled disabledColor="#ffffff"
:placeholder=province_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>
<view class="df aic jcsb" style="font-size: 30rpx;">
<div>首单</div>
<div>
<u-switch v-model="value" @change="change"></u-switch>
</div>
</view>
</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-picker @cancel="show1=false" closeOnClickOverlay @confirm="tment" :show="show1"
:columns="[radiolist1]"></u-picker>
<!-- <u-overlay :show="show1" >
<view class="connection-type">
<scroll-view class="list" scroll-y="true">
<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>
</scroll-view>
<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-picker @cancel="show4=false" closeOnClickOverlay @confirm="confirm" :show="show4"
:columns="columns"></u-picker>
</u-popup>
</template>
<script>
export default {
data() {
return {
group_id: uni.getStorageSync('userInfo').group_id,
form: {},
show: false,
show1: false,
show2: false,
show3: false,
show4: false,
columns: [],
indexa: 0,
value: false,
keywords: '',
depart_id: '',
auth_level: '',
position_id: '',
position_name: '',
depart_name: '',
auth_name: '',
province_id: '',
province_name: '',
indexb: 0,
indexc: 0,
suoone: [],
suotwo: [],
list: [],
radiolist1: [],
radiolist2: [],
radiolist3: [{
id: false,
label: '全部'
},
{
id: 0,
label: '待审核'
},
{
id: 1,
label: '已通过'
},
{
id: 2,
label: '已驳回'
},
{
id: 3,
label: '已停用'
}
]
};
},
props: {
fatherMethod: {
type: Function,
default: null
}
},
created() {
this.$api.sendRequest({
url: '/api/salasman/lists',
data: {
page_size: 999
},
success: (res) => {
this.suoone = res.data.list
for (let i = 0; i < res.data.list.length; i++) {
this.radiolist1.push(res.data.list[i].realname)
}
console.log(this.radiolist1, '业务员列表');
},
})
this.$api.sendRequest({
url: '/api/member/getStoreTypeList',
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] })
}
},
})
this.$api.sendRequest({
url: '/api/address/lists',
data: {
pid: 0
},
success: res => {
this.list = res.data
console.log(res.data, '地区');
let a = []
for (let i = 0; i < res.data.length; i++) {
a.push(res.data[i].name)
}
this.columns = [a]
}
})
},
methods: {
//清空
qingkongsin() {
this.show = false
this.auth_level = false
this.position_id = ''
this.depart_id = ''
this.keywords = ''
this.position_name = ''
this.depart_name = ''
this.auth_name = ''
this.province_id = ''
this.province_name = ''
this.value = false
let obj = {
keywords: this.keywords,
salas_id: this.depart_id,
store_type: this.depart_name,
status: this.auth_level,
province_id: this.province_id,
first_order: this.value ? 1 : 0
}
this.$emit('fatherMethod', obj)
},
confirm(value) {
console.log(value.value[0]);
for (let i = 0; i < this.list.length; i++) {
if (value.value[0] == this.list[i].name) {
this.province_id = this.list[i].id
this.province_name = this.list[i].name
}
}
this.show4 = false
},
change(e) {
console.log('change', e);
},
//确认
childMethod() {
let obj = {
keywords: this.keywords,
salas_id: this.depart_id,
store_type: this.depart_name,
status: this.auth_level,
province_id: this.province_id,
first_order: this.value ? 1 : 0
}
this.$emit('fatherMethod', obj)
this.show = false
},
tment(e) {
let index = e.indexs[0]
this.depart_id = this.suoone[index].uid
this.position_name = this.suoone[index].realname
this.show1 = false
},
tmenttwo(indexa) {
this.depart_name = this.suotwo[indexa]
this.show2 = false
},
tmentsui(indexa) {
this.auth_level = this.radiolist3[indexa].id
this.auth_name = this.radiolist3[indexa].label
this.show3 = false
console.log(this.auth_level);
},
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">
::v-deep {
.u-transition {}
/* #ifdef APP */
.u-popup__content {
margin-top: 170rpx !important;
}
/* #endif */
}
.connection-type {
width: 596rpx;
height: 90%;
background: #F8F6F6;
border-radius: 2rpx;
position: fixed;
right: 0;
bottom: 88rpx;
.list {
min-height: 10%;
}
.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>