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

结算账单

parent c2f2ed52
<template>
<view class="settlement-view">
<view class="left-view">
<view class="time-view"></view>
<view class="order-view" v-for="(value, key) in items" :key="key">
<text>{{value}}:</text>
<text>{{data[key]}}</text>
<view class="settlement-com-view">
<view class="left-view">
<view class="time-view">{{timeText}}</view>
<view class="order-view">
<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 class="right-view">
<view :class="settlementTypeClass">{{data.payableRecordStatusText}}</view>
<view class="settlement-amount-view">{{data.payableAmount}}</view>
</view>
<view class="line-view"></view>
</view>
</template>
......@@ -21,10 +24,10 @@
type: Object,
default () {
return {
paymentTime: '今天',
payableAmount: 'yingfu',
paymentTime: new Date().getTime(),
payableRecordStatusText: '提现',
payableRecordNumber: 'EE999777',
payableAmount: 9899
settlementAmount: 9899
}
}
}
......@@ -40,60 +43,92 @@
payableRecordNumber: '工单编号',
businessType: '工单类型'
}
},
settlementTypeClass() {
switch (this.data){
case '预计':
return 'settlement-type-y'
case '已确认':
return 'settlement-type-h'
}
},
settlementTypeClass() {
switch (this.data) {
case '提现':
return 'settlement-type-y'
case '其他':
return 'settlement-type-h'
}
},
timeText() {
return this.$u.timeFormat(this.data.paymentTime, 'mm.dd')
}
}
}
</script>
<style lang="scss" scoped>
.settlement-view {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 30rpx;
.settlement-view {
height: 212rpx;
.settlement-com-view {
display: flex;
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 {
.time-view {
height: 40rpx;
color: #333333;
background-color: #F4F5F7;
border-radius: 8rpx;
font-size: 20rpx;
.order-view {
font-size: 26rpx;
color: #999999;
}
}
.order-view {
font-size: 26rpx;
color: #999999;
.right-view {
display: flex;
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 {
.settlement-type-y {
border-radius: 8rpx;
border: 2rpx solid #FF930D;
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;
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
margin: 0 30rpx;
}
}
</style>
<template>
<template>
<view class="statement-view">
<view class="statement-com-view">
<view class="left-view">
<view class="time-view">{{timeText}}</view>
<view class="order-view">
<text>工单编号:</text>
<text>{{data.orderNumber}}</text>
</view>
<view class="order-view">
<text>工单类型:</text>
<text>{{typeText}}</text>
<view class="statement-com-view">
<view class="left-view">
<view class="time-view">{{timeText}}</view>
<view class="order-view">
<text>工单编号:</text>
<text>{{data.orderNumber}}</text>
</view>
<view class="order-view">
<text>工单类型:</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 class="right-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 class="line-view"></view>
</view>
</template>
......@@ -32,7 +31,7 @@
paymentTime: new Date().getTime(),
payableRecordStatusText: '预结',
orderNumber: 'EE999777',
orderServiceType: '安装',
orderServiceType: '安装',
inGuaranteePeriod: false, // true 保内;false 保外
payableAmount: 9899
}
......@@ -45,91 +44,95 @@
}
},
computed: {
statementTypeClass() {
switch (this.data.payableRecordStatusText){
case '预结':
return 'statement-type-y'
case '已确认':
return 'statement-type-h'
}
},
typeText() {
return (this.data.inGuaranteePeriod ? '保内' : '保外') + '-' + this.data.orderServiceType
},
timeText() {
return this.$u.timeFormat(this.data.paymentTime, 'mm.dd')
statementTypeClass() {
switch (this.data.payableRecordStatusText) {
case '预结':
return 'statement-type-y'
case '已确认':
return 'statement-type-h'
}
},
typeText() {
return (this.data.inGuaranteePeriod ? '保内' : '保外') + '-' + this.data.orderServiceType
},
timeText() {
return this.$u.timeFormat(this.data.paymentTime, 'mm.dd')
}
}
}
</script>
<style lang="scss" scoped>
.statement-view {
height: 212rpx;
.statement-view {
height: 212rpx;
.statement-com-view {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 30rpx;
display: flex;
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: 20rpx;
text-align: center;
padding-top: 6rpx;
}
.left-view {
.time-view {
height: 40rpx;
width: 80rpx;
color: #333333;
background-color: #F4F5F7;
border-radius: 8rpx;
font-size: 20rpx;
margin-bottom: 10rpx;
text-align: center;
padding-top: 6rpx;
.order-view {
font-size: 26rpx;
color: #999999;
margin-bottom: 6rpx;
}
}
.order-view {
font-size: 26rpx;
color: #999999;
margin-bottom: 6rpx;
}
}
.right-view {
display: flex;
flex-direction: column;
align-items: flex-end;
.right-view {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-top: 6rpx;
.statement-status-view {
border-radius: 8rpx;
border: 2rpx solid #FF930D;
font-size: 20rpx;
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-status-view {
border-radius: 8rpx;
border: 2rpx solid #FF930D;
font-size: 20rpx;
color: #FF930D;
width: 80rpx;
height: 40rpx;
text-align: center;
padding-top: 4rpx;
&.statement-type-y {
border: 2rpx solid #FF930D;
color: #FF930D;
.statement-amount-view {
font-size: 40rpx;
font-weight: bold;
color: #2272FF;
margin-top: 20rpx;
}
&.statement-type-h {
border: 2rpx solid #2272FF;
color: #2272FF;
}
}
.statement-amount-view {
font-size: 40rpx;
font-weight: bold;
color: #2272FF;
margin-top: 30rpx;
}
}
}
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
margin: 0 30rpx;
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
margin: 0 30rpx;
}
}
</style>
......@@ -141,7 +141,6 @@
position: relative;
overflow: auto;
background-color: #F4F5F7;
overflow: auto;
.header-image {
position: absolute;
width: 100%;
......
<template>
<view class="statement-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="结算账单" titleColor="#333333" :border-bottom="false"></u-navbar>
<view class="settlement-view">
<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>
</template>
<script>
import Settlement from "@/components/mine/settlement.vue"
export default {
props: {
data: {
type: Object,
default () {
return {
paymentTime: '已结算金额',
}
}
}
components: {
Settlement
},
data() {
return {
info: {
totalAmount: 0,
payableRecordExtendDtos: []
},
date: '2021-05'
}
},
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>
<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>
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