提交 5f128aa4 authored 作者: 宋雄's avatar 宋雄

完善支付和对账

上级 2df02534
......@@ -4,7 +4,7 @@
const serverConfig = {
baseURL: "https://life.cloud.hjxbc.cn",
imageURL: "https://life.cloud.hjxbc.cn/sys/common/static/",
// baseURL: "http://192.168.0.101:9999",
// baseURL: "http://192.168.0.106:9999",
// baseURL: "http://192.168.0.119:9999",
// baseURL: "http://220.203.25.212:9999", /* 根域名 */
// baseURL: "http://114.67.111.37:8001" /* 根域名 */
......
......@@ -134,12 +134,14 @@
}, {
"path": "pages/payCostProperty/index",
"style": {
"navigationBarTitleText": "缴费"
"navigationBarTitleText": "缴费",
"enablePullDownRefresh": true
}
}, {
"path": "pages/payCostRecord/index",
"style": {
"navigationBarTitleText": "缴费记录"
"navigationBarTitleText": "缴费记录",
"enablePullDownRefresh": true
}
}, {
"path": "pages/payCostDetails/index",
......@@ -187,7 +189,8 @@
},{
"path": "pages/myPaycost/index",
"style": {
"navigationBarTitleText": "我的缴费记录"
"navigationBarTitleText": "我的缴费记录",
"enablePullDownRefresh": true
}
}, {
"path": "pages/myPaycostDetails/index",
......
<template>
<view class="container">
<view class="page" v-if="payList.length">
<view class="page">
<view class="paycost">
<view class="screening">
<uni-datetime-picker v-model="range" type="daterange" />
<view>
<uni-datetime-picker v-model="range" type="daterange" start-placeholder="缴费开始日期" end-placeholder="缴费结束日期" @change="onDateChange" />
</view>
<view class="list">
<view class="item" @click="toDetail()">
<view class="list" v-if="payList.length">
<view class="item" @click="toDetail(item.id)" v-for="item in payList" :key="item.id">
<view class="title">
<view class="name">电费</view>
<view class="cost">¥100.00</view>
<view class="name">{{item.chargeTypeName}}</view>
<view class="cost">¥{{item.totalAmount}}</view>
</view>
<view class="content">
<view class="text">
<view class="name">缴费人</view>
<view class="detail">张一</view>
<view class="detail">{{item.residentName}}</view>
</view>
<view class="text">
<view class="name">缴费人号码</view>
<view class="detail">15214525682</view>
<view class="detail">{{item.residentPhone}}</view>
</view>
<view class="text">
<view class="name">缴费时间</view>
<view class="detail">2023年3月1日 12:12</view>
<view class="detail">{{item.paymentTime}}</view>
</view>
<view class="text">
<view class="name">缴费地址</view>
<view class="detail">十堰市张湾区汉江之星小区1栋1302</view>
<view class="detail">{{item.buildingName}}{{item.unitName}}{{item.roomName}}</view>
</view>
</view>
</view>
<!-- <view class="item" @click="toDetail()">
<view class="title">
<view class="name">水费</view>
<view class="cost">¥100.00</view>
</view>
<view class="content">
<view class="text">
<view class="name">缴费人</view>
<view class="detail">张一</view>
</view>
<view class="text">
<view class="name">缴费人号码</view>
<view class="detail">15214525682</view>
</view>
<view class="text">
<view class="name">缴费时间</view>
<view class="detail">2023年3月1日 12:12</view>
</view>
<view class="text">
<view class="name">缴费地址</view>
<view class="detail">十堰市张湾区汉江之星小区1栋1302</view>
</view>
</view>
</view>
<view class="item" @click="toDetail()">
<view class="title">
<view class="name">物业费</view>
<view class="cost">¥100.00</view>
</view>
<view class="content">
<view class="text">
<view class="name">缴费人</view>
<view class="detail">张一</view>
</view>
<view class="text">
<view class="name">缴费人号码</view>
<view class="detail">15214525682</view>
</view>
<view class="text">
<view class="name">缴费时间</view>
<view class="detail">2023年3月1日 12:12</view>
</view>
<view class="text">
<view class="name">缴费地址</view>
<view class="detail">十堰市张湾区汉江之星小区1栋1302</view>
</view>
</view>
</view> -->
</view>
</view>
</view>
......@@ -96,23 +47,55 @@
components: {noData},
data() {
return {
isFinish: false,
pageNo: 1,
range: ['', ''],
payList: []
}
},
methods: {
async getList() {
let {result} = await communityPaymentApi({paymentStatus: 'paid'})
this.payList = result.records
async getList(flag) {
let {result} = await communityPaymentApi({
paymentStatus: 'paid',
payStartTime: this.range[0] || '',
payEndTime: this.range[1] || '',
pageNo: this.pageNo,
pageSize: 10
})
if(this.pageNo === 1) {
this.payList = [].concat(result.records)
} else {
this.payList = this.payList.concat(result.records)
}
if(flag) { uni.stopPullDownRefresh(); }
if(this.payList.length >= result.total) {
this.isFinish = true
} else {
this.pageNo += 1
}
},
onDateChange(value) {
this.pageNo = 1
this.range = value
this.getList()
},
toDetail() {
toDetail(id) {
uni.navigateTo({
url: '/pages/myPaycostDetails/index',
url: '/pages/myPaycostDetails/index?id=' + id
});
}
},
onLoad() {
this.getList()
},
onPullDownRefresh() {
this.pageNo = 1
this.isFinish = false
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
}
}
</script>
......@@ -123,16 +106,13 @@
</style>
<style lang="scss" scoped>
.page {
padding: 30rpx 30rpx 90rpx;
padding: 30rpx;
background-color: #F8F6F9;
}
.paycost {
.screening {
margin-bottom: 30rpx;
}
.list {
margin-top: 30rpx;
.item {
background-color: #ffffff;
border-radius: 16rpx;
......
......@@ -5,51 +5,63 @@
<view class="details">
<view class="title">
<view class="name">
<view class="cost">100</view>
<view class="cost">{{payDetail.totalAmount}}</view>
</view>
<view class="text">汉江之星物业公司</view>
<view class="text">{{payDetail.propertyName}}</view>
</view>
<view class="content">
<view class="text">
<view class="name">费用类型</view>
<view class="detail">电费</view>
<view class="detail">{{payDetail.chargeTypeName}}</view>
</view>
<view class="text">
<view class="name">订单编号</view>
<view class="detail">1278373332321</view>
<view class="detail">{{payDetail.id}}</view>
</view>
<view class="text">
<view class="name">创建时间</view>
<view class="detail">2021/09/09 13:20 </view>
<view class="detail">{{payDetail.createTime}}</view>
</view>
<view class="text">
<view class="name">缴费周期</view>
<view class="detail">1月</view>
<view class="detail">{{payDetail.chargeCycle | transChargeCycle}}</view>
</view>
<view class="text">
<view class="name">支付时间</view>
<view class="detail"> 2021/11/09 13:20</view>
</view>
<view class="text">
<view class="name">上期度数(度)</view>
<view class="detail">5</view>
</view>
<view class="text">
<view class="name">本期度数(度)</view>
<view class="detail">5</view>
</view>
<view class="text">
<view class="name">用量(度)</view>
<view class="detail">10</view>
<view class="detail">{{payDetail.paymentTime}}</view>
</view>
<template v-if="payDetail.designFormulas === 2">
<view class="text">
<view class="name">建筑面积</view>
<view class="detail">{{payDetail.floorSpace}}</view>
</view>
<view class="text">
<view class="name">单价</view>
<view class="detail">{{payDetail.unitPrice}}</view>
</view>
</template>
<template v-if="payDetail.designFormulas === 3">
<view class="text">
<view class="name">上期度数(度)</view>
<view class="detail">{{payDetail.lastDegrees}}</view>
</view>
<view class="text">
<view class="name">本期度数(度)</view>
<view class="detail">{{payDetail.currentDegrees}}</view>
</view>
<view class="text">
<view class="name">用量(度)</view>
<view class="detail">{{payDetail.useAmount}}</view>
</view>
</template>
<view class="text">
<view class="name">支付方式</view>
<view class="detail">微信支付</view>
</view>
</view>
</view>
<view class="form-bounced" @click="receipt()">开收据</view>
<view class="form-bounced" @click="receipt()">申请退款</view>
<!-- <view class="form-bounced" @click="receipt()">开收据</view>
<view class="form-bounced" @click="receipt()">申请退款</view> -->
</view>
</view>
<uni-popup ref="popup" type="dialog">
......@@ -60,13 +72,30 @@
</template>
<script>
import {
communityPaymentDetailApi
} from '@/config/api.js'
import {CHARGING_CYCLE} from '@/utils/dictionary'
export default {
data() {
return {
payDetail: {}
}
},
filters: {
transChargeCycle(value) {
let current = CHARGING_CYCLE.find(item=>item.value === value)
return current ? current.label : ''
}
},
methods: {
async getDetail(id) {
let res = await communityPaymentDetailApi({id})
this.payDetail = res.result
if(res.result.designFormulas === 3) {
this.payDetail['useAmount'] = (res.result.currentDegrees - Number(res.result.lastDegrees)).toFixed(2)
}
},
receipt() {
this.$refs.popup.open()
},
......@@ -77,11 +106,8 @@
this.$refs.popup.close()
}
},
onLoad() {
},
onShow() {
onLoad(option) {
this.getDetail(option.id)
}
}
</script>
......
......@@ -7,7 +7,7 @@
<view class="name">
<view class="cost">{{payDetail.totalAmount}}</view>
</view>
<view class="tag" :class="{'pay': item.paymentStatus === 'unPaid'}">{{item.paymentStatus === 'paid' ? '已付款' : '未付款'}}</view>
<view class="tag" :class="{'pay': payDetail.paymentStatus === 'unPaid'}">{{payDetail.paymentStatus === 'paid' ? '已付款' : '未付款'}}</view>
</view>
<view class="content">
<view class="text">
......@@ -33,7 +33,7 @@
</view>
</view>
<view class="form-submit" @click="onSubmit">支付</view>
<view v-if="payDetail.paymentStatus === 'unPaid'" class="form-submit" @click="onSubmit">支付</view>
</view>
</view>
</view>
......
......@@ -15,9 +15,10 @@
<view class="list">
<view class="item" v-for="item in payList" :key="item.id" @click="toDetail(item.id)">
<view class="title">
<view class="name">{{item.chargeTypeName}}<view class="cost">¥{{item.totalAmount}}</view>
<view class="name">
{{item.chargeTypeName}}<view class="cost">¥{{item.totalAmount}}</view>
</view>
<view class="tag">去缴费</view>
<view class="tag">{{item.paymentStatus === 'paid' ? '已缴费' : '去缴费'}}</view>
</view>
<view class="content">
<view class="text">
......@@ -54,10 +55,13 @@
{code: 'SFLX00004', name: '燃气费'},
{code: 'SFLX00005', name: '暖气费'}
]
let chargeTypeCode = ''
export default {
components: {noData},
data() {
return {
isFinish: false,
pageNo: 1,
userName: '',
userPhone: '',
platformName: '',
......@@ -65,9 +69,24 @@
}
},
methods: {
async getList(chargeTypeCode) {
let {result} = await communityPaymentApi({chargeTypeCode})
this.payList = result.records
async getList(flag) {
let {result} = await communityPaymentApi({
paymentStatus: 'unPaid',
chargeTypeCode,
pageNo: this.pageNo,
pageSize: 10
})
if(this.pageNo === 1) {
this.payList = [].concat(result.records)
} else {
this.payList = this.payList.concat(result.records)
}
if(flag) { uni.stopPullDownRefresh(); }
if(this.payList.length >= result.total) {
this.isFinish = true
} else {
this.pageNo += 1
}
},
toRecord(type) {
if(type == 1){
......@@ -76,7 +95,7 @@
});
}else if(type == 2){
uni.navigateTo({
url: '/pages/payCostRecord/index',
url: '/pages/payCostRecord/index?code=' + chargeTypeCode
});
}
},
......@@ -90,13 +109,23 @@
this.userName = uni.getStorageSync('user_name')
this.userPhone = uni.getStorageSync('user_phone')
this.platformName = uni.getStorageSync('platform_name')
this.getList(option.code)
chargeTypeCode = option.code
this.getList()
let obj = freeType.find(item=>item.code === option.code)
if(obj) {
uni.setNavigationBarTitle({
title: obj.name
})
}
},
onPullDownRefresh() {
this.pageNo = 1
this.isFinish = false
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
}
}
</script>
......
<template>
<view class="container">
<view class="page">
<view class="page" v-if="payList.length">
<view class="property">
<view class="list">
<view class="item" @click="toDetail()">
<view class="item" @click="toDetail(item.id)" v-for="item in payList" :key="item.id">
<view class="title">
<view class="name">物业费:<view class="cost">¥100.00</view>
<view class="name">{{item.chargeTypeName}}<view class="cost">¥{{item.totalAmount}}</view>
</view>
<view class="tag">已付款</view>
</view>
<view class="content">
<view class="text">
<view class="name">缴费人</view>
<view class="detail">张一</view>
<view class="detail">{{item.residentName}}</view>
</view>
<view class="text">
<view class="name">缴费人号码</view>
<view class="detail">15214525682</view>
<view class="detail">{{item.residentPhone}}</view>
</view>
<view class="text">
<view class="name">缴费时间</view>
<view class="detail">2023年3月1日 12:12</view>
<view class="detail">{{item.paymentTime}}</view>
</view>
<view class="text">
<view class="name">缴费地址</view>
<view class="detail">十堰市张湾区汉江之星小区1栋1302</view>
</view>
</view>
</view>
<view class="item" @click="toDetail()">
<view class="title">
<view class="name">物业费:<view class="cost">¥100.00</view>
</view>
<view class="tag">已付款</view>
</view>
<view class="content">
<view class="text">
<view class="name">缴费人</view>
<view class="detail">张一</view>
</view>
<view class="text">
<view class="name">缴费人号码</view>
<view class="detail">15214525682</view>
</view>
<view class="text">
<view class="name">缴费时间</view>
<view class="detail">2023年3月1日 12:12</view>
</view>
<view class="text">
<view class="name">缴费地址</view>
<view class="detail">十堰市张湾区汉江之星小区1栋1302</view>
<view class="detail">{{item.buildingName}}{{item.unitName}}{{item.roomName}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <no-data :show="payList.length === 0" text="暂无缴费记录"></no-data> -->
<no-data :show="payList.length === 0" text="暂无缴费记录"></no-data>
</view>
</template>
......@@ -66,25 +40,53 @@
communityPaymentApi
} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
let chargeTypeCode = ''
export default {
components: {noData},
data() {
return {
isFinish: false,
pageNo: 1,
payList: []
}
},
methods: {
async getList() {
let {result} = await communityPaymentApi({paymentStatus: 'paid'})
this.payList = result.records
async getList(flag) {
let {result} = await communityPaymentApi({
paymentStatus: 'paid',
chargeTypeCode,
pageNo: this.pageNo,
pageSize: 10
})
if(this.pageNo === 1) {
this.payList = [].concat(result.records)
} else {
this.payList = this.payList.concat(result.records)
}
if(flag) { uni.stopPullDownRefresh(); }
if(this.payList.length >= result.total) {
this.isFinish = true
} else {
this.pageNo += 1
}
},
toDetail() {
toDetail(id) {
uni.navigateTo({
url: '/pages/payCostDetails/index',
url: '/pages/myPaycostDetails/index?id=' + id
});
}
},
onLoad() {
onLoad(option) {
chargeTypeCode = option.code
this.getList()
},
onPullDownRefresh() {
this.pageNo = 1
this.isFinish = false
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
}
}
......
......@@ -3,23 +3,17 @@
<view class="page">
<view class="property">
<view class="user">
<view class="name">张一 15214525682</view>
<view class="add">十堰市张湾区汉江之星小区1栋1302</view>
<view class="name">{{userName}} {{userPhone}}</view>
<view class="add">{{platformName}}</view>
</view>
<view class="screening">
<view class="title">
<view class="picker on">
<!-- <view class="title"> -->
<!-- <view class="picker on"> -->
<picker @change="bindPickerChange" :value="year" :range="yearList">
<view class="uni-input">{{yearList[index]}}<image src="../../static/images/icon_up.png" class="icon"></image></view>
</picker>
</view>
<view class="picker">
<picker @change="bindPickerChange1" :value="month" :range="monthList">
<view class="uni-input">{{monthList[index1]}}<image src="../../static/images/icon_up.png" class="icon"></image></view>
</picker>
</view>
</view>
<!-- </view> -->
<!-- </view> -->
<view class="content">
<view class="text">
<view class="name">合计金额(元)</view>120
......@@ -39,15 +33,17 @@
</template>
<script>
let chargeTypeCode = ''
export default {
data() {
return {
userName: '',
userPhone: '',
platformName: '',
year: '',
index: 0,
yearList: ['2023年', '2022年', '2021年'],
yearList: ['全部', '2023年', '2022年', '2021年'],
month: '',
index1: 0,
monthList: ['全部月份', '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
chartData: {
categories: ["2023年", "2022年", "2021年"],
series: [{
......@@ -87,11 +83,12 @@
this.index1 = e.detail.value
},
},
onLoad() {
},
onShow() {
onLoad(option) {
this.userName = uni.getStorageSync('user_name')
this.userPhone = uni.getStorageSync('user_phone')
this.platformName = uni.getStorageSync('platform_name')
chargeTypeCode = option.code
// this.getList()
}
}
</script>
......@@ -136,27 +133,35 @@
.title {
display: flex;
.picker {
display: flex;
align-items: center;
.uni-input {
font-size: 28rpx;
color: #373737;
}
.icon {
width: 20rpx;
height: 12rpx;
margin-left: 15rpx;
}
}
// .picker {
// display: flex;
// align-items: center;
// .uni-input {
// font-size: 28rpx;
// color: #373737;
// }
// .icon {
// width: 20rpx;
// height: 12rpx;
// margin-left: 15rpx;
// }
// }
}
.uni-input {
font-size: 28rpx;
color: #373737;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.on {
padding-right: 40rpx;
margin-right: 40rpx;
border-right: 1px solid #F0F0F2;
}
.icon {
width: 20rpx;
height: 12rpx;
margin-left: 15rpx;
}
.content {
......
......@@ -5,4 +5,20 @@ export const relationShipList = [
{label: '亲人', value: 'relative'},
{label: '朋友', value: 'friend'},
{label: '其他', value: 'other'}
]
// 付费周期
export const CHARGING_CYCLE = [
{label: '每月', value: '1'},
{label: '每季度', value: '2'},
{label: '每年', value: '3'},
{label: '一次性付清', value: '4'},
{label: '预付', value: '5'}
]
// 计算公式
export const DESIGN_FORMULAS = [
{label: '固定金额', value: 1},
{label: '建筑面积 × 单价', value: 2},
{label: '(本期度数 - 上期度数) × 单价', value: 3}
]
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论