|
@@ -1,17 +1,17 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
<!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
|
|
|
- <u--form labelPosition="left" :model="wuyeAmountInfo" :rules="rules" ref="form1" labelWidth="80">
|
|
|
+ <u--form labelPosition="left" :model="param" :rules="rules" ref="form1" labelWidth="80">
|
|
|
<u-form-item label="楼号" prop="name" borderBottom ref="item1">
|
|
|
- <u--input v-model="wuyeAmountInfo.buildingNo" border="none" placeholder="请输入楼号(例:1)" type='number'>
|
|
|
+ <u--input v-model="param.buildingNo" border="none" placeholder="请输入楼号(例:1)" type='number'>
|
|
|
</u--input>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="单元号" prop="name" borderBottom ref="item1">
|
|
|
- <u--input v-model="wuyeAmountInfo.unitNo" border="none" placeholder="请输入单元号(例:2)" type='number'>
|
|
|
+ <u--input v-model="param.unitNo" border="none" placeholder="请输入单元号(例:2)" type='number'>
|
|
|
</u--input>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="房间号" prop="name" borderBottom ref="item1">
|
|
|
- <u--input v-model="wuyeAmountInfo.floor" border="none" placeholder="请输入房间号(例:501)" type='number'>
|
|
|
+ <u--input v-model="param.floor" border="none" placeholder="请输入房间号(例:501)" type='number'>
|
|
|
</u--input>
|
|
|
</u-form-item>
|
|
|
</u--form>
|
|
@@ -50,8 +50,11 @@
|
|
|
<view class="left">
|
|
|
付款状态:
|
|
|
</view>
|
|
|
- <view class="">
|
|
|
- {{wuyeAmountInfo.totalActualPayment==0?'未支付':"已支付"}}
|
|
|
+ <view v-if="wuyeAmountInfo.totalActualPayment==0" style="color:red">
|
|
|
+ 未支付
|
|
|
+ </view>
|
|
|
+ <view v-else style="color:#21d261">
|
|
|
+ 已支付{{wuyeAmountInfo.totalActualPayment}}元
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="title-qj">
|
|
@@ -114,7 +117,7 @@
|
|
|
应缴费总合计:
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- {{total}}
|
|
|
+ {{total}}元
|
|
|
</view>
|
|
|
</view>
|
|
|
<u-button type="primary" text="去付款" @click="pay" class="pay"></u-button>
|
|
@@ -132,6 +135,11 @@
|
|
|
return {
|
|
|
isSHowInfo: false,
|
|
|
isShowCode: false,
|
|
|
+ param: {
|
|
|
+ buildingNo: '',
|
|
|
+ unitNo: '',
|
|
|
+ floor: '',
|
|
|
+ },
|
|
|
wuyeAmountInfo: {
|
|
|
buildingNo: '',
|
|
|
unitNo: '',
|
|
@@ -167,6 +175,12 @@
|
|
|
return _totalPrice;
|
|
|
},
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ if (this.param.buildingNo&&this.param.unitNo&&this.param.floor) {
|
|
|
+ this.selectInfo()
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
methods: {
|
|
|
pay() {
|
|
|
console.log("去付款")
|
|
@@ -177,21 +191,21 @@
|
|
|
|
|
|
},
|
|
|
selectInfo() {
|
|
|
- if (!this.wuyeAmountInfo.buildingNo) {
|
|
|
+ if (!this.param.buildingNo) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: '请输入楼号!',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.wuyeAmountInfo.unitNo) {
|
|
|
+ if (!this.param.unitNo) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: '请输入单元号!',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.wuyeAmountInfo.floor) {
|
|
|
+ if (!this.param.floor) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: '请输入房间号!',
|
|
@@ -199,19 +213,25 @@
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ uni.showLoading({
|
|
|
+ title:"查询中"
|
|
|
+ })
|
|
|
this.$request.baseRequest('wuyeAmountInfoApp', 'getInfo', {
|
|
|
- wuyeAmountInfo: JSON.stringify(this.wuyeAmountInfo)
|
|
|
+ wuyeAmountInfo: JSON.stringify(this.param)
|
|
|
}, failres => {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: failres.errmsg,
|
|
|
})
|
|
|
+ this.isSHowInfo = false
|
|
|
uni.hideLoading()
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
|
- this.isSHowInfo = true
|
|
|
- this.wuyeAmountInfo = res.data
|
|
|
+ if(res.data){
|
|
|
+ this.isSHowInfo = true
|
|
|
+ this.wuyeAmountInfo = res.data
|
|
|
+ }
|
|
|
+ uni.hideLoading()
|
|
|
})
|
|
|
|
|
|
},
|