b25b036d
wuxw
v1.9 优化日期
|
1
|
<template>
|
fc9bd1db
wuxw
开发完成合同详情
|
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
|
<div>
<div class="flex justify-end">
<div :span="12" class="padding-right-xs padding-left-xl"></div>
<div :span="12" class="text-right padding-right-lg">
<el-button type="primary" size="small" style="margin-left:10px" @click="_printFeeReceipt()">
{{ $t('contractDetailReceipt.print') }}
</el-button>
<el-button type="primary" size="small" style="margin-left:10px" @click="_printFeeSmallReceipt()">
{{ $t('contractDetailReceipt.printSmall') }}
</el-button>
<el-button type="primary" size="small" style="margin-left:10px" @click="_printApplyFeeReceipt()">
{{ $t('contractDetailReceipt.printApply') }}
</el-button>
</div>
</div>
<div class="margin-top">
<el-table :data="contractDetailReceiptInfo.feeReceipts" border style="width: 100%">
<el-table-column width="50" align="center">
<template slot-scope="scope">
<el-checkbox v-model="contractDetailReceiptInfo.selectReceipts" :label="scope.row.receiptId"></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="objName" :label="$t('contractDetailReceipt.feeType')" align="center"></el-table-column>
<el-table-column prop="payObjName" :label="$t('contractDetailReceipt.owner')" align="center"></el-table-column>
<el-table-column prop="feeName" :label="$t('contractDetailReceipt.feeItem')" align="center"></el-table-column>
<el-table-column :label="$t('contractDetailReceipt.feePeriod')" align="center" width="200">
<template slot-scope="scope">
|
4afadb73
wuxw
v1.9 优化装修 上传视频失败问...
|
30
31
|
{{ dateFormat(scope.row.startTime) }}~<br />
{{ dateFormat(scope.row.endTime) }}
|
fc9bd1db
wuxw
开发完成合同详情
|
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
|
</template>
</el-table-column>
<el-table-column prop="amount" :label="$t('contractDetailReceipt.totalAmount')" align="center">
<template slot-scope="scope">
{{ scope.row.amount }}{{ $t('common.yuan') }}
</template>
</el-table-column>
<el-table-column prop="createTime" :label="$t('contractDetailReceipt.payTime')" align="center"
width="160"></el-table-column>
<el-table-column prop="receiptId" :label="$t('contractDetailReceipt.receiptId')" align="center"
width="120"></el-table-column>
</el-table>
<el-row class="margin-top">
<el-col :span="24" class="text-right">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="total">
</el-pagination>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import { queryFeeReceipt, listFeePrintPage } from '@/api/contract/contractDetailReceiptApi'
import { getCommunityId } from '@/api/community/communityApi'
|
4afadb73
wuxw
v1.9 优化装修 上传视频失败问...
|
60
|
import {dateFormat} from '@/utils/dateUtil'
|
fc9bd1db
wuxw
开发完成合同详情
|
61
62
63
64
65
66
67
68
69
|
export default {
name: 'ContractDetailReceipt',
data() {
return {
contractDetailReceiptInfo: {
feeReceipts: [],
payObjId: '',
selectReceipts: [],
|
f5128dde
wuxw
优化打印404 问题
|
70
|
printUrl: '/#/pages/property/printPayFee'
|
fc9bd1db
wuxw
开发完成合同详情
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
},
currentPage: 1,
pageSize: 10,
total: 0,
communityId: ''
}
},
created() {
this.communityId = getCommunityId()
this._listFeePrintPages()
},
watch: {
'contractDetailReceiptInfo.selectReceipts': {
handler(newVal) {
if (newVal.length === this.contractDetailReceiptInfo.feeReceipts.length) {
this.contractDetailReceiptInfo.quan = true
} else {
this.contractDetailReceiptInfo.quan = false
}
},
deep: true
}
},
methods: {
|
4afadb73
wuxw
v1.9 优化装修 上传视频失败问...
|
95
|
dateFormat,
|
fc9bd1db
wuxw
开发完成合同详情
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
open(data) {
this.contractDetailReceiptInfo.payObjId = data.ownerId
this._listContractDetailReceipt(this.currentPage, this.pageSize)
},
switch(params) {
if (!params.ownerId) return
this.contractDetailReceiptInfo.payObjId = params.ownerId
this._listContractDetailReceipt(this.currentPage, this.pageSize)
},
_listContractDetailReceipt(page, rows) {
this.contractDetailReceiptInfo.selectReceipts = []
const param = {
page: page,
row: rows,
payObjId: this.contractDetailReceiptInfo.payObjId,
communityId: this.communityId
}
queryFeeReceipt(param)
.then(response => {
this.contractDetailReceiptInfo.feeReceipts = response.data
|
f9f29297
wuxw
v1.9 分页 record 传给...
|
117
|
this.total = response.total
|
fc9bd1db
wuxw
开发完成合同详情
|
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
|
this.currentPage = page
})
.catch(error => {
console.error('请求失败:', error)
})
},
handleSizeChange(val) {
this.pageSize = val
this._listContractDetailReceipt(this.currentPage, this.pageSize)
},
handleCurrentChange(val) {
this.currentPage = val
this._listContractDetailReceipt(this.currentPage, this.pageSize)
},
_printFeeReceipt() {
if (this.contractDetailReceiptInfo.selectReceipts.length < 1) {
this.$message.warning(this.$t('contractDetailReceipt.selectPrintReceipt'))
return
}
const receiptIds = this.contractDetailReceiptInfo.selectReceipts.join(',')
window.open(`${this.contractDetailReceiptInfo.printUrl}?receiptIds=${receiptIds}&apply=N`)
},
_printApplyFeeReceipt() {
if (this.contractDetailReceiptInfo.selectReceipts.length < 1) {
this.$message.warning(this.$t('contractDetailReceipt.selectPrint'))
return
}
const receiptIds = this.contractDetailReceiptInfo.selectReceipts.join(',')
|
f5128dde
wuxw
优化打印404 问题
|
146
|
window.open(`/#/pages/property/printPayFee?receiptIds=${receiptIds}&apply=Y`)
|
fc9bd1db
wuxw
开发完成合同详情
|
147
148
149
150
151
152
153
|
},
_printFeeSmallReceipt() {
if (this.contractDetailReceiptInfo.selectReceipts.length < 1) {
this.$message.warning(this.$t('contractDetailReceipt.selectPrintReceipt'))
return
}
const receiptIds = this.contractDetailReceiptInfo.selectReceipts.join(',')
|
f5128dde
wuxw
优化打印404 问题
|
154
|
window.open(`/#/pages/property/printSmallPayFee?receiptIds=${receiptIds}`)
|
fc9bd1db
wuxw
开发完成合同详情
|
155
156
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
194
195
196
197
198
199
|
},
_listFeePrintPages() {
const param = {
page: 1,
row: 1,
state: 'T',
communityId: this.communityId
}
listFeePrintPage(param)
.then(response => {
const feePrintPages = response.data
if (feePrintPages && feePrintPages.length > 0) {
this.contractDetailReceiptInfo.printUrl = feePrintPages[0].url
}
})
.catch(error => {
console.error('请求失败:', error)
})
}
}
}
</script>
<style scoped>
.margin-top {
margin-top: 20px;
}
.margin-top-lg {
margin-top: 30px;
}
.padding-right-xs {
padding-right: 5px;
}
.padding-left-xl {
padding-left: 30px;
}
.padding-right-lg {
padding-right: 30px;
}
</style>
|