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.
 
 
 
 
 

264 lines
5.0 KiB

<template>
<view class="selectPopuparr">
<u-popup :show="show" @close="show=false" bgColor="#fff" mode="top">
<view class="selectPopup">
<div class="list">
<u-row style="flex-wrap: wrap;" gutter="16">
<u-col span="4" v-for="(item,index) in group_id==2?list:list1" :key="index">
<div class="item" :class="[item.name==current?'current':'']" @click="current=item.name">
{{item.name}}
</div>
</u-col>
</u-row>
</div>
<div class="btns">
<div class="btn1" @click="show=false">取消</div>
<div class="btn2" @click="btn()">确定</div>
</div>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
current: this.tochild,
group_id: uni.getStorageSync('userInfo').group_id,
show: false,
list: [{
name: "经营日报",
URL: '../index/index',
},
{
name: "经营月报",
URL: '../Monthlyreportdetails/Monthlyreportdetails'
},
// {
// name: "订单回款统计",
// URL:'../Paymentcollection/Paymentcollection'
// },
{
name: "商品销售统计",
URL: '../Collectionstatistics/Collectionstatistics'
},
{
name: "商品分类统计",
URL: '../Classificationstatistics/Classificationstatistics'
},
{
name: "客户销售统计",
URL: '../Customer_statistics/Customer_statistics'
},
{
name: "客户类型统计",
URL: '../Customer_type/Customer_type'
},
{
name: "业务员排名",
URL: '../salesman_ranking/salesman_ranking'
},
{
name: "地区统计",
URL: '../area_statistics/area_statistics'
},
],
list1: [{
name: "经营日报",
URL: '../index/index'
},
{
name: "经营月报",
URL: '../Monthlyreportdetails/Monthlyreportdetails'
},
// {
// name: "订单回款统计",
// URL:'../Paymentcollection/Paymentcollection'
// },
{
name: "商品销售统计",
URL: '../Collectionstatistics/Collectionstatistics'
},
{
name: "商品分类统计",
URL: '../Classificationstatistics/Classificationstatistics'
},
{
name: "客户销售统计",
URL: '../Customer_statistics/Customer_statistics'
},
{
name: "客户类型统计",
URL: '../Customer_type/Customer_type'
},
// {
// name: "业务员排名",
// URL:'../salesman_ranking/salesman_ranking'
// },
{
name: "地区统计",
URL: '../area_statistics/area_statistics'
},
]
};
},
props: {
tochild: {
type: String,
default: '经营日报'
},
},
created() {
},
methods: {
btn() {
if (this.group_id == 2) {
this.list.forEach(item => {
if (this.current == item.name) {
uni.navigateTo({
url: item.URL
})
}
})
} else {
this.list1.forEach(item => {
if (this.current == item.name) {
uni.navigateTo({
url: item.URL
})
}
})
}
this.show = false
},
start() {
this.show = true
}
}
}
</script>
<style lang="scss">
::v-deep {
.u-transition {
top: 86rpx !important;
}
/* #ifdef APP */
.u-transition {
margin-top: 80rpx;
}
/* #endif */
}
.selectPopup {
/* #ifdef APP */
height: 440rpx;
position: relative;
// margin-top: 88rpx;
background: #fff;
/* #endif */
.btns {
/* #ifdef APP */
position: absolute;
bottom: 0;
/* #endif */
display: flex;
align-items: center;
/* #ifdef APP */
.btn1 {
background: #F6F6F6;
color: #585858;
width: 375rpx;
height: 90rpx;
display: flex;
align-items: center;
justify-content: space-around;
}
/* #endif */
/* #ifdef APP */
.btn2 {
background: #21BBF3;
color: #fff;
width: 375rpx;
height: 90rpx;
display: flex;
align-items: center;
justify-content: space-around;
}
/* #endif */
/* #ifdef H5 */
.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;
}
/* #endif */
/* #ifdef H5 */
.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;
}
/* #endif */
}
.list {
padding: 32rpx;
background: #fff;
box-sizing: border-box;
}
.current {
background: rgba(33, 187, 243, 0.08) !important;
color: #21BBF3 !important;
}
.item {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
text-align: center;
line-height: 60rpx;
height: 60rpx;
background: #F6F6F6;
border-radius: 12rpx;
margin-bottom: 40rpx;
}
}
</style>