优化公司组件

This commit is contained in:
weipengfei 2023-07-25 10:22:55 +08:00
parent 10d104aef8
commit e4bb562821
3 changed files with 10 additions and 349 deletions

View File

@ -63,7 +63,10 @@
</view> </view>
<view class="card"> <view class="card">
<view class="one"> <view class="one">
<view class="linkman">主要联系人</view> <view class="linkman">
<view style="height: 30rpx;width: 6rpx;background-color: #3175f9;border-radius: 3rpx;margin-right: 8rpx;"></view>
主要联系人
</view>
<view class="info"> <view class="info">
<view class="info_item">姓名{{company.master_name}}</view> <view class="info_item">姓名{{company.master_name}}</view>
<view class="info_item">职位{{company.master_position}}</view> <view class="info_item">职位{{company.master_position}}</view>
@ -74,7 +77,10 @@
<view style="height: 32rpx;"></view> <view style="height: 32rpx;"></view>
<view class="one" v-for="(other, index) in company.other_contacts" :key="index"> <view class="one" v-for="(other, index) in company.other_contacts" :key="index">
<block v-if="other.name!=''"> <block v-if="other.name!=''">
<view class="linkman">其他联系人</view> <view class="linkman">
<view style="height: 30rpx;width: 6rpx;background-color: #3175f9;border-radius: 3rpx;margin-right: 8rpx;"></view>
其他联系人
</view>
<view class="info"> <view class="info">
<view class="info_item">姓名{{other.name}}</view> <view class="info_item">姓名{{other.name}}</view>
<view class="info_item">职位{{other.position}}</view> <view class="info_item">职位{{other.position}}</view>
@ -283,6 +289,8 @@
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin-bottom: 28rpx; margin-bottom: 28rpx;
display: flex;
align-items: center;
} }
.info { .info {

View File

@ -219,15 +219,6 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, {
"path": "manager/manager",
"style": {
"navigationBarTitleText": "片区经理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, { }, {
"path": "orderDetail/orderDetail", "path": "orderDetail/orderDetail",
"style": { "style": {

View File

@ -1,338 +0,0 @@
<template>
<view class="">
<!-- <view class="head_box">
<u-search shape="round" placeholder="搜索任务状态、优先级、部门等" :showAction="false" style="margin-right: 26rpx;"></u-search>
<view class="btn">筛选</view>
</view> -->
<!-- 任务搜索框 -->
<view class="task_box">
<u-search shape="round" placeholder="搜索片区经理" :showAction="false"></u-search>
<!-- 筛选按钮 -->
<view>
<u-popup :show="show" @close="show=false" @open="show=true" mode="top"
overlayStyle="position: fixed;top:100rpx">
<!-- <view class="search_box">
<view class="">
<view class="first_order" v-for="item in orderData" :key="item.id" :class="item.id==typeid?'choose':''">
<text>{{item.first_order}}</text>
</view>
</view>
<view class="second_order">
<view class="second" v-for="item in orderList" :key="item.id" @click="getInfo(item.info,item.id)">
{{item.info}}
</view>
</view>
</view> -->
</u-popup>
<view @click="show = true" class="screening" :class="show?'choose_style':''">筛选</view>
</view>
</view>
<view class="list">
<view class="item" v-for="item in areaManagerList" :key="item.id">
<view class="left">
<view class="top">
<!-- <image class="avatar" :src="item.avatar||'../../static/img/public/man.png'"></image> -->
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'" width="112.28rpx" height="112.28rpx" shape="circle">
</u--image>
<view class="text">
<view class="name">{{item.name}}</view>
<view class="mobile">
<uni-icons type="phone" color="#999999FF"></uni-icons>联系人-<text @click="copyPhone(item.account)">{{item.account}}</text>
</view>
</view>
</view>
<view class="bottom">
<view class="circle"></view>
<view class="green">所属片区</view>
<view>{{item.city_name+item.area_name+item.street_name}}</view>
</view>
</view>
<view class="right">
<!-- <view class="top">
发消息
</view> -->
<view class="bottom" @click="callUp(item.account)">
拨打电话
</view>
</view>
</view>
</view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import { Toast } from '@/libs/uniApi.js'
import {companyAreaManager} from "@/api/company.js"
export default {
data() {
return {
show: false,
loadConfig:{
page: 1,
limit: 15,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
areaManagerList:[]
}
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#3175f9'
})
},
onLoad() {},
onShow() {
this.loadAreaManager();
},
onReachBottom() {
this.loadAreaManager();
},
methods: {
async loadAreaManager(){
if(this.loadConfig.status=="nomore")return;
this.loadConfig.status="loading"
let res = await companyAreaManager({
page: this.loadConfig.page,
limit: this.loadConfig.limit
})
this.loadConfig.status="loadmore"
if(res.data.data.length<this.loadConfig.limit){
this.loadConfig.status="nomore"
}else {
this.loadConfig.page++;
}
this.areaManagerList = [...this.areaManagerList, ...res.data?.data]
},
//
callUp(phone) {
uni.makePhoneCall({
phoneNumber: phone+"",
success: (e) => {
console.log(e);
},
fail: (e) => {
Toast('页面跳转失败,请检查是否开启权限')
}
});
},
//
copyPhone(str=""){
uni.setClipboardData({
data:str+"",
success: (e) => {
Toast('号码已复制')
},
fail: (e) => {
Toast('复制失败')
}
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.task_box {
margin: 0 auto;
width: 750rpx;
height: 98rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 28rpx;
.screening {
margin-left: 10px;
width: 149rpx;
height: 63rpx;
line-height: 63rpx;
text-align: center;
background: #FFFFFF;
border-radius: 35rpx;
border: 2rpx solid #E6E5E5;
color: #666;
font-size: 28rpx;
}
.choose_style {
background-color: #3274F9;
color: #fff;
}
}
//
.search_box {
width: 750rpx;
// height: 368rpx;
background: #FFFFFF;
display: flex;
.first_order {
width: 250rpx;
height: 73rpx;
text-align: center;
color: #666666;
font-size: 28rpx;
line-height: 73rpx;
background-color: #f5f5f5;
}
.choose {
background-color: #fff;
color: #3274F9;
}
.second_order {
text-align: center;
width: 500rpx;
.second {
line-height: 73rpx;
height: 73rpx;
border-bottom: 2rpx solid #E6E6E6;
}
}
}
.head_box {
width: 750rpx;
height: 98rpx;
box-sizing: border-box;
padding: 0 28rpx;
background-color: #FFFFFF;
display: flex;
justify-content: space-around;
align-items: center;
.btn {
width: 149rpx;
height: 63rpx;
background: #FFFFFF;
border-radius: 35rpx 35rpx 35rpx 35rpx;
opacity: 1;
border: 2rpx solid #E6E5E5;
display: flex;
align-items: center;
justify-content: center;
}
}
.list {
margin: 21rpx 28rpx;
padding-bottom: 21rpx;
.item {
width: 694rpx;
// height: 201rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
margin-bottom: 21rpx;
box-sizing: border-box;
padding: 28rpx;
display: flex;
justify-content: space-between;
.left {
display: flex;
flex-direction: column;
justify-content: space-between;
.top {
display: flex;
justify-content: left;
align-items: center;
.avatar {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
margin-right: 18rpx;
}
.u_avatar{
margin-right: 18rpx;
}
.text {
display: flex;
justify-content: space-around;
flex-direction: column;
height: 100%;
.name {
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.mobile {
color: #999999;
}
}
}
.bottom {
display: flex;
justify-content: left;
align-items: center;
margin-top: 20rpx;
.circle {
width: 11rpx;
height: 11rpx;
opacity: 1;
border: 2rpx solid #34A853;
margin-right: 10rpx;
border-radius: 50%;
}
.green {
font-weight: 400;
color: #34A853;
line-height: 0rpx;
margin-right: 18rpx;
-webkit-background-clip: text;
}
}
}
.right {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
.top,
.bottom {
width: 158rpx;
height: 53rpx;
background: #FFFFFF;
border-radius: 26rpx 26rpx 26rpx 26rpx;
opacity: 1;
border: 2rpx solid #3274F9;
color: #3274F9;
display: flex;
align-items: center;
justify-content: center;
}
.bottom {
border: 2rpx solid #F9AA32;
color: #F9AA32;
margin-top: 18rpx;
}
}
}
}
</style>