2023-07-21 15:35:53 +08:00
|
|
|
|
<template>
|
2023-08-18 16:03:25 +08:00
|
|
|
|
<view class="">
|
|
|
|
|
<u-sticky bgColor="#0022C7">
|
|
|
|
|
<u-tabs :list="tabLists" @click="changeCurrent" lineColor='white' :scrollable="false" lineWidth='40'
|
|
|
|
|
inactiveStyle='color:white' activeStyle="color:white"></u-tabs>
|
|
|
|
|
</u-sticky>
|
|
|
|
|
<view v-if="loadType">
|
|
|
|
|
<view class="company_info" v-show="current==0">
|
|
|
|
|
<company></company>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="company_list" v-show="current==1">
|
2023-08-20 19:51:55 +08:00
|
|
|
|
<!-- <view class="info_card" v-for="item in companyList" :key="item.id">
|
2023-08-18 16:03:25 +08:00
|
|
|
|
<view class="top" @click="navTo('/subpkg/companySign/companySign?id='+item.id)">
|
|
|
|
|
<view>
|
|
|
|
|
<view class="info_name" :class="item.is_contract?'have':'no'">{{item.company_name}}</view>
|
|
|
|
|
<view class="info_type">{{item.company_type_name}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="btn">详情<uni-icons type="forward" color="#666666"></uni-icons></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-line></u-line>
|
|
|
|
|
<view class="bottom">
|
|
|
|
|
<image src="../../static/img/contract/company.png"></image>
|
|
|
|
|
<view class="text">
|
|
|
|
|
<view class="text_item">
|
|
|
|
|
<view class="left_text">主要联系人:</view>
|
|
|
|
|
<view>{{item.master_name}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text_item" @click="copyPhone(item.master_phone)">
|
|
|
|
|
<view class="left_text">联系方式:</view>
|
|
|
|
|
<view>{{item.master_phone}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text_item">
|
|
|
|
|
<view class="left_text">区县乡镇:</view>
|
|
|
|
|
<view>{{item.city_name+'/'+item.area_name+'/'+item.street_name}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-08-20 19:51:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
<view class="cards" v-for="item in companyList" :key="item.id">
|
|
|
|
|
|
|
|
|
|
<view class="cards_head">
|
2023-08-21 15:28:35 +08:00
|
|
|
|
<view class="cards_head_top">
|
2023-08-30 18:09:49 +08:00
|
|
|
|
<view><u--image src="../../static/img/company/company.png" width="33.29rpx"
|
|
|
|
|
height="33.29rpx" style="margin-right:20rpx"></u--image></view>
|
2023-08-21 15:28:35 +08:00
|
|
|
|
<text>{{item.company_name}}</text>
|
|
|
|
|
</view>
|
2023-08-30 18:09:49 +08:00
|
|
|
|
<view @click="navTo('/subpkg/companySign/companySign?id='+item.id)">详情 <uni-icons type="forward"
|
|
|
|
|
style="margin-left: 10rpx;" color="white"></uni-icons></view>
|
2023-08-20 19:51:55 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="cards_content">
|
|
|
|
|
<view class="right">
|
|
|
|
|
<view class="is_contract">
|
|
|
|
|
<view>
|
|
|
|
|
<text>法人姓名 :</text>
|
|
|
|
|
<text>{{item.master_name}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<text style="color: green;" v-if="item.is_contract">已签约</text>
|
2023-08-30 18:09:49 +08:00
|
|
|
|
<text style="color: #ff7c32;" v-else>签约中</text>
|
2023-08-20 19:51:55 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="">
|
|
|
|
|
<text>担任职务 :</text>
|
|
|
|
|
<text>{{item.master_position}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="" @click="copyPhone(item.master_phone)">
|
|
|
|
|
<text>联系电话 :</text>
|
|
|
|
|
<text>{{item.master_phone}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="">
|
|
|
|
|
<text>负责区域 :</text>
|
|
|
|
|
<text> {{item.city_name+item.area_name+item.street_name}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-08-22 16:01:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
|
|
|
|
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
2023-08-21 15:42:32 +08:00
|
|
|
|
<mybtn text="新建签约" @click="navTo('/subpkg/companyUnsign/companyUnsign')">
|
|
|
|
|
<u-icon name="plus" color="white" size="18" style="margin-right: 10rpx;"></u-icon>
|
2023-08-21 17:25:01 +08:00
|
|
|
|
</mybtn>
|
2023-08-21 15:42:32 +08:00
|
|
|
|
<!-- <u-button class="btns" @click="navTo('/subpkg/companyUnsign/companyUnsign')">
|
2023-08-21 15:28:35 +08:00
|
|
|
|
<u-icon name="plus" color="white" size="18" style="margin-right: 10rpx;"></u-icon>
|
|
|
|
|
新建签约
|
2023-08-21 15:42:32 +08:00
|
|
|
|
</u-button> -->
|
2023-08-21 15:28:35 +08:00
|
|
|
|
<!-- <u-button class="btns" type="primary" icon="plus" text="新建签约"></u-button> -->
|
2023-08-18 16:03:25 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="company_info" v-show="current==2">
|
2023-09-07 10:31:06 +08:00
|
|
|
|
<companyFinance ref="financeRef"></companyFinance>
|
2023-08-18 16:03:25 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view v-show="current==3">
|
|
|
|
|
<task ref="taskRef" style="width: 100vw;"></task>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-empty v-else icon="/static/img/empty/data.png" text="没有数据"></u-empty>
|
|
|
|
|
</view>
|
2023-07-21 15:35:53 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-08-18 16:03:25 +08:00
|
|
|
|
import {
|
|
|
|
|
companyIndex
|
|
|
|
|
} from "@/api/company.js"
|
|
|
|
|
import {
|
|
|
|
|
Toast
|
|
|
|
|
} from '@/libs/uniApi.js'
|
|
|
|
|
import companyFinance from "@/components/companyFinance/companyFinance.vue"
|
|
|
|
|
import task from "@/components/task/index.vue"
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
companyFinance,
|
|
|
|
|
task
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
current: 0,
|
|
|
|
|
currentChild: 0,
|
|
|
|
|
loadType: true, // 当公司不存在时显示
|
|
|
|
|
tabLists: [{
|
|
|
|
|
name: '我的公司',
|
|
|
|
|
}, {
|
|
|
|
|
name: '签约公司'
|
|
|
|
|
}, {
|
|
|
|
|
name: '公司财务'
|
2023-09-07 17:33:57 +08:00
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// name: '任务情况'
|
|
|
|
|
// },
|
|
|
|
|
],
|
2023-08-18 16:03:25 +08:00
|
|
|
|
loadConfig: {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 15,
|
|
|
|
|
lastpage: '',
|
|
|
|
|
loadingText: '努力加载中',
|
|
|
|
|
loadmoreText: '轻轻上拉',
|
|
|
|
|
nomoreText: '我也是有底线的~~',
|
|
|
|
|
status: 'loadmore'
|
|
|
|
|
},
|
|
|
|
|
companyList: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad() {},
|
|
|
|
|
onShow() {
|
|
|
|
|
if (this.$store.state.app.userInfo.company_id) {
|
|
|
|
|
this.loadCompanyList();
|
|
|
|
|
} else {
|
|
|
|
|
this.loadType = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onReachBottom() {
|
|
|
|
|
if (this.current == 1) this.loadCompanyList();
|
2023-09-07 10:31:06 +08:00
|
|
|
|
else if (this.current == 2) this.$refs.financeRef.loadList();
|
2023-08-18 16:03:25 +08:00
|
|
|
|
else if (this.current == 3) this.$refs.taskRef.loadList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async initLoad() {
|
|
|
|
|
this.loadConfig.page = 1;
|
|
|
|
|
this.loadConfig.status = "loadmore";
|
|
|
|
|
this.companyList = [];
|
|
|
|
|
await this.loadCompanyList();
|
|
|
|
|
},
|
|
|
|
|
// 加载公司列表
|
|
|
|
|
async loadCompanyList() {
|
|
|
|
|
if (this.loadConfig.status == "nomore") return;
|
|
|
|
|
this.loadConfig.status = "loading";
|
|
|
|
|
let res = await companyIndex({
|
|
|
|
|
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.companyList = [...this.companyList, ...res.data?.data]
|
|
|
|
|
},
|
|
|
|
|
navTo(url) {
|
2023-08-24 17:14:32 +08:00
|
|
|
|
if(url){
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '加载中',
|
|
|
|
|
mask: true
|
|
|
|
|
});
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url,
|
|
|
|
|
success() {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}else Toast('暂未开放')
|
2023-08-18 16:03:25 +08:00
|
|
|
|
},
|
|
|
|
|
naviBack() {
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
},
|
|
|
|
|
copyPhone(str = "", type = "号码") {
|
|
|
|
|
if (str) uni.setClipboardData({
|
|
|
|
|
data: str + "",
|
|
|
|
|
success: (e) => {
|
|
|
|
|
Toast(type + '已复制')
|
|
|
|
|
},
|
|
|
|
|
fail: (e) => {
|
|
|
|
|
Toast('复制失败')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
changeCurrent(e) {
|
|
|
|
|
this.current = e.index;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onPullDownRefresh() {
|
|
|
|
|
if (this.current == 1) this.initLoad();
|
2023-09-07 10:31:06 +08:00
|
|
|
|
else if (this.current == 2) this.$refs.financeRef.initLoad();
|
2023-08-18 16:03:25 +08:00
|
|
|
|
else if (this.current == 3) this.$refs.taskRef.initLoadConfig();
|
|
|
|
|
this.$u.sleep(500).then(() => {
|
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-21 15:35:53 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2023-08-18 16:03:25 +08:00
|
|
|
|
page {}
|
2023-08-03 17:44:02 +08:00
|
|
|
|
|
2023-08-21 15:28:35 +08:00
|
|
|
|
.btns {
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
color: white;
|
|
|
|
|
background-color: $theme-oa-color;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-20 19:51:55 +08:00
|
|
|
|
.cards {
|
|
|
|
|
|
2023-08-30 11:19:26 +08:00
|
|
|
|
margin-top: 28rpx;
|
2023-08-20 19:51:55 +08:00
|
|
|
|
width: 694rpx;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.cards_head {
|
|
|
|
|
padding: 28rpx;
|
|
|
|
|
background-color: $theme-oa-color;
|
|
|
|
|
color: white;
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
2023-08-21 15:28:35 +08:00
|
|
|
|
|
|
|
|
|
.cards_head_top {
|
|
|
|
|
display: flex;
|
2023-08-21 15:50:13 +08:00
|
|
|
|
width: 70vw;
|
2023-08-21 15:28:35 +08:00
|
|
|
|
}
|
2023-08-20 19:51:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cards_content {
|
|
|
|
|
padding: 28rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
.left {
|
|
|
|
|
text-align: center;
|
|
|
|
|
// padding: 15rpx 25rpx;
|
|
|
|
|
padding-top: 20rpx;
|
|
|
|
|
|
|
|
|
|
width: 160rpx;
|
|
|
|
|
background-color: $theme-oa-color;
|
|
|
|
|
color: white;
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|
|
|
|
|
.cir {
|
|
|
|
|
width: 120rpx;
|
|
|
|
|
height: 120rpx;
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
margin-left: 25rpx;
|
|
|
|
|
border-radius: 120rpx;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
.is_contract {
|
|
|
|
|
width: 85vw;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
view {
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
|
|
|
|
text:nth-child(2) {
|
|
|
|
|
margin-left: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.u_avatar {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.fixed_box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
position: fixed;
|
|
|
|
|
/* #ifdef APP-PLUS */
|
|
|
|
|
top: 0;
|
|
|
|
|
/* #endif */
|
|
|
|
|
/* #ifdef H5 */
|
|
|
|
|
top: 44px;
|
|
|
|
|
/* #endif */
|
|
|
|
|
left: 0;
|
|
|
|
|
z-index: 999;
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.top_box {
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
display: flex;
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.item {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
/* 禁止缩小 */
|
|
|
|
|
width: 155rpx;
|
|
|
|
|
height: 53rpx;
|
|
|
|
|
background: #F5F5F5FF;
|
|
|
|
|
color: #999999FF;
|
|
|
|
|
border-radius: 35rpx 35rpx 35rpx 35rpx;
|
|
|
|
|
opacity: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin: 28rpx 0;
|
|
|
|
|
margin-left: 28rpx;
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.active {
|
|
|
|
|
background: $theme-oa-color;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.top_box2 {
|
|
|
|
|
.item {
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
width: 120rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.company_info {
|
|
|
|
|
// margin-top: 110rpx;
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.company_list {
|
2023-08-30 11:19:26 +08:00
|
|
|
|
padding-bottom: 160rpx;
|
2023-08-18 16:03:25 +08:00
|
|
|
|
// margin-top: 190rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.info_card {
|
|
|
|
|
width: 694rpx;
|
|
|
|
|
// height: 300rpx;
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
|
|
|
|
margin-top: 28rpx;
|
|
|
|
|
padding: 24rpx;
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.top {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 28rpx;
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.info_name {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #333333;
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.have {
|
|
|
|
|
&::before {
|
|
|
|
|
content: "已签约";
|
|
|
|
|
border-radius: 14rpx;
|
|
|
|
|
border: 5rpx solid #5ac725;
|
|
|
|
|
color: #5ac725;
|
|
|
|
|
padding: 3rpx 6rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.no {
|
|
|
|
|
&::before {
|
|
|
|
|
content: "未签约";
|
|
|
|
|
border-radius: 14rpx;
|
|
|
|
|
border: 5rpx solid #f56c6c;
|
|
|
|
|
color: #f56c6c;
|
|
|
|
|
padding: 3rpx 6rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.info_type {
|
|
|
|
|
font-size: 25rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: $theme-oa-color;
|
|
|
|
|
margin-top: 10rpx;
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.btn {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
font-size: 25rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #666666;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: right;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
.bottom {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-top: 28rpx;
|
2023-08-04 11:32:51 +08:00
|
|
|
|
|
2023-08-18 16:03:25 +08:00
|
|
|
|
image {
|
|
|
|
|
height: 140rpx;
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
margin-right: 28rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.text {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
.text_item {
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.left_text {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-07-21 15:35:53 +08:00
|
|
|
|
</style>
|