Commit d767b5e68029315c33060eabb38345cf238289d0

Authored by wuxw
1 parent 5b51508b

v1.9 合同费用bug 修复

src/api/contract/contractDetailFeeApi.js
1 1 import request from '@/utils/request'
2 2  
  3 +// 查询费用列表
3 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 19 \ No newline at end of file
... ...
src/components/contract/contractDetailFee.vue
1 1 <template>
2   - <div class="margin-top">
  2 + <div class="">
3 3 <div class="flex justify-end">
4 4 <div :span="2" class="padding-right-xs padding-left-xl"></div>
5 5 <div :span="2" class="padding-right-xs padding-right-xl"></div>
... ... @@ -102,7 +102,12 @@
102 102 </el-col>
103 103 </el-row>
104 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 111 </div>
107 112 </template>
108 113  
... ... @@ -110,11 +115,20 @@
110 115 import { listFee } from '@/api/contract/contractDetailFeeApi'
111 116 import { getCommunityId } from '@/api/community/communityApi'
112 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 124 export default {
115 125 name: 'ContractDetailFee',
116 126 components: {
117   - TempImportRoomFee
  127 + TempImportRoomFee,
  128 + contractCreateFeeAdd,
  129 + DeleteFee,
  130 + EditFee,
  131 + FinishFee
118 132 },
119 133 data() {
120 134 return {
... ... @@ -135,9 +149,13 @@ export default {
135 149 methods: {
136 150 open(data) {
137 151 this.contractDetailFeeInfo.contractId = data.contractId
  152 + this.contractDetailFeeInfo.contractName = data.contractName
  153 + this._loadContractDetailFeeData(1, this.pagination.pageSize)
  154 + },
  155 + _query() {
138 156 this._loadContractDetailFeeData(1, this.pagination.pageSize)
139 157 },
140   - _loadContractDetailFeeData(page, row) {
  158 + async _loadContractDetailFeeData(page, row) {
141 159 const params = {
142 160 page: page || 1,
143 161 row: row || 10,
... ... @@ -145,20 +163,19 @@ export default {
145 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 180 _openTempImportContractFeeModal() {
164 181 this.$refs.tempImportRoomFee.open({
... ... @@ -169,35 +186,32 @@ export default {
169 186 })
170 187 },
171 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 191 _editContractFee(fee) {
175   - this.$emit('edit-fee', fee)
  192 + this.$refs.editFee.open(fee)
176 193 },
177 194 _payContractFeeHis(fee) {
178 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 198 _deleteContractFee(fee) {
182   - this.$emit('delete-fee', {
  199 + this.$refs.deleteFee.open({
183 200 communityId: this.communityId,
184 201 feeId: fee.feeId
185 202 })
186 203 },
187 204 _finishContractFee(fee) {
188   - this.$emit('finish-fee', {
  205 + this.$refs.finishFee.open({
189 206 communityId: this.communityId,
190 207 feeId: fee.feeId
191 208 })
192 209 },
193 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 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 216 _getContractAttrValue(attrs, specCd) {
203 217 let value = ""
... ... @@ -216,13 +230,13 @@ export default {
216 230 if (fee.state == '2009001') {
217 231 return "-"
218 232 }
219   - return this.$options.filters.dateFormat(fee.endTime)
  233 + return dateFormat(fee.deadlineTime)
220 234 },
221 235 _getContractEndTime(fee) {
222 236 if (fee.state == '2009001') {
223 237 return "-"
224 238 }
225   - return this.$options.filters.dateFormat(fee.endTime)
  239 + return dateFormat(fee.endTime)
226 240 },
227 241 handlePageChange(currentPage) {
228 242 this.pagination.currentPage = currentPage
... ...
src/components/contract/contractDetailRoom.vue
1 1 <template>
2   - <div class="margin-top">
  2 + <div class="">
3 3 <div class="flex justify-end">
4 4 <div :span="2" class="padding-right-xs padding-left-xl"></div>
5 5 <div :span="2" class="padding-right-xs padding-right-xl"></div>
6 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 8 @click="_openAddContractRoom">
9 9 <i class="el-icon-plus"></i>
10 10 {{ $t('contractDetailRoom.addPropertyChange') }}
11   - </el-button>
  11 + </el-button> -->
12 12 </div>
13 13 </div>
14 14 <div class="margin-top">
... ... @@ -104,9 +104,6 @@ export default {
104 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 107 handlePageChange(currentPage) {
111 108 this.pagination.currentPage = currentPage
112 109 this._loadContractDetailRoomData(currentPage, this.pagination.pageSize)
... ...
src/views/contract/contractDetail.vue
1 1 <template>
  2 + <div class="padding">
2 3 <div class="white-bg padding-lg padding-top border-radius">
3 4 <div class="flex justify-between">
4 5 <div class="text-title">{{ $t('contractDetail.title') }}</div>
... ... @@ -138,6 +139,7 @@
138 139 :contractId="contractDetailInfo.contractId" :contractName="contractDetailInfo.contractName"
139 140 :ownerId="contractDetailInfo.objId"></component>
140 141 </div>
  142 +</div>
141 143 </template>
142 144  
143 145 <script>
... ...
src/views/contract/contractManageList.vue
... ... @@ -93,9 +93,9 @@
93 93 <el-table-column :label="$t('contractManage.table.operation')" align="center" width="220">
94 94 <template slot-scope="scope">
95 95 <el-button-group>
96   - <el-button size="mini" @click="openContractFee(scope.row)">
  96 + <!-- <el-button size="mini" @click="openContractFee(scope.row)">
97 97 {{ $t('contractManage.operation.fee') }}
98   - </el-button>
  98 + </el-button> -->
99 99 <el-button size="mini" @click="viewContract(scope.row)">
100 100 {{ $t('contractManage.operation.view') }}
101 101 </el-button>
... ...
src/views/contract/printContractList.vue
1 1 <template>
2 2 <div class="print-contract-container">
3   - <el-card class="box-card">
  3 + <div class="box-card">
4 4 <div slot="header" class="clearfix">
5 5 <h2>{{ $t('printContract.title') }}</h2>
6 6 </div>
... ... @@ -18,23 +18,14 @@
18 18 </el-row>
19 19  
20 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 22 <i class="el-icon-printer"></i>&nbsp;{{ $t('printContract.print') }}
27 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 25 {{ $t('printContract.close') }}
35 26 </el-button>
36 27 </div>
37   - </el-card>
  28 + </div>
38 29 </div>
39 30 </template>
40 31  
... ...
src/views/fee/carCreateFeeList.vue
1 1 <template>
2 2 <div class="car-create-fee-container">
3 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 6 </div>
7 7 <el-row :gutter="20">
8 8 <el-col :span="4">
... ... @@ -24,11 +24,11 @@
24 24 </el-select>
25 25 </el-col>
26 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 28 <i class="el-icon-search"></i>
29 29 {{ $t('carCreateFee.query') }}
30 30 </el-button>
31   - <el-button @click="handleReset" style="margin-left:10px">
  31 + <el-button size="small" @click="handleReset" style="margin-left:10px">
32 32 <i class="el-icon-refresh"></i>
33 33 {{ $t('carCreateFee.reset') }}
34 34 </el-button>
... ... @@ -37,21 +37,21 @@
37 37 </el-card>
38 38  
39 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 44 <i class="el-icon-plus"></i>
45 45 {{ $t('carCreateFee.customTemplate') }}
46 46 </el-button>
47   - <el-button @click="handleOpenDoCreateRoomFee" style="margin-left:10px">
  47 + <el-button size="small" @click="handleOpenDoCreateRoomFee" style="margin-left:10px">
48 48 <i class="el-icon-plus"></i>
49 49 {{ $t('carCreateFee.customCreate') }}
50 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 52 {{ $t('carCreateFee.batchCreate') }}
53 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 55 {{ $t('carCreateFee.buyMonthlyCard') }}
56 56 </el-button>
57 57 </div>
... ...
src/views/fee/contractCreateFeeList.vue
... ... @@ -60,9 +60,9 @@
60 60 <el-button v-if="scope.row.state !== '2002'" size="mini" @click="handlePayFee(scope.row)">
61 61 {{ $t('contractCreateFee.table.payFee') }}
62 62 </el-button>
63   - <el-button size="mini" @click="handleViewDetail(scope.row)">
  63 + <!-- <el-button size="mini" @click="handleViewDetail(scope.row)">
64 64 {{ $t('contractCreateFee.table.viewDetail') }}
65   - </el-button>
  65 + </el-button> -->
66 66 <el-button size="mini" @click="handleViewFee(scope.row)">
67 67 {{ $t('contractCreateFee.table.viewFee') }}
68 68 </el-button>
... ... @@ -163,7 +163,7 @@ export default {
163 163 },
164 164 handleViewDetail(row) {
165 165 this.$router.push({
166   - path: '/views/contract/contractChangeDetail',
  166 + path: '/views/contract/contractDetail',
167 167 query: { contractId: row.contractId }
168 168 })
169 169 },
... ... @@ -172,7 +172,8 @@ export default {
172 172 path: '/views/contract/contractDetail',
173 173 query: {
174 174 contractId: row.contractId,
175   - contractCode: row.contractCode
  175 + contractCode: row.contractCode,
  176 + currentTab:'contractDetailFee'
176 177 }
177 178 })
178 179 },
... ...