Commit d767b5e68029315c33060eabb38345cf238289d0

Authored by wuxw
1 parent 5b51508b

v1.9 合同费用bug 修复

src/api/contract/contractDetailFeeApi.js
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 2
  3 +// 查询费用列表
3 export function listFee(params) { 4 export function listFee(params) {
4 - return request({  
5 - url: '/fee.listFee',  
6 - method: 'get',  
7 - params 5 + return new Promise((resolve, reject) => {
  6 + request({
  7 + url: '/fee.listFee',
  8 + method: 'get',
  9 + params
  10 + }).then(response => {
  11 + const res = response.data
  12 + resolve(res)
  13 +
  14 + }).catch(error => {
  15 + reject(error)
  16 + })
8 }) 17 })
9 } 18 }
10 \ No newline at end of file 19 \ No newline at end of file
src/components/contract/contractDetailFee.vue
1 <template> 1 <template>
2 - <div class="margin-top"> 2 + <div class="">
3 <div class="flex justify-end"> 3 <div class="flex justify-end">
4 <div :span="2" class="padding-right-xs padding-left-xl"></div> 4 <div :span="2" class="padding-right-xs padding-left-xl"></div>
5 <div :span="2" class="padding-right-xs padding-right-xl"></div> 5 <div :span="2" class="padding-right-xs padding-right-xl"></div>
@@ -102,7 +102,12 @@ @@ -102,7 +102,12 @@
102 </el-col> 102 </el-col>
103 </el-row> 103 </el-row>
104 </div> 104 </div>
105 - <temp-import-room-fee ref="tempImportRoomFee"></temp-import-room-fee> 105 + <temp-import-room-fee ref="tempImportRoomFee" @success="_query"></temp-import-room-fee>
  106 + <contract-create-fee-add ref="contractCreateFeeAdd" @success="_query"></contract-create-fee-add>
  107 + <delete-fee ref="deleteFee" @success="_query"></delete-fee>
  108 + <edit-fee ref="editFee" @success="_query"></edit-fee>
  109 + <finish-fee ref="finishFee" @success="_query"></finish-fee>
  110 +
106 </div> 111 </div>
107 </template> 112 </template>
108 113
@@ -110,11 +115,20 @@ @@ -110,11 +115,20 @@
110 import { listFee } from '@/api/contract/contractDetailFeeApi' 115 import { listFee } from '@/api/contract/contractDetailFeeApi'
111 import { getCommunityId } from '@/api/community/communityApi' 116 import { getCommunityId } from '@/api/community/communityApi'
112 import TempImportRoomFee from '@/components/fee/tempImportRoomFee' 117 import TempImportRoomFee from '@/components/fee/tempImportRoomFee'
  118 +import contractCreateFeeAdd from '@/components/fee/contractCreateFeeAdd'
  119 +import {dateFormat} from '@/utils/dateUtil'
  120 +import DeleteFee from '@/components/fee/deleteFee'
  121 +import EditFee from '@/components/fee/editFee'
  122 +import FinishFee from '@/components/fee/finishFee'
