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