v1.9 优化加入费用拆分功能和费用合并功能

This commit is contained in:
wuxw 2025-10-15 10:26:27 +08:00
parent 2e006672e0
commit b0222bb045
5 changed files with 31 additions and 17 deletions

View File

@ -27,11 +27,7 @@ export function listFee(params) {
params
}).then(response => {
const res = response.data
if (res.code === 0) {
resolve(res)
} else {
reject(new Error(res.msg || 'Failed to get fee list'))
}
}).catch(error => {
reject(error)
})

View File

@ -3,7 +3,7 @@
<el-row>
<el-col :span="24" class="text-right">
<el-button type="primary" size="small" style="margin-left: 10px"
v-if="hasPrivilege('502020090427190001') && feeDetailSubInfo.fee.state === '2008001'" @click="_splitPayFee">
v-if="hasPrivilege('502020090427190001') && feeDetailSubInfo.fee.state == '2008001'" @click="_splitPayFee">
{{ $t('feeDetailSub.split') }}
</el-button>
</el-col>
@ -49,8 +49,8 @@
</el-col>
</el-row>
<merge-fee ref="mergeFee" @merge-success="loadData" />
<split-fee ref="splitFee" @split-success="loadData" />
<merge-fee ref="mergeFee" @success="loadData" />
<split-fee ref="splitFee" @success="loadData" />
</div>
</template>

View File

@ -5,13 +5,8 @@
width="50%"
:before-close="closeMergeFeeModel"
>
<el-table :data="[]" border style="width: 100%">
<el-table-column align="center">
<template >
{{ $t('mergeFee.mergeDescription') }}
</template>
</el-table-column>
</el-table>
{{ $t('mergeFee.mergeDescription') }}
<span slot="footer" class="dialog-footer">
<el-button @click="closeMergeFeeModel">{{ $t('mergeFee.cancel') }}</el-button>
<el-button type="primary" @click="_doMergeFee">{{ $t('mergeFee.confirmMerge') }}</el-button>
@ -50,7 +45,7 @@ export default {
const res = await mergePayFee(params)
if (res.code === 0) {
this.closeMergeFeeModel()
this.$emit('merge-success')
this.$emit('success')
this.$message.success(this.$t('common.operationSuccess'))
} else {
this.$message.error(res.msg)

View File

@ -1,6 +1,6 @@
<template>
<el-dialog :title="$t('splitFee.title')" :visible.sync="visible" width="50%">
<el-form :model="splitFeeInfo" label-width="120px">
<el-form :model="splitFeeInfo" label-width="120px" class="text-left">
<el-form-item :label="$t('splitFee.timePeriod')">
<div>{{ splitFeeInfo.endTime }} ~ {{ splitFeeInfo.deadlineTime }}</div>
</el-form-item>
@ -33,6 +33,8 @@
<script>
import { splitFee } from '@/api/fee/listCarFeeApi'
import {dateFormat} from '@/utils/dateUtil'
import {getCommunityId} from '@/api/community/communityApi'
export default {
name: 'SplitFee',
@ -52,7 +54,7 @@ export default {
open(fee) {
this.splitFeeInfo = {
feeId: fee.feeId,
endTime: this.$formatDate(fee.endTime),
endTime: dateFormat(fee.endTime),
deadlineTime: this._computeSplitDeadLineTime(fee),
splitTime: '',
remark: ''
@ -71,6 +73,7 @@ export default {
const data = {
preFeeId: this.splitFeeInfo.feeId,
splitTime: this.splitFeeInfo.splitTime,
communityId:getCommunityId(),
remark: this.splitFeeInfo.remark
}

View File

@ -243,6 +243,16 @@ export const messages = {
},
feeDetailSubDemo: {
openComponent: 'Open Fee Detail Sub Component'
},
splitFee: {
title: 'Split Fee',
timePeriod: 'Time Period',
splitTime: 'Split Time',
splitTimePlaceholder: 'Please select split time',
note: 'Note: The split time must be within the billing period',
remark: 'Remark',
remarkPlaceholder: 'Please enter remark',
splitTimeRequired: 'Split time is required'
}
},
zh: {
@ -488,6 +498,16 @@ export const messages = {
},
feeDetailSubDemo: {
openComponent: '打开费用子详情组件'
},
splitFee: {
title: '拆分费用',
timePeriod: '时间段',
splitTime: '拆分时间',
splitTimePlaceholder: '请选择拆分时间',
note: '注意:拆分时间必须在计费时间段内',
remark: '备注',
remarkPlaceholder: '请输入备注',
splitTimeRequired: '拆分时间不能为空'
}
}
}