24d3590f
wuxw
房屋收费页面开发完成
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
<template>
<div>
<el-row class="margin-top">
<el-col :span="24" class="text-right">
<el-button
type="primary"
size="small"
v-if="simplifyCallableInfo.roomId"
@click="_openWritePrintOweFeeCallableModal"
>
<i class="el-icon-plus"></i>
{{ $t('simplifyCallable.register') }}
</el-button>
<el-button
type="primary"
size="small"
v-if="simplifyCallableInfo.roomId"
@click="_openAddOweFeeCallableModal"
>
<i class="el-icon-plus"></i>
{{ $t('simplifyCallable.callable') }}
</el-button>
<el-button
type="primary"
size="small"
v-if="simplifyCallableInfo.roomId"
@click="_printOwnOrder"
>
<i class="el-icon-plus"></i>
{{ $t('simplifyCallable.callableOrder') }}
</el-button>
</el-col>
</el-row>
<div>
<el-table
:data="simplifyCallableInfo.callables"
style="margin-top:10px"
border
stripe
>
<el-table-column prop="ofcId" :label="$t('simplifyCallable.id')" align="center"></el-table-column>
<el-table-column prop="ownerName" :label="$t('simplifyCallable.ownerName')" align="center"></el-table-column>
<el-table-column prop="payerObjName" :label="$t('simplifyCallable.payerObjName')" align="center"></el-table-column>
<el-table-column prop="feeName" :label="$t('simplifyCallable.feeName')" align="center"></el-table-column>
<el-table-column prop="amountdOwed" :label="$t('simplifyCallable.amount')" align="center"></el-table-column>
<el-table-column :label="$t('simplifyCallable.timePeriod')" align="center">
<template slot-scope="scope">
{{scope.row.startTime}}<br>~{{scope.row.endTime}}
</template>
</el-table-column>
<el-table-column prop="callableWayName" :label="$t('simplifyCallable.callableWay')" align="center"></el-table-column>
<el-table-column prop="staffName" :label="$t('simplifyCallable.staffName')" align="center"></el-table-column>
<el-table-column prop="stateName" :label="$t('simplifyCallable.status')" align="center"></el-table-column>
<el-table-column prop="remark" :label="$t('simplifyCallable.remark')" align="center">
<template slot-scope="scope">
<div class="textAuto" style="max-width: 200px;">{{scope.row.remark}}</div>
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('simplifyCallable.createTime')" align="center"></el-table-column>
<el-table-column :label="$t('simplifyCallable.actions')" align="center">
<template slot-scope="scope">
<el-button-group>
<el-button size="mini" @click="_openDeleteOweFeeCallableModel(scope.row)">
{{ $t('simplifyCallable.delete') }}
</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
<el-pagination
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total">
</el-pagination>
</div>
<write-owe-fee-callable ref="writeOweFeeCallable"></write-owe-fee-callable>
<delete-owe-fee-callable ref="deleteOweFeeCallable"></delete-owe-fee-callable>
</div>
</template>
<script>
import { getCommunityId } from '@/api/community/communityApi'
import { listOweFeeCallable } from '@/api/fee/simplifyCallableApi'
import WriteOweFeeCallable from './writeOweFeeCallable'
import DeleteOweFeeCallable from './deleteOweFeeCallable'
export default {
name: 'SimplifyCallable',
components: {
WriteOweFeeCallable,
DeleteOweFeeCallable
},
data() {
return {
DEFAULT_PAGE: 1,
DEFAULT_ROWS: 10,
simplifyCallableInfo: {
callables: [],
ownerId: '',
roomId: '',
roomName: '',
total: 0,
records: 0
},
currentPage: 1,
pageSize: 10,
total: 0
}
},
created() {
this._initEvent()
},
methods: {
_initEvent() {
this.$on('switch', this.handleSwitch)
this.$on('listOwnerData', this._listSimplifyCallable)
},
handleSwitch(param) {
if (!param.roomId) return
this.clearSimplifyCallableInfo()
Object.assign(this.simplifyCallableInfo, param)
this._listSimplifyCallable(this.DEFAULT_PAGE, this.DEFAULT_ROWS)
},
handleCurrentChange(val) {
this._listSimplifyCallable(val, this.DEFAULT_ROWS)
},
async _listSimplifyCallable(page, row) {
try {
const res = await listOweFeeCallable({
page,
row,
payerObjId: this.simplifyCallableInfo.roomId,
communityId: getCommunityId()
})
this.simplifyCallableInfo.total = res.total
this.simplifyCallableInfo.records = res.records
this.simplifyCallableInfo.callables = res.data
this.total = res.records
} catch (error) {
console.error('Request failed:', error)
}
},
clearSimplifyCallableInfo() {
this.simplifyCallableInfo = {
callables: [],
ownerId: '',
roomId: '',
roomName: '',
total: 0,
records: 0
}
},
_printOwnOrder() {
|
24d3590f
wuxw
房屋收费页面开发完成
|
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
},
_openWritePrintOweFeeCallableModal() {
if (!this.simplifyCallableInfo.roomId) {
this.$message.warning(this.$t('simplifyCallable.noRoomSelected'))
return
}
this.$refs.writeOweFeeCallable.open({
roomId: this.simplifyCallableInfo.roomId,
roomName: this.simplifyCallableInfo.roomName
})
},
_openAddOweFeeCallableModal() {
this.$router.push(`/fee/roomOweFeeCallable?roomId=${this.simplifyCallableInfo.roomId}`)
},
_openDeleteOweFeeCallableModel(oweFeeCallable) {
this.$refs.deleteOweFeeCallable.open(oweFeeCallable)
},
open(params) {
this.handleSwitch(params)
}
}
}
</script>
<style scoped>
.margin-top {
margin-top: 15px;
}
.text-right {
text-align: right;
}
.textAuto {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
|