Commit 4e594912 authored by 刘用法's avatar 刘用法

结算账单

parent c2f2ed52
<template> <template>
<view class="settlement-view"> <view class="settlement-view">
<view class="settlement-com-view">
<view class="left-view"> <view class="left-view">
<view class="time-view"></view> <view class="time-view">{{timeText}}</view>
<view class="order-view" v-for="(value, key) in items" :key="key"> <view class="order-view">
<text>{{value}}:</text> <text>提现编号:</text>
<text>{{data[key]}}</text> <text>{{data.payableRecordNumber}}</text>
</view> </view>
</view> </view>
<view class="right-view"> <view class="right-view">
<view :class="settlementTypeClass">{{data.payableRecordStatusText}}</view> <view :class="['settlement-status-view', settlementTypeClass]">{{data.payableRecordStatusText}}</view>
<view class="settlement-amount-view">{{data.payableAmount}}</view> <view class="settlement-amount-view">-{{data.settlementAmount}}</view>
</view> </view>
</view> </view>
<view class="line-view"></view>
</view>
</template> </template>
<script> <script>
...@@ -21,10 +24,10 @@ ...@@ -21,10 +24,10 @@
type: Object, type: Object,
default () { default () {
return { return {
paymentTime: '今天', paymentTime: new Date().getTime(),
payableAmount: 'yingfu', payableRecordStatusText: '提现',
payableRecordNumber: 'EE999777', payableRecordNumber: 'EE999777',
payableAmount: 9899 settlementAmount: 9899
} }
} }
} }
...@@ -42,12 +45,15 @@ ...@@ -42,12 +45,15 @@
} }
}, },
settlementTypeClass() { settlementTypeClass() {
switch (this.data){ switch (this.data) {
case '预计': case '提现':
return 'settlement-type-y' return 'settlement-type-y'
case '已确认': case '其他':
return 'settlement-type-h' return 'settlement-type-h'
} }
},
timeText() {
return this.$u.timeFormat(this.data.paymentTime, 'mm.dd')
} }
} }
} }
...@@ -55,18 +61,24 @@ ...@@ -55,18 +61,24 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.settlement-view { .settlement-view {
height: 212rpx;
.settlement-com-view {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
padding: 30rpx; padding: 30rpx;
height: 210rpx;
.left-view { .left-view {
.time-view { .time-view {
height: 40rpx; height: 40rpx;
width: 80rpx;
color: #333333; color: #333333;
background-color: #F4F5F7; background-color: #F4F5F7;
border-radius: 8rpx; border-radius: 8rpx;
font-size: 20rpx; font-size: 20rpx;
margin-bottom: 40rpx;
text-align: center;
padding-top: 6rpx;
} }
.order-view { .order-view {
...@@ -76,24 +88,47 @@ ...@@ -76,24 +88,47 @@
} }
.right-view { .right-view {
.settlement-type-y { display: flex;
flex-direction: column;
align-items: flex-end;
.settlement-status-view {
border-radius: 8rpx; border-radius: 8rpx;
border: 2rpx solid #FF930D; border: 2rpx solid #FF930D;
font-size: 20rpx; font-size: 20rpx;
color: #FF930D; color: #FF930D;
width: 80rpx;
height: 40rpx;
text-align: center;
padding-top: 4rpx;
margin-right: 10rpx;
&.settlement-type-y {
border: 2rpx solid #FF930D;
color: #FF930D;
} }
.settlement-type-h {
border-radius: 8rpx; &.settlement-type-h {
border: 2rpx solid #2272FF; border: 2rpx solid #2272FF;
font-size: 20rpx;
color: #2272FF; color: #2272FF;
} }
}
.settlement-amount-view { .settlement-amount-view {
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
color: #2272FF; color: #FA5A49;
margin-top: 30rpx;
}
}
} }
.line-view {
background-color: #F4F5F7;
height: 2rpx;
margin: 0 30rpx;
} }
} }
</style> </style>
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -46,7 +45,7 @@ ...@@ -46,7 +45,7 @@
}, },
computed: { computed: {
statementTypeClass() { statementTypeClass() {
switch (this.data.payableRecordStatusText){ switch (this.data.payableRecordStatusText) {
case '预结': case '预结':
return 'statement-type-y' return 'statement-type-y'
case '已确认': case '已确认':
...@@ -66,12 +65,13 @@ ...@@ -66,12 +65,13 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.statement-view { .statement-view {
height: 212rpx; height: 212rpx;
.statement-com-view { .statement-com-view {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
padding: 30rpx; padding: 30rpx;
height: 210rpx;
.left-view { .left-view {
.time-view { .time-view {
height: 40rpx; height: 40rpx;
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
background-color: #F4F5F7; background-color: #F4F5F7;
border-radius: 8rpx; border-radius: 8rpx;
font-size: 20rpx; font-size: 20rpx;
margin-bottom: 10rpx; margin-bottom: 20rpx;
text-align: center; text-align: center;
padding-top: 6rpx; padding-top: 6rpx;
} }
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-end; align-items: flex-end;
margin-top: 6rpx;
.statement-status-view { .statement-status-view {
border-radius: 8rpx; border-radius: 8rpx;
border: 2rpx solid #FF930D; border: 2rpx solid #FF930D;
...@@ -106,11 +106,13 @@ ...@@ -106,11 +106,13 @@
height: 40rpx; height: 40rpx;
text-align: center; text-align: center;
padding-top: 4rpx; padding-top: 4rpx;
&.statement-type-y { &.statement-type-y {
border: 2rpx solid #FF930D; border: 2rpx solid #FF930D;
color: #FF930D; color: #FF930D;
} }
&.statement-type-h { &.statement-type-h {
border: 2rpx solid #2272FF; border: 2rpx solid #2272FF;
color: #2272FF; color: #2272FF;
...@@ -122,10 +124,11 @@ ...@@ -122,10 +124,11 @@
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
color: #2272FF; color: #2272FF;
margin-top: 20rpx; margin-top: 30rpx;
} }
} }
} }
.line-view { .line-view {
background-color: #F4F5F7; background-color: #F4F5F7;
height: 2rpx; height: 2rpx;
......
...@@ -141,7 +141,6 @@ ...@@ -141,7 +141,6 @@
position: relative; position: relative;
overflow: auto; overflow: auto;
background-color: #F4F5F7; background-color: #F4F5F7;
overflow: auto;
.header-image { .header-image {
position: absolute; position: absolute;
width: 100%; width: 100%;
......
<template> <template>
<view class="statement-view"> <view class="settlement-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="结算账单" titleColor="#333333" :border-bottom="false"></u-navbar> <u-navbar back-icon-color="#333333" background="#F4F5F7" title="结算账单" titleColor="#333333"
:border-bottom="false"></u-navbar>
<view class="settlement-conten">
<view class="settlement-content-view">
<view class="head-view">
<view class="head-top-view">
<picker mode="date" :value="date" fields="month" @change="bindDateChange">
<view class="date-input">
<text class="date-text">{{date}}</text>
<u-icon name="arrow-down"></u-icon>
</view>
</picker>
</view>
<view class="head-bottom-view">
<view class="head-amount-view">
<view><text>已结算金额(元)</text></view>
<view class="head-amount-text"><text>{{info.totalAmount}}</text></view>
</view>
</view>
</view>
<image :src="liushuibeijingImage" class="head-back-image" mode="widthFix"></image>
<view class="list-view">
<view v-for="(item, index) in info.payableRecordExtendDtos" :key="index">
<Settlement :data="item"></Settlement>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import Settlement from "@/components/mine/settlement.vue"
export default { export default {
props: { components: {
data: { Settlement
type: Object,
default () {
return {
paymentTime: '已结算金额',
}
}
}
}, },
data() { data() {
return { return {
info: {
totalAmount: 0,
payableRecordExtendDtos: []
},
date: '2021-05'
} }
}, },
computed: { computed: {
liushuibeijingImage() {
return this.imageUrl + 'liushuibeijing.png'
},
imageUrl() {
return process.uniEnv.qn_base_url
},
},
created() {
var item = {
paymentTime: new Date().getTime(),
payableRecordStatusText: '提现',
payableRecordNumber: 'EE999777',
settlementAmount: 9899
}
this.info.payableRecordExtendDtos = [item, item, item, item, item]
},
methods: {
bindDateChange: function(e) {
this.date = e.target.value
},
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.statement-view { .settlement-view {
display: flex;
flex-direction: column;
height: 100vh;
background-color: #F4F5F7;
.settlement-conten {
overflow: auto;
.settlement-content-view {
margin: 10rpx 30rpx 30rpx 30rpx;
border-radius: 12rpx;
position: relative;
border-radius: 12rpx;
background-color: #FFFFFF;
.head-back-image {
position: relative;
width: 100%;
z-index: 0;
}
.head-view {
z-index: 1;
padding: 30rpx;
color: #FFFFFF;
position: absolute;
width: 100%;
.head-top-view {
margin-top: 10rpx;
margin-bottom: 50rpx;
.date-input {
.date-text {
padding-right: 10rpx;
font-size: 28rpx;
}
}
}
.head-bottom-view {
display: flex;
align-items: flex-start;
justify-content: space-between;
.head-amount-view {
font-size: 24rpx;
.head-amount-text {
font-size: 40rpx;
margin-top: 10rpx;
}
}
}
}
.list-view {
position: relative;
z-index: 1;
padding-bottom: 20rpx;
}
}
}
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment