You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
155 lines
3.3 KiB
155 lines
3.3 KiB
<template> |
|
<view style="height: 100vh;display: flex;flex-direction: column;"> |
|
<view class="header"> |
|
<view :style="{height:styles.top+'px'}"></view> |
|
<uni-nav-bar @clickLeft='jump(-1)' :border="false" color='white' backgroundColor="rgba(0,0,0,0)" |
|
left-icon="back" title="公司账户管理" /> |
|
<view class="seach"> |
|
<uni-easyinput @confirm='seachFn' style="border-radius:12rpx ;" prefixIcon="search" |
|
placeholder-style="color:#bbb;font-weight: 100;" confirmType="搜索" v-model="paramter.params.companyName" |
|
placeholder="请输入公司名称"> |
|
</uni-easyinput> |
|
</view> |
|
</view> |
|
<view style="flex:1;overflow: hidden;"> |
|
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower='scrolltolower'> |
|
<view class="container"> |
|
<view class="item" v-for="item,index in tableList" :key="index" |
|
@tap="jump(1,'/financialCenter/business/detail',item)"> |
|
<image class="logo" src="@/static/company.png"></image> |
|
<view>{{item.companyName}}</view> |
|
<view>企业总余额:{{handlerNumber(item.totalBalance)}}</view> |
|
</view> |
|
</view> |
|
</scroll-view> |
|
</view> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
import serve from '@/api/financialCenter/business.js' |
|
export default { |
|
data() { |
|
return { |
|
styles: {}, |
|
paramter: { |
|
currentPage: 1, |
|
pageSize: 10, |
|
params: { |
|
companyName:'' |
|
} |
|
}, |
|
tableList: [] |
|
} |
|
}, |
|
onLoad() { |
|
this.styles = uni.getMenuButtonBoundingClientRect() |
|
this.getByPage() |
|
}, |
|
// onShow() { |
|
// this.getByPage() |
|
// }, |
|
methods: { |
|
seachFn() { |
|
this.tableList = [] |
|
this.paramter.currentPage = 1 |
|
this.getByPage() |
|
console.log('seachFn') |
|
}, |
|
getByPage() { |
|
serve.getByPage(this.paramter).then(res => { |
|
this.tableList = this.tableList.concat(res.data.list); |
|
}) |
|
}, |
|
// 触底加载 |
|
scrolltolower() { |
|
this.paramter.currentPage += 1 |
|
this.getByPage() |
|
|
|
}, |
|
handlerNumber(number) { |
|
if (number == 0) return number |
|
if (!number) { |
|
return '--' |
|
} |
|
return +number.toFixed(2) |
|
}, |
|
|
|
jump(e, path,item) { |
|
console.log(123) |
|
switch (e) { |
|
case -1: |
|
uni.navigateBack() |
|
break; |
|
case 1: |
|
uni.navigateTo({ |
|
url: `${path}?item=${encodeURI(JSON.stringify(item))}` |
|
}) |
|
break; |
|
} |
|
}, |
|
} |
|
} |
|
</script> |
|
|
|
<style> |
|
.uni-easyinput__content { |
|
background-color: #fff; |
|
} |
|
|
|
.header { |
|
position: relative; |
|
width: 100%; |
|
min-height: 403rpx; |
|
background: url('https://xoi-support.oss-cn-hangzhou.aliyuncs.com/星油admin小程序/sjbj.png') center/100% no-repeat; |
|
} |
|
|
|
.header .seach { |
|
margin-top: 60rpx; |
|
padding: 0 50rpx; |
|
} |
|
|
|
.container { |
|
padding: 30rpx 55rpx; |
|
} |
|
|
|
.container .item { |
|
position: relative; |
|
margin-bottom: 25rpx; |
|
padding-top: 60rpx; |
|
height: 200rpx; |
|
width: 100%; |
|
background: #fff; |
|
/* border: 1px solid #333; */ |
|
border-radius: 10rpx; |
|
} |
|
|
|
.container .item .logo { |
|
position: absolute; |
|
left: 20rpx; |
|
top: 50%; |
|
transform: translateY(-50%); |
|
width: 100rpx; |
|
height: 100rpx; |
|
border-radius: 50%; |
|
/* border: 1px solid #333; */ |
|
} |
|
|
|
.container .item view { |
|
padding-left: 150rpx; |
|
|
|
} |
|
|
|
.container .item view:nth-of-type(1) { |
|
/* margin-top: 57rpx; */ |
|
color: #333; |
|
font-size: 30rpx; |
|
font-weight: 550; |
|
} |
|
|
|
.container .item view:nth-of-type(2) { |
|
margin-top: 10rpx; |
|
color: #778899; |
|
font-size: 24rpx; |
|
} |
|
</style>
|
|
|