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

结算账单

parent c2f2ed52
<template> <template>
<view class="settlement-view"> <view class="settlement-view">
<view class="left-view"> <view class="settlement-com-view">
<view class="time-view"></view> <view class="left-view">
<view class="order-view" v-for="(value, key) in items" :key="key"> <view class="time-view">{{timeText}}</view>
<text>{{value}}:</text> <view class="order-view">
<text>{{data[key]}}</text> <text>提现编号:</text>
<text>{{data.payableRecordNumber}}</text>
</view>
</view>
<view class="right-view">
<view :class="['settlement-status-view', settlementTypeClass]">{{data.payableRecordStatusText}}</view>
<view class="settlement-amount-view">-{{data.settlementAmount}}</view>
</view> </view>
</view> </view>
<view class="right-view"> <view class="line-view"></view>
<view :class="settlementTypeClass">{{data.payableRecordStatusText}}</view>
<view class="settlement-amount-view">{{data.payableAmount}}</view>
</view>
</view> </view>
</template> </template>
...@@ -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
} }
} }
} }
...@@ -40,60 +43,92 @@ ...@@ -40,60 +43,92 @@
payableRecordNumber: '工单编号', payableRecordNumber: '工单编号',
businessType: '工单类型' businessType: '工单类型'
} }
}, },
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')
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.settlement-view { .settlement-view {
display: flex; height: 212rpx;
justify-content: space-between; .settlement-com-view {
align-items: flex-start; display: flex;
padding: 30rpx; justify-content: space-between;
align-items: flex-start;
padding: 30rpx;
height: 210rpx;
.left-view {
.time-view {
height: 40rpx;
width: 80rpx;
color: #333333;
background-color: #F4F5F7;
border-radius: 8rpx;
font-size: 20rpx;
margin-bottom: 40rpx;
text-align: center;
padding-top: 6rpx;
}
.left-view { .order-view {
.time-view { font-size: 26rpx;
height: 40rpx; color: #999999;
color: #333333; }
background-color: #F4F5F7;
border-radius: 8rpx;
font-size: 20rpx;
} }
.order-view { .right-view {
font-size: 26rpx; display: flex;
color: #999999; flex-direction: column;
align-items: flex-end;
.settlement-status-view {
border-radius: 8rpx;
border: 2rpx solid #FF930D;
font-size: 20rpx;
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: 2rpx solid #2272FF;
color: #2272FF;
}
}
.settlement-amount-view {
font-size: 40rpx;
font-weight: bold;
color: #FA5A49;
margin-top: 30rpx;
}
} }
} }
.right-view { .line-view {
.settlement-type-y { background-color: #F4F5F7;
border-radius: 8rpx; height: 2rpx;
border: 2rpx solid #FF930D; margin: 0 30rpx;
font-size: 20rpx;
color: #FF930D;
}
.settlement-type-h {
border-radius: 8rpx;
border: 2rpx solid #2272FF;
font-size: 20rpx;
color: #2272FF;
}
.settlement-amount-view {
font-size: 40rpx;
font-weight: bold;
color: #2272FF;
}
} }
} }
</style> </style>
<template> <template>
<view class="statement-view"> <view class="statement-view">
<view class="statement-com-view"> <view class="statement-com-view">
<view class="left-view"> <view class="left-view">
<view class="time-view">{{timeText}}</view> <view class="time-view">{{timeText}}</view>
<view class="order-view"> <view class="order-view">
<text>工单编号:</text> <text>工单编号:</text>
<text>{{data.orderNumber}}</text> <text>{{data.orderNumber}}</text>
</view> </view>
<view class="order-view"> <view class="order-view">
<text>工单类型:</text> <text>工单类型:</text>
<text>{{typeText}}</text> <text>{{typeText}}</text>
</view>
</view>
<view class="right-view">
<view :class="['statement-status-view', statementTypeClass]">{{data.payableRecordStatusText}}</view>
<view class="statement-amount-view">+{{data.payableAmount}}</view>
</view> </view>
</view> </view>
<view class="right-view"> <view class="line-view"></view>
<view :class="['statement-status-view', statementTypeClass]">{{data.payableRecordStatusText}}</view>
<view class="statement-amount-view">+{{data.payableAmount}}</view>
</view>
</view>
<view class="line-view"></view>
</view>
</view> </view>
</template> </template>
...@@ -32,7 +31,7 @@ ...@@ -32,7 +31,7 @@
paymentTime: new Date().getTime(), paymentTime: new Date().getTime(),
payableRecordStatusText: '预结', payableRecordStatusText: '预结',
orderNumber: 'EE999777', orderNumber: 'EE999777',
orderServiceType: '安装', orderServiceType: '安装',
inGuaranteePeriod: false, // true 保内;false 保外 inGuaranteePeriod: false, // true 保内;false 保外
payableAmount: 9899 payableAmount: 9899
} }
...@@ -45,91 +44,95 @@ ...@@ -45,91 +44,95 @@
} }
}, },
computed: { computed: {
statementTypeClass() { statementTypeClass() {
switch (this.data.payableRecordStatusText){ switch (this.data.payableRecordStatusText) {
case '预结': case '预结':
return 'statement-type-y' return 'statement-type-y'
case '已确认': case '已确认':
return 'statement-type-h' return 'statement-type-h'
} }
}, },
typeText() { typeText() {
return (this.data.inGuaranteePeriod ? '保内' : '保外') + '-' + this.data.orderServiceType return (this.data.inGuaranteePeriod ? '保内' : '保外') + '-' + this.data.orderServiceType
}, },
timeText() { timeText() {
return this.$u.timeFormat(this.data.paymentTime, 'mm.dd') return this.$u.timeFormat(this.data.paymentTime, 'mm.dd')
} }
} }
} }
</script> </script>
<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 {
.time-view {
height: 40rpx;
width: 80rpx;
color: #333333;
background-color: #F4F5F7;
border-radius: 8rpx;
font-size: 20rpx;
margin-bottom: 20rpx;
text-align: center;
padding-top: 6rpx;
}
.left-view { .order-view {
.time-view { font-size: 26rpx;
height: 40rpx; color: #999999;
width: 80rpx; margin-bottom: 6rpx;
color: #333333; }
background-color: #F4F5F7;
border-radius: 8rpx;
font-size: 20rpx;
margin-bottom: 10rpx;
text-align: center;
padding-top: 6rpx;
} }
.order-view { .right-view {
font-size: 26rpx; display: flex;
color: #999999; flex-direction: column;
margin-bottom: 6rpx; align-items: flex-end;
}
}
.right-view { .statement-status-view {
display: flex; border-radius: 8rpx;
flex-direction: column; border: 2rpx solid #FF930D;
align-items: flex-end; font-size: 20rpx;
margin-top: 6rpx; color: #FF930D;
.statement-status-view { width: 80rpx;
border-radius: 8rpx; height: 40rpx;
border: 2rpx solid #FF930D; text-align: center;
font-size: 20rpx; padding-top: 4rpx;
color: #FF930D;
width: 80rpx;
height: 40rpx;
text-align: center;
padding-top: 4rpx;
&.statement-type-y {
border: 2rpx solid #FF930D;
color: #FF930D;
}
&.statement-type-h {
border: 2rpx solid #2272FF;
color: #2272FF;
}
}
&.statement-type-y {
border: 2rpx solid #FF930D;
color: #FF930D;
.statement-amount-view { }
font-size: 40rpx;
font-weight: bold; &.statement-type-h {
color: #2272FF; border: 2rpx solid #2272FF;
margin-top: 20rpx; color: #2272FF;
}
}
.statement-amount-view {
font-size: 40rpx;
font-weight: bold;
color: #2272FF;
margin-top: 30rpx;
}
} }
} }
}
.line-view { .line-view {
background-color: #F4F5F7; background-color: #F4F5F7;
height: 2rpx; height: 2rpx;
margin: 0 30rpx; margin: 0 30rpx;
} }
} }
</style> </style>
...@@ -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