113 123
114 export default { 124 export default {
115 name: 'ContractDetailFee', 125 name: 'ContractDetailFee',
116 components: { 126 components: {
117 - TempImportRoomFee 127 + TempImportRoomFee,
  128 + contractCreateFeeAdd,
  129 + DeleteFee,
  130 + EditFee,
  131 + FinishFee
118 }, 132 },
119 data() { 133 data() {
120 return { 134 return {
@@ -135,9 +149,13 @@ export default { @@ -135,9 +149,13 @@ export default {
135 methods: { 149 methods: {
136 open(data) { 150 open(data) {
137 this.contractDetailFeeInfo.contractId = data.contractId 151 this.contractDetailFeeInfo.contractId = data.contractId
  152 + this.contractDetailFeeInfo.contractName = data.contractName
  153 + this._loadContractDetailFeeData(1, this.pagination.pageSize)
  154 + },
  155 + _query() {
138 this._loadContractDetailFeeData(1, this.pagination.pageSize) 156 this._loadContractDetailFeeData(1, this.pagination.pageSize)
139 }, 157 },
140 - _loadContractDetailFeeData(page, row) { 158 + async _loadContractDetailFeeData(page, row) {
141 const params = { 159 const params = {
142 page: page || 1, 160 page: page || 1,
143 row: row || 10, 161 row: row || 10,
@@ -145,20 +163,19 @@ export default { @@ -145,20 +163,19 @@ export default {
145 payerObjId: this.contractDetailFeeInfo.contractId, 163 payerObjId: this.contractDetailFeeInfo.contractId,
146 } 164 }
147 165
148 - listFee(params).then(response => {  
149 - this.contractDetailFeeInfo.total = response.total  
150 - this.contractDetailFeeInfo.records = response.records  
151 - this.contractDetailFeeInfo.fees = response.fees  
152 - this.pagination.total = response.total 166 + const res = await listFee(params)
  167 + console.log(res)
  168 + this.contractDetailFeeInfo.total = res.total
  169 + this.contractDetailFeeInfo.records = res.records
  170 + this.contractDetailFeeInfo.fees = res.fees
  171 + this.pagination.total = res.total
153 172
154 - let totalAmount = 0.0  
155 - response.fees.forEach(item => {  
156 - totalAmount += parseFloat(item.amountOwed)  
157 - })  
158 - this.contractDetailFeeInfo.totalAmount = totalAmount.toFixed(2)  
159 - }).catch(error => {  
160 - console.error('请求失败:', error) 173 + let totalAmount = 0.0
  174 + res.fees.forEach(item => {
  175 + totalAmount += parseFloat(item.amountOwed)
161 }) 176 })
  177 + this.contractDetailFeeInfo.totalAmount = totalAmount.toFixed(2)
  178 +
162 }, 179 },
163 _openTempImportContractFeeModal() { 180 _openTempImportContractFeeModal() {
164 this.$refs.tempImportRoomFee.open({ 181 this.$refs.tempImportRoomFee.open({
@@ -169,35 +186,32 @@ export default { @@ -169,35 +186,32 @@ export default {
169 }) 186 })
170 }, 187 },
171 _payContractFee(fee) { 188 _payContractFee(fee) {
172 - this.$router.push(`/property/payFeeOrder?feeId=${fee.feeId}`) 189 + this.$router.push(`/views/fee/payFeeOrder?feeId=${fee.feeId}`)
173 }, 190 },
174 _editContractFee(fee) { 191 _editContractFee(fee) {
175 - this.$emit('edit-fee', fee) 192 + this.$refs.editFee.open(fee)
176 }, 193 },
177 _payContractFeeHis(fee) { 194 _payContractFeeHis(fee) {
178 fee.builtUpArea = this.contractDetailFeeInfo.builtUpArea 195 fee.builtUpArea = this.contractDetailFeeInfo.builtUpArea
179 - this.$router.push(`/property/propertyFee?${this.objToGetParam(fee)}`) 196 + this.$router.push(`/views/fee/propertyFee?${this.objToGetParam(fee)}`)
180 }, 197 },
181 _deleteContractFee(fee) { 198 _deleteContractFee(fee) {
182 - this.$emit('delete-fee', { 199 + this.$refs.deleteFee.open({
183 communityId: this.communityId, 200 communityId: this.communityId,
184 feeId: fee.feeId 201 feeId: fee.feeId
185 }) 202 })
186 }, 203 },
187 _finishContractFee(fee) { 204 _finishContractFee(fee) {
188 - this.$emit('finish-fee', { 205 + this.$refs.finishFee.open({
189 communityId: this.communityId, 206 communityId: this.communityId,
190 feeId: fee.feeId 207 feeId: fee.feeId
191 }) 208 })
192 }, 209 },
193 _toContractOwePayFee() { 210 _toContractOwePayFee() {
194 - this.$router.push(`/property/owePayFeeOrder?payObjId=${this.contractDetailFeeInfo.contractId}&payObjType=7777&contractName=${this.contractDetailFeeInfo.contractName}`) 211 + this.$router.push(`/views/fee/owePayFeeOrder?payObjId=${this.contractDetailFeeInfo.contractId}&payObjType=7777&contractName=${this.contractDetailFeeInfo.contractName}`)
195 }, 212 },
196 _openContractCreateFeeAddModal() { 213 _openContractCreateFeeAddModal() {
197 - this.$emit('create-fee-add', {  
198 - isMore: false,  
199 - contract: this.contractDetailFeeInfo  
200 - }) 214 + this.$refs.contractCreateFeeAdd.open(this.contractDetailFeeInfo, false)
201 }, 215 },
202 _getContractAttrValue(attrs, specCd) { 216 _getContractAttrValue(attrs, specCd) {
203 let value = "" 217 let value = ""
@@ -216,13 +230,13 @@ export default { @@ -216,13 +230,13 @@ export default {
216 if (fee.state == '2009001') { 230 if (fee.state == '2009001') {
217 return "-" 231 return "-"
218 } 232 }
219 - return this.$options.filters.dateFormat(fee.endTime) 233 + return dateFormat(fee.deadlineTime)
220 }, 234 },
221 _getContractEndTime(fee) { 235 _getContractEndTime(fee) {
222 if (fee.state == '2009001') { 236 if (fee.state == '2009001') {
223 return "-" 237 return "-"
224 } 238 }
225 - return this.$options.filters.dateFormat(fee.endTime) 239 + return dateFormat(fee.endTime)
226 }, 240 },
227 handlePageChange(currentPage) { 241 handlePageChange(currentPage) {
228 this.pagination.currentPage = currentPage 242 this.pagination.currentPage = currentPage
src/components/contract/contractDetailRoom.vue
1 <template> 1 <template>
2 - <div class="margin-top"> 2 + <div class="">
3 <div class="flex justify-end"> 3 <div class="flex justify-end">
4 <div :span="2" class="padding-right-xs padding-left-xl"></div> 4 <div :span="2" class="padding-right-xs padding-left-xl"></div>
5 <div :span="2" class="padding-right-xs padding-right-xl"></div> 5 <div :span="2" class="padding-right-xs padding-right-xl"></div>
6 <div :span="8" class="text-right"> 6 <div :span="8" class="text-right">
7 - <el-button type="primary" size="small" style="margin-left:10px" v-if="hasPrivilege('502023021978930012')" 7 + <!-- <el-button type="primary" size="small" style="margin-left:10px" v-if="hasPrivilege('502023021978930012')"
8 @click="_openAddContractRoom"> 8 @click="_openAddContractRoom">
9 <i class="el-icon-plus"></i> 9 <i class="el-icon-plus"></i>
10 {{ $t('contractDetailRoom.addPropertyChange') }} 10 {{ $t('contractDetailRoom.addPropertyChange') }}
11 - </el-button> 11 + </el-button> -->
12 </div> 12 </div>
13 </div> 13 </div>
14 <div class="margin-top"> 14 <div class="margin-top">
@@ -104,9 +104,6 @@ export default { @@ -104,9 +104,6 @@ export default {
104 this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`) 104 this.$router.push('/pages/property/simplifyAcceptance?tab=业务受理&searchType=1&searchValue=' + `${room.floorNum}-${room.unitNum}-${room.roomNum}`)
105 105
106 }, 106 },
107 - _openAddContractRoom() {  
108 - this.$router.push('/admin/contractChangeDetail?param=contractChangeAssets')  
109 - },  
110 handlePageChange(currentPage) { 107 handlePageChange(currentPage) {
111 this.pagination.currentPage = currentPage 108 this.pagination.currentPage = currentPage
112 this._loadContractDetailRoomData(currentPage, this.pagination.pageSize) 109 this._loadContractDetailRoomData(currentPage, this.pagination.pageSize)
src/views/contract/contractDetail.vue
1 <template> 1 <template>
  2 + <div class="padding">
2 <div class="white-bg padding-lg padding-top border-radius"> 3 <div class="white-bg padding-lg padding-top border-radius">
3 <div class="flex justify-between"> 4 <div class="flex justify-between">
4 <div class="text-title">{{ $t('contractDetail.title') }}</div> 5 <div class="text-title">{{ $t('contractDetail.title') }}</div>
@@ -138,6 +139,7 @@ @@ -138,6 +139,7 @@
138 :contractId="contractDetailInfo.contractId" :contractName="contractDetailInfo.contractName" 139 :contractId="contractDetailInfo.contractId" :contractName="contractDetailInfo.contractName"
139 :ownerId="contractDetailInfo.objId"></component> 140 :ownerId="contractDetailInfo.objId"></component>
140 </div> 141 </div>
  142 +</div>
141 </template> 143 </template>
142 144
143 <script> 145 <script>
src/views/contract/contractManageList.vue
@@ -93,9 +93,9 @@ @@ -93,9 +93,9 @@
93 <el-table-column :label="$t('contractManage.table.operation')" align="center" width="220"> 93 <el-table-column :label="$t('contractManage.table.operation')" align="center" width="220">
94 <template slot-scope="scope"> 94 <template slot-scope="scope">
95 <el-button-group> 95 <el-button-group>
96 - <el-button size="mini" @click="openContractFee(scope.row)"> 96 + <!-- <el-button size="mini" @click="openContractFee(scope.row)">
97 {{ $t('contractManage.operation.fee') }} 97 {{ $t('contractManage.operation.fee') }}
98 - </el-button> 98 + </el-button> -->
99 <el-button size="mini" @click="viewContract(scope.row)"> 99 <el-button size="mini" @click="viewContract(scope.row)">
100 {{ $t('contractManage.operation.view') }} 100 {{ $t('contractManage.operation.view') }}
101 </el-button> 101 </el-button>
src/views/contract/printContractList.vue
1 <template> 1 <template>
2 <div class="print-contract-container"> 2 <div class="print-contract-container">
3 - <el-card class="box-card"> 3 + <div class="box-card">
4 <div slot="header" class="clearfix"> 4 <div slot="header" class="clearfix">
5 <h2>{{ $t('printContract.title') }}</h2> 5 <h2>{{ $t('printContract.title') }}</h2>
6 </div> 6 </div>
@@ -18,23 +18,14 @@ @@ -18,23 +18,14 @@
18 </el-row> 18 </el-row>
19 19
20 <div id="print-btn" class="button-group"> 20 <div id="print-btn" class="button-group">
21 - <el-button  
22 - type="primary"  
23 - class="float-right"  
24 - @click="_printContractDiv"  
25 - > 21 + <el-button type="primary" class="float-right" @click="_printContractDiv">
26 <i class="el-icon-printer"></i>&nbsp;{{ $t('printContract.print') }} 22 <i class="el-icon-printer"></i>&nbsp;{{ $t('printContract.print') }}
27 </el-button> 23 </el-button>
28 - <el-button  
29 - type="warning"  
30 - class="float-right"  
31 - style="margin-right:20px;"  
32 - @click="_closePage"  
33 - > 24 + <el-button type="warning" class="float-right" style="margin-right:20px;" @click="_closePage">
34 {{ $t('printContract.close') }} 25 {{ $t('printContract.close') }}
35 </el-button> 26 </el-button>
36 </div> 27 </div>
37 - </el-card> 28 + </div>
38 </div> 29 </div>
39 </template> 30 </template>
40 31
src/views/fee/carCreateFeeList.vue
1 <template> 1 <template>
2 <div class="car-create-fee-container"> 2 <div class="car-create-fee-container">
3 <el-card class="box-card"> 3 <el-card class="box-card">
4 - <div slot="header" class="clearfix">  
5 - <h5>{{ $t('carCreateFee.queryCondition') }}</h5> 4 + <div slot="header" class="flex justify-between">
  5 + <div>{{ $t('carCreateFee.queryCondition') }}</div>
6 </div> 6 </div>
7 <el-row :gutter="20"> 7 <el-row :gutter="20">
8 <el-col :span="4"> 8 <el-col :span="4">
@@ -24,11 +24,11 @@ @@ -24,11 +24,11 @@
24 </el-select> 24 </el-select>
25 </el-col> 25 </el-col>
26 <el-col :span="4" style="text-align:right"> 26 <el-col :span="4" style="text-align:right">
27 - <el-button type="primary" @click="handleQuery"> 27 + <el-button type="primary" size="small" @click="handleQuery">
28 <i class="el-icon-search"></i> 28 <i class="el-icon-search"></i>
29 {{ $t('carCreateFee.query') }} 29 {{ $t('carCreateFee.query') }}
30 </el-button> 30 </el-button>
31 - <el-button @click="handleReset" style="margin-left:10px"> 31 + <el-button size="small" @click="handleReset" style="margin-left:10px">
32 <i class="el-icon-refresh"></i> 32 <i class="el-icon-refresh"></i>
33 {{ $t('carCreateFee.reset') }} 33 {{ $t('carCreateFee.reset') }}
34 </el-button> 34 </el-button>
@@ -37,21 +37,21 @@ @@ -37,21 +37,21 @@
37 </el-card> 37 </el-card>
38 38
39 <el-card class="box-card" style="margin-top:20px"> 39 <el-card class="box-card" style="margin-top:20px">
40 - <div slot="header" class="clearfix">  
41 - <h5>{{ $t('carCreateFee.vehicleCharging') }}</h5>  
42 - <div style="float:right">  
43 - <el-button @click="handleOpenFeeImportExcel"> 40 + <div slot="header" class="flex justify-between">
  41 + <div>{{ $t('carCreateFee.vehicleCharging') }}</div>
  42 + <div>
  43 + <el-button size="small" @click="handleOpenFeeImportExcel">
44 <i class="el-icon-plus"></i> 44 <i class="el-icon-plus"></i>
45 {{ $t('carCreateFee.customTemplate') }} 45 {{ $t('carCreateFee.customTemplate') }}
46 </el-button> 46 </el-button>
47 - <el-button @click="handleOpenDoCreateRoomFee" style="margin-left:10px"> 47 + <el-button size="small" @click="handleOpenDoCreateRoomFee" style="margin-left:10px">
48 <i class="el-icon-plus"></i> 48 <i class="el-icon-plus"></i>
49 {{ $t('carCreateFee.customCreate') }} 49 {{ $t('carCreateFee.customCreate') }}
50 </el-button> 50 </el-button>
51 - <el-button type="primary" @click="handleBatchCreate" style="margin-left:10px"> 51 + <el-button type="primary" size="small" @click="handleBatchCreate" style="margin-left:10px">
52 {{ $t('carCreateFee.batchCreate') }} 52 {{ $t('carCreateFee.batchCreate') }}
53 </el-button> 53 </el-button>
54 - <el-button type="primary" @click="handleBuyMonthlyCard" style="margin-left:10px"> 54 + <el-button type="primary" size="small" @click="handleBuyMonthlyCard" style="margin-left:10px">
55 {{ $t('carCreateFee.buyMonthlyCard') }} 55 {{ $t('carCreateFee.buyMonthlyCard') }}
56 </el-button> 56 </el-button>
57 </div> 57 </div>
src/views/fee/contractCreateFeeList.vue
@@ -60,9 +60,9 @@ @@ -60,9 +60,9 @@
60 <el-button v-if="scope.row.state !== '2002'" size="mini" @click="handlePayFee(scope.row)"> 60 <el-button v-if="scope.row.state !== '2002'" size="mini" @click="handlePayFee(scope.row)">
61 {{ $t('contractCreateFee.table.payFee') }} 61 {{ $t('contractCreateFee.table.payFee') }}
62 </el-button> 62 </el-button>
63 - <el-button size="mini" @click="handleViewDetail(scope.row)"> 63 + <!-- <el-button size="mini" @click="handleViewDetail(scope.row)">
64 {{ $t('contractCreateFee.table.viewDetail') }} 64 {{ $t('contractCreateFee.table.viewDetail') }}
65 - </el-button> 65 + </el-button> -->
66 <el-button size="mini" @click="handleViewFee(scope.row)"> 66 <el-button size="mini" @click="handleViewFee(scope.row)">
67 {{ $t('contractCreateFee.table.viewFee') }} 67 {{ $t('contractCreateFee.table.viewFee') }}
68 </el-button> 68 </el-button>
@@ -163,7 +163,7 @@ export default { @@ -163,7 +163,7 @@ export default {
163 }, 163 },
164 handleViewDetail(row) { 164 handleViewDetail(row) {
165 this.$router.push({ 165 this.$router.push({
166 - path: '/views/contract/contractChangeDetail', 166 + path: '/views/contract/contractDetail',
167 query: { contractId: row.contractId } 167 query: { contractId: row.contractId }
168 }) 168 })
169 }, 169 },
@@ -172,7 +172,8 @@ export default { @@ -172,7 +172,8 @@ export default {
172 path: '/views/contract/contractDetail', 172 path: '/views/contract/contractDetail',
173 query: { 173 query: {
174 contractId: row.contractId, 174 contractId: row.contractId,
175 - contractCode: row.contractCode 175 + contractCode: row.contractCode,
  176 + currentTab:'contractDetailFee'
176 } 177 }
177 }) 178 })
178 }, 179 },