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="top">
<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 class="name">{{userInfo.nickname}}</view>
<view v-if="user_id==0">
<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 class="right" @click="naviTo('/subpkg/topUp/topUp')">
账户充值
@ -94,11 +100,15 @@
<script>
import { accountLogLists, accountLogListsMonth } from "@/api/pay.js"
import { userInfo } from "@/api/oaUser.js"
import { Toast } from '@/libs/uniApi.js'
export default {
data() {
return {
user_id:0,
userInfo:{},
otherUserInfo:{},
billTypeList:['日账单','月账单'],
current: 0,
billList: [],
@ -113,12 +123,21 @@ export default {
},
}
},
onLoad() {
onLoad(e) {
if(e.id>0){
this.user_id=e.id
}
this.loadBill()
},
onShow() {
// 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:{
eyeType(){
@ -127,6 +146,7 @@ export default {
},
onBackPress() {
this.loadBill()
},
methods: {
naviTo(url) {
@ -135,6 +155,12 @@ export default {
url: url
}) : Toast('暂未开放')
},
async OtherUserInfo(){
let res = await userInfo({
id:this.user_id
});
this.userInfo=res.data
},
updateEye(){
this.$store.commit('SET_EYE_TYPE')
},
@ -149,7 +175,8 @@ export default {
let res = await accountLogLists({
type: 'um', //
page_no: this.loadConfig.page,
page_size: this.loadConfig.limit
page_size: this.loadConfig.limit,
user_id:this.user_id
});
this.loadConfig.status="loadmore"
if(res.data.lists.length<this.loadConfig.limit){

View File

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