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 params
}).then(response => { }).then(response => {
const res = response.data const res = response.data
if (res.code === 0) {
resolve(res) resolve(res)
} else {
reject(new Error(res.msg || 'Failed to get fee list'))
}
}).catch(error => { }).catch(error => {
reject(error) reject(error)
}) })

View File

@ -3,7 +3,7 @@
<el-row> <el-row>
<el-col :span="24" class="text-right"> <el-col :span="24" class="text-right">
<el-button type="primary" size="small" style="margin-left: 10px" <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') }} {{ $t('feeDetailSub.split') }}
</el-button> </el-button>
</el-col> </el-col>
@ -49,8 +49,8 @@
</el-col> </el-col>
</el-row> </el-row>
<merge-fee ref="mergeFee" @merge-success="loadData" /> <merge-fee ref="mergeFee" @success="loadData" />
<split-fee ref="splitFee" @split-success="loadData" /> <split-fee ref="splitFee" @success="loadData" />
</div> </div>
</template> </template>

View File

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

View File

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

View File

@ -243,6 +243,16 @@ export const messages = {
}, },
feeDetailSubDemo: { feeDetailSubDemo: {
openComponent: 'Open Fee Detail Sub Component' 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: { zh: {
@ -488,6 +498,16 @@ export const messages = {
}, },
feeDetailSubDemo: { feeDetailSubDemo: {
openComponent: '打开费用子详情组件' openComponent: '打开费用子详情组件'
},
splitFee: {
title: '拆分费用',
timePeriod: '时间段',
splitTime: '拆分时间',
splitTimePlaceholder: '请选择拆分时间',
note: '注意:拆分时间必须在计费时间段内',
remark: '备注',
remarkPlaceholder: '请输入备注',
splitTimeRequired: '拆分时间不能为空'
} }
} }
} }