mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
支持账户扣款功能
This commit is contained in:
parent
0f3b9efd64
commit
c9d481ec80
@ -5,7 +5,7 @@
|
||||
<checkbox-group @change="checkboxChange">
|
||||
<view class="cu-list menu" v-for="(account, idx) in accounts" :key="idx" :data-item="account"
|
||||
@click="_viewAccountDetail(account)">
|
||||
<view class="cu-item arrow">
|
||||
<view class="cu-item ">
|
||||
<view class="content padding-tb-sm">
|
||||
<view>
|
||||
<view class="text-cut" style="width:220px">
|
||||
@ -87,7 +87,7 @@
|
||||
});
|
||||
},
|
||||
|
||||
_listOwnerAccount: function(_feeId, _communityId) {
|
||||
_listOwnerAccount: function(_communityId) {
|
||||
// 2023.6.12
|
||||
let _that = this;
|
||||
context.getOwner(function(_ownerInfo) {
|
||||
@ -97,7 +97,7 @@
|
||||
}
|
||||
queryOwnerAccount({
|
||||
page: 1,
|
||||
row: 20,
|
||||
row: 1,
|
||||
idCard: _ownerInfo.idCard,
|
||||
link: _ownerInfo.link,
|
||||
communityId: _communityId,
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
<view>
|
||||
<view class="cu-form-group arrow margin-top" v-if="payerObjs &&payerObjs.length >1">
|
||||
<view class="title" style="width: 200upx;">按房屋缴费</view>
|
||||
<picker bindchange="PickerChange" :value="payerObjIndex" :range="payerObjs" :range-key="'payerObjName'" @change="_payerObjectChange">
|
||||
<picker bindchange="PickerChange" :value="payerObjIndex" :range="payerObjs" :range-key="'payerObjName'"
|
||||
@change="_payerObjectChange">
|
||||
<view class="picker">
|
||||
{{payerObjName?payerObjName:'请选择'}}
|
||||
</view>
|
||||
@ -49,6 +50,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<vcUserAccount ref="vcUserAccountRef" @getUserAmount="getUserAmount"></vcUserAccount>
|
||||
|
||||
</view>
|
||||
<view v-else>
|
||||
<no-data-page></no-data-page>
|
||||
@ -64,15 +68,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// pages/fee/payParkingFee.js
|
||||
import context from '../../lib/java110/Java110Context.js';
|
||||
const constant = context.constant;
|
||||
|
||||
import vcUserAccount from '@/components/vc-user-account/vc-user-account.vue';
|
||||
import noDataPage from '../../components/no-data-page/no-data-page.vue'
|
||||
|
||||
import {
|
||||
@ -112,6 +114,7 @@
|
||||
scrollLeft: 0,
|
||||
amount: 0,
|
||||
receivableAmount: 0.00,
|
||||
orgReceivableAmount: 0.00,
|
||||
communityId: '',
|
||||
communityName: '',
|
||||
appId: '',
|
||||
@ -122,11 +125,14 @@
|
||||
payerObjId: '',
|
||||
payerObjName: '',
|
||||
payerObjIndex: 0,
|
||||
feeIds:[]
|
||||
feeIds: [],
|
||||
selectUserAccount: [], // 选中的账户
|
||||
accountAmount: 0.0, // 账户金额
|
||||
};
|
||||
},
|
||||
components: {
|
||||
noDataPage
|
||||
noDataPage,
|
||||
vcUserAccount,
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
@ -134,6 +140,10 @@
|
||||
onLoad: function(options) {
|
||||
context.onLoad(options);
|
||||
autoLogin(options);
|
||||
let _that = this;
|
||||
setTimeout(function() {
|
||||
_that.$refs.vcUserAccountRef._listOwnerAccount('', _that.communityId);
|
||||
}, 1500)
|
||||
},
|
||||
onShow() {
|
||||
let _that = this;
|
||||
@ -154,7 +164,7 @@
|
||||
communityId: this.communityId,
|
||||
payObjId: this.payerObjId
|
||||
}
|
||||
_that.receivableAmount = 0;
|
||||
_that.orgReceivableAmount = 0;
|
||||
_that.feeIds = [];
|
||||
getRoomOweFees(_objData)
|
||||
.then(function(_fees) {
|
||||
@ -164,12 +174,13 @@
|
||||
_that.fees = _fees;
|
||||
_fees.forEach(function(_item) {
|
||||
if (_item.payOnline == 'Y') {
|
||||
_that.receivableAmount += _item.feeTotalPrice;
|
||||
_that.orgReceivableAmount += _item.feeTotalPrice;
|
||||
_that.feeIds.push(_item.feeId);
|
||||
}
|
||||
});
|
||||
_that.receivableAmount = _that.receivableAmount.toFixed(2);
|
||||
_that.orgReceivableAmount = _that.orgReceivableAmount.toFixed(2);
|
||||
_that.computeFeeObj(_fees);
|
||||
_that.computeReceivableAmount();
|
||||
return _fees;
|
||||
}, function(error) {
|
||||
uni.showToast({
|
||||
@ -189,6 +200,10 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
let _acctId = '';
|
||||
if(this.selectUserAccount && this.selectUserAccount.length>0){
|
||||
_acctId = this.selectUserAccount[0].acctId;
|
||||
}
|
||||
let _objData = {
|
||||
business: "oweFee",
|
||||
cycles: this.feeMonth,
|
||||
@ -200,6 +215,7 @@
|
||||
//appId: uni.getStorageSync(mapping.W_APP_ID),
|
||||
storeId: this.storeId,
|
||||
feeIds: this.feeIds,
|
||||
acctId:_acctId,
|
||||
};
|
||||
uni.setStorageSync('doing_cashier', _objData);
|
||||
uni.navigateTo({
|
||||
@ -255,6 +271,24 @@
|
||||
this.payerObjId = _curPayerObj.payerObjId;
|
||||
this.payerObjName = _curPayerObj.payerObjName;
|
||||
this._loadOweFee();
|
||||
},
|
||||
getUserAmount: function(_accInfo) {
|
||||
// 选中的账户列表
|
||||
this.selectUserAccount = _accInfo.selectedAccounts;
|
||||
// 账户金额
|
||||
this.accountAmount = _accInfo.totalUserAmount;
|
||||
this.computeReceivableAmount();
|
||||
},
|
||||
computeReceivableAmount() {
|
||||
let orgReceivableAmount = this.orgReceivableAmount;
|
||||
let _receivableAmount = parseFloat(orgReceivableAmount);
|
||||
if (this.accountAmount) {
|
||||
_receivableAmount = _receivableAmount - parseFloat(this.accountAmount);
|
||||
}
|
||||
|
||||
_receivableAmount = _receivableAmount.toFixed(2);
|
||||
_receivableAmount = _receivableAmount < 0 ? 0.00:_receivableAmount;
|
||||
this.receivableAmount = _receivableAmount;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -278,7 +278,7 @@
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.vcUserAccountRef._listOwnerAccount(this.feeId, this.communityId);
|
||||
this.$refs.vcUserAccountRef._listOwnerAccount( this.communityId);
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user