mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-11 14:17:25 +08:00
优化业主端欠费点击无法查到的问题
This commit is contained in:
parent
6883696bca
commit
9f1ddf52cd
@ -4,17 +4,19 @@
|
||||
<view class="block__title">业主账户</view>
|
||||
<checkbox-group @change="checkboxChange">
|
||||
<view class="cu-list menu" v-for="(account, idx) in accounts" :key="idx" :data-item="account"
|
||||
@click="_viewAccountDetail(account)">
|
||||
@click="_viewAccountDetail(account)">
|
||||
<view class="cu-item ">
|
||||
<view class="content padding-tb-sm">
|
||||
<view>
|
||||
<view class="text-cut" style="width:220px">
|
||||
<checkbox :value="account.acctId" :checked="account.checked" /> {{account.acctTypeName}}
|
||||
<checkbox :value="account.acctId" :checked="account.checked" />
|
||||
{{account.acctTypeName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{account.amount}}{{account.acctType == '2004' ? '分' : '元'}}</text>
|
||||
<text
|
||||
class="text-grey text-sm">{{account.amount}}{{account.acctType == '2004' ? '分' : '元'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -28,10 +30,11 @@
|
||||
import {
|
||||
queryOwnerAccount
|
||||
} from '../../api/user/userApi.js';
|
||||
import {getCommunityId} from '../../api/community/communityApi.js'
|
||||
import {
|
||||
getCommunityId
|
||||
} from '../../api/community/communityApi.js'
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
accounts: [],
|
||||
@ -39,7 +42,7 @@
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
||||
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
@ -47,10 +50,11 @@
|
||||
let _totalUserAmount = 0.0;
|
||||
let _selectedAccounts = [];
|
||||
this.accounts.forEach(item => {
|
||||
if(val.includes(item.acctId)){
|
||||
if (val.includes(item.acctId)) {
|
||||
// 账户类型判断
|
||||
if (item.acctType == '2004') { //积分账户
|
||||
if (parseFloat(item.amount) >= parseFloat(item.maximumNumber)) { //如果积分账户余额大于最大使用积分,就抵扣最大使用积分
|
||||
if (parseFloat(item.amount) >= parseFloat(item
|
||||
.maximumNumber)) { //如果积分账户余额大于最大使用积分,就抵扣最大使用积分
|
||||
_totalUserAmount += parseFloat(item.maximumNumber / item.deductionProportion);
|
||||
_selectedAccounts.push(item);
|
||||
} else {
|
||||
@ -66,11 +70,11 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.$emit('getUserAmount', {
|
||||
totalUserAmount: _totalUserAmount,
|
||||
selectedAccounts: _selectedAccounts
|
||||
});
|
||||
totalUserAmount: _totalUserAmount,
|
||||
selectedAccounts: _selectedAccounts
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@ -78,38 +82,33 @@
|
||||
* @param {Object} e
|
||||
* 选择账户事件
|
||||
*/
|
||||
checkboxChange: function (e) {
|
||||
checkboxChange: function(e) {
|
||||
var values = e.detail.value;
|
||||
this.selectedAccounts = values;
|
||||
this.accounts.forEach((item, index) => {
|
||||
if(values.includes(item.acctId)){
|
||||
if (values.includes(item.acctId)) {
|
||||
item.checked = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
_listOwnerAccount: function(_communityId) {
|
||||
// 2023.6.12
|
||||
let _that = this;
|
||||
context.getOwner(function(_ownerInfo) {
|
||||
if (_ownerInfo) {
|
||||
queryOwnerAccount({
|
||||
page: 1,
|
||||
row: 99,
|
||||
idCard: _ownerInfo.idCard,
|
||||
link: _ownerInfo.ownerTel,
|
||||
communityId: _communityId,
|
||||
// acctType:'2003',
|
||||
acctTypes: '2003,2004'
|
||||
}).then((data) => {
|
||||
if (!data) {
|
||||
_that.accounts = [];
|
||||
return;
|
||||
}
|
||||
_that.accounts = data;
|
||||
})
|
||||
queryOwnerAccount({
|
||||
page: 1,
|
||||
row: 99,
|
||||
communityId: _communityId,
|
||||
// acctType:'2003',
|
||||
acctTypes: '2003,2004'
|
||||
}).then((data) => {
|
||||
if (!data) {
|
||||
_that.accounts = [];
|
||||
return;
|
||||
}
|
||||
});
|
||||
_that.accounts = data;
|
||||
})
|
||||
|
||||
// let _that = this;
|
||||
// queryOwnerAccount({
|
||||
// page: 1,
|
||||
@ -126,17 +125,17 @@
|
||||
},
|
||||
_viewAccountDetail: function(_account) {
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.block__title {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgba(69,90,100,.6);
|
||||
padding: 40rpx 30rpx 20rpx;
|
||||
}
|
||||
</style>
|
||||
.block__title {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgba(69, 90, 100, .6);
|
||||
padding: 40rpx 30rpx 20rpx;
|
||||
}
|
||||
</style>
|
||||
@ -100,7 +100,7 @@ export default {
|
||||
changeOwnerPhone: baseUrl + 'app/ownerApi/changeOwnerPhone', //修改密码
|
||||
queryRentingConfig: baseUrl + 'app/renting/queryRentingConfig', // 房屋出租配置查询
|
||||
saveRentingPool: baseUrl + 'app/renting/saveRentingPool', //出租提交
|
||||
listOweFees: baseUrl + 'app/feeApi/listOweFees', //查询房屋欠费
|
||||
listOweFees: baseUrl + 'app/fee.queryOwnerOweFee', //查询房屋欠费
|
||||
toOweFeePay: baseUrl + "app/payment/toOweFeePay", //欠费缴费
|
||||
toPayTempCarFee: baseUrl + "app/payment/toPayTempCarFee", //欠费缴费
|
||||
queryRentingPool: baseUrl + 'app/renting/queryRentingPool',
|
||||
@ -148,7 +148,7 @@ export default {
|
||||
listApplyRoomDiscountRecordDetail: baseUrl + "app/applyRoomDiscountRecord/queryApplyRoomDiscountRecordDetail",
|
||||
// 查询房屋费用项
|
||||
listRoomFee: baseUrl + "app/fee.listFee",
|
||||
queryOwnerAccount: baseUrl + "app/account/queryOwnerAccount",
|
||||
queryOwnerAccount: baseUrl + "app/account.queryOwnerAccount",
|
||||
queryOwnerAccountDetail: baseUrl + "app/account/queryOwnerAccountDetail",
|
||||
ownerCommunity: baseUrl + "app/owner.ownerCommunity",
|
||||
queryShopType: baseUrl + 'app/mall.queryShopType', //查询店铺类型
|
||||
|
||||
@ -82,10 +82,11 @@
|
||||
formatDate,
|
||||
dateSubOneDay,
|
||||
getDate,
|
||||
} from '../../lib/java110/utils/DateUtil.js'
|
||||
} from '../../lib/java110/utils/DateUtil.js';
|
||||
|
||||
|
||||
import {
|
||||
getCurCommunity
|
||||
getCommunityId
|
||||
} from '../../api/community/communityApi.js';
|
||||
|
||||
import {
|
||||
@ -96,9 +97,6 @@
|
||||
getRoomOweFees
|
||||
} from '../../api/fee/feeApi.js'
|
||||
|
||||
import {
|
||||
getCurOwner
|
||||
} from '../../api/owner/ownerApi.js'
|
||||
|
||||
import {
|
||||
getRoomFees
|
||||
@ -138,25 +136,21 @@
|
||||
onLoad: function(options) {
|
||||
context.onLoad(options);
|
||||
autoLogin(options);
|
||||
this.communityId = options.communityId;
|
||||
this.payerObjId = options.payerObjId;
|
||||
if(!this.communityId){
|
||||
this.communityId = getCommunityId();
|
||||
}
|
||||
let _that = this;
|
||||
setTimeout(function() {
|
||||
_that.$refs.vcUserAccountRef._listOwnerAccount(_that.communityId);
|
||||
}, 1500)
|
||||
},
|
||||
onShow() {
|
||||
let _that = this;
|
||||
getCurOwner().then(function(_owner) {
|
||||
_that.communityId = _owner.communityId;
|
||||
_that.communityName = _owner.communityName;
|
||||
_that.ownerId = _owner.ownerId;
|
||||
_that._loadOweFee();
|
||||
});
|
||||
_that._loadOweFee();
|
||||
},
|
||||
methods: {
|
||||
_loadOweFee: function() {
|
||||
let _that = this;
|
||||
let _objData = {
|
||||
ownerId: this.ownerId,
|
||||
page: 1,
|
||||
row: 50,
|
||||
communityId: this.communityId,
|
||||
@ -176,6 +170,9 @@
|
||||
});
|
||||
_that.computeFeeObj(_fees);
|
||||
_that.computeReceivableAmount();
|
||||
setTimeout(function(){
|
||||
_that.$refs.vcUserAccountRef._listOwnerAccount(_that.communityId);
|
||||
},1500)
|
||||
return _fees;
|
||||
}, function(error) {
|
||||
uni.showToast({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user