Commit ab1ebb3cfd864717c68e39507f74587bf5eba458
1 parent
5480f93a
缴费支持 押金 优惠券 优惠折扣 账户等功能
Showing
14 changed files
with
350 additions
and
393 deletions
src/api/fee/payFeeOrderApi.js
| ... | ... | @@ -38,7 +38,7 @@ export function computePayFeeCoupon(params) { |
| 38 | 38 | return new Promise((resolve, reject) => { |
| 39 | 39 | const communityId = getCommunityId() |
| 40 | 40 | request({ |
| 41 | - url: '/coupon/computePayFeeCoupon', | |
| 41 | + url: '/coupon.computePayFeeCoupon', | |
| 42 | 42 | method: 'get', |
| 43 | 43 | params: { ...params, communityId } |
| 44 | 44 | }).then(response => { |
| ... | ... | @@ -54,7 +54,7 @@ export function queryCommunityOwnerAccount(params) { |
| 54 | 54 | return new Promise((resolve, reject) => { |
| 55 | 55 | const communityId = getCommunityId() |
| 56 | 56 | request({ |
| 57 | - url: '/account/queryCommunityOwnerAccount', | |
| 57 | + url: '/account.queryCommunityOwnerAccount', | |
| 58 | 58 | method: 'get', |
| 59 | 59 | params: { ...params, communityId } |
| 60 | 60 | }).then(response => { |
| ... | ... | @@ -70,7 +70,7 @@ export function queryFeeDeposit(params) { |
| 70 | 70 | return new Promise((resolve, reject) => { |
| 71 | 71 | const communityId = getCommunityId() |
| 72 | 72 | request({ |
| 73 | - url: '/fee/queryFeeDeposit', | |
| 73 | + url: '/fee.queryFeeDeposit', | |
| 74 | 74 | method: 'get', |
| 75 | 75 | params: { ...params, communityId, state: '1400' } |
| 76 | 76 | }).then(response => { |
| ... | ... | @@ -86,7 +86,7 @@ export function refundFeeDeposit(data) { |
| 86 | 86 | return new Promise((resolve, reject) => { |
| 87 | 87 | data.communityId = getCommunityId() |
| 88 | 88 | request({ |
| 89 | - url: '/fee/refundFeeDeposit', | |
| 89 | + url: '/fee.refundFeeDeposit', | |
| 90 | 90 | method: 'post', |
| 91 | 91 | data |
| 92 | 92 | }).then(response => { | ... | ... |
src/components/fee/payFeeCoupon.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog | |
| 3 | - :title="$t('payFeeCoupon.title')" | |
| 4 | - :visible.sync="dialogVisible" | |
| 5 | - width="70%" | |
| 6 | - @close="handleClose" | |
| 7 | - > | |
| 8 | 2 | <el-card v-if="feeCoupons.length > 0"> |
| 9 | - <div slot="header" class="clearfix"> | |
| 3 | + <div slot="header" class="flex justify-between"> | |
| 10 | 4 | <span>{{ $t('payFeeCoupon.couponInfo') }}</span> |
| 11 | 5 | </div> |
| 12 | 6 | |
| 13 | - <el-table | |
| 14 | - :data="feeCoupons" | |
| 15 | - border | |
| 16 | - style="width: 100%" | |
| 17 | - > | |
| 18 | - <el-table-column | |
| 19 | - prop="ruleName" | |
| 20 | - align="center" | |
| 21 | - :label="$t('payFeeCoupon.ruleName')" | |
| 22 | - /> | |
| 23 | - <el-table-column | |
| 24 | - prop="couponName" | |
| 25 | - align="center" | |
| 26 | - :label="$t('payFeeCoupon.couponName')" | |
| 27 | - /> | |
| 28 | - <el-table-column | |
| 29 | - prop="quantity" | |
| 30 | - align="center" | |
| 31 | - :label="$t('payFeeCoupon.quantity')" | |
| 32 | - > | |
| 7 | + <el-table :data="feeCoupons" border style="width: 100%"> | |
| 8 | + <el-table-column prop="ruleName" align="center" :label="$t('payFeeCoupon.ruleName')" /> | |
| 9 | + <el-table-column prop="couponName" align="center" :label="$t('payFeeCoupon.couponName')" /> | |
| 10 | + <el-table-column prop="quantity" align="center" :label="$t('payFeeCoupon.quantity')"> | |
| 33 | 11 | <template slot-scope="scope"> |
| 34 | 12 | {{ scope.row.quantity }}{{ $t('payFeeCoupon.unit') }} |
| 35 | 13 | </template> |
| 36 | 14 | </el-table-column> |
| 37 | - <el-table-column | |
| 38 | - prop="toTypeName" | |
| 39 | - align="center" | |
| 40 | - :label="$t('payFeeCoupon.purpose')" | |
| 41 | - /> | |
| 15 | + <el-table-column prop="toTypeName" align="center" :label="$t('payFeeCoupon.purpose')" /> | |
| 42 | 16 | </el-table> |
| 43 | 17 | </el-card> |
| 44 | - </el-dialog> | |
| 45 | 18 | </template> |
| 46 | 19 | |
| 47 | 20 | <script> |
| 48 | 21 | import { getCommunityId } from '@/api/community/communityApi' |
| 22 | +import { computePayFeeCoupon } from '@/api/fee/payFeeOrderApi' | |
| 49 | 23 | |
| 50 | 24 | export default { |
| 51 | 25 | name: 'PayFeeCoupon', |
| ... | ... | @@ -65,7 +39,6 @@ export default { |
| 65 | 39 | this.cycles = params.cycles || 1 |
| 66 | 40 | this.endTime = params.endTime || '' |
| 67 | 41 | this.listFeeCoupons() |
| 68 | - this.dialogVisible = true | |
| 69 | 42 | }, |
| 70 | 43 | close() { |
| 71 | 44 | this.dialogVisible = false |
| ... | ... | @@ -82,8 +55,8 @@ export default { |
| 82 | 55 | endTime: this.endTime |
| 83 | 56 | } |
| 84 | 57 | |
| 85 | - const response = await this.$http.get('/coupon.computePayFeeCoupon', { params }) | |
| 86 | - this.feeCoupons = response.data.data || [] | |
| 58 | + const response = await computePayFeeCoupon(params) | |
| 59 | + this.feeCoupons = response.data || [] | |
| 87 | 60 | } catch (error) { |
| 88 | 61 | console.error('查询优惠券信息失败:', error) |
| 89 | 62 | } | ... | ... |
src/components/fee/payFeeDeposit.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog :title="$t('payFeeDeposit.title')" :visible.sync="dialogVisible" width="80%" @close="handleClose"> | |
| 3 | - <el-card v-if="fees.length > 0"> | |
| 4 | - <div slot="header" class="clearfix"> | |
| 2 | + <div> | |
| 3 | + <el-card v-if="fees.length > 0" class="margin-bottom-sm"> | |
| 4 | + <div slot="header" class="flex justify-between"> | |
| 5 | 5 | <span>{{ $t('payFeeDeposit.depositInfo') }}</span> |
| 6 | 6 | <el-button type="primary" size="small" style="float: right;" @click="queryPayFeeDeposit"> |
| 7 | 7 | <i class="el-icon-refresh"></i> |
| ... | ... | @@ -29,13 +29,14 @@ |
| 29 | 29 | </el-table> |
| 30 | 30 | </el-card> |
| 31 | 31 | |
| 32 | - <refund-deposit-fee ref="refundDepositFee"></refund-deposit-fee> | |
| 33 | - </el-dialog> | |
| 32 | + <refund-deposit-fee ref="refundDepositFee" @success="listFeeDeposit"></refund-deposit-fee> | |
| 33 | + </div> | |
| 34 | 34 | </template> |
| 35 | 35 | |
| 36 | 36 | <script> |
| 37 | 37 | import { getCommunityId } from '@/api/community/communityApi' |
| 38 | 38 | import RefundDepositFee from './refundDepositFee' |
| 39 | +import { queryFeeDeposit } from '@/api/fee/payFeeOrderApi' | |
| 39 | 40 | |
| 40 | 41 | export default { |
| 41 | 42 | name: 'PayFeeDeposit', |
| ... | ... | @@ -58,7 +59,6 @@ export default { |
| 58 | 59 | this.payerObjType = params.payerObjType |
| 59 | 60 | this.ownerId = params.ownerId || '' |
| 60 | 61 | this.listFeeDeposit() |
| 61 | - this.dialogVisible = true | |
| 62 | 62 | }, |
| 63 | 63 | close() { |
| 64 | 64 | this.dialogVisible = false |
| ... | ... | @@ -75,9 +75,9 @@ export default { |
| 75 | 75 | state: '1400' |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - const response = await this.$http.get('/fee.queryFeeDeposit', { params }) | |
| 79 | - if (response.data.code === 0) { | |
| 80 | - this.fees = response.data.data || [] | |
| 78 | + const response = await queryFeeDeposit(params) | |
| 79 | + if (response.code === 0) { | |
| 80 | + this.fees = response.data || [] | |
| 81 | 81 | } |
| 82 | 82 | } catch (error) { |
| 83 | 83 | console.error('查询押金信息失败:', error) | ... | ... |
src/components/fee/payFeeDiscount.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog | |
| 3 | - :title="$t('payFeeDiscount.title')" | |
| 4 | - :visible.sync="dialogVisible" | |
| 5 | - width="80%" | |
| 6 | - @close="handleClose" | |
| 7 | - > | |
| 8 | 2 | <el-card v-if="shouldShowDiscounts"> |
| 9 | - <div slot="header" class="clearfix"> | |
| 3 | + <div slot="header" class="flex justify-between"> | |
| 10 | 4 | <span>{{ $t('payFeeDiscount.discountInfo') }}</span> |
| 11 | 5 | </div> |
| 12 | 6 | |
| 13 | - <el-table | |
| 14 | - :data="feeDiscounts" | |
| 15 | - border | |
| 16 | - style="width: 100%" | |
| 17 | - > | |
| 18 | - <el-table-column | |
| 19 | - align="center" | |
| 20 | - width="60" | |
| 21 | - > | |
| 7 | + <el-table :data="feeDiscounts" border style="width: 100%"> | |
| 8 | + <el-table-column align="center" width="60"> | |
| 22 | 9 | <template slot-scope="scope"> |
| 23 | - <el-checkbox | |
| 24 | - v-model="selectDiscountIds" | |
| 25 | - :label="scope.row.discountId" | |
| 26 | - @change="computeFeeDiscount" | |
| 27 | - ></el-checkbox> | |
| 10 | + <el-checkbox v-model="selectDiscountIds" :label="scope.row.discountId" | |
| 11 | + @change="computeFeeDiscount"></el-checkbox> | |
| 28 | 12 | </template> |
| 29 | 13 | </el-table-column> |
| 30 | - <el-table-column | |
| 31 | - prop="discountType" | |
| 32 | - align="center" | |
| 33 | - :label="$t('payFeeDiscount.discountType')" | |
| 34 | - > | |
| 14 | + <el-table-column prop="discountType" align="center" :label="$t('payFeeDiscount.discountType')"> | |
| 35 | 15 | <template slot-scope="scope"> |
| 36 | 16 | {{ getDiscountTypeName(scope.row.discountType) }} |
| 37 | 17 | </template> |
| 38 | 18 | </el-table-column> |
| 39 | - <el-table-column | |
| 40 | - prop="discountName" | |
| 41 | - align="center" | |
| 42 | - :label="$t('payFeeDiscount.discountName')" | |
| 43 | - /> | |
| 44 | - <el-table-column | |
| 45 | - prop="ruleName" | |
| 46 | - align="center" | |
| 47 | - :label="$t('payFeeDiscount.ruleName')" | |
| 48 | - /> | |
| 49 | - <el-table-column | |
| 50 | - align="center" | |
| 51 | - :label="$t('payFeeDiscount.rule')" | |
| 52 | - > | |
| 19 | + <el-table-column prop="discountName" align="center" :label="$t('payFeeDiscount.discountName')" /> | |
| 20 | + <el-table-column prop="ruleName" align="center" :label="$t('payFeeDiscount.ruleName')" /> | |
| 21 | + <el-table-column align="center" :label="$t('payFeeDiscount.rule')"> | |
| 53 | 22 | <template slot-scope="scope"> |
| 54 | - <div v-for="(item,index) in scope.row.feeDiscountSpecs" :key="index"> | |
| 23 | + <div v-for="(item, index) in scope.row.feeDiscountSpecs" :key="index"> | |
| 55 | 24 | {{ item.specName }}:{{ item.specValue }} |
| 56 | 25 | </div> |
| 57 | 26 | </template> |
| 58 | 27 | </el-table-column> |
| 59 | - <el-table-column | |
| 60 | - align="center" | |
| 61 | - :label="$t('payFeeDiscount.discountAmount')" | |
| 62 | - > | |
| 28 | + <el-table-column align="center" :label="$t('payFeeDiscount.discountAmount')"> | |
| 63 | 29 | <template slot="header"> |
| 64 | 30 | <span>{{ $t('payFeeDiscount.discountAmount') }}</span> |
| 65 | - <el-tooltip | |
| 66 | - effect="dark" | |
| 67 | - :content="$t('payFeeDiscount.discountTooltip')" | |
| 68 | - placement="top" | |
| 69 | - > | |
| 31 | + <el-tooltip effect="dark" :content="$t('payFeeDiscount.discountTooltip')" placement="top"> | |
| 70 | 32 | <i class="el-icon-info" style="margin-left:5px"></i> |
| 71 | 33 | </el-tooltip> |
| 72 | 34 | </template> |
| ... | ... | @@ -77,12 +39,13 @@ |
| 77 | 39 | </el-table-column> |
| 78 | 40 | </el-table> |
| 79 | 41 | </el-card> |
| 80 | - </el-dialog> | |
| 42 | + | |
| 81 | 43 | </template> |
| 82 | 44 | |
| 83 | 45 | <script> |
| 84 | 46 | import { getCommunityId } from '@/api/community/communityApi' |
| 85 | -import {dateAdd} from '@/utils/dateUtil' | |
| 47 | +import { dateAdd } from '@/utils/dateUtil' | |
| 48 | +import { computeFeeDiscount } from '@/api/fee/payFeeOrderApi' | |
| 86 | 49 | |
| 87 | 50 | export default { |
| 88 | 51 | name: 'PayFeeDiscount', |
| ... | ... | @@ -117,7 +80,6 @@ export default { |
| 117 | 80 | this.custEndTime = params.custEndTime |
| 118 | 81 | this.cycles = params.cycles || 1 |
| 119 | 82 | this.listFeeDiscounts() |
| 120 | - this.dialogVisible = true | |
| 121 | 83 | }, |
| 122 | 84 | close() { |
| 123 | 85 | this.dialogVisible = false |
| ... | ... | @@ -126,7 +88,7 @@ export default { |
| 126 | 88 | try { |
| 127 | 89 | this.communityId = await getCommunityId() |
| 128 | 90 | let cycles = this.cycles |
| 129 | - | |
| 91 | + | |
| 130 | 92 | const params = { |
| 131 | 93 | page: 1, |
| 132 | 94 | row: 20, |
| ... | ... | @@ -139,8 +101,8 @@ export default { |
| 139 | 101 | custEndTime: this.custEndTime ? dateAdd(this.custEndTime) : '' |
| 140 | 102 | } |
| 141 | 103 | |
| 142 | - const response = await this.$http.get('/feeDiscount/computeFeeDiscount', { params }) | |
| 143 | - this.feeDiscounts = response.data.data || [] | |
| 104 | + const response = await computeFeeDiscount(params) | |
| 105 | + this.feeDiscounts = response.data || [] | |
| 144 | 106 | this.selectDiscountIds = this.feeDiscounts.map(item => item.discountId) |
| 145 | 107 | this.computeFeeDiscount() |
| 146 | 108 | } catch (error) { |
| ... | ... | @@ -166,7 +128,7 @@ export default { |
| 166 | 128 | computeFeeDiscount() { |
| 167 | 129 | let totalDiscountMoney = 0.0 |
| 168 | 130 | let selectDiscount = [] |
| 169 | - | |
| 131 | + | |
| 170 | 132 | this.selectDiscountIds.forEach(item => { |
| 171 | 133 | this.feeDiscounts.forEach(disItem => { |
| 172 | 134 | if (disItem.feeDiscountSpecs && disItem.feeDiscountSpecs.length > 0) { |
| ... | ... | @@ -176,12 +138,12 @@ export default { |
| 176 | 138 | specValue = feeItem.specValue |
| 177 | 139 | } |
| 178 | 140 | }) |
| 179 | - if ((disItem.discountType === '1001' || disItem.discountType === '3003') && | |
| 180 | - parseFloat(this.cycles) < parseFloat(specValue)) { | |
| 141 | + if ((disItem.discountType === '1001' || disItem.discountType === '3003') && | |
| 142 | + parseFloat(this.cycles) < parseFloat(specValue)) { | |
| 181 | 143 | return |
| 182 | 144 | } |
| 183 | 145 | } |
| 184 | - | |
| 146 | + | |
| 185 | 147 | if (item === disItem.discountId && disItem.discountPrice !== 0 && disItem.ruleId !== "102020008") { |
| 186 | 148 | if (disItem.feeDiscountSpecs && disItem.feeDiscountSpecs.length > 0) { |
| 187 | 149 | let specValue = "" |
| ... | ... | @@ -207,8 +169,8 @@ export default { |
| 207 | 169 | } |
| 208 | 170 | } |
| 209 | 171 | } else if (item === disItem.discountId && disItem.ruleId === "102020008") { |
| 210 | - if (disItem.feeDiscountSpecs != null && disItem.feeDiscountSpecs != undefined && | |
| 211 | - disItem.feeDiscountSpecs.length > 0) { | |
| 172 | + if (disItem.feeDiscountSpecs != null && disItem.feeDiscountSpecs != undefined && | |
| 173 | + disItem.feeDiscountSpecs.length > 0) { | |
| 212 | 174 | let specValue = "" |
| 213 | 175 | disItem.feeDiscountSpecs.forEach(feeItem => { |
| 214 | 176 | if (feeItem.specName === this.$t('payFeeDiscount.monthSpec')) { |
| ... | ... | @@ -222,7 +184,7 @@ export default { |
| 222 | 184 | } |
| 223 | 185 | }) |
| 224 | 186 | }) |
| 225 | - | |
| 187 | + | |
| 226 | 188 | this.totalDiscountMoney = totalDiscountMoney |
| 227 | 189 | this.$emit('changeDiscountPrice', { |
| 228 | 190 | totalDiscountMoney, | ... | ... |
src/components/fee/payFeeUserAccount.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog | |
| 3 | - :title="$t('payFeeUserAccount.title')" | |
| 4 | - :visible.sync="dialogVisible" | |
| 5 | - width="70%" | |
| 6 | - @close="handleClose" | |
| 7 | - > | |
| 8 | - <el-card v-if="accountList.length > 0"> | |
| 9 | - <div slot="header" class="clearfix"> | |
| 2 | + <div> | |
| 3 | + <el-card v-if="accountList.length > 0" class="margin-bottom-sm"> | |
| 4 | + <div slot="header" class="flex justify-between"> | |
| 10 | 5 | <span>{{ $t('payFeeUserAccount.accountInfo') }}</span> |
| 11 | - <el-button | |
| 12 | - type="primary" | |
| 13 | - size="small" | |
| 14 | - style="float: right;" | |
| 15 | - @click="queryPayFeeUserAccount" | |
| 16 | - > | |
| 6 | + <el-button type="primary" size="small" style="float: right;" @click="queryPayFeeUserAccount"> | |
| 17 | 7 | <i class="el-icon-refresh"></i> |
| 18 | 8 | {{ $t('payFeeUserAccount.refresh') }} |
| 19 | 9 | </el-button> |
| 20 | 10 | </div> |
| 21 | 11 | |
| 22 | - <el-table | |
| 23 | - :data="accountList" | |
| 24 | - border | |
| 25 | - style="width: 100%" | |
| 26 | - > | |
| 27 | - <el-table-column | |
| 28 | - align="center" | |
| 29 | - :label="$t('payFeeUserAccount.select')" | |
| 30 | - width="80" | |
| 31 | - > | |
| 12 | + <el-table :data="accountList" border style="width: 100%"> | |
| 13 | + <el-table-column align="center" :label="$t('payFeeUserAccount.select')" width="80"> | |
| 32 | 14 | <template slot-scope="scope"> |
| 33 | - <el-radio | |
| 34 | - v-model="selectedAccount" | |
| 35 | - :label="scope.row.acctId" | |
| 36 | - @change="computeFeeUserAmount(scope.row.acctId)" | |
| 37 | - ></el-radio> | |
| 15 | + <el-checkbox v-model="selectedAccounts" :value="scope.row.acctId" | |
| 16 | + @change="(checked) => handleAccountChange(scope.row.acctId, checked)"></el-checkbox> | |
| 38 | 17 | </template> |
| 39 | 18 | </el-table-column> |
| 40 | - <el-table-column | |
| 41 | - prop="acctTypeName" | |
| 42 | - align="center" | |
| 43 | - :label="$t('payFeeUserAccount.accountType')" | |
| 44 | - /> | |
| 45 | - <el-table-column | |
| 46 | - prop="acctName" | |
| 47 | - align="center" | |
| 48 | - :label="$t('payFeeUserAccount.accountName')" | |
| 49 | - /> | |
| 50 | - <el-table-column | |
| 51 | - prop="amount" | |
| 52 | - align="center" | |
| 53 | - :label="$t('payFeeUserAccount.accountAmount')" | |
| 54 | - > | |
| 19 | + <el-table-column prop="acctTypeName" align="center" :label="$t('payFeeUserAccount.accountType')" /> | |
| 20 | + <el-table-column prop="acctName" align="center" :label="$t('payFeeUserAccount.accountName')" /> | |
| 21 | + <el-table-column prop="amount" align="center" :label="$t('payFeeUserAccount.accountAmount')"> | |
| 55 | 22 | <template slot-scope="scope"> |
| 56 | 23 | {{ scope.row.amount }} {{ $t('payFeeUserAccount.yuan') }} |
| 57 | 24 | </template> |
| 58 | 25 | </el-table-column> |
| 59 | - <el-table-column | |
| 60 | - align="center" | |
| 61 | - :label="$t('payFeeUserAccount.operation')" | |
| 62 | - width="150" | |
| 63 | - > | |
| 26 | + <el-table-column align="center" :label="$t('payFeeUserAccount.operation')" width="150"> | |
| 64 | 27 | <template slot-scope="scope"> |
| 65 | - <el-button | |
| 66 | - type="primary" | |
| 67 | - size="mini" | |
| 68 | - @click="openAddUserAmountModal(scope.row)" | |
| 69 | - > | |
| 28 | + <el-button type="primary" size="mini" @click="openAddUserAmountModal(scope.row)"> | |
| 70 | 29 | <i class="el-icon-plus"></i> |
| 71 | 30 | {{ $t('payFeeUserAccount.prestore') }} |
| 72 | 31 | </el-button> |
| ... | ... | @@ -74,22 +33,22 @@ |
| 74 | 33 | </el-table-column> |
| 75 | 34 | </el-table> |
| 76 | 35 | </el-card> |
| 77 | - </el-dialog> | |
| 36 | + </div> | |
| 78 | 37 | </template> |
| 79 | 38 | |
| 80 | 39 | <script> |
| 81 | 40 | import { getCommunityId } from '@/api/community/communityApi' |
| 41 | +import { queryCommunityOwnerAccount } from '@/api/fee/payFeeOrderApi' | |
| 82 | 42 | |
| 83 | 43 | export default { |
| 84 | 44 | name: 'PayFeeUserAccount', |
| 85 | 45 | data() { |
| 86 | 46 | return { |
| 87 | - dialogVisible: false, | |
| 88 | 47 | accountList: [], |
| 89 | 48 | feeId: '', |
| 90 | 49 | ownerId: '', |
| 91 | 50 | communityId: '', |
| 92 | - selectedAccount: null | |
| 51 | + selectedAccounts: [] // 改为数组,支持多选 | |
| 93 | 52 | } |
| 94 | 53 | }, |
| 95 | 54 | methods: { |
| ... | ... | @@ -97,7 +56,6 @@ export default { |
| 97 | 56 | this.feeId = params.feeId |
| 98 | 57 | this.ownerId = params.ownerId || '' |
| 99 | 58 | this.listUserAccount() |
| 100 | - this.dialogVisible = true | |
| 101 | 59 | }, |
| 102 | 60 | close() { |
| 103 | 61 | this.dialogVisible = false |
| ... | ... | @@ -113,8 +71,8 @@ export default { |
| 113 | 71 | communityId: this.communityId |
| 114 | 72 | } |
| 115 | 73 | |
| 116 | - const response = await this.$http.get('/account.queryCommunityOwnerAccount', { params }) | |
| 117 | - this.accountList = response.data.data || [] | |
| 74 | + const response = await queryCommunityOwnerAccount(params) | |
| 75 | + this.accountList = response.data || [] | |
| 118 | 76 | } catch (error) { |
| 119 | 77 | console.error('查询用户账户失败:', error) |
| 120 | 78 | } |
| ... | ... | @@ -125,17 +83,53 @@ export default { |
| 125 | 83 | openAddUserAmountModal(userAccount) { |
| 126 | 84 | window.open(`/#/views/owner/ownerDetail?ownerId=${userAccount.objId}¤tTab=ownerDetailAccount`) |
| 127 | 85 | }, |
| 128 | - computeFeeUserAmount(acctId) { | |
| 86 | + // 新增:处理账户选择变化 | |
| 87 | + handleAccountChange(acctId, checked) { | |
| 88 | + console.log('选中的账户ID:', acctId, '是否选中:', checked) | |
| 89 | + console.log('当前selectedAccounts:', this.selectedAccounts) | |
| 90 | + | |
| 91 | + // 确保 selectedAccounts 是数组 | |
| 92 | + if (!Array.isArray(this.selectedAccounts)) { | |
| 93 | + this.selectedAccounts = [] | |
| 94 | + } | |
| 95 | + | |
| 96 | + if (checked) { | |
| 97 | + // 添加到选中数组 | |
| 98 | + if (!this.selectedAccounts.includes(acctId)) { | |
| 99 | + this.selectedAccounts.push(acctId) | |
| 100 | + } | |
| 101 | + } else { | |
| 102 | + // 从选中数组中移除 | |
| 103 | + const index = this.selectedAccounts.indexOf(acctId) | |
| 104 | + if (index > -1) { | |
| 105 | + this.selectedAccounts.splice(index, 1) | |
| 106 | + } | |
| 107 | + } | |
| 108 | + | |
| 109 | + console.log('更新后的selectedAccounts:', this.selectedAccounts) | |
| 110 | + this.computeFeeUserAmount() | |
| 111 | + }, | |
| 112 | + // 修复:computeFeeUserAmount 方法 | |
| 113 | + computeFeeUserAmount() { | |
| 114 | + console.log('计算费用,选中的账户:', this.selectedAccounts) | |
| 115 | + | |
| 129 | 116 | let totalUserAmount = 0.0 |
| 130 | 117 | let selectAccount = [] |
| 131 | - | |
| 118 | + | |
| 119 | + // 确保 selectedAccounts 是数组 | |
| 120 | + if (!Array.isArray(this.selectedAccounts)) { | |
| 121 | + this.selectedAccounts = [] | |
| 122 | + } | |
| 123 | + | |
| 132 | 124 | this.accountList.forEach(item => { |
| 133 | - if (acctId === item.acctId && item.amount != 0) { | |
| 125 | + if (this.selectedAccounts.includes(item.acctId) && item.amount != 0) { | |
| 134 | 126 | totalUserAmount += parseFloat(item.amount) |
| 135 | 127 | selectAccount.push(item) |
| 136 | 128 | } |
| 137 | 129 | }) |
| 138 | 130 | |
| 131 | + console.log('计算的总金额:', totalUserAmount, '选中的账户列表:', selectAccount) | |
| 132 | + | |
| 139 | 133 | this.$emit('changeUserAmountPrice', { |
| 140 | 134 | totalUserAmount, |
| 141 | 135 | accountList: this.accountList, |
| ... | ... | @@ -147,7 +141,7 @@ export default { |
| 147 | 141 | }, |
| 148 | 142 | handleClose() { |
| 149 | 143 | this.accountList = [] |
| 150 | - this.selectedAccount = null | |
| 144 | + this.selectedAccounts = [] // 清空选中的账户 | |
| 151 | 145 | this.feeId = '' |
| 152 | 146 | this.ownerId = '' |
| 153 | 147 | } | ... | ... |
src/components/fee/refundDepositFee.vue
| ... | ... | @@ -12,14 +12,15 @@ |
| 12 | 12 | ></el-alert> |
| 13 | 13 | |
| 14 | 14 | <div slot="footer" class="dialog-footer"> |
| 15 | - <el-button @click="dialogVisible = false">{{ $t('refundDepositFee.cancel') }}</el-button> | |
| 16 | - <el-button type="primary" @click="refundDepositFee">{{ $t('refundDepositFee.confirm') }}</el-button> | |
| 15 | + <el-button @click="dialogVisible = false">{{ $t('common.cancel') }}</el-button> | |
| 16 | + <el-button type="primary" @click="refundDepositFee">{{ $t('common.confirm') }}</el-button> | |
| 17 | 17 | </div> |
| 18 | 18 | </el-dialog> |
| 19 | 19 | </template> |
| 20 | 20 | |
| 21 | 21 | <script> |
| 22 | 22 | import { getCommunityId } from '@/api/community/communityApi' |
| 23 | +import { refundFeeDeposit } from '@/api/fee/payFeeOrderApi' | |
| 23 | 24 | |
| 24 | 25 | export default { |
| 25 | 26 | name: 'RefundDepositFee', |
| ... | ... | @@ -41,11 +42,10 @@ export default { |
| 41 | 42 | try { |
| 42 | 43 | this.refundData.communityId = await getCommunityId() |
| 43 | 44 | |
| 44 | - const response = await this.$http.post('/fee.refundFeeDeposit', this.refundData) | |
| 45 | - if (response.data.code === 0) { | |
| 45 | + const response = await refundFeeDeposit(this.refundData) | |
| 46 | + if (response.code === 0) { | |
| 46 | 47 | this.$message.success(this.$t('refundDepositFee.success')) |
| 47 | 48 | this.$emit('success') |
| 48 | - this.dialogVisible = false | |
| 49 | 49 | } else { |
| 50 | 50 | this.$message.error(response.data.msg) |
| 51 | 51 | } | ... | ... |
src/components/fee/roomCreateFeeAdd.vue
| ... | ... | @@ -65,6 +65,7 @@ |
| 65 | 65 | <script> |
| 66 | 66 | import { saveRoomCreateFee, listFeeConfigs } from '@/api/fee/roomCreateFeeAddApi' |
| 67 | 67 | import { getDict, getCommunityId } from '@/api/community/communityApi' |
| 68 | +import { dateFormat,addMonth } from '@/utils/dateUtil' | |
| 68 | 69 | |
| 69 | 70 | export default { |
| 70 | 71 | name: 'RoomCreateFeeAdd', |
| ... | ... | @@ -135,8 +136,8 @@ export default { |
| 135 | 136 | |
| 136 | 137 | handleFeeTypeChange(value) { |
| 137 | 138 | if (value === '888800010006' || value === '888800010014') { |
| 138 | - this.formData.startTime = this.$dayjs().format('YYYY-MM-DD') | |
| 139 | - this.formData.endTime = this.$dayjs().add(1, 'month').format('YYYY-MM-DD') | |
| 139 | + this.formData.startTime = dateFormat(new Date()) | |
| 140 | + this.formData.endTime = dateFormat(addMonth(new Date(),1)) | |
| 140 | 141 | } |
| 141 | 142 | |
| 142 | 143 | this.formData.configId = '' | ... | ... |
src/views/fee/batchPayFeeOrderLang.js
| ... | ... | @@ -26,19 +26,6 @@ export const messages = { |
| 26 | 26 | preSave: 'Pre-save', |
| 27 | 27 | yuan: 'yuan' |
| 28 | 28 | }, |
| 29 | - payFeeDeposit: { | |
| 30 | - title: 'Deposit Information', | |
| 31 | - payerObj: 'Payer Object', | |
| 32 | - feeItem: 'Fee Item', | |
| 33 | - timePeriod: 'Time Period', | |
| 34 | - amount: 'Amount', | |
| 35 | - payTime: 'Payment Time', | |
| 36 | - refund: 'Refund Deposit' | |
| 37 | - }, | |
| 38 | - refundDepositFee: { | |
| 39 | - title: 'Confirm Operation', | |
| 40 | - confirmText: 'After the deposit is refunded, it will be automatically deposited into the account. You can choose to pay from the account. If you refund cash to the owner, please go to the business homepage to refund the deposit!' | |
| 41 | - }, | |
| 42 | 29 | batchPayConfirm: { |
| 43 | 30 | title: 'Payment Confirmation', |
| 44 | 31 | amount: 'Amount:', |
| ... | ... | @@ -94,19 +81,6 @@ export const messages = { |
| 94 | 81 | preSave: '预存', |
| 95 | 82 | yuan: '元' |
| 96 | 83 | }, |
| 97 | - payFeeDeposit: { | |
| 98 | - title: '押金信息', | |
| 99 | - payerObj: '收费对象', | |
| 100 | - feeItem: '费用项', | |
| 101 | - timePeriod: '时间段', | |
| 102 | - amount: '金额', | |
| 103 | - payTime: '缴费时间', | |
| 104 | - refund: '退押金' | |
| 105 | - }, | |
| 106 | - refundDepositFee: { | |
| 107 | - title: '请确认您的操作!', | |
| 108 | - confirmText: '押金退款后自动存到账户中,您可以从账户中选择缴费,如果退现金给业主,请到业务首页面退押金!' | |
| 109 | - }, | |
| 110 | 84 | batchPayConfirm: { |
| 111 | 85 | title: '收费确认', |
| 112 | 86 | amount: '金额:', | ... | ... |
src/views/fee/batchPayFeeOrderList.vue
| ... | ... | @@ -20,7 +20,8 @@ |
| 20 | 20 | }}</el-button> |
| 21 | 21 | </div> |
| 22 | 22 | |
| 23 | - <el-table :data="batchPayFeeOrderInfo.batchFees" border style="width: 100%" v-loading="loading"> | |
| 23 | + <el-table :data="batchPayFeeOrderInfo.batchFees" border style="width: 100%" v-loading="loading" | |
| 24 | + @selection-change="handleSelectionChange" ref="batchFeeTable"> | |
| 24 | 25 | <el-table-column type="selection" width="55" align="center"></el-table-column> |
| 25 | 26 | <el-table-column prop="feeTypeCdName" :label="$t('batchPayFeeOrder.feeType')" |
| 26 | 27 | align="center"></el-table-column> |
| ... | ... | @@ -76,7 +77,8 @@ |
| 76 | 77 | </el-table> |
| 77 | 78 | </el-card> |
| 78 | 79 | <div class="margin-top"> |
| 79 | - <pay-fee-user-account ref="payFeeUserAccount"></pay-fee-user-account> | |
| 80 | + <pay-fee-user-account ref="payFeeUserAccount" | |
| 81 | + @changeUserAmountPrice="changeUserAmountPrice"></pay-fee-user-account> | |
| 80 | 82 | </div> |
| 81 | 83 | <pay-fee-deposit ref="payFeeDeposit"></pay-fee-deposit> |
| 82 | 84 | |
| ... | ... | @@ -115,7 +117,7 @@ import PayFeeDeposit from '@/components/fee/payFeeDeposit' |
| 115 | 117 | import BatchPayConfirm from '@/components/fee/batchPayConfirm' |
| 116 | 118 | import BatchFeeCycle from '@/components/fee/batchFeeCycle' |
| 117 | 119 | import { listFee, listFeeObj } from '@/api/fee/batchPayFeeOrderApi' |
| 118 | -import {dateFormat,dateAdd} from '@/utils/dateUtil' | |
| 120 | +import { dateFormat, dateAdd } from '@/utils/dateUtil' | |
| 119 | 121 | |
| 120 | 122 | export default { |
| 121 | 123 | name: 'BatchPayFeeOrderList', |
| ... | ... | @@ -149,6 +151,33 @@ export default { |
| 149 | 151 | this._initData() |
| 150 | 152 | }, |
| 151 | 153 | methods: { |
| 154 | + // 新增:处理表格选择变化 | |
| 155 | + handleSelectionChange(selection) { | |
| 156 | + console.log('选中的行:', selection) | |
| 157 | + | |
| 158 | + // 更新 selectPayFeeIds 数组 | |
| 159 | + this.batchPayFeeOrderInfo.selectPayFeeIds = selection.map(item => item.feeId) | |
| 160 | + | |
| 161 | + console.log('更新后的 selectPayFeeIds:', this.batchPayFeeOrderInfo.selectPayFeeIds) | |
| 162 | + | |
| 163 | + // 重新计算总费用 | |
| 164 | + this._doComputeTotalFee() | |
| 165 | + }, | |
| 166 | + | |
| 167 | + // 新增:设置表格选中状态 | |
| 168 | + setTableSelection() { | |
| 169 | + // 根据 selectPayFeeIds 设置表格的选中状态 | |
| 170 | + this.$nextTick(() => { | |
| 171 | + if (this.$refs.batchFeeTable) { | |
| 172 | + this.batchPayFeeOrderInfo.batchFees.forEach(row => { | |
| 173 | + if (this.batchPayFeeOrderInfo.selectPayFeeIds.includes(row.feeId)) { | |
| 174 | + this.$refs.batchFeeTable.toggleRowSelection(row, true) | |
| 175 | + } | |
| 176 | + }) | |
| 177 | + } | |
| 178 | + }) | |
| 179 | + }, | |
| 180 | + | |
| 152 | 181 | async _initData() { |
| 153 | 182 | const ownerId = this.$route.query.ownerId |
| 154 | 183 | const payerObjType = this.$route.query.payerObjType |
| ... | ... | @@ -164,8 +193,10 @@ export default { |
| 164 | 193 | |
| 165 | 194 | await this._loadBatchFees() |
| 166 | 195 | |
| 167 | - this.$refs.payFeeUserAccount._listUserAccount(1, 20) | |
| 168 | - this.$refs.payFeeDeposit._listFeeDeposit(1, 20) | |
| 196 | + setTimeout(() => { | |
| 197 | + this.$refs.payFeeUserAccount.open({ ownerId: this.batchPayFeeOrderInfo.ownerId }) | |
| 198 | + this.$refs.payFeeDeposit.open({ payerObjId: this.batchPayFeeOrderInfo.ownerId, payerObjType: this.batchPayFeeOrderInfo.payerObjType }) | |
| 199 | + }, 1000) | |
| 169 | 200 | }, |
| 170 | 201 | |
| 171 | 202 | async _loadBatchFees() { |
| ... | ... | @@ -181,7 +212,7 @@ export default { |
| 181 | 212 | } |
| 182 | 213 | |
| 183 | 214 | const res = await listFee(params) |
| 184 | - | |
| 215 | + | |
| 185 | 216 | let _batchFees = [] |
| 186 | 217 | let _selectPayFeeIds = [] |
| 187 | 218 | |
| ... | ... | @@ -205,6 +236,9 @@ export default { |
| 205 | 236 | |
| 206 | 237 | this._pushPayObjs() |
| 207 | 238 | this._doComputeTotalFee() |
| 239 | + | |
| 240 | + // 设置表格选中状态 | |
| 241 | + this.setTableSelection() | |
| 208 | 242 | } catch (error) { |
| 209 | 243 | console.error('请求失败:', error) |
| 210 | 244 | } finally { |
| ... | ... | @@ -271,7 +305,17 @@ export default { |
| 271 | 305 | }) |
| 272 | 306 | |
| 273 | 307 | this.batchPayFeeOrderInfo.batchFees = _batchFees |
| 308 | + | |
| 309 | + // 更新 selectPayFeeIds,只保留当前显示的费用ID | |
| 310 | + const currentFeeIds = _batchFees.map(fee => fee.feeId) | |
| 311 | + this.batchPayFeeOrderInfo.selectPayFeeIds = this.batchPayFeeOrderInfo.selectPayFeeIds.filter(id => | |
| 312 | + currentFeeIds.includes(id) | |
| 313 | + ) | |
| 314 | + | |
| 274 | 315 | this._doComputeTotalFee() |
| 316 | + | |
| 317 | + // 重新设置表格选中状态 | |
| 318 | + this.setTableSelection() | |
| 275 | 319 | }, |
| 276 | 320 | |
| 277 | 321 | _openPayFee(payType) { |
| ... | ... | @@ -403,6 +447,18 @@ export default { |
| 403 | 447 | |
| 404 | 448 | _settingsFeeCycle(batchFee) { |
| 405 | 449 | this.$refs.batchFeeCycle.open(batchFee) |
| 450 | + }, | |
| 451 | + | |
| 452 | + changeUserAmountPrice(data) { | |
| 453 | + this.batchPayFeeOrderInfo.accountAmount = data.totalUserAmount; | |
| 454 | + if (data.selectAccount && data.selectAccount.length > 0) { | |
| 455 | + data.selectAccount.forEach(_acct => { | |
| 456 | + if (_acct.acctType == '2003') { | |
| 457 | + this.batchPayFeeOrderInfo.acctId = _acct.acctId; | |
| 458 | + } | |
| 459 | + }) | |
| 460 | + } | |
| 461 | + this._doComputeTotalFee(); | |
| 406 | 462 | } |
| 407 | 463 | } |
| 408 | 464 | } | ... | ... |
src/views/fee/owePayFeeOrderList.vue
| ... | ... | @@ -4,34 +4,21 @@ |
| 4 | 4 | <div slot="header" class="clearfix"> |
| 5 | 5 | <span>{{ owePayFeeOrderInfo.roomName }}</span> |
| 6 | 6 | <div class="card-header-actions"> |
| 7 | - <el-button | |
| 8 | - type="primary" | |
| 9 | - size="small" | |
| 10 | - @click="_printOwnOrder()" | |
| 11 | - v-if="owePayFeeOrderInfo.oweFees.length > 0"> | |
| 7 | + <el-button type="primary" size="small" @click="_printOwnOrder()" v-if="owePayFeeOrderInfo.oweFees.length > 0"> | |
| 12 | 8 | {{ $t('owePayFeeOrder.printNotice1') }} |
| 13 | 9 | </el-button> |
| 14 | - <el-button | |
| 15 | - type="primary" | |
| 16 | - size="small" | |
| 17 | - @click="_printOwnOrder2()" | |
| 10 | + <el-button type="primary" size="small" @click="_printOwnOrder2()" | |
| 18 | 11 | v-if="owePayFeeOrderInfo.oweFees.length > 0"> |
| 19 | 12 | {{ $t('owePayFeeOrder.printNotice2') }} |
| 20 | 13 | </el-button> |
| 21 | - <el-button | |
| 22 | - type="primary" | |
| 23 | - size="small" | |
| 24 | - @click="_goBack()"> | |
| 14 | + <el-button type="primary" size="small" @click="_goBack()"> | |
| 25 | 15 | <i class="el-icon-close"></i> |
| 26 | 16 | {{ $t('common.back') }} |
| 27 | 17 | </el-button> |
| 28 | 18 | </div> |
| 29 | 19 | </div> |
| 30 | 20 | |
| 31 | - <el-table | |
| 32 | - :data="owePayFeeOrderInfo.oweFees" | |
| 33 | - border | |
| 34 | - style="width: 100%"> | |
| 21 | + <el-table :data="owePayFeeOrderInfo.oweFees" border style="width: 100%"> | |
| 35 | 22 | <el-table-column type="selection" width="55" @selection-change="handleSelectionChange"></el-table-column> |
| 36 | 23 | <el-table-column prop="payerObjName" :label="$t('owePayFeeOrder.payerObj')" align="center"></el-table-column> |
| 37 | 24 | <el-table-column prop="feeTypeCdName" :label="$t('owePayFeeOrder.feeType')" align="center"></el-table-column> |
| ... | ... | @@ -59,20 +46,12 @@ |
| 59 | 46 | <span>{{ $t('owePayFeeOrder.yuan') }}</span> |
| 60 | 47 | </el-col> |
| 61 | 48 | <el-col :span="2"> |
| 62 | - <el-button | |
| 63 | - type="success" | |
| 64 | - size="medium" | |
| 65 | - @click="_openPayFee('qrCode')" | |
| 66 | - class="pay-btn"> | |
| 49 | + <el-button type="success" size="medium" @click="_openPayFee('qrCode')" class="pay-btn"> | |
| 67 | 50 | {{ $t('owePayFeeOrder.scanPay') }} |
| 68 | 51 | </el-button> |
| 69 | 52 | </el-col> |
| 70 | 53 | <el-col :span="2"> |
| 71 | - <el-button | |
| 72 | - type="primary" | |
| 73 | - size="medium" | |
| 74 | - @click="_payFee()" | |
| 75 | - class="pay-btn"> | |
| 54 | + <el-button type="primary" size="medium" @click="_payFee()" class="pay-btn"> | |
| 76 | 55 | {{ $t('owePayFeeOrder.pay') }} |
| 77 | 56 | </el-button> |
| 78 | 57 | </el-col> |
| ... | ... | @@ -80,10 +59,7 @@ |
| 80 | 59 | </el-card> |
| 81 | 60 | |
| 82 | 61 | <!-- 缴费确认弹窗 --> |
| 83 | - <el-dialog | |
| 84 | - :title="$t('owePayFeeOrder.paymentConfirm')" | |
| 85 | - :visible.sync="showPayModal" | |
| 86 | - width="50%"> | |
| 62 | + <el-dialog :title="$t('owePayFeeOrder.paymentConfirm')" :visible.sync="showPayModal" width="50%"> | |
| 87 | 63 | <el-form label-width="120px"> |
| 88 | 64 | <el-form-item :label="$t('owePayFeeOrder.room')"> |
| 89 | 65 | <span>{{ owePayFeeOrderInfo.roomName }}</span> |
| ... | ... | @@ -93,62 +69,40 @@ |
| 93 | 69 | <span>{{ $t('owePayFeeOrder.yuan') }}</span> |
| 94 | 70 | </el-form-item> |
| 95 | 71 | <el-form-item :label="$t('owePayFeeOrder.paymentMethod')" required> |
| 96 | - <el-select | |
| 97 | - v-model="owePayFeeOrderInfo.primeRate" | |
| 98 | - style="width:100%" | |
| 72 | + <el-select v-model="owePayFeeOrderInfo.primeRate" style="width:100%" | |
| 99 | 73 | :placeholder="$t('owePayFeeOrder.selectPaymentMethod')"> |
| 100 | - <el-option | |
| 101 | - v-for="item in filteredPrimeRates" | |
| 102 | - :key="item.statusCd" | |
| 103 | - :label="item.name" | |
| 74 | + <el-option v-for="item in filteredPrimeRates" :key="item.statusCd" :label="item.name" | |
| 104 | 75 | :value="item.statusCd"> |
| 105 | 76 | </el-option> |
| 106 | 77 | </el-select> |
| 107 | 78 | </el-form-item> |
| 108 | 79 | <el-form-item :label="$t('owePayFeeOrder.remark')"> |
| 109 | - <el-input | |
| 110 | - type="textarea" | |
| 111 | - :placeholder="$t('owePayFeeOrder.inputRemark')" | |
| 112 | - v-model="owePayFeeOrderInfo.remark"> | |
| 80 | + <el-input type="textarea" :placeholder="$t('owePayFeeOrder.inputRemark')" v-model="owePayFeeOrderInfo.remark"> | |
| 113 | 81 | </el-input> |
| 114 | 82 | </el-form-item> |
| 115 | - <el-form-item | |
| 116 | - v-if="owePayFeeOrderInfo.payType === 'qrCode'" | |
| 117 | - :label="$t('owePayFeeOrder.authCode')"> | |
| 118 | - <el-input | |
| 119 | - v-model="owePayFeeOrderInfo.authCode" | |
| 120 | - :placeholder="$t('owePayFeeOrder.scanCodeTip')" | |
| 83 | + <el-form-item v-if="owePayFeeOrderInfo.payType === 'qrCode'" :label="$t('owePayFeeOrder.authCode')"> | |
| 84 | + <el-input v-model="owePayFeeOrderInfo.authCode" :placeholder="$t('owePayFeeOrder.scanCodeTip')" | |
| 121 | 85 | @keyup.enter.native="_qrCodePayFee"> |
| 122 | 86 | </el-input> |
| 123 | 87 | </el-form-item> |
| 124 | 88 | </el-form> |
| 125 | 89 | <span slot="footer" class="dialog-footer"> |
| 126 | 90 | <el-button @click="_closeDoOwePayFeeModal()">{{ $t('common.close') }}</el-button> |
| 127 | - <el-button | |
| 128 | - type="primary" | |
| 129 | - @click="_doPayFee()" | |
| 130 | - v-if="owePayFeeOrderInfo.payType === 'common'"> | |
| 91 | + <el-button type="primary" @click="_doPayFee()" v-if="owePayFeeOrderInfo.payType === 'common'"> | |
| 131 | 92 | {{ $t('owePayFeeOrder.confirmPayment') }} |
| 132 | 93 | </el-button> |
| 133 | 94 | </span> |
| 134 | 95 | </el-dialog> |
| 135 | 96 | |
| 136 | 97 | <!-- 缴费结果弹窗 --> |
| 137 | - <el-dialog | |
| 138 | - :title="$t('owePayFeeOrder.paymentTip')" | |
| 139 | - :visible.sync="showResultModal" | |
| 140 | - width="30%"> | |
| 98 | + <el-dialog :title="$t('owePayFeeOrder.paymentTip')" :visible.sync="showResultModal" width="30%"> | |
| 141 | 99 | <p>{{ $t('owePayFeeOrder.paymentSuccess') }}</p> |
| 142 | 100 | <span slot="footer" class="dialog-footer"> |
| 143 | 101 | <el-button @click="_back()">{{ $t('common.back') }}</el-button> |
| 144 | - <el-button | |
| 145 | - type="primary" | |
| 146 | - @click="_printAndBack('ON')"> | |
| 102 | + <el-button type="primary" @click="_printAndBack('ON')"> | |
| 147 | 103 | {{ $t('owePayFeeOrder.mergePrint') }} |
| 148 | 104 | </el-button> |
| 149 | - <el-button | |
| 150 | - type="primary" | |
| 151 | - @click="_printAndBack('OFF')"> | |
| 105 | + <el-button type="primary" @click="_printAndBack('OFF')"> | |
| 152 | 106 | {{ $t('owePayFeeOrder.printReceipt') }} |
| 153 | 107 | </el-button> |
| 154 | 108 | </span> |
| ... | ... | @@ -162,7 +116,7 @@ |
| 162 | 116 | import { getDict } from '@/api/community/communityApi' |
| 163 | 117 | import { getCommunityId } from '@/api/community/communityApi' |
| 164 | 118 | import { dateFormat } from '@/utils/dateUtil' |
| 165 | -import { | |
| 119 | +import { | |
| 166 | 120 | listOweFees, |
| 167 | 121 | payOweFee, |
| 168 | 122 | qrCodePayment, |
| ... | ... | @@ -221,7 +175,7 @@ export default { |
| 221 | 175 | async _initData() { |
| 222 | 176 | const _payObjId = this.$route.query.payObjId |
| 223 | 177 | const _payObjType = this.$route.query.payObjType |
| 224 | - | |
| 178 | + | |
| 225 | 179 | if (!_payObjId) { |
| 226 | 180 | this.$message.error(this.$t('owePayFeeOrder.illegalOperation')) |
| 227 | 181 | this.$router.go(-1) |
| ... | ... | @@ -237,11 +191,11 @@ export default { |
| 237 | 191 | await this._loadPrimeRates() |
| 238 | 192 | await this._listFeePrintPages() |
| 239 | 193 | }, |
| 240 | - | |
| 194 | + | |
| 241 | 195 | handleSelectionChange(val) { |
| 242 | 196 | this.owePayFeeOrderInfo.selectPayFeeIds = val.map(item => item.feeId) |
| 243 | 197 | }, |
| 244 | - | |
| 198 | + | |
| 245 | 199 | async _loadOweFees() { |
| 246 | 200 | try { |
| 247 | 201 | const params = { |
| ... | ... | @@ -251,30 +205,30 @@ export default { |
| 251 | 205 | payObjId: this.owePayFeeOrderInfo.payObjId, |
| 252 | 206 | payObjType: this.owePayFeeOrderInfo.payObjType, |
| 253 | 207 | } |
| 254 | - | |
| 208 | + | |
| 255 | 209 | const { data } = await listOweFees(params) |
| 256 | - | |
| 210 | + | |
| 257 | 211 | if (data.length < 1) { |
| 258 | 212 | this.owePayFeeOrderInfo.oweFees = [] |
| 259 | 213 | this.$message.warning(this.$t('owePayFeeOrder.noOweData')) |
| 260 | 214 | return |
| 261 | 215 | } |
| 262 | - | |
| 216 | + | |
| 263 | 217 | this.owePayFeeOrderInfo.oweFees = data |
| 264 | 218 | this.owePayFeeOrderInfo.selectPayFeeIds = data.map(item => item.feeId) |
| 265 | 219 | this.owePayFeeOrderInfo.toFixedSign = data[0].val |
| 266 | - | |
| 220 | + | |
| 267 | 221 | this.owePayFeeOrderInfo.oweFees.forEach(item => { |
| 268 | 222 | item.receivableAmount = item.feeTotalPrice |
| 269 | 223 | item.feePrice = item.feeTotalPrice |
| 270 | 224 | }) |
| 271 | - | |
| 225 | + | |
| 272 | 226 | this._dealSelectFee() |
| 273 | 227 | } catch (error) { |
| 274 | 228 | console.error('获取欠费数据失败:', error) |
| 275 | 229 | } |
| 276 | 230 | }, |
| 277 | - | |
| 231 | + | |
| 278 | 232 | async _loadPrimeRates() { |
| 279 | 233 | try { |
| 280 | 234 | const data = await getDict('pay_fee_detail', 'prime_rate') |
| ... | ... | @@ -283,7 +237,7 @@ export default { |
| 283 | 237 | console.error('获取支付方式失败:', error) |
| 284 | 238 | } |
| 285 | 239 | }, |
| 286 | - | |
| 240 | + | |
| 287 | 241 | async _listFeePrintPages() { |
| 288 | 242 | try { |
| 289 | 243 | const params = { |
| ... | ... | @@ -292,7 +246,7 @@ export default { |
| 292 | 246 | state: 'T', |
| 293 | 247 | communityId: this.communityId |
| 294 | 248 | } |
| 295 | - | |
| 249 | + | |
| 296 | 250 | const { data } = await listFeePrintPages(params) |
| 297 | 251 | if (data && data.length > 0) { |
| 298 | 252 | this.owePayFeeOrderInfo.printUrl = data[0].url |
| ... | ... | @@ -301,7 +255,7 @@ export default { |
| 301 | 255 | console.error('获取打印页面失败:', error) |
| 302 | 256 | } |
| 303 | 257 | }, |
| 304 | - | |
| 258 | + | |
| 305 | 259 | _payFee() { |
| 306 | 260 | if (this.owePayFeeOrderInfo.selectPayFeeIds.length <= 0) { |
| 307 | 261 | this.$message.warning(this.$t('owePayFeeOrder.noSelectedFee')) |
| ... | ... | @@ -310,7 +264,7 @@ export default { |
| 310 | 264 | this.showPayModal = true |
| 311 | 265 | this.owePayFeeOrderInfo.payType = 'common' |
| 312 | 266 | }, |
| 313 | - | |
| 267 | + | |
| 314 | 268 | _openPayFee() { |
| 315 | 269 | if (this.owePayFeeOrderInfo.selectPayFeeIds.length <= 0) { |
| 316 | 270 | this.$message.warning(this.$t('owePayFeeOrder.noSelectedFee')) |
| ... | ... | @@ -319,11 +273,11 @@ export default { |
| 319 | 273 | this.showPayModal = true |
| 320 | 274 | this.owePayFeeOrderInfo.payType = 'qrCode' |
| 321 | 275 | }, |
| 322 | - | |
| 276 | + | |
| 323 | 277 | _closeDoOwePayFeeModal() { |
| 324 | 278 | this.showPayModal = false |
| 325 | 279 | }, |
| 326 | - | |
| 280 | + | |
| 327 | 281 | _getPayFees() { |
| 328 | 282 | const _fees = [] |
| 329 | 283 | this.owePayFeeOrderInfo.selectPayFeeIds.forEach(_item => { |
| ... | ... | @@ -341,25 +295,25 @@ export default { |
| 341 | 295 | }) |
| 342 | 296 | return _fees |
| 343 | 297 | }, |
| 344 | - | |
| 298 | + | |
| 345 | 299 | async _doPayFee() { |
| 346 | 300 | if (!this.owePayFeeOrderInfo.primeRate) { |
| 347 | 301 | this.$message.warning(this.$t('owePayFeeOrder.selectPaymentMethod')) |
| 348 | 302 | return |
| 349 | 303 | } |
| 350 | - | |
| 304 | + | |
| 351 | 305 | const _fees = this._getPayFees() |
| 352 | 306 | if (_fees.length < 1) { |
| 353 | 307 | this.$message.warning(this.$t('owePayFeeOrder.noSelectedFeeItem')) |
| 354 | 308 | return |
| 355 | 309 | } |
| 356 | - | |
| 310 | + | |
| 357 | 311 | const _data = { |
| 358 | 312 | communityId: this.communityId, |
| 359 | 313 | fees: _fees, |
| 360 | 314 | remark: this.owePayFeeOrderInfo.remark |
| 361 | 315 | } |
| 362 | - | |
| 316 | + | |
| 363 | 317 | try { |
| 364 | 318 | const res = await payOweFee(_data) |
| 365 | 319 | if (res.code === 0) { |
| ... | ... | @@ -373,19 +327,19 @@ export default { |
| 373 | 327 | this.$message.error(error) |
| 374 | 328 | } |
| 375 | 329 | }, |
| 376 | - | |
| 330 | + | |
| 377 | 331 | async _qrCodePayFee() { |
| 378 | 332 | if (!this.owePayFeeOrderInfo.primeRate) { |
| 379 | 333 | this.$message.warning(this.$t('owePayFeeOrder.selectPaymentMethod')) |
| 380 | 334 | return |
| 381 | 335 | } |
| 382 | - | |
| 336 | + | |
| 383 | 337 | const _fees = this._getPayFees() |
| 384 | 338 | if (_fees.length < 1) { |
| 385 | 339 | this.$message.warning(this.$t('owePayFeeOrder.noSelectedFeeItem')) |
| 386 | 340 | return |
| 387 | 341 | } |
| 388 | - | |
| 342 | + | |
| 389 | 343 | const _data = { |
| 390 | 344 | communityId: this.communityId, |
| 391 | 345 | fees: _fees, |
| ... | ... | @@ -394,7 +348,7 @@ export default { |
| 394 | 348 | receivedAmount: this.owePayFeeOrderInfo.feePrices, |
| 395 | 349 | subServiceCode: 'fee.payOweFee' |
| 396 | 350 | } |
| 397 | - | |
| 351 | + | |
| 398 | 352 | try { |
| 399 | 353 | const res = await qrCodePayment(_data) |
| 400 | 354 | if (res.code === 404) { |
| ... | ... | @@ -416,14 +370,14 @@ export default { |
| 416 | 370 | this.$message.error(error) |
| 417 | 371 | } |
| 418 | 372 | }, |
| 419 | - | |
| 373 | + | |
| 420 | 374 | async _qrCodeCheckPayFinish() { |
| 421 | 375 | const _fees = this._getPayFees() |
| 422 | 376 | if (_fees.length < 1) { |
| 423 | 377 | this.$message.warning(this.$t('owePayFeeOrder.noSelectedFeeItem')) |
| 424 | 378 | return |
| 425 | 379 | } |
| 426 | - | |
| 380 | + | |
| 427 | 381 | const _data = { |
| 428 | 382 | communityId: this.communityId, |
| 429 | 383 | fees: _fees, |
| ... | ... | @@ -434,7 +388,7 @@ export default { |
| 434 | 388 | paymentPoolId: this.owePayFeeOrderInfo.paymentPoolId, |
| 435 | 389 | subServiceCode: 'fee.payOweFee' |
| 436 | 390 | } |
| 437 | - | |
| 391 | + | |
| 438 | 392 | try { |
| 439 | 393 | const res = await checkPayFinish(_data) |
| 440 | 394 | if (res.code === 404) { |
| ... | ... | @@ -451,7 +405,7 @@ export default { |
| 451 | 405 | this.$message.error(error) |
| 452 | 406 | } |
| 453 | 407 | }, |
| 454 | - | |
| 408 | + | |
| 455 | 409 | _doDealPayResult(res) { |
| 456 | 410 | this._closeDoOwePayFeeModal() |
| 457 | 411 | const _data = res.data |
| ... | ... | @@ -460,26 +414,26 @@ export default { |
| 460 | 414 | _detailIds += (item + ',') |
| 461 | 415 | }) |
| 462 | 416 | this.owePayFeeOrderInfo.detailIds = _detailIds |
| 463 | - | |
| 417 | + | |
| 464 | 418 | setTimeout(() => { |
| 465 | 419 | this.showResultModal = true |
| 466 | 420 | }, 2000) |
| 467 | - | |
| 421 | + | |
| 468 | 422 | this.owePayFeeOrderInfo.selectPayFeeIds = [] |
| 469 | 423 | this._loadOweFees() |
| 470 | 424 | this.$message.success(res.msg) |
| 471 | 425 | }, |
| 472 | - | |
| 426 | + | |
| 473 | 427 | _back() { |
| 474 | 428 | this.showResultModal = false |
| 475 | 429 | this.$router.go(-1) |
| 476 | 430 | }, |
| 477 | - | |
| 431 | + | |
| 478 | 432 | _printAndBack(merge) { |
| 479 | 433 | this.showResultModal = false |
| 480 | 434 | window.open(`${this.owePayFeeOrderInfo.printUrl}?detailIds=${this.owePayFeeOrderInfo.detailIds}&merge=${merge}`) |
| 481 | 435 | }, |
| 482 | - | |
| 436 | + | |
| 483 | 437 | _dealSelectFee() { |
| 484 | 438 | let totalFee = 0.00 |
| 485 | 439 | this.owePayFeeOrderInfo.selectPayFeeIds.forEach(_item => { |
| ... | ... | @@ -490,15 +444,15 @@ export default { |
| 490 | 444 | }) |
| 491 | 445 | this.owePayFeeOrderInfo.feePrices = Math.round(totalFee * 100, 2) / 100 |
| 492 | 446 | }, |
| 493 | - | |
| 447 | + | |
| 494 | 448 | _goBack() { |
| 495 | 449 | this.$router.go(-1) |
| 496 | 450 | }, |
| 497 | - | |
| 451 | + | |
| 498 | 452 | _printOwnOrder() { |
| 499 | 453 | window.open(`/#/views/fee/printOweFee?payObjId=${this.owePayFeeOrderInfo.payObjId}&payObjType=${this.owePayFeeOrderInfo.payObjType}&payObjName=${this.owePayFeeOrderInfo.roomName}`) |
| 500 | 454 | }, |
| 501 | - | |
| 455 | + | |
| 502 | 456 | _printOwnOrder2() { |
| 503 | 457 | this.$refs.printOwnFee.open({ |
| 504 | 458 | payObjId: this.owePayFeeOrderInfo.payObjId, |
| ... | ... | @@ -506,7 +460,7 @@ export default { |
| 506 | 460 | payObjName: this.owePayFeeOrderInfo.roomName |
| 507 | 461 | }) |
| 508 | 462 | }, |
| 509 | - | |
| 463 | + | |
| 510 | 464 | _getDeadlineTime(fee) { |
| 511 | 465 | if (fee.amountOwed === 0 && fee.endTime === fee.deadlineTime) { |
| 512 | 466 | return "-" |
| ... | ... | @@ -516,7 +470,7 @@ export default { |
| 516 | 470 | } |
| 517 | 471 | return dateFormat(fee.deadlineTime) |
| 518 | 472 | }, |
| 519 | - | |
| 473 | + | |
| 520 | 474 | _getEndTime(fee) { |
| 521 | 475 | if (fee.state === '2009001') { |
| 522 | 476 | return "-" |
| ... | ... | @@ -530,41 +484,41 @@ export default { |
| 530 | 484 | <style lang="scss" scoped> |
| 531 | 485 | .owe-pay-fee-order-container { |
| 532 | 486 | padding: 20px; |
| 533 | - | |
| 487 | + | |
| 534 | 488 | .box-card { |
| 535 | 489 | margin-bottom: 20px; |
| 536 | - | |
| 490 | + | |
| 537 | 491 | .clearfix { |
| 538 | 492 | display: flex; |
| 539 | 493 | justify-content: space-between; |
| 540 | 494 | align-items: center; |
| 541 | 495 | } |
| 542 | - | |
| 496 | + | |
| 543 | 497 | .card-header-actions { |
| 544 | 498 | .el-button { |
| 545 | 499 | margin-left: 10px; |
| 546 | 500 | } |
| 547 | 501 | } |
| 548 | 502 | } |
| 549 | - | |
| 503 | + | |
| 550 | 504 | .footer-row { |
| 551 | 505 | margin-top: 20px; |
| 552 | 506 | display: flex; |
| 553 | 507 | align-items: center; |
| 554 | - | |
| 508 | + | |
| 555 | 509 | .amount-col { |
| 556 | 510 | display: flex; |
| 557 | 511 | align-items: center; |
| 558 | 512 | justify-content: flex-end; |
| 559 | 513 | padding-right: 20px; |
| 560 | - | |
| 514 | + | |
| 561 | 515 | .amount-text { |
| 562 | 516 | font-size: 30px; |
| 563 | 517 | color: red; |
| 564 | 518 | padding: 0 5px; |
| 565 | 519 | } |
| 566 | 520 | } |
| 567 | - | |
| 521 | + | |
| 568 | 522 | .pay-btn { |
| 569 | 523 | width: 100%; |
| 570 | 524 | } | ... | ... |
src/views/fee/payFeeConfigDiscountManageList.vue
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <div slot="header"> |
| 4 | 4 | <el-row type="flex" justify="space-between" align="middle"> |
| 5 | 5 | <el-col :span="12" class="text-left"> |
| 6 | - <h5>{{ $t('payFeeConfigDiscountManage.title') }}</h5> | |
| 6 | + <span>{{ $t('payFeeConfigDiscountManage.title') }}</span> | |
| 7 | 7 | </el-col> |
| 8 | 8 | <el-col :span="12" class="text-right"> |
| 9 | 9 | <el-button type="primary" size="small" @click="goBack"> | ... | ... |
src/views/fee/payFeeOrderLang.js
| ... | ... | @@ -100,26 +100,6 @@ export const messages = { |
| 100 | 100 | yuan: 'yuan', |
| 101 | 101 | prestore: 'Prestore' |
| 102 | 102 | }, |
| 103 | - payFeeDeposit: { | |
| 104 | - title: 'Deposit Information', | |
| 105 | - depositInfo: 'Deposit Information', | |
| 106 | - refresh: 'Refresh', | |
| 107 | - payerObj: 'Payer Object', | |
| 108 | - feeName: 'Fee Item', | |
| 109 | - timeRange: 'Time Range', | |
| 110 | - amount: 'Amount', | |
| 111 | - paymentTime: 'Payment Time', | |
| 112 | - operation: 'Operation', | |
| 113 | - refund: 'Refund' | |
| 114 | - }, | |
| 115 | - refundDepositFee: { | |
| 116 | - title: 'Please confirm your operation!', | |
| 117 | - alertText: 'After the deposit is refunded, it will be automatically deposited into the account. You can choose to pay from the account. If you refund cash to the owner, please go to the business home page to refund the deposit!', | |
| 118 | - cancel: 'Cancel', | |
| 119 | - confirm: 'Confirm', | |
| 120 | - success: 'Refund deposit successfully', | |
| 121 | - error: 'Refund deposit failed' | |
| 122 | - }, | |
| 123 | 103 | payFeeOrderResult: { |
| 124 | 104 | title: 'Payment Prompt', |
| 125 | 105 | success: 'Payment successful', |
| ... | ... | @@ -290,26 +270,6 @@ export const messages = { |
| 290 | 270 | yuan: '元', |
| 291 | 271 | prestore: '预存' |
| 292 | 272 | }, |
| 293 | - payFeeDeposit: { | |
| 294 | - title: '押金信息', | |
| 295 | - depositInfo: '押金信息', | |
| 296 | - refresh: '刷新', | |
| 297 | - payerObj: '收费对象', | |
| 298 | - feeName: '费用项', | |
| 299 | - timeRange: '时间段', | |
| 300 | - amount: '金额', | |
| 301 | - paymentTime: '缴费时间', | |
| 302 | - operation: '操作', | |
| 303 | - refund: '退押金' | |
| 304 | - }, | |
| 305 | - refundDepositFee: { | |
| 306 | - title: '请确认您的操作!', | |
| 307 | - alertText: '押金退款后自动存到账户中,您可以从账户中选择缴费,如果退现金给业主,请到业务首页面退押金!', | |
| 308 | - cancel: '点错了', | |
| 309 | - confirm: '确认', | |
| 310 | - success: '退押金成功', | |
| 311 | - error: '退押金失败' | |
| 312 | - }, | |
| 313 | 273 | payFeeOrderResult: { |
| 314 | 274 | title: '缴费提示', |
| 315 | 275 | success: '缴费成功', | ... | ... |
src/views/fee/payFeeOrderList.vue
| ... | ... | @@ -187,10 +187,10 @@ |
| 187 | 187 | </el-row> |
| 188 | 188 | </el-card> |
| 189 | 189 | |
| 190 | - <pay-fee-user-account ref="payFeeUserAccount"></pay-fee-user-account> | |
| 190 | + <pay-fee-user-account ref="payFeeUserAccount" @changeUserAmountPrice="changeUserAmountPrice"></pay-fee-user-account> | |
| 191 | 191 | <pay-fee-deposit ref="payFeeDeposit"></pay-fee-deposit> |
| 192 | 192 | <pay-fee-order-confirm ref="payFeeOrderConfirm"></pay-fee-order-confirm> |
| 193 | - <pay-fee-discount ref="payFeeDiscount"></pay-fee-discount> | |
| 193 | + <pay-fee-discount ref="payFeeDiscount" @changeDiscountPrice="changeDiscountPrice"></pay-fee-discount> | |
| 194 | 194 | <pay-fee-coupon ref="payFeeCoupon"></pay-fee-coupon> |
| 195 | 195 | <prestore-account2 ref="prestoreAccount2"></prestore-account2> |
| 196 | 196 | <view-room-data ref="viewRoomData"></view-room-data> |
| ... | ... | @@ -290,6 +290,9 @@ export default { |
| 290 | 290 | }, |
| 291 | 291 | created() { |
| 292 | 292 | this.initData() |
| 293 | + setTimeout(() => { | |
| 294 | + this.handleAccountChange(true) | |
| 295 | + }, 1000) | |
| 293 | 296 | }, |
| 294 | 297 | methods: { |
| 295 | 298 | async initData() { |
| ... | ... | @@ -449,7 +452,6 @@ export default { |
| 449 | 452 | for (let index = 1; index < 7; index++) { |
| 450 | 453 | this.payFeeOrderInfo.paymentCycles.push(index * listRoomData.data.paymentCycle); |
| 451 | 454 | } |
| 452 | - console.log('listRoomData', listRoomData) | |
| 453 | 455 | //发送get请求 |
| 454 | 456 | |
| 455 | 457 | if (Object.prototype.hasOwnProperty.call(listRoomData.data, 'custEndTime')) { |
| ... | ... | @@ -469,35 +471,96 @@ export default { |
| 469 | 471 | this.$message.warning('超过最大计费结束时间,' + dateSub(listRoomData.data.maxEndTime, listRoomData.data.feeFlag) + ",请用更小缴费周期或者自定义结束时间缴费"); |
| 470 | 472 | return; |
| 471 | 473 | } |
| 472 | - // vc.emit('payFeeDiscount', 'computeFeeDiscount', { | |
| 473 | - // feeId: this.payFeeOrderInfo.feeId, | |
| 474 | - // cycles: _cycles, | |
| 475 | - // payerObjId: this.payFeeOrderInfo.payerObjId, | |
| 476 | - // payerObjType: this.payFeeOrderInfo.payerObjType, | |
| 477 | - // endTime: this.payFeeOrderInfo.endTime, | |
| 478 | - // custEndTime: this.payFeeOrderInfo.custEndTime | |
| 479 | - // }); | |
| 480 | - // vc.emit('payFeeCoupon', 'computeFeeCoupon', { | |
| 481 | - // feeId: this.payFeeOrderInfo.feeId, | |
| 482 | - // cycles: _cycles, | |
| 483 | - // payerObjId: this.payFeeOrderInfo.payerObjId, | |
| 484 | - // payerObjType: this.payFeeOrderInfo.payerObjType, | |
| 485 | - // endTime: this.payFeeOrderInfo.endTime | |
| 486 | - // }); | |
| 487 | - // vc.emit('payFeeDeposit', 'computeFeeDeposit', { | |
| 488 | - // payerObjId: this.payFeeOrderInfo.payerObjId, | |
| 489 | - // payerObjType: this.payFeeOrderInfo.payerObjType, | |
| 490 | - // }); | |
| 474 | + this.$refs.payFeeDiscount.open({ | |
| 475 | + feeId: this.payFeeOrderInfo.feeId, | |
| 476 | + cycles: _cycles, | |
| 477 | + payerObjId: this.payFeeOrderInfo.payerObjId, | |
| 478 | + payerObjType: this.payFeeOrderInfo.payerObjType, | |
| 479 | + endTime: this.payFeeOrderInfo.endTime, | |
| 480 | + }) | |
| 481 | + this.$refs.payFeeCoupon.open({ | |
| 482 | + feeId: this.payFeeOrderInfo.feeId, | |
| 483 | + cycles: _cycles, | |
| 484 | + payerObjId: this.payFeeOrderInfo.payerObjId, | |
| 485 | + payerObjType: this.payFeeOrderInfo.payerObjType, | |
| 486 | + endTime: this.payFeeOrderInfo.endTime, | |
| 487 | + }) | |
| 488 | + this.$refs.payFeeDeposit.open({ | |
| 489 | + payerObjId: this.payFeeOrderInfo.payerObjId, | |
| 490 | + payerObjType: this.payFeeOrderInfo.payerObjType, | |
| 491 | + }) | |
| 491 | 492 | this._listFeeIntegral(_cycles); |
| 492 | - | |
| 493 | - | |
| 494 | 493 | }, |
| 495 | - | |
| 494 | + changeDiscountPrice(data) { | |
| 495 | + let _totalFeePrice = this.payFeeOrderInfo.totalFeePrice; | |
| 496 | + if (_totalFeePrice < 0) { | |
| 497 | + return; | |
| 498 | + } | |
| 499 | + let _totalDiscountMoney = data.totalDiscountMoney; | |
| 500 | + //如果应收小区 优惠金额 则不优惠 | |
| 501 | + if (_totalFeePrice < _totalDiscountMoney) { | |
| 502 | + this.$message.warning("实收款不能为负数!") | |
| 503 | + } | |
| 504 | + this.payFeeOrderInfo.selectDiscount = data.selectDiscount; | |
| 505 | + this.payFeeOrderInfo.totalDiscountMoney = _totalDiscountMoney; | |
| 506 | + // 该处js做减法后,会出现小数点后取不尽的bug,再次处理 | |
| 507 | + let receivedAmount = _totalFeePrice - _totalDiscountMoney; | |
| 508 | + this.payFeeOrderInfo.receivedAmount = receivedAmount;//this._getFixedNum(receivedAmount); | |
| 509 | + }, | |
| 496 | 510 | async _listFeeIntegral(_cycles) { |
| 497 | 511 | // 实现积分计算逻辑 |
| 498 | 512 | console.log(_cycles) |
| 499 | 513 | }, |
| 500 | - | |
| 514 | + changeUserAmountPrice(data) { | |
| 515 | + this.payFeeOrderInfo.selectUserAccount = data.selectAccount; | |
| 516 | + this.payFeeOrderInfo.accountAmount = data.totalUserAmount; | |
| 517 | + this.payFeeOrderInfo.accountList = data.accountList; | |
| 518 | + this.payFeeOrderInfo.integralAmount = data.integralAmount; | |
| 519 | + this.payFeeOrderInfo.cashAmount = data.cashAmount; | |
| 520 | + this.payFeeOrderInfo.couponAmount = data.couponAmount; | |
| 521 | + this._doComputeAccountRedepositDeduction(); | |
| 522 | + }, | |
| 523 | + /** | |
| 524 | + * 如果选择使用用户余额,则更新应缴金额 | |
| 525 | + * | |
| 526 | + * accountAmount: 0.0, // 账户金额 | |
| 527 | + viewAccountAmount: 0.0, // 账户金额 | |
| 528 | + deductionAmount: 0.0, //抵扣金额 | |
| 529 | + needDeductionAmount: false, | |
| 530 | + redepositAmount: 0.0, //转存金额 | |
| 531 | + */ | |
| 532 | + _doComputeAccountRedepositDeduction: function () { | |
| 533 | + let receivedAmount = this.payFeeOrderInfo.receivedAmount; //实缴 | |
| 534 | + //计算 | |
| 535 | + let accountAmount = this.payFeeOrderInfo.accountAmount; | |
| 536 | + let deductionAmount = 0.0; // 抵消金额 | |
| 537 | + this.payFeeOrderInfo.deductionAmount = deductionAmount; | |
| 538 | + let redepositAmount = 0.0; //转存金额 | |
| 539 | + this.payFeeOrderInfo.redepositAmount = redepositAmount; | |
| 540 | + let totalDiscountMoney = this.payFeeOrderInfo.totalDiscountMoney; // 优惠金额 | |
| 541 | + let totalFeePrice = this.payFeeOrderInfo.totalFeePrice; //应缴 | |
| 542 | + //将显示账户金额实际刷成 账户金额 | |
| 543 | + this.payFeeOrderInfo.viewAccountAmount = accountAmount; | |
| 544 | + //计算转存 ,转存 = 实缴 + 折扣优惠 - 应缴 | |
| 545 | + redepositAmount = parseFloat(receivedAmount) + parseFloat(totalDiscountMoney) - parseFloat(totalFeePrice); | |
| 546 | + //转存 | |
| 547 | + if (parseFloat(redepositAmount) > 0) { | |
| 548 | + this.payFeeOrderInfo.redepositAmount = redepositAmount.toFixed(2); // 计算转存 | |
| 549 | + this.payFeeOrderInfo.viewAccountAmount = parseFloat(this.payFeeOrderInfo.viewAccountAmount) + parseFloat(this.payFeeOrderInfo.redepositAmount); | |
| 550 | + return; | |
| 551 | + } | |
| 552 | + // 计算抵消金额 应缴 - 折扣 - 实缴 = 抵消金额 | |
| 553 | + deductionAmount = parseFloat(totalFeePrice) - parseFloat(totalDiscountMoney) - parseFloat(receivedAmount); | |
| 554 | + if (parseFloat(deductionAmount) > 0 && parseFloat(accountAmount) >= parseFloat(deductionAmount)) { | |
| 555 | + this.payFeeOrderInfo.deductionAmount = deductionAmount.toFixed(2); | |
| 556 | + let viewAccountAmount = this.payFeeOrderInfo.viewAccountAmount; | |
| 557 | + this.payFeeOrderInfo.viewAccountAmount = parseFloat(this.payFeeOrderInfo.viewAccountAmount) - parseFloat(this.payFeeOrderInfo.deductionAmount); | |
| 558 | + if (parseFloat(this.payFeeOrderInfo.viewAccountAmount) < 0) { //账户小于0 | |
| 559 | + this.payFeeOrderInfo.viewAccountAmount = 0; | |
| 560 | + this.payFeeOrderInfo.deductionAmount = viewAccountAmount; | |
| 561 | + } | |
| 562 | + } | |
| 563 | + }, | |
| 501 | 564 | } |
| 502 | 565 | } |
| 503 | 566 | </script> | ... | ... |
src/views/fee/refundDepositFeeLang.js
| ... | ... | @@ -5,7 +5,8 @@ export const messages = { |
| 5 | 5 | unrefunded: 'Unrefunded', |
| 6 | 6 | refunded: 'Refunded', |
| 7 | 7 | pendingReview: 'Pending Review', |
| 8 | - printReceipt: 'Reprint Receipt' | |
| 8 | + printReceipt: 'Reprint Receipt', | |
| 9 | + alertText: 'Are you sure you want to refund the deposit?' | |
| 9 | 10 | }, |
| 10 | 11 | payFeeDeposit: { |
| 11 | 12 | payerObject: 'Payer', |
| ... | ... | @@ -16,7 +17,14 @@ export const messages = { |
| 16 | 17 | status: 'Status', |
| 17 | 18 | operation: 'Operation', |
| 18 | 19 | refundDeposit: 'Refund Deposit', |
| 19 | - detail: 'Detail' | |
| 20 | + detail: 'Detail', | |
| 21 | + title: 'Deposit Information', | |
| 22 | + depositInfo: 'Deposit Information', | |
| 23 | + refresh: 'Refresh', | |
| 24 | + payerObj: 'Payer Object', | |
| 25 | + feeName: 'Fee Item', | |
| 26 | + timeRange: 'Time Range', | |
| 27 | + refund: 'Refund' | |
| 20 | 28 | }, |
| 21 | 29 | returnPayFee: { |
| 22 | 30 | fillRefundReason: 'Fill Refund Reason', |
| ... | ... | @@ -39,7 +47,9 @@ export const messages = { |
| 39 | 47 | unrefunded: '未退押金', |
| 40 | 48 | refunded: '已退押金', |
| 41 | 49 | pendingReview: '待审核', |
| 42 | - printReceipt: '补打退款单' | |
| 50 | + printReceipt: '补打退款单', | |
| 51 | + alertText: '押金退款后自动存到账户中,您可以从账户中选择缴费,如果退现金给业主,请到业务首页面退押金!' | |
| 52 | + | |
| 43 | 53 | }, |
| 44 | 54 | payFeeDeposit: { |
| 45 | 55 | payerObject: '收费对象', |
| ... | ... | @@ -50,7 +60,17 @@ export const messages = { |
| 50 | 60 | status: '状态', |
| 51 | 61 | operation: '操作', |
| 52 | 62 | refundDeposit: '退押金', |
| 53 | - detail: '详情' | |
| 63 | + detail: '详情', | |
| 64 | + title: '押金信息', | |
| 65 | + depositInfo: '押金信息', | |
| 66 | + refresh: '刷新', | |
| 67 | + payerObj: '收费对象', | |
| 68 | + feeName: '费用项', | |
| 69 | + timeRange: '时间段', | |
| 70 | + // amount: '金额', | |
| 71 | + // paymentTime: '缴费时间', | |
| 72 | + // operation: '操作', | |
| 73 | + refund: '退押金' | |
| 54 | 74 | }, |
| 55 | 75 | returnPayFee: { |
| 56 | 76 | fillRefundReason: '填写退费原因', | ... | ... |