This commit is contained in:
mkm 2023-08-03 15:44:42 +08:00
parent ba0cf23b62
commit 22b3f30488
2 changed files with 84 additions and 31 deletions

View File

@ -3,8 +3,14 @@
<view class="finance_head"> <view class="finance_head">
<view class="top"> <view class="top">
<view class="left" @click="naviTo()"> <view class="left" @click="naviTo()">
<u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" width="44px" height="44px" shape="circle"></u--image> <view v-if="user_id==0">
<view class="name">{{userInfo.nickname}}</view> <u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" width="44px" height="44px" shape="circle"></u--image>
<view class="name">{{userInfo.nickname}}</view>
</view>
<view v-else>
<u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" width="44px" height="44px" shape="circle"></u--image>
<view class="name">{{userInfo.nickname}}</view>
</view>
</view> </view>
<!-- <view class="right" @click="naviTo('/subpkg/topUp/topUp')"> <!-- <view class="right" @click="naviTo('/subpkg/topUp/topUp')">
账户充值 账户充值
@ -94,11 +100,15 @@
<script> <script>
import { accountLogLists, accountLogListsMonth } from "@/api/pay.js" import { accountLogLists, accountLogListsMonth } from "@/api/pay.js"
import { userInfo } from "@/api/oaUser.js"
import { Toast } from '@/libs/uniApi.js' import { Toast } from '@/libs/uniApi.js'
export default { export default {
data() { data() {
return { return {
user_id:0,
userInfo:{}, userInfo:{},
otherUserInfo:{},
billTypeList:['日账单','月账单'], billTypeList:['日账单','月账单'],
current: 0, current: 0,
billList: [], billList: [],
@ -113,12 +123,21 @@ export default {
}, },
} }
}, },
onLoad() { onLoad(e) {
if(e.id>0){
this.user_id=e.id
}
this.loadBill() this.loadBill()
}, },
onShow() { onShow() {
// console.log(this.userInfo); // console.log(this.userInfo);
this.userInfo = this.$store.state.app.userInfo; if(this.user_id==0){
this.userInfo = this.$store.state.app.userInfo;
}else{
this.OtherUserInfo()
}
}, },
computed:{ computed:{
eyeType(){ eyeType(){
@ -127,6 +146,7 @@ export default {
}, },
onBackPress() { onBackPress() {
this.loadBill() this.loadBill()
}, },
methods: { methods: {
naviTo(url) { naviTo(url) {
@ -135,6 +155,12 @@ export default {
url: url url: url
}) : Toast('暂未开放') }) : Toast('暂未开放')
}, },
async OtherUserInfo(){
let res = await userInfo({
id:this.user_id
});
this.userInfo=res.data
},
updateEye(){ updateEye(){
this.$store.commit('SET_EYE_TYPE') this.$store.commit('SET_EYE_TYPE')
}, },
@ -149,7 +175,8 @@ export default {
let res = await accountLogLists({ let res = await accountLogLists({
type: 'um', // type: 'um', //
page_no: this.loadConfig.page, page_no: this.loadConfig.page,
page_size: this.loadConfig.limit page_size: this.loadConfig.limit,
user_id:this.user_id
}); });
this.loadConfig.status="loadmore" this.loadConfig.status="loadmore"
if(res.data.lists.length<this.loadConfig.limit){ if(res.data.lists.length<this.loadConfig.limit){

View File

@ -3,10 +3,9 @@
<view class="personnel_list"> <view class="personnel_list">
<block v-for="(item, index) in userList" :key="item.id"> <block v-for="(item, index) in userList" :key="item.id">
<view class="personnel_item"> <view class="personnel_item">
<view class="type" :class="item.is_contract?'type_blue':''"> <view class="type" :class="item.is_contract?'type_blue':''">
<image v-if="item.is_contract" src="../../static/icons/ok_w.png"></image> <image v-if="item.is_contract" src="../../static/icons/ok_w.png"></image>
<image v-else src="../../static/icons/err_w.png"></image> <image v-else src="../../static/icons/err_w.png"></image>
<text>{{item.is_contract?'已签约':'未签约'}}</text>
</view> </view>
<view class="top"> <view class="top">
<view class="left"> <view class="left">
@ -15,18 +14,23 @@
<view class="right"> <view class="right">
<view class="info_top"> <view class="info_top">
<view class="info_name">{{item.nickname}}</view> <view class="info_name">{{item.nickname}}</view>
<view v-if="item.company">{{item.company.company_name}}</view> <text class="phone">电话:</text>
<text class="tel">{{item.phone||item.account}}</text>
</view> </view>
<view class="info_bottom"> <view class="info_bottom">
<view class="item phone"> <text class="item phone">
<uni-icons type="phone" color="#999999FF"></uni-icons> 分管片区:
{{item.phone||item.account}} </text>
</view>
<view class="item"> <view class="item">
<uni-icons type="location" color="#999999FF"></uni-icons>
<view class="location">{{ item.city_name+item.area_name+item.street_name }}</view> <view class="location">{{ item.city_name+item.area_name+item.street_name }}</view>
</view> </view>
</view> </view>
<view class="company">
<text>
所属公司:
</text>
<view class="itm" v-if="item.company">{{item.company.company_name}}</view>
</view>
</view> </view>
</view> </view>
<view class="center"> <view class="center">
@ -34,16 +38,13 @@
{{role}} {{role}}
<!-- <text class="green">管理人</text> --> <!-- <text class="green">管理人</text> -->
</view> </view>
<view class="bottom">
<view><image :src="item.qualification&&item.qualification.id_card?'../../static/icons/ok.png':'../../static/icons/err.png'"></image>身份证</view>
<view><image :src="item.qualification&&item.qualification.car_card?'../../static/icons/ok.png':'../../static/icons/err.png'"></image>驾驶证</view>
<view><image :src="item.qualification&&item.qualification.bank_account?'../../static/icons/ok.png':'../../static/icons/err.png'"></image>银行卡</view>
</view>
</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;float: right;">
<!-- <button v-if="item.is_captain" class="look" @click="navTo('/subpkg/archives/archives?id='+item.id)">片区档案</button> --> <button class="look sign" v-if="item.is_contract==1">已签约</button>
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">查看</button> <button class="look red" v-else>未签约</button>
<button class="look" @click="navTo('/subpkg/finance/finance?id='+item.id)">财务查看</button>
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">信息查看</button>
</view> </view>
</view> </view>
</block> </block>
@ -140,10 +141,10 @@ export default {
position: relative; position: relative;
padding: 28rpx; padding: 28rpx;
.type{ .type{
width: 137rpx; width: 50rpx;
height: 53rpx; height: 50rpx;
background-color: #F02828; background-color: #F02828;
border-radius: 0rpx 14rpx 0rpx 14rpx; border-radius: 50%;
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
@ -152,16 +153,16 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: absolute; position: absolute;
top: 0; top: 10rpx;
right: 0; right: 10rpx;
image{ image{
width: 18rpx; width: 18rpx;
height: 18rpx; height: 18rpx;
margin-right: 9rpx; margin-right: 1rpx;
} }
} }
.type_blue{ .type_blue{
background-color: $theme-oa-color; background-color: #34A853;
} }
.top{ .top{
// background-color: #3274F9; // background-color: #3274F9;
@ -187,6 +188,13 @@ export default {
color: #333333; color: #333333;
margin-right: 18rpx; margin-right: 18rpx;
} }
.phone{
margin-left: 30rpx;
color: #999999;
}
.tel{
color: #000;
}
} }
.info_bottom{ .info_bottom{
display: flex; display: flex;
@ -202,8 +210,18 @@ export default {
white-space: nowrap; /* 不换行 */ white-space: nowrap; /* 不换行 */
overflow: hidden; /* 将超出文本隐藏 */ overflow: hidden; /* 将超出文本隐藏 */
text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */ text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */
color: #000;
} }
} }
.company{
display: flex;
text{
margin-right: 30rpx;
}
.itm{
color: #000;
}
}
} }
} }
.center{ .center{
@ -235,7 +253,7 @@ export default {
} }
.bottom{ .bottom{
display: flex; display: flex;
justify-content: right; justify-content: center;
.look{ .look{
width: 158rpx; width: 158rpx;
height: 53rpx; height: 53rpx;
@ -251,6 +269,14 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.sign{
color: #34A853;
border: 2rpx solid #34A853;
}
.red{
color: #F02828;
border: 2rpx solid #F02828;
}
} }
} }
} }