v1.9 合同费用bug 修复

This commit is contained in:
wuxw 2025-10-20 13:33:10 +08:00
parent 5b51508bd8
commit d767b5e680
8 changed files with 82 additions and 68 deletions

View File

@ -1,9 +1,18 @@
import request from '@/utils/request'
// 查询费用列表
export function listFee(params) {
return request({
return new Promise((resolve, reject) => {
request({
url: '/fee.listFee',
method: 'get',
params
}).then(response => {
const res = response.data
resolve(res)
}).catch(error => {
reject(error)
})
})
}

View File

@ -1,5 +1,5 @@
<template>
<div class="margin-top">
<div class="">
<div class="flex justify-end">
<div :span="2" class="padding-right-xs padding-left-xl"></div>
<div :span="2" class="padding-right-xs padding-right-xl"></div>
@ -102,7 +102,12 @@
</el-col>
</el-row>
</div>
<temp-import-room-fee ref="tempImportRoomFee"></temp-import-room-fee>
<temp-import-room-fee ref="tempImportRoomFee" @success="_query"></temp-import-room-fee>
<contract-create-fee-add ref="contractCreateFeeAdd" @success="_query"></contract-create-fee-add>
<delete-fee ref="deleteFee" @success="_query"></delete-fee>
<edit-fee ref="editFee" @success="_query"></edit-fee>
<finish-fee ref="finishFee" @success="_query"></finish-fee>
</div>
</template>
@ -110,11 +115,20 @@
import { listFee } from '@/api/contract/contractDetailFeeApi'
import { getCommunityId } from '@/api/community/communityApi'
import TempImportRoomFee from '@/components/fee/tempImportRoomFee'
import contractCreateFeeAdd from '@/components/fee/contractCreateFeeAdd'
import {dateFormat} from '@/utils/dateUtil'
import DeleteFee from '@/components/fee/deleteFee'
import EditFee from '@/components/fee/editFee'
import FinishFee from '@/components/fee/finishFee'
export default {
name: 'ContractDetailFee',
components: {
TempImportRoomFee
TempImportRoomFee,
contractCreateFeeAdd,
DeleteFee,
EditFee,
FinishFee
},
data() {
return {
@ -135,9 +149,13 @@ export default {
methods: {
open(data) {
this.contractDetailFeeInfo.contractId = data.contractId
this.contractDetailFeeInfo.contractName = data.contractName
this._loadContractDetailFeeData(1, this.pagination.pageSize)
},
_loadContractDetailFeeData(page, row) {
_query() {
this._loadContractDetailFeeData(1, this.pagination.pageSize)
},
async _loadContractDetailFeeData(page, row) {
const params = {
page: page || 1,
row: row || 10,
@ -145,20 +163,19 @@ export default {
payerObjId: this.contractDetailFeeInfo.contractId,
}
listFee(params).then(response => {
this.contractDetailFeeInfo.total = response.total
this.contractDetailFeeInfo.records = response.records
this.contractDetailFeeInfo.fees = response.fees
this.pagination.total = response.total
const res = await listFee(params)
console.log(res)
this.contractDetailFeeInfo.total = res.total
this.contractDetailFeeInfo.records = res.records
this.contractDetailFeeInfo.fees = res.fees
this.pagination.total = res.total
let totalAmount = 0.0
response.fees.forEach(item => {
res.fees.forEach(item => {
totalAmount += parseFloat(item.amountOwed)
})
this.contractDetailFeeInfo.totalAmount = totalAmount.toFixed(2)
}).catch(error => {
console.error('请求失败:', error)
})
},
_openTempImportContractFeeModal() {
this.$refs.tempImportRoomFee.open({
@ -169,35 +186,32 @@ export default {
})
},
_payContractFee(fee) {
this.$router.push(`/property/payFeeOrder?feeId=${fee.feeId}`)
this.$router.push(`/views/fee/payFeeOrder?feeId=${fee.feeId}`)
},
_editContractFee(fee) {
this.$emit('edit-fee', fee)
this.$refs.editFee.open(fee)
},
_payContractFeeHis(fee) {
fee.builtUpArea = this.contractDetailFeeInfo.builtUpArea
this.$router.push(`/property/propertyFee?${this.objToGetParam(fee)}`)
this.$router.push(`/views/fee/propertyFee?${this.objToGetParam(fee)}`)
},
_deleteContractFee(fee) {
this.$emit('delete-fee', {
this.$refs.deleteFee.open({
communityId: this.communityId,
feeId: fee.feeId
})
},
_finishContractFee(fee) {
this.$emit('finish-fee', {
this.$refs.finishFee.open({
communityId: this.communityId,
feeId: fee.feeId
})
},
_toContractOwePayFee() {
this.$router.push(`/property/owePayFeeOrder?payObjId=${this.contractDetailFeeInfo.contractId}&payObjType=7777&contractName=${this.contractDetailFeeInfo.contractName}`)
this.$router.push(`/views/fee/owePayFeeOrder?payObjId=${this.contractDetailFeeInfo.contractId}&payObjType=7777&contractName=${this.contractDetailFeeInfo.contractName}`)
},
_openContractCreateFeeAddModal() {
this.$emit('create-fee-add', {
isMore: false,
contract: this.contractDetailFeeInfo
})
this.$refs.contractCreateFeeAdd.open(this.contractDetailFeeInfo, false)
},
_getContractAttrValue(attrs, specCd) {
let value = ""
@ -216,13 +230,13 @@ export default {
if (fee.state == '2009001') {
return "-"
}
return this.$options.filters.dateFormat(fee.endTime)
return dateFormat(fee.deadlineTime)
},
_getContractEndTime(fee) {
if (fee.state == '2009001') {
return "-"
}
return this.$options.filters.dateFormat(fee.endTime)
return dateFormat(fee.endTime)
},
handlePageChange(currentPage) {
this.pagination.currentPage = currentPage

View File

@ -1,14 +1,14 @@
<template>
<div class="margin-top">
<div class="">
<div class="flex justify-end">
<div :span="2" class="padding-right-xs padding-left-xl"></div>
<div :span="2" class="padding-right-xs padding-right-xl"></div>
<div :span="8" class="text-right">
<el-button type="primary" size="small" style="margin-left:10px" v-if="hasPrivilege('502023021978930012')"
<!-- <el-button type="primary" size="small" style="margin-left:10px" v-if="hasPrivilege('502023021978930012')"
@click="_openAddContractRoom">
<i class="el-icon-plus"></i>
{{ $t('contractDetailRoom.addPropertyChange') }}
</el-button>
</el-button> -->
</div>
</div>
<div class="margin-top">
@ -104,9 +104,6 @@ export default {
this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`)
},
_openAddContractRoom() {
this.$router.push('/admin/contractChangeDetail?param=contractChangeAssets')
},
handlePageChange(currentPage) {
this.pagination.currentPage = currentPage
this._loadContractDetailRoomData(currentPage, this.pagination.pageSize)

View File

@ -1,4 +1,5 @@
<template>
<div class="padding">
<div class="white-bg padding-lg padding-top border-radius">
<div class="flex justify-between">
<div class="text-title">{{ $t('contractDetail.title') }}</div>
@ -138,6 +139,7 @@
:contractId="contractDetailInfo.contractId" :contractName="contractDetailInfo.contractName"
:ownerId="contractDetailInfo.objId"></component>
</div>
</div>
</template>
<script>

View File

@ -93,9 +93,9 @@
<el-table-column :label="$t('contractManage.table.operation')" align="center" width="220">
<template slot-scope="scope">
<el-button-group>
<el-button size="mini" @click="openContractFee(scope.row)">
<!-- <el-button size="mini" @click="openContractFee(scope.row)">
{{ $t('contractManage.operation.fee') }}
</el-button>
</el-button> -->
<el-button size="mini" @click="viewContract(scope.row)">
{{ $t('contractManage.operation.view') }}
</el-button>

View File

@ -1,6 +1,6 @@
<template>
<div class="print-contract-container">
<el-card class="box-card">
<div class="box-card">
<div slot="header" class="clearfix">
<h2>{{ $t('printContract.title') }}</h2>
</div>
@ -18,23 +18,14 @@
</el-row>
<div id="print-btn" class="button-group">
<el-button
type="primary"
class="float-right"
@click="_printContractDiv"
>
<el-button type="primary" class="float-right" @click="_printContractDiv">
<i class="el-icon-printer"></i>&nbsp;{{ $t('printContract.print') }}
</el-button>
<el-button
type="warning"
class="float-right"
style="margin-right:20px;"
@click="_closePage"
>
<el-button type="warning" class="float-right" style="margin-right:20px;" @click="_closePage">
{{ $t('printContract.close') }}
</el-button>
</div>
</el-card>
</div>
</div>
</template>

View File

@ -1,8 +1,8 @@
<template>
<div class="car-create-fee-container">
<el-card class="box-card">
<div slot="header" class="clearfix">
<h5>{{ $t('carCreateFee.queryCondition') }}</h5>
<div slot="header" class="flex justify-between">
<div>{{ $t('carCreateFee.queryCondition') }}</div>
</div>
<el-row :gutter="20">
<el-col :span="4">
@ -24,11 +24,11 @@
</el-select>
</el-col>
<el-col :span="4" style="text-align:right">
<el-button type="primary" @click="handleQuery">
<el-button type="primary" size="small" @click="handleQuery">
<i class="el-icon-search"></i>
{{ $t('carCreateFee.query') }}
</el-button>
<el-button @click="handleReset" style="margin-left:10px">
<el-button size="small" @click="handleReset" style="margin-left:10px">
<i class="el-icon-refresh"></i>
{{ $t('carCreateFee.reset') }}
</el-button>
@ -37,21 +37,21 @@
</el-card>
<el-card class="box-card" style="margin-top:20px">
<div slot="header" class="clearfix">
<h5>{{ $t('carCreateFee.vehicleCharging') }}</h5>
<div style="float:right">
<el-button @click="handleOpenFeeImportExcel">
<div slot="header" class="flex justify-between">
<div>{{ $t('carCreateFee.vehicleCharging') }}</div>
<div>
<el-button size="small" @click="handleOpenFeeImportExcel">
<i class="el-icon-plus"></i>
{{ $t('carCreateFee.customTemplate') }}
</el-button>
<el-button @click="handleOpenDoCreateRoomFee" style="margin-left:10px">
<el-button size="small" @click="handleOpenDoCreateRoomFee" style="margin-left:10px">
<i class="el-icon-plus"></i>
{{ $t('carCreateFee.customCreate') }}
</el-button>
<el-button type="primary" @click="handleBatchCreate" style="margin-left:10px">
<el-button type="primary" size="small" @click="handleBatchCreate" style="margin-left:10px">
{{ $t('carCreateFee.batchCreate') }}
</el-button>
<el-button type="primary" @click="handleBuyMonthlyCard" style="margin-left:10px">
<el-button type="primary" size="small" @click="handleBuyMonthlyCard" style="margin-left:10px">
{{ $t('carCreateFee.buyMonthlyCard') }}
</el-button>
</div>

View File

@ -60,9 +60,9 @@
<el-button v-if="scope.row.state !== '2002'" size="mini" @click="handlePayFee(scope.row)">
{{ $t('contractCreateFee.table.payFee') }}
</el-button>
<el-button size="mini" @click="handleViewDetail(scope.row)">
<!-- <el-button size="mini" @click="handleViewDetail(scope.row)">
{{ $t('contractCreateFee.table.viewDetail') }}
</el-button>
</el-button> -->
<el-button size="mini" @click="handleViewFee(scope.row)">
{{ $t('contractCreateFee.table.viewFee') }}
</el-button>
@ -163,7 +163,7 @@ export default {
},
handleViewDetail(row) {
this.$router.push({
path: '/views/contract/contractChangeDetail',
path: '/views/contract/contractDetail',
query: { contractId: row.contractId }
})
},
@ -172,7 +172,8 @@ export default {
path: '/views/contract/contractDetail',
query: {
contractId: row.contractId,
contractCode: row.contractCode
contractCode: row.contractCode,
currentTab:'contractDetailFee'
}
})
},