更新
This commit is contained in:
160
financialCenter/business/detail.vue
Normal file
160
financialCenter/business/detail.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<view class="detail">
|
||||
<view class="card">
|
||||
<view>{{info.companyName}}</view>
|
||||
<view>{{handlerNumber(info.totalBalance)}}</view>
|
||||
<view>企业总余额(元)</view>
|
||||
</view>
|
||||
<view class="card-sec">
|
||||
<view class="first">
|
||||
<view>{{handlerNumber(info.balance)}}</view>
|
||||
<view>账户总余额(元)</view>
|
||||
</view>
|
||||
<view class="second">
|
||||
<view class="sepcial">
|
||||
<view>{{handlerNumber(+info.outCountBalance + +info.inCountBalance)}}</view>
|
||||
<view>油卡总余额</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>{{handlerNumber(info.inCountBalance)}}</view>
|
||||
<view>自营油卡余额</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>{{handlerNumber(info.outCountBalance)}}</view>
|
||||
<view>外营油卡余额</view>
|
||||
</view>
|
||||
<view class="sepcial">
|
||||
<view>{{handlerNumber(+info.rechargeRebateBalance + +info.consumeRebateBalance)}}</view>
|
||||
<view>返利总余额</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>{{handlerNumber(info.rechargeRebateBalance)}}</view>
|
||||
<view>充值返利余额</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>{{handlerNumber(info.consumeRebateBalance)}}</view>
|
||||
<view>消费返利余额</view>
|
||||
</view>
|
||||
<view class="sepcial">
|
||||
<view>{{handlerNumber( +info.chargeRechargeBalance + +info.totalChargeAmount)}}</view>
|
||||
<view>充值余额</view>
|
||||
</view>
|
||||
<view class="sepcial">
|
||||
<view>{{handlerNumber(info.chargeRechargeBalance)}}</view>
|
||||
<view>赊销充值余额</view>
|
||||
</view>
|
||||
<view class="sepcial">
|
||||
<view>{{handlerNumber(info.totalChargeAmount)}}</view>
|
||||
<view>赊销待还金额</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import serve from '@/api/financialCenter/business.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {}
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.item) {
|
||||
this.info = JSON.parse(decodeURI(options.item))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handlerNumber(number) {
|
||||
if (number == 0) return number
|
||||
if (!number) {
|
||||
return '--'
|
||||
}
|
||||
return +number.toFixed(2)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.detail {
|
||||
padding: 100rpx 35rpx 0;
|
||||
|
||||
}
|
||||
|
||||
.sepcial {
|
||||
padding-top: 13rpx !important;
|
||||
}
|
||||
|
||||
.sepcial view:nth-of-type(1) {
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 50rpx 40rpx 0;
|
||||
wdith: 100%;
|
||||
height: 285rpx;
|
||||
background: url('https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/oms-card-bg.png') #fff 100%/100% no-repeat;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.card view {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.card view:nth-of-type(2) {
|
||||
margin-top: 60rpx;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.card view:nth-of-type(1),
|
||||
.card view:nth-of-type(3) {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.card-sec {
|
||||
width: 100%;
|
||||
min-height: 500rpx;
|
||||
padding: 45rpx 35rpx;
|
||||
background: #FAEBD770;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.card-sec .first {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-sec .first view:nth-of-type(1) {
|
||||
font-size: 46rpx;
|
||||
}
|
||||
|
||||
.card-sec .first view:nth-of-type(2) {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.card-sec .second {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.card-sec .second>view {
|
||||
padding-top: 20rpx;
|
||||
padding-left: 5rpx;
|
||||
width: 33.3%;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.card-sec .second>view view:nth-of-type(1) {
|
||||
color: #333;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.card-sec .second>view view:nth-of-type(2) {
|
||||
color: #696969;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
153
financialCenter/business/index.vue
Normal file
153
financialCenter/business/index.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<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"></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) {
|
||||
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>
|
||||
120
financialCenter/serviceStation/detail.vue
Normal file
120
financialCenter/serviceStation/detail.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<view class="detail">
|
||||
<view class="card">
|
||||
<view>{{info.accountName}}</view>
|
||||
<view>{{handlerNumber(info.balance)}}</view>
|
||||
<view>账户总余额(元)</view>
|
||||
</view>
|
||||
<view class="card-sec">
|
||||
<view class="second">
|
||||
<view class="sepcial">
|
||||
<view>{{handlerNumber(info.rechargeBalance)}}</view>
|
||||
<view>账户充值余额</view>
|
||||
</view>
|
||||
<view class="sepcial">
|
||||
<view>{{handlerNumber(info.rechargeRebateBalance)}}</view>
|
||||
<view>充值返利余额</view>
|
||||
</view>
|
||||
<view class="sepcial">
|
||||
<view>{{handlerNumber(info.consumeRebateBalance)}}</view>
|
||||
<view>消费返利余额</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.item) {
|
||||
this.info = JSON.parse(decodeURI(options.item))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handlerNumber(number) {
|
||||
console.log(number)
|
||||
if (number == 0) return number
|
||||
if (!number) {
|
||||
return '--'
|
||||
}
|
||||
return +number.toFixed(2)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.detail {
|
||||
padding: 100rpx 35rpx 0;
|
||||
|
||||
}
|
||||
|
||||
.sepcial {
|
||||
padding-top: 13rpx !important;
|
||||
}
|
||||
|
||||
.sepcial view:nth-of-type(1) {
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 50rpx 40rpx 0;
|
||||
wdith: 100%;
|
||||
height: 285rpx;
|
||||
background: url('https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/oms-card-bg.png') #fff 100%/100% no-repeat;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.card view {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.card view:nth-of-type(2) {
|
||||
margin-top: 60rpx;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.card view:nth-of-type(1),
|
||||
.card view:nth-of-type(3) {
|
||||
font-size: 26rpx;
|
||||
/* margin-top: 10rpx; */
|
||||
}
|
||||
|
||||
.card-sec {
|
||||
width: 100%;
|
||||
/* min-height: 500rpx; */
|
||||
padding: 35rpx;
|
||||
background: #FAEBD770;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.card-sec .second {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.card-sec .second>view {
|
||||
padding-top: 20rpx;
|
||||
padding-left: 5rpx;
|
||||
width: 33.3%;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.card-sec .second>view view:nth-of-type(1) {
|
||||
color: #333;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.card-sec .second>view view:nth-of-type(2) {
|
||||
color: #696969;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
149
financialCenter/serviceStation/index.vue
Normal file
149
financialCenter/serviceStation/index.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<view style="height: 100vh;display: flex;flex-direction: column; background: #F0F2FF;">
|
||||
<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.accountName" 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/serviceStation/detail',item)">
|
||||
<image class="logo"></image>
|
||||
<view>{{item.accountName}}</view>
|
||||
<view>账户总余额:{{handlerNumber(item.balance)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/financialCenter/serviceStation.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
styles: {},
|
||||
paramter: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
params: {
|
||||
accountName: ''
|
||||
}
|
||||
},
|
||||
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) {
|
||||
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: 30rpx;
|
||||
padding: 0 50rpx;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 30rpx 55rpx;
|
||||
}
|
||||
|
||||
.container .item {
|
||||
position: relative;
|
||||
margin-bottom: 25rpx;
|
||||
padding-top: 60rpx;
|
||||
height: 200rpx;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
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) {
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
font-weight: 550;
|
||||
}
|
||||
|
||||
.container .item view:nth-of-type(2) {
|
||||
margin-top: 10rpx;
|
||||
color: #778899;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user