优化
This commit is contained in:
parent
cad8ac898e
commit
253fa0a543
@ -10,6 +10,11 @@ export const companyMine = (data) => oahttp.get('/company/mine', data)
|
|||||||
*/
|
*/
|
||||||
export const companyIndex = (data) => oahttp.get('/company/index', data)
|
export const companyIndex = (data) => oahttp.get('/company/index', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未签约公司列表
|
||||||
|
*/
|
||||||
|
export const companyUnsigned = (data) => oahttp.get('/company/unsigned', data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公司详情
|
* 公司详情
|
||||||
*/
|
*/
|
||||||
@ -29,3 +34,14 @@ export const companyUser = (data) => oahttp.get('/company/users', data)
|
|||||||
* 人员详情
|
* 人员详情
|
||||||
*/
|
*/
|
||||||
export const companyUserDetail = (data) => oahttp.get('/company/user', data)
|
export const companyUserDetail = (data) => oahttp.get('/company/user', data)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员详情
|
||||||
|
*/
|
||||||
|
export const accountMonthList = (data) => oahttp.get('/account_log/company_year_count', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员详情
|
||||||
|
*/
|
||||||
|
export const accountDateList = (data) => oahttp.get('/account_log/company_lists', data)
|
@ -35,3 +35,8 @@ export const commonBrigade = (data) => oahttp.get('/common/brigade', data)
|
|||||||
* 获取商机分类
|
* 获取商机分类
|
||||||
*/
|
*/
|
||||||
export const categoryBusinessList = (data) => oahttp.get('/CategoryBusiness/list', data)
|
export const categoryBusinessList = (data) => oahttp.get('/CategoryBusiness/list', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典列表
|
||||||
|
*/
|
||||||
|
export const dictDataLists = (data) => oahttp.get('/common/dict_data_lists', data)
|
@ -189,6 +189,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
this.company = res.data.company;
|
this.company = res.data.company;
|
||||||
|
uni.$emit('companyInfo', this.company); //发送全局事件
|
||||||
this.user = res.data.user;
|
this.user = res.data.user;
|
||||||
this.contract = res.data.contract;
|
this.contract = res.data.contract;
|
||||||
this.skeleton = false;
|
this.skeleton = false;
|
||||||
|
249
components/companyFinance/companyFinance.vue
Normal file
249
components/companyFinance/companyFinance.vue
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
<template>
|
||||||
|
<view class="c_card">
|
||||||
|
<view class="f_card">
|
||||||
|
<view class="item">
|
||||||
|
<view>公司账户余额(元)</view>
|
||||||
|
<view class="price" v-if="company.deposit">{{cCount(company.deposit)}}</view>
|
||||||
|
<view class="price" v-else>0.00</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view>公司收益金额(元)</view>
|
||||||
|
<view class="price" v-if="company.company_money">{{cCount(company.company_money)}}</view>
|
||||||
|
<view class="price" v-else>0.00</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="f_nav">
|
||||||
|
<view class="title">账单流水</view>
|
||||||
|
<view class="right">
|
||||||
|
<view class="btn" :class="current==0?'active':''" @click="current=0;initLoad()">日账单</view>
|
||||||
|
<view class="btn" :class="current==1?'active':''" @click="current=1;initLoad()">月账单</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="f_list">
|
||||||
|
<view class="item" v-for="(item, index) in list" :key="index">
|
||||||
|
<view class="top">
|
||||||
|
账单日期: {{current?item.month:item.create_time}}
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="text">
|
||||||
|
<view class="t_item" v-if="current==0">
|
||||||
|
<view>任务名称:</view>
|
||||||
|
<view class="tips">{{item.remark}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="t_item">
|
||||||
|
<view>收益来源:</view>
|
||||||
|
<view class="tips">{{current?item.remark:item.type_desc}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="price">{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { accountMonthList, accountDateList } from "@/api/company.js"
|
||||||
|
export default {
|
||||||
|
name: "companyFinance",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
current: 0,
|
||||||
|
list: [],
|
||||||
|
company:{},
|
||||||
|
loadConfig:{
|
||||||
|
page: 1,
|
||||||
|
limit: 15,
|
||||||
|
lastpage: '',
|
||||||
|
loadingText: '努力加载中',
|
||||||
|
loadmoreText: '轻轻上拉',
|
||||||
|
nomoreText: '我也是有底线的~~',
|
||||||
|
status: 'loadmore'
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
uni.$on('companyInfo', (e)=>{
|
||||||
|
this.company = e;
|
||||||
|
this.initLoad();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
initLoad(){
|
||||||
|
this.loadConfig.page = 1;
|
||||||
|
this.loadConfig.status = "loadmore";
|
||||||
|
this.list = [];
|
||||||
|
this.initList();
|
||||||
|
},
|
||||||
|
async initList(){
|
||||||
|
if(this.loadConfig.status=="nomore")return;
|
||||||
|
this.loadConfig.status="loading";
|
||||||
|
let res;
|
||||||
|
if(this.current==0) res = await accountDateList({
|
||||||
|
page: this.loadConfig.page,
|
||||||
|
limit: this.loadConfig.limit,
|
||||||
|
company_id: this.$store.state.app.userInfo.company_id
|
||||||
|
})
|
||||||
|
else res = await accountMonthList({
|
||||||
|
page: this.loadConfig.page,
|
||||||
|
limit: this.loadConfig.limit,
|
||||||
|
company_id: this.$store.state.app.userInfo.company_id
|
||||||
|
})
|
||||||
|
this.loadConfig.status="loadmore"
|
||||||
|
if(res.data.length<this.loadConfig.limit){
|
||||||
|
this.loadConfig.status="nomore"
|
||||||
|
}else {
|
||||||
|
this.loadConfig.page++;
|
||||||
|
}
|
||||||
|
this.list = [...this.list, ...res.data]
|
||||||
|
},
|
||||||
|
// 格式化数据
|
||||||
|
cCount(value=0){
|
||||||
|
try{
|
||||||
|
return value.toFixed(2);
|
||||||
|
}catch(e){
|
||||||
|
return "0.00";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.c_card {
|
||||||
|
padding-top: 28rpx;
|
||||||
|
|
||||||
|
.f_card {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 694rpx;
|
||||||
|
height: 158rpx;
|
||||||
|
background: #3175F9;
|
||||||
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
opacity: 1;
|
||||||
|
padding: 28rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 28rpx;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
&:nth-child(1) {
|
||||||
|
border-right: 1px solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-size: 49rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.f_nav {
|
||||||
|
margin: 28rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-end;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333333;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: "";
|
||||||
|
width: 6rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #3175F9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin-left: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
color: #3175F9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.f_list {
|
||||||
|
.item {
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-bottom: 28rpx;
|
||||||
|
width: 694rpx;
|
||||||
|
// height: 238rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||||
|
opacity: 1;
|
||||||
|
padding: 28rpx;
|
||||||
|
|
||||||
|
.top {
|
||||||
|
margin-bottom: 28rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-family: PingFang SC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
display: inline-block;
|
||||||
|
content: '账单详情';
|
||||||
|
width: 137rpx;
|
||||||
|
height: 49rpx;
|
||||||
|
line-height: 49rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: #3274F9;
|
||||||
|
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
||||||
|
color: #fff;
|
||||||
|
margin-right: 28rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 39rpx;
|
||||||
|
.t_item{
|
||||||
|
display: flex;
|
||||||
|
&:nth-child(1){
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
.tips{
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.price{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #F02828;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -128,7 +128,7 @@
|
|||||||
keys.forEach(item => {
|
keys.forEach(item => {
|
||||||
if (!isNaN(this.formData[item])) this.formData[item] = +this.formData[item];
|
if (!isNaN(this.formData[item])) this.formData[item] = +this.formData[item];
|
||||||
})
|
})
|
||||||
console.log(this.formData);
|
// console.log(this.formData);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -175,12 +175,13 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
@ -211,14 +212,24 @@
|
|||||||
|
|
||||||
.plus {
|
.plus {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
|
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
|
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
|
|
||||||
background: $theme-oa-color;
|
background: $theme-oa-color;
|
||||||
|
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
|
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -355,6 +355,15 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
"path": "captain/captain",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "队长列表",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#3175f9",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
|
||||||
}]
|
}]
|
||||||
}],
|
}],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
@ -226,6 +226,12 @@ export const oaHomeData = [
|
|||||||
icon: prefix + 'oa/bxsq@2x.png',
|
icon: prefix + 'oa/bxsq@2x.png',
|
||||||
// url: '/subpkg/taskAdmin/taskAdmin',
|
// url: '/subpkg/taskAdmin/taskAdmin',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: '档案管理',
|
||||||
|
icon: prefix + 'oa/bxsq@2x.png',
|
||||||
|
url: '/subpkg/captain/captain',
|
||||||
|
admin: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: '档案管理',
|
text: '档案管理',
|
||||||
icon: prefix + 'oa/bxsq@2x.png',
|
icon: prefix + 'oa/bxsq@2x.png',
|
||||||
|
@ -213,6 +213,7 @@
|
|||||||
justify-content: left;
|
justify-content: left;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
|
||||||
.circle {
|
.circle {
|
||||||
width: 11rpx;
|
width: 11rpx;
|
||||||
|
181
subpkg/captain/captain.vue
Normal file
181
subpkg/captain/captain.vue
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<view class="card" v-for="item in list" :key="item.id" @click="navTo('/subpkg/archives/archives?id='+item.id)">
|
||||||
|
<view class="top">
|
||||||
|
<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.nickname}}</view>
|
||||||
|
<view class="mobile">
|
||||||
|
<uni-icons type="phone" color="#999999FF"></uni-icons>联系方式-<text>{{item.account}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="left">
|
||||||
|
<view class="circle"></view>
|
||||||
|
<view class="green">片区</view>
|
||||||
|
<view class="b_l_text">{{item.area_name+item.street_name}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="right">{{'管理户数: '+item.informationg_count+" 户"}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||||
|
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { companyUser } from "@/api/company.js"
|
||||||
|
import { Toast } from '@/libs/uniApi.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
loadConfig: {
|
||||||
|
page: 1,
|
||||||
|
limit: 15,
|
||||||
|
lastpage: '',
|
||||||
|
loadingText: '努力加载中',
|
||||||
|
loadmoreText: '轻轻上拉',
|
||||||
|
nomoreText: '我也是有底线的~~',
|
||||||
|
status: 'loadmore'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.initLoad()
|
||||||
|
},
|
||||||
|
onShow() {},
|
||||||
|
onReachBottom() {
|
||||||
|
this.loadList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navTo(url) {
|
||||||
|
url ?
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url,
|
||||||
|
}) : Toast('暂未开放')
|
||||||
|
},
|
||||||
|
initLoad() {
|
||||||
|
this.loadConfig.page = 1;
|
||||||
|
this.loadConfig.status = "loadmore";
|
||||||
|
this.list = [];
|
||||||
|
this.loadList();
|
||||||
|
},
|
||||||
|
async loadList() {
|
||||||
|
if (this.loadConfig.status == "nomore") return;
|
||||||
|
this.loadConfig.status = "loading";
|
||||||
|
let res = await companyUser({
|
||||||
|
page: this.loadConfig.page,
|
||||||
|
limit: this.loadConfig.limit,
|
||||||
|
company_id: this.$store.state.app.userInfo.company_id,
|
||||||
|
is_captain: 1
|
||||||
|
})
|
||||||
|
this.loadConfig.status = "loadmore"
|
||||||
|
if (res.data.data.length < this.loadConfig.limit) {
|
||||||
|
this.loadConfig.status = "nomore"
|
||||||
|
} else {
|
||||||
|
this.loadConfig.page++;
|
||||||
|
}
|
||||||
|
this.list = [...this.list, ...res.data.data];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.page {
|
||||||
|
padding-top: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-bottom: 28rpx;
|
||||||
|
padding: 28rpx;
|
||||||
|
width: 694rpx;
|
||||||
|
height: 221rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
|
.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;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
.b_l_text{
|
||||||
|
width: 360rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
color: #3274F9;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,17 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="">
|
||||||
|
<view class="fixed_box">
|
||||||
<view class="top_box">
|
<view class="top_box">
|
||||||
<view class="item" :class="current==0?'active':''" @click="current=0">我的公司</view>
|
<view class="item" :class="current==0?'active':''" @click="current=0">我的公司</view>
|
||||||
<view class="item" :class="current==1?'active':''" @click="current=1">签约公司</view>
|
<view class="item" :class="current==1?'active':''" @click="current=1">签约公司</view>
|
||||||
|
<view class="item" :class="current==2?'active':''" @click="current=2">公司财务</view>
|
||||||
|
<!-- <view class="item" :class="current==3?'active':''" @click="current=3">公司财务</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="company" v-show="current==0">
|
<view class="top_box top_box2" v-if="current==1">
|
||||||
|
<view class="item" :class="currentChild==0?'active':''" @click="currentChild=0;initLoad()">已签约</view>
|
||||||
|
<view class="item" :class="currentChild==1?'active':''" @click="currentChild=1;initLoad()">未签约</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="company_info" v-show="current==0">
|
||||||
<company></company>
|
<company></company>
|
||||||
</view>
|
</view>
|
||||||
<view class="company_list" v-show="current==1">
|
<view class="company_list" v-show="current==1">
|
||||||
<view class="info_card" v-for="item in companyList" :key="item.id">
|
<view class="info_card" v-for="item in companyList" :key="item.id">
|
||||||
<view class="top" @click="naviTo('/subpkg/companySign/companySign?id='+item.id)">
|
<view class="top" @click="naviTo('/subpkg/companySign/companySign?id='+item.id)">
|
||||||
<view>
|
<view>
|
||||||
<view class="info_name">{{item.company_name}}</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 class="info_type">{{item.company_type_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">详情<uni-icons type="forward" color="#666666"></uni-icons></view>
|
<view class="btn">详情<uni-icons type="forward" color="#666666"></uni-icons></view>
|
||||||
@ -32,16 +41,23 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||||
</view>
|
</view>
|
||||||
|
<view class="company_info" v-show="current==2">
|
||||||
|
<companyFinance></companyFinance>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { companyIndex } from "@/api/company.js"
|
import { companyIndex, companyUnsigned } from "@/api/company.js"
|
||||||
import { Toast } from '@/libs/uniApi.js'
|
import { Toast } from '@/libs/uniApi.js'
|
||||||
|
import companyFinance from "@/components/companyFinance/companyFinance.vue"
|
||||||
export default {
|
export default {
|
||||||
|
components:{companyFinance},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
current: 0,
|
current: 0,
|
||||||
|
currentChild: 0,
|
||||||
loadConfig:{
|
loadConfig:{
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 15,
|
limit: 15,
|
||||||
@ -62,11 +78,22 @@
|
|||||||
this.loadCompanyList();
|
this.loadCompanyList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initLoad(){
|
||||||
|
this.loadConfig.page = 1;
|
||||||
|
this.loadConfig.status = "loadmore";
|
||||||
|
this.companyList = [];
|
||||||
|
this.loadCompanyList();
|
||||||
|
},
|
||||||
// 加载公司列表
|
// 加载公司列表
|
||||||
async loadCompanyList(){
|
async loadCompanyList(){
|
||||||
if(this.loadConfig.status=="nomore")return;
|
if(this.loadConfig.status=="nomore")return;
|
||||||
this.loadConfig.status="loading"
|
this.loadConfig.status="loading";
|
||||||
let res = await companyIndex({
|
let res;
|
||||||
|
if(this.currentChild==0) res = await companyIndex({
|
||||||
|
page: this.loadConfig.page,
|
||||||
|
limit: this.loadConfig.limit
|
||||||
|
})
|
||||||
|
else res = await companyUnsigned({
|
||||||
page: this.loadConfig.page,
|
page: this.loadConfig.page,
|
||||||
limit: this.loadConfig.limit
|
limit: this.loadConfig.limit
|
||||||
})
|
})
|
||||||
@ -106,12 +133,24 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.fixed_box{
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
top:0;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
top:44px;
|
||||||
|
/* #endif */
|
||||||
|
left: 0;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
.top_box{
|
.top_box{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.item{
|
.item{
|
||||||
width: 175rpx;
|
width: 155rpx;
|
||||||
height: 53rpx;
|
height: 53rpx;
|
||||||
background: #F5F5F5FF;
|
background: #F5F5F5FF;
|
||||||
color: #999999FF;
|
color: #999999FF;
|
||||||
@ -120,18 +159,26 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 28rpx;
|
margin: 28rpx 0;
|
||||||
|
margin-left: 28rpx;
|
||||||
}
|
}
|
||||||
.active{
|
.active{
|
||||||
background: $theme-oa-color;
|
background: $theme-oa-color;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.company{
|
.top_box2{
|
||||||
|
.item{
|
||||||
|
margin-top: 0;
|
||||||
|
width: 120rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.company_info{
|
||||||
|
margin-top: 110rpx;
|
||||||
}
|
}
|
||||||
.company_list{
|
.company_list{
|
||||||
padding-bottom: 32rpx;
|
padding-bottom: 32rpx;
|
||||||
|
margin-top: 190rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -152,6 +199,28 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
.have{
|
||||||
|
&::before{
|
||||||
|
content: "已签约";
|
||||||
|
border-radius: 14rpx;
|
||||||
|
border: 5rpx solid #5ac725;
|
||||||
|
color: #5ac725;
|
||||||
|
padding: 3rpx 6rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.no{
|
||||||
|
&::before{
|
||||||
|
content: "未签约";
|
||||||
|
border-radius: 14rpx;
|
||||||
|
border: 5rpx solid #f56c6c;
|
||||||
|
color: #f56c6c;
|
||||||
|
padding: 3rpx 6rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
.info_type{
|
.info_type{
|
||||||
font-size: 25rpx;
|
font-size: 25rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-line color="#999999FF"></u-line>
|
<u-line color="#999999FF"></u-line>
|
||||||
<view class="bottom" style="margin-top: 28rpx;">
|
<view class="bottom" style="margin-top: 28rpx;">
|
||||||
<button v-if="item.is_captain" class="look" @click="navTo('/subpkg/archives/archives?id='+item.id)">片区档案</button>
|
<!-- <button v-if="item.is_captain" class="look" @click="navTo('/subpkg/archives/archives?id='+item.id)">片区档案</button> -->
|
||||||
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">查看</button>
|
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">查看</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -89,7 +89,7 @@ export default {
|
|||||||
let res = await companyUser({
|
let res = await companyUser({
|
||||||
page: this.loadConfig.page,
|
page: this.loadConfig.page,
|
||||||
limit: this.loadConfig.limit,
|
limit: this.loadConfig.limit,
|
||||||
company_id: this.$store.state.app.userInfo.admin.company_id
|
company_id: this.$store.state.app.userInfo.company_id
|
||||||
})
|
})
|
||||||
this.loadConfig.status="loadmore"
|
this.loadConfig.status="loadmore"
|
||||||
if(res.data.data.length<this.loadConfig.limit){
|
if(res.data.data.length<this.loadConfig.limit){
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"></u-skeleton>
|
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"></u-skeleton>
|
||||||
<block v-if="!skeleton">
|
<block v-if="!skeleton">
|
||||||
<view class="title">电子合同</view>
|
<view class="title">电子合同</view>
|
||||||
<view v-if="userInfo.contract&&userInfo.contract.check_status==2" class="card">
|
<view v-if="userInfo.contract&&userInfo.contract.status" class="card">
|
||||||
<uni-section style="background-color: transparent;" :title="userInfo.name" titleFontSize="32rpx"
|
<uni-section style="background-color: transparent;" :title="userInfo.name" titleFontSize="32rpx"
|
||||||
type="line"></uni-section>
|
type="line"></uni-section>
|
||||||
<view class="c_text">性别:{{userInfo.sex==1?'男':'女'}}</view>
|
<view class="c_text">性别:{{userInfo.sex==1?'男':'女'}}</view>
|
||||||
@ -125,13 +125,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button v-if="!userInfo.is_contract&&!userInfo.contract" class="btn" @click="createContract">发起合同</button>
|
<picker v-if="!userInfo.is_contract&&!userInfo.contract" :range="contractTypeList" range-key="name" @change="changeType">
|
||||||
<view v-if="userInfo.contract&&userInfo.contract.check_status==1" class="card">
|
<button class="btn">发起合同</button>
|
||||||
<view class="contract_box">
|
</picker>
|
||||||
|
<view v-if="userInfo.contract&&userInfo.contract.check_status==1">
|
||||||
|
<button class="btn tips_center">合同已发起,请等待审核</button></view>
|
||||||
|
<view v-if="userInfo.contract&&userInfo.contract.check_status==2" class="card">
|
||||||
|
<view class="contract_box send">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
|
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="name">合同</view>
|
<view class="name">{{userInfo.contract.contract_type_name}}</view>
|
||||||
<view>
|
<view>
|
||||||
<text>{{userInfo.contract&&userInfo.contract.create_time}}</text>
|
<text>{{userInfo.contract&&userInfo.contract.create_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -139,9 +143,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
|
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
|
||||||
<button>发送合同</button>
|
<view class="bottom">
|
||||||
|
<button class="send_btn" @click="addContract">发送合同</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -150,6 +157,7 @@
|
|||||||
import { Toast } from '@/libs/uniApi.js'
|
import { Toast } from '@/libs/uniApi.js'
|
||||||
import { companyUserDetail } from "@/api/company.js"
|
import { companyUserDetail } from "@/api/company.js"
|
||||||
import { loginSetInfo, userDraftingcontracts, userInitiateContract } from "@/api/oaUser.js"
|
import { loginSetInfo, userDraftingcontracts, userInitiateContract } from "@/api/oaUser.js"
|
||||||
|
import { dictDataLists } from "@/api/oaPbulic.js"
|
||||||
export default {
|
export default {
|
||||||
onReady() {
|
onReady() {
|
||||||
uni.setNavigationBarColor({
|
uni.setNavigationBarColor({
|
||||||
@ -162,6 +170,9 @@
|
|||||||
id: '',
|
id: '',
|
||||||
skeleton: true,
|
skeleton: true,
|
||||||
show: false,
|
show: false,
|
||||||
|
typeShow: false,
|
||||||
|
timer: null, // 计时器
|
||||||
|
timerCount: 0, //倒计时
|
||||||
updateForm:{
|
updateForm:{
|
||||||
is_captain: 0,
|
is_captain: 0,
|
||||||
},
|
},
|
||||||
@ -169,15 +180,16 @@
|
|||||||
qualification: {},
|
qualification: {},
|
||||||
contract: {},
|
contract: {},
|
||||||
roles: {}
|
roles: {}
|
||||||
}
|
},
|
||||||
|
contractTypeList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if (options.id) this.id = options.id;
|
if (options.id) this.id = options.id;
|
||||||
},
|
this.initContractTypeList();
|
||||||
onShow() {
|
|
||||||
this.loadUserDetail();
|
this.loadUserDetail();
|
||||||
},
|
},
|
||||||
|
onShow() { },
|
||||||
methods: {
|
methods: {
|
||||||
naviTo(url) {
|
naviTo(url) {
|
||||||
url ?
|
url ?
|
||||||
@ -199,14 +211,45 @@
|
|||||||
Toast('更新成功');
|
Toast('更新成功');
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
// 生成合同
|
changeType(e){
|
||||||
async createContract(){
|
// console.log(this.contractTypeList[e.detail.value]);
|
||||||
let res = await userInitiateContract({
|
this.createContract({
|
||||||
party_b:'',
|
party_b:this.userInfo.id,
|
||||||
contract_type:'',
|
contract_type:this.contractTypeList[e.detail.value].id,
|
||||||
type:''
|
type:1 //1-公司,2-个人
|
||||||
})
|
})
|
||||||
Toast('合同已生成')
|
},
|
||||||
|
// 初始化合同类型
|
||||||
|
async initContractTypeList(){
|
||||||
|
let res = await dictDataLists({
|
||||||
|
type_id: 7
|
||||||
|
})
|
||||||
|
this.contractTypeList = res.data;
|
||||||
|
},
|
||||||
|
// 发起合同
|
||||||
|
async createContract(data){
|
||||||
|
let res = await userInitiateContract({
|
||||||
|
party_b:data.party_b,
|
||||||
|
contract_type:data.contract_type,
|
||||||
|
type:data.type
|
||||||
|
})
|
||||||
|
Toast('合同已发起')
|
||||||
|
this.loadUserDetail();
|
||||||
|
},
|
||||||
|
// 生成合同
|
||||||
|
async addContract(data){
|
||||||
|
if(!this.timer){
|
||||||
|
this.timerCount = 60;
|
||||||
|
let res = await userDraftingcontracts({
|
||||||
|
id: this.userInfo.id
|
||||||
|
});
|
||||||
|
Toast('合同已生成');
|
||||||
|
this.loadUserDetail();
|
||||||
|
this.timer = setInterval(()=>{
|
||||||
|
this.timerCount--;
|
||||||
|
if(this.timerCount==0)clearInterval(this.timer);
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
loadUserDetail() {
|
loadUserDetail() {
|
||||||
if (!this.id) return;
|
if (!this.id) return;
|
||||||
@ -296,7 +339,7 @@
|
|||||||
width: 284rpx;
|
width: 284rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #3274F9;
|
color: $theme-oa-color;
|
||||||
// white-space: nowrap; /* 不换行 */
|
// white-space: nowrap; /* 不换行 */
|
||||||
// overflow: hidden; /* 将超出文本隐藏 */
|
// overflow: hidden; /* 将超出文本隐藏 */
|
||||||
// text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */
|
// text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */
|
||||||
@ -339,7 +382,7 @@
|
|||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-left: 1rpx solid #ccc;
|
border-left: 1rpx solid #ccc;
|
||||||
color: #3274F9;
|
color: $theme-oa-color;
|
||||||
&:nth-child(1){
|
&:nth-child(1){
|
||||||
border-left: none;
|
border-left: none;
|
||||||
color: #333;
|
color: #333;
|
||||||
@ -377,6 +420,10 @@
|
|||||||
|
|
||||||
.contract {
|
.contract {
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
|
.title{
|
||||||
|
width: 694rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
@ -442,6 +489,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.send{
|
||||||
|
padding-top: 28rpx;
|
||||||
|
}
|
||||||
|
.send_btn{
|
||||||
|
width: 100%;
|
||||||
|
height: 84rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@ -455,5 +514,10 @@
|
|||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tips_center{
|
||||||
|
background-color: #666;
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -176,7 +176,11 @@
|
|||||||
// 初始化商机分类
|
// 初始化商机分类
|
||||||
async initCategoryBusinessList() {
|
async initCategoryBusinessList() {
|
||||||
let res = await categoryBusinessList();
|
let res = await categoryBusinessList();
|
||||||
this.demandList = res.data;
|
// this.demandList = res.data;
|
||||||
|
this.demandList = res.data.filter(item=>item.id==6);
|
||||||
|
this.demandList[0].children = this.demandList[0].children.filter(item=>item.id==7||item.id==8);
|
||||||
|
this.demandListChild = this.demandList[0].children;
|
||||||
|
// console.log(this.demandList);
|
||||||
},
|
},
|
||||||
// 选择更多需求
|
// 选择更多需求
|
||||||
changeHandler(e) {
|
changeHandler(e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user