apply-clients 3.4.93 → 3.4.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,783 +1,793 @@
1
- <template>
2
- <div class="col-sm-12" style="margin: 20px 0px;">
3
- <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
- <template partial='head'>
5
- <tr>
6
- <th class="textNoLineBreak">序号</th>
7
- <th class="textNoLineBreak" v-if="selectdata.f_apply_type !== '开发商集体报建'">地址</th>
8
- <th class="textNoLineBreak">缴费编号</th>
9
- <th class="textNoLineBreak">收费金额(退款金额)</th>
10
- <th class="textNoLineBreak">金额大写</th>
11
- <th class="textNoLineBreak">收费项目</th>
12
- <th class="textNoLineBreak">付款方式</th>
13
- <th class="textNoLineBreak">付款方名称</th>
14
- <th class="textNoLineBreak">付款方账号</th>
15
- <th class="textNoLineBreak">付款流水号</th>
16
- <th class="textNoLineBreak">收费人员</th>
17
- <th class="textNoLineBreak">收费日期</th>
18
- <th class="textNoLineBreak">实际收费日期</th>
19
- <th class="textNoLineBreak">备注</th>
20
- <th class="textNoLineBreak">缴费状态</th>
21
- <th class="textNoLineBreak">作废人员</th>
22
- <th class="textNoLineBreak">作废时间</th>
23
- <th class="textNoLineBreak">作废原因</th>
24
- <th class="textNoLineBreak">确认人</th>
25
- <th class="textNoLineBreak">确认时间</th>
26
- <th class="textNoLineBreak">
27
- <button
28
- type="button"
29
- class="btn btn-info head-but"
30
- @click="$parent.$parent.showChargeModal()"
31
- :disabled="$parent.$parent.mark === 1 || ($parent.$parent.selectdata.f_cumulative_payment_money >= $parent.$parent.selectdata.f_due_money || $parent.$parent.selectdata.f_surplus_money === 0)"
32
- >新增收费</button>
33
- </th>
34
- </tr>
35
- </template>
36
- <template partial='body'>
37
- <tr>
38
- <td style="text-align: center;">
39
- <nobr>{{$index+1}}</nobr>
40
- </td>
41
- <td style="text-align: center;" v-if="selectdata.f_apply_type !== '开发商集体报建'">
42
- <nobr>{{row.f_useraddres}}</nobr>
43
- </td>
44
- <td style="text-align: center;">
45
- <nobr>{{row.f_charge_number}}</nobr>
46
- </td>
47
- <td style="text-align: center;">
48
- <nobr>{{row.f_charge_money}}</nobr>
49
- </td>
50
- <td style="text-align: center;">
51
- <nobr>{{row.f_amount_words}}</nobr>
52
- </td>
53
- <td style="text-align: center;">
54
- <nobr>{{row.f_payment_term}}</nobr>
55
- </td>
56
- <td style="text-align: center;">
57
- <nobr>{{row.f_payment_method}}</nobr>
58
- </td>
59
- <td style="text-align: center;">
60
- <nobr>{{row.f_payer_name}}</nobr>
61
- </td>
62
- <td style="text-align: center;">
63
- <nobr>{{row.f_payer_account}}</nobr>
64
- </td>
65
- <td style="text-align: center;">
66
- <nobr>{{row.f_payer_number}}</nobr>
67
- </td>
68
- <td style="text-align: center;">
69
- <nobr>{{row.f_charge_collectors}}</nobr>
70
- </td>
71
- <td style="text-align: center;">
72
- <nobr>{{row.f_charge_date}}</nobr>
73
- </td>
74
- <td style="text-align: center;">
75
- <nobr>{{row.f_actual_date}}</nobr>
76
- </td>
77
- <td style="text-align: center;">
78
- <nobr>{{row.f_charge_remarks}}</nobr>
79
- </td>
80
- <td style="text-align: center;">
81
- <nobr>{{row.f_charge_status}}</nobr>
82
- </td>
83
- <td style="text-align: center;">
84
- <nobr>{{row.f_void_staff}}</nobr>
85
- </td>
86
- <td style="text-align: center;">
87
- <nobr>{{row.f_void_date}}</nobr>
88
- </td>
89
- <td style="text-align: center;">
90
- <nobr>{{row.f_void_remarks}}</nobr>
91
- </td>
92
- <td style="text-align: center;">
93
- <nobr>{{row.f_confirm_person}}</nobr>
94
- </td>
95
- <td style="text-align: center;">
96
- <nobr>{{row.f_confirm_date}}</nobr>
97
- </td>
98
- <td style="text-align: center;">
99
- <nobr v-if="row.f_charge_status !== '退款'&& row.f_charge_status !== '作废' && row.f_confirm_person==null">
100
- <button
101
- type="button"
102
- name="button"
103
- class="btn btn-link"
104
- @click="$parent.$parent.showConfirmModal(row)"
105
- >确认收款</button>
106
- </nobr>
107
- <nobr v-if="row.f_charge_status !== '退款'">
108
- <button
109
- type="button"
110
- name="button"
111
- class="btn btn-link"
112
- :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
113
- @click="$parent.$parent.showInvalidModal(row)"
114
- >作废</button>
115
-
116
- <button
117
- type="button"
118
- name="button"
119
- class="btn btn-link"
120
- @click="$parent.$parent.showPrintModal(row)"
121
- >打印预览</button>
122
- </nobr>
123
- </td>
124
- </tr>
125
- </template>
126
- </data-grid>
127
-
128
- <validator name="v">
129
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
130
- <header slot="modal-header" class="modal-header">
131
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
132
- <h4 class="modal-title">收费明细</h4>
133
- </header>
134
- <article slot="modal-body" class="modal-body clearfix">
135
- <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
136
- <label class="col-sm-2 control-label">缴费地址:</label>
137
- <div class="col-sm-10">
138
- <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
139
- <input-select width="100%" class="select select_list" placeholder='请选择'
140
- v-model="charge.useraddres"
141
- :value.sync="charge.useraddres"
142
- :options='useraddresList'
143
- :value-single="true"
144
- @change="selectAddres()"
145
- close-on-select ></input-select>
146
- </div>
147
- </div>
148
- <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
149
- <label class="col-sm-2 control-label">收费项目:</label>
150
- <div class="col-sm-10">
151
- <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
152
- <input-select width="100%" class="select select_list" placeholder='请选择'
153
- v-model="charge.f_payment_term"
154
- :value.sync="charge.f_payment_term"
155
- :options='paymentTerm'
156
- :value-single="true"
157
- close-on-select ></input-select>
158
- </div>
159
- </div>
160
- <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
161
- <label class="col-sm-2 control-label">收费金额:</label>
162
- <div class="col-sm-10">
163
- <input type="text"
164
- class="form-control input_view"
165
- style="width: 100%"
166
- placeholder="0.00"
167
- @keyup="handleInput"
168
- @change="moneyChange"
169
- v-validate:f_charge_money = "['required']"
170
- v-model="charge.f_charge_money" />
171
- </div>
172
- </div>
173
- <div class="form-group col-sm-12" :class="[$v.f_payment_method.required ? 'has-error' : '']">
174
- <label class="col-sm-2 control-label">付款方式:</label>
175
- <div class="col-sm-10">
176
- <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
177
- <input-select
178
- placeholder='请选择' width="100%"
179
- v-model="charge.f_payment_method"
180
- :value.sync="charge.f_payment_method"
181
- :options='paymentMethod'
182
- class="select select_list"
183
- :value-single="true"
184
- @change="changePaymentMethod()"
185
- close-on-select ></input-select>
186
- </div>
187
- </div>
188
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
189
- <label class="col-sm-2 control-label">付款方名称:</label>
190
- <div class="col-sm-10">
191
- <input type="text"
192
- class="form-control input_view"
193
- style="width: 100%"
194
- v-validate:f_payer_name = "['required']"
195
- v-model="charge.f_payer_name" value="" />
196
- </div>
197
- </div>
198
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
199
- <label class="col-sm-2 control-label">付款方账号:</label>
200
- <div class="col-sm-10">
201
- <input type="text" style="width: 100%" class="form-control input_view"
202
- v-validate:f_payer_account = "['required']"
203
- v-model="charge.f_payer_account" value=""/>
204
- </div>
205
- </div>
206
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
207
- <label class="col-sm-2 control-label">付款流水号:</label>
208
- <div class="col-sm-10">
209
- <input type="text"
210
- class="form-control input_view"
211
- style="width: 100%" @change="payerNumberChange()"
212
- v-validate:f_payer_number = "['required']"
213
- v-model="charge.f_payer_number" value="" />
214
- </div>
215
- </div>
216
- <div class="form-group col-sm-12">
217
- <label class="col-sm-2 control-label">金额大写:</label>
218
- <div class="col-sm-10">
219
- <input type="text"
220
- class="form-control input_view"
221
- style="width: 100%"
222
- :value="smalltoBIG(0)"
223
- readonly
224
- v-model.sync="charge.f_amount_words" />
225
- </div>
226
- </div>
227
- <div class="form-group col-sm-12"
228
- v-if="selectdata.f_apply_type === '散户集体报建'"
229
- >
230
- <label class="col-sm-2 control-label">单价(户):</label>
231
- <div class="col-sm-10">
232
- <input type="text"
233
- class="form-control input_view"
234
- style="width: 100%"
235
- readonly
236
- v-model="selectdata.f_price" />
237
- </div>
238
- </div>
239
- <div class="form-group col-sm-12"
240
- v-if="selectdata.f_apply_type === '散户集体报建'"
241
- >
242
- <label class="col-sm-2 control-label">累计缴费金额:</label>
243
- <div class="col-sm-10">
244
- <input type="text"
245
- class="form-control input_view"
246
- style="width: 100%"
247
- readonly
248
- v-model="charge.f_cumulative_payment_money"
249
- :value="charge.f_cumulative_payment_money || 0" />
250
- </div>
251
- </div>
252
- <div class="form-group col-sm-12"
253
- v-if="selectdata.f_apply_type === '散户集体报建'"
254
- >
255
- <label class="col-sm-2 control-label">未结金额:</label>
256
- <div class="col-sm-10">
257
- <input type="text"
258
- class="form-control input_view"
259
- style="width: 100%"
260
- readonly
261
- v-model="charge.f_outstanding_amount"
262
- :value="charge.f_outstanding_amount || 0" />
263
- </div>
264
- </div>
265
- <div class="form-group col-sm-12">
266
- <label class="col-sm-2 control-label">应交总金额:</label>
267
- <div class="col-sm-10">
268
- <input type="text"
269
- class="form-control input_view"
270
- style="width: 100%"
271
- readonly
272
- v-model="selectdata.f_due_money" />
273
- </div>
274
- </div>
275
- <div class="form-group col-sm-12">
276
- <label class="col-sm-2 control-label">累计缴费总金额:</label>
277
- <div class="col-sm-10">
278
- <input type="text"
279
- class="form-control input_view"
280
- style="width: 100%"
281
- readonly
282
- v-model="selectdata.f_cumulative_payment_money" />
283
- </div>
284
- </div>
285
- <div class="form-group col-sm-12">
286
- <label class="col-sm-2 control-label">未结总金额:</label>
287
- <div class="col-sm-10">
288
- <input type="text"
289
- class="form-control input_view"
290
- style="width: 100%"
291
- readonly
292
- v-model="selectdata.f_surplus_money" />
293
- </div>
294
- </div>
295
- <div class="form-group col-sm-12">
296
- <label class="col-sm-2 control-label">备注:</label>
297
- <div class="col-sm-10">
298
- <input type="text"
299
- class="form-control input_view"
300
- style="width: 100%"
301
- v-model="charge.f_charge_remarks" />
302
- </div>
303
- </div>
304
- <div class="form-group col-sm-12">
305
- <label class="col-sm-2 control-label">实际收款时间:</label>
306
- <div class="col-sm-10">
307
- <datepicker id="startDate" placeholder="实际收款时间"
308
- style="width: 60%!important;"
309
- v-model="charge.f_actual_date"
310
- :value.sync="charge.f_actual_date"
311
- :format="'yyyy-MM-dd HH:mm:ss'"
312
- :show-reset-button="true"
313
- >
314
- </datepicker>
315
- </div>
316
- </div>
317
- </article>
318
- <footer slot="modal-footer" class="modal-footer">
319
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
320
- </footer>
321
- </modal>
322
- </validator>
323
-
324
- <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
325
- <header slot="modal-header" class="modal-header">
326
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
327
- <h4 class="modal-title">作废收费</h4>
328
- </header>
329
- <article slot="modal-body" class="modal-body clearfix">
330
- <div class="form-group col-sm-12" v-if="false">
331
- <label class="col-sm-2 control-label">缴费地址:</label>
332
- <div class="col-sm-10">
333
- <input type="text"
334
- class="form-control input_view"
335
- style="width: 100%"
336
- readonly
337
- v-model="charge.f_useraddres" />
338
- </div>
339
- </div>
340
- <div class="form-group col-sm-12">
341
- <label class="col-sm-2 control-label">收费金额:</label>
342
- <div class="col-sm-10">
343
- <input type="text"
344
- class="form-control input_view"
345
- style="width: 100%"
346
- readonly
347
- v-model="charge.f_charge_money" />
348
- </div>
349
- </div>
350
- <div class="form-group col-sm-12">
351
- <label class="col-sm-2 control-label">付款方式:</label>
352
- <div class="col-sm-10">
353
- <input type="text"
354
- class="form-control input_view"
355
- style="width: 100%"
356
- readonly
357
- v-model="charge.f_payment_method" />
358
- </div>
359
- </div>
360
- <div class="form-group col-sm-12">
361
- <label class="col-sm-2 control-label">金额大写:</label>
362
- <div class="col-sm-10">
363
- <input type="text"
364
- class="form-control input_view"
365
- style="width: 100%"
366
- readonly
367
- v-model="charge.f_amount_words" />
368
- </div>
369
- </div>
370
- <div class="form-group col-sm-12">
371
- <label class="col-sm-2 control-label">收费人员:</label>
372
- <div class="col-sm-10">
373
- <input type="text"
374
- class="form-control input_view"
375
- style="width: 100%"
376
- readonly
377
- v-model="charge.f_charge_collectors" />
378
- </div>
379
- </div>
380
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
381
- <label class="col-sm-2 control-label">作废原因:</label>
382
- <div class="col-sm-10">
383
- <input type="text"
384
- class="form-control input_view"
385
- style="width: 100%"
386
- v-model="charge.f_void_remarks" />
387
- </div>
388
- </div>
389
- </article>
390
- <footer slot="modal-footer" class="modal-footer">
391
- <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
392
- </footer>
393
- </modal>
394
- <modal v-if="showConfirm" :show.sync="showConfirm" v-ref:modal :backdrop="false" title="确认收款">
395
- <header slot="modal-header" class="modal-header">
396
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
397
- <h4 class="modal-title">确认收款</h4>
398
- </header>
399
- <article slot="modal-body" class="modal-body clearfix">
400
- <div class="form-group col-sm-12" v-if="false">
401
- <label class="col-sm-2 control-label">缴费地址:</label>
402
- <div class="col-sm-10">
403
- <input type="text"
404
- class="form-control input_view"
405
- style="width: 100%"
406
- readonly
407
- v-model="charge.f_useraddres" />
408
- </div>
409
- </div>
410
- <div class="form-group col-sm-12">
411
- <label class="col-sm-2 control-label">收费金额:</label>
412
- <div class="col-sm-10">
413
- <input type="text"
414
- class="form-control input_view"
415
- style="width: 100%"
416
- readonly
417
- v-model="charge.f_charge_money" />
418
- </div>
419
- </div>
420
- <div class="form-group col-sm-12">
421
- <label class="col-sm-2 control-label">付款方式:</label>
422
- <div class="col-sm-10">
423
- <input type="text"
424
- class="form-control input_view"
425
- style="width: 100%"
426
- readonly
427
- v-model="charge.f_payment_method" />
428
- </div>
429
- </div>
430
- <div class="form-group col-sm-12">
431
- <label class="col-sm-2 control-label">金额大写:</label>
432
- <div class="col-sm-10">
433
- <input type="text"
434
- class="form-control input_view"
435
- style="width: 100%"
436
- readonly
437
- v-model="charge.f_amount_words" />
438
- </div>
439
- </div>
440
- <div class="form-group col-sm-12">
441
- <label class="col-sm-2 control-label">收费人员:</label>
442
- <div class="col-sm-10">
443
- <input type="text"
444
- class="form-control input_view"
445
- style="width: 100%"
446
- readonly
447
- v-model="charge.f_charge_collectors" />
448
- </div>
449
- </div>
450
- <div class="form-group col-sm-12">
451
- <label class="col-sm-2 control-label">确认人:</label>
452
- <div class="col-sm-10">
453
- <input type="text"
454
- class="form-control input_view"
455
- style="width: 100%"
456
- v-model="charge.f_confirm_person" />
457
- </div>
458
- </div>
459
- <div class="form-group col-sm-12">
460
- <label class="col-sm-2 control-label">确认时间:</label>
461
- <div class="col-sm-10">
462
- <datepicker id="startDate" placeholder="确认时间"
463
- style="width: 60%!important;"
464
- v-model="charge.f_confirm_date"
465
- :value.sync="charge.f_confirm_date"
466
- :default="true"
467
- :format="'yyyy-MM-dd HH:mm:ss'"
468
- :show-reset-button="true"
469
- >
470
- </datepicker>
471
- </div>
472
- </div>
473
- </article>
474
- <footer slot="modal-footer" class="modal-footer">
475
- <button type="button" class="btn btn-primary" @click="ConfirmPayment()">确认收款</button>
476
- </footer>
477
- </modal>
478
- <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
479
- <header slot="modal-header" class="modal-header">
480
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
481
- <h4 class="modal-title">打印预览</h4>
482
- </header>
483
- <article slot="modal-body" class="modal-body clearfix">
484
- <apply-print-chargepc :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-chargepc>
485
- </article>
486
- <footer slot="modal-footer" class="modal-footer">
487
- <button type="button" class="btn btn-primary" @click="print()">打印</button>
488
- </footer>
489
- </modal>
490
- </div>
491
- </template>
492
- <script>
493
- import {getNowDate,isEmpty} from '../../../components/Util'
494
- import {PagedList} from 'vue-client'
495
- import {HttpResetClass} from 'vue-client'
496
- import Vue from 'vue'
497
-
498
- export default {
499
- title: '收费管理',
500
- props: {
501
- selectdata: {
502
- type: Object
503
- },
504
- mark: {
505
- type: Number,
506
- default: 0
507
- }
508
- },
509
- data () {
510
- return {
511
- showCharge: false, // 收费明细
512
- showInvalid: false, // 作废
513
- showPrint: false, // 打印
514
- showConfirm: false, // 确认收款
515
- person:this.$login.f.name,
516
- model: {
517
- data: null
518
- }, // 记录
519
- useraddresList: [], // 地址列表
520
- charge: {
521
-
522
- }
523
- }
524
- },
525
- ready () {
526
- this.search()
527
- },
528
- methods: {
529
- async payerNumberChange () {
530
- if (isEmpty(this.charge.f_payer_number)) {
531
- return
532
- }
533
- let http = new HttpResetClass()
534
- let data = {
535
- tablename: 't_charge_record',
536
- condition: `f_payer_number = '${this.charge.f_payer_number}'`
537
- }
538
- let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
539
- resolveMsg: null,
540
- rejectMsg: '流水号查询失败!!!'
541
- })
542
- if (res.data.length > 0) {
543
- this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
544
- return
545
- }
546
- },
547
- print () {
548
- this.$refs.print.$refs.print.PrintTable()
549
- },
550
- showPrintModal(row) {
551
- this.charge = row
552
- this.showPrint = true
553
- },
554
- selectAddres () {
555
- if (this.charge.useraddres) {
556
- this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
557
- this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
558
- } else {
559
- this.charge.f_cumulative_payment_money = 0
560
- this.charge.f_outstanding_amount = this.selectdata.f_price
561
- }
562
- },
563
- async invalidApplyCharge() {
564
-
565
- let http = new HttpResetClass()
566
- let data = {
567
- apply: this.selectdata,
568
- user: this.$login.f,
569
- charge: this.charge
570
- }
571
- let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
572
- resolveMsg: null,
573
- rejectMsg: '作废失败!!!'
574
- })
575
- this.selectdata = res.data
576
-
577
- this.$dispatch('breakControl', this.selectdata)
578
- },
579
- async ConfirmPayment() {
580
- let http = new HttpResetClass()
581
- let data = {
582
- apply: this.selectdata,
583
- user: this.$login.f,
584
- charge: this.charge
585
- }
586
- let res = await http.load('POST', 'rs/logic/confirmCharge', {data: data}, {
587
- resolveMsg: null,
588
- rejectMsg: '确认收款失败!!!'
589
- })
590
- if(res.data==200){
591
- this.$showAlert('确认收款成功!!!', 'success', 3000)
592
- //延时1s
593
- setTimeout(() => {
594
- this.showConfirm= false
595
- }, 1000)
596
- }
597
- //重新查询
598
- this.search()
599
- },
600
- // 打开作废收费
601
- showInvalidModal(row) {
602
- this.charge = row
603
- this.showInvalid = true
604
- },
605
- showConfirmModal(row){
606
- this.charge = row
607
- this.charge.f_confirm_person=this.person
608
- this.showConfirm= true
609
- },
610
- // 新增收费
611
- async saveCharge() {
612
- let http = new HttpResetClass()
613
- let data = {
614
- apply: this.selectdata,
615
- user: this.$login.f,
616
- charge: this.charge
617
- }
618
-
619
- let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
620
- resolveMsg: null,
621
- rejectMsg: '缴费失败!!!'
622
- })
623
- this.selectdata = res.data
624
-
625
- this.$dispatch('breakControl', this.selectdata)
626
- },
627
- moneyChange () {
628
- if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
629
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
630
- this.charge.f_charge_money = null
631
- return
632
- }
633
- if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
634
- this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
635
- this.charge.f_charge_money = null
636
- return
637
- }
638
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
639
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
640
- this.charge.f_charge_money = null
641
- return
642
- }
643
- },
644
- // 金额转大写
645
- handleInput(e) {
646
- // 通过正则过滤小数点后两位
647
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
648
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
649
- },
650
- // 金额转大写
651
- smalltoBIG(n) {
652
- let fraction = ['角', '分'];
653
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
654
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
655
- let head = n < 0 ? '欠' : '';
656
- n = Math.abs(n);
657
-
658
- let s = '';
659
-
660
- for (var i = 0; i < fraction.length; i++) {
661
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
662
- }
663
- s = s || '';
664
- n = Math.floor(n);
665
-
666
- for (var i = 0; i < unit[0].length && n > 0; i++) {
667
- let p = '';
668
- for (var j = 0; j < unit[1].length && n > 0; j++) {
669
- p = digit[n % 10] + unit[1][j] + p;
670
- n = Math.floor(n / 10);
671
- }
672
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
673
- }
674
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
675
- },
676
- async changePaymentMethod () {
677
- if (this.charge.f_payment_method === '银行转账' && this.selectdata.f_apply_type === '团购报建') {
678
- let http = new HttpResetClass()
679
- let data = {
680
- tablename: 't_dev_info',
681
- condition: `f_orgid = '${this.$login.f.orgid}' and id = '${this.selectdata.f_dev_id}'`
682
- }
683
- let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
684
- resolveMsg: null,
685
- rejectMsg: '开发商档案查询失败!!!'
686
- })
687
-
688
- this.charge.f_payer_name = res.data[0].f_dev_name
689
- this.charge.f_payer_account = res.data[0].f_bank_account
690
- }
691
- },
692
- async getUserAddress() {
693
- let http = new HttpResetClass()
694
- let data = {}
695
- let url = null
696
- if (this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
697
- data = {
698
- condition: `ui.f_userinfo_id = ${this.selectdata.f_userinfo_id}`
699
- }
700
- url = 'rs/sql/applyGetUserinfos'
701
- } else {
702
- data = {
703
- condition: this.selectdata.f_apply_type === '散户集体报建' ? `nvl(cr.f_cumulative_payment_money, 0) < ${this.selectdata.f_price}` : '1=1',
704
- f_process_id: this.selectdata.f_process_id
705
- }
706
- url = 'rs/sql/getAddresAndCumulativePayment'
707
- }
708
- let res = await http.load('POST', url, {data:data}, {
709
- resolveMsg: null,
710
- rejectMsg: '用户获取失败!!!'
711
- })
712
-
713
- if (res.data.length <= 0) {
714
- this.$showAlert('暂无需要缴费用户!!!', 'warning', 3000)
715
- }
716
-
717
- this.useraddresList = res.data.map(item => {
718
- return {
719
- // 有用户姓名地址后拼接姓名
720
- label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
721
- value: item
722
- }
723
- })
724
-
725
- },
726
- async showChargeModal() {
727
- // this.getUserAddress()
728
-
729
- if (this.selectdata.f_apply_type === '团购报建') {
730
- this.charge.f_dev_info_id = this.selectdata.f_dev_id
731
- }
732
-
733
- this.showCharge = true
734
- },
735
- async search () {
736
- let http = new HttpResetClass()
737
- let data = {
738
- // condition: `cr.f_charge_status != '退款'`,
739
- f_process_id: this.selectdata.f_process_id
740
- }
741
- let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
742
- resolveMsg: null,
743
- rejectMsg: '收费记录查询失败!!!'
744
- })
745
- this.model.data = res.data
746
- },
747
- // 关闭对话框
748
- closeModal() {
749
- this.showCharge = false
750
- this.showInvalid = false
751
- this.showPrint = false
752
- this.showConfirm = false
753
- this.charge = {}
754
- this.search()
755
- }
756
- },
757
- events: {
758
- },
759
- computed: {
760
- paymentMethod() {
761
- return this.$appdata.getParam("付款方式")
762
- },
763
- paymentTerm() {
764
- return this.$appdata.getParam("收费项目")
765
- }
766
- },
767
- watch: {
768
- }
769
- }
770
- </script>
771
- <style scoped>
772
- .textNoLineBreak {
773
- white-space: nowrap;
774
- }
775
- .head-but{
776
- margin-left: 5px;
777
- height: 34px;
778
- /*background-color: #6aa6e2;*/
779
- border-radius: 4px;
780
- font-family: PingFang;
781
- color: #ffffff;
782
- }
783
- </style>
1
+ <template>
2
+ <div class="col-sm-12" style="margin: 20px 0px;">
3
+ <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak" v-if="selectdata.f_apply_type !== '开发商集体报建'">地址</th>
8
+ <th class="textNoLineBreak">缴费编号</th>
9
+ <th class="textNoLineBreak">收费金额(退款金额)</th>
10
+ <th class="textNoLineBreak">金额大写</th>
11
+ <th class="textNoLineBreak">收费项目</th>
12
+ <th class="textNoLineBreak">付款方式</th>
13
+ <th class="textNoLineBreak">付款方名称</th>
14
+ <th class="textNoLineBreak">付款方账号</th>
15
+ <th class="textNoLineBreak">付款流水号</th>
16
+ <th class="textNoLineBreak">收费人员</th>
17
+ <th class="textNoLineBreak">收费日期</th>
18
+ <th class="textNoLineBreak">实际收费日期</th>
19
+ <th class="textNoLineBreak">备注</th>
20
+ <th class="textNoLineBreak">缴费状态</th>
21
+ <th class="textNoLineBreak">作废人员</th>
22
+ <th class="textNoLineBreak">作废时间</th>
23
+ <th class="textNoLineBreak">作废原因</th>
24
+ <th class="textNoLineBreak">确认人</th>
25
+ <th class="textNoLineBreak">确认时间</th>
26
+ <th class="textNoLineBreak">
27
+ <button
28
+ type="button"
29
+ class="btn btn-info head-but"
30
+ @click="$parent.$parent.showChargeModal()"
31
+ :disabled="$parent.$parent.mark === 1 || ($parent.$parent.selectdata.f_cumulative_payment_money >= $parent.$parent.selectdata.f_due_money || $parent.$parent.selectdata.f_surplus_money === 0)"
32
+ >新增收费</button>
33
+ </th>
34
+ </tr>
35
+ </template>
36
+ <template partial='body'>
37
+ <tr>
38
+ <td style="text-align: center;">
39
+ <nobr>{{$index+1}}</nobr>
40
+ </td>
41
+ <td style="text-align: center;" v-if="selectdata.f_apply_type !== '开发商集体报建'">
42
+ <nobr>{{row.f_useraddres}}</nobr>
43
+ </td>
44
+ <td style="text-align: center;">
45
+ <nobr>{{row.f_charge_number}}</nobr>
46
+ </td>
47
+ <td style="text-align: center;">
48
+ <nobr>{{row.f_charge_money}}</nobr>
49
+ </td>
50
+ <td style="text-align: center;">
51
+ <nobr>{{row.f_amount_words}}</nobr>
52
+ </td>
53
+ <td style="text-align: center;">
54
+ <nobr>{{row.f_payment_term}}</nobr>
55
+ </td>
56
+ <td style="text-align: center;">
57
+ <nobr>{{row.f_payment_method}}</nobr>
58
+ </td>
59
+ <td style="text-align: center;">
60
+ <nobr>{{row.f_payer_name}}</nobr>
61
+ </td>
62
+ <td style="text-align: center;">
63
+ <nobr>{{row.f_payer_account}}</nobr>
64
+ </td>
65
+ <td style="text-align: center;">
66
+ <nobr>{{row.f_payer_number}}</nobr>
67
+ </td>
68
+ <td style="text-align: center;">
69
+ <nobr>{{row.f_charge_collectors}}</nobr>
70
+ </td>
71
+ <td style="text-align: center;">
72
+ <nobr>{{row.f_charge_date}}</nobr>
73
+ </td>
74
+ <td style="text-align: center;">
75
+ <nobr>{{row.f_actual_date}}</nobr>
76
+ </td>
77
+ <td style="text-align: center;">
78
+ <nobr>{{row.f_charge_remarks}}</nobr>
79
+ </td>
80
+ <td style="text-align: center;">
81
+ <nobr>{{row.f_charge_status}}</nobr>
82
+ </td>
83
+ <td style="text-align: center;">
84
+ <nobr>{{row.f_void_staff}}</nobr>
85
+ </td>
86
+ <td style="text-align: center;">
87
+ <nobr>{{row.f_void_date}}</nobr>
88
+ </td>
89
+ <td style="text-align: center;">
90
+ <nobr>{{row.f_void_remarks}}</nobr>
91
+ </td>
92
+ <td style="text-align: center;">
93
+ <nobr>{{row.f_confirm_person}}</nobr>
94
+ </td>
95
+ <td style="text-align: center;">
96
+ <nobr>{{row.f_confirm_date}}</nobr>
97
+ </td>
98
+ <td style="text-align: center;">
99
+ <nobr v-if="row.f_charge_status !== '退款'&& row.f_charge_status !== '作废' && row.f_confirm_person==null">
100
+ <button
101
+ type="button"
102
+ name="button"
103
+ class="btn btn-link"
104
+ @click="$parent.$parent.showConfirmModal(row)"
105
+ >确认收款</button>
106
+ </nobr>
107
+ <nobr v-if="row.f_charge_status !== '退款'">
108
+ <button
109
+ type="button"
110
+ name="button"
111
+ class="btn btn-link"
112
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
113
+ @click="$parent.$parent.showInvalidModal(row)"
114
+ >作废</button>
115
+
116
+ <button
117
+ type="button"
118
+ name="button"
119
+ class="btn btn-link"
120
+ @click="$parent.$parent.showPrintModal(row)"
121
+ >打印预览</button>
122
+ </nobr>
123
+ </td>
124
+ </tr>
125
+ </template>
126
+ </data-grid>
127
+
128
+ <validator name="v">
129
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
130
+ <header slot="modal-header" class="modal-header">
131
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
132
+ <h4 class="modal-title">收费明细</h4>
133
+ </header>
134
+ <article slot="modal-body" class="modal-body clearfix">
135
+ <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
136
+ <label class="col-sm-2 control-label">缴费地址:</label>
137
+ <div class="col-sm-10">
138
+ <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
139
+ <input-select width="100%" class="select select_list" placeholder='请选择'
140
+ v-model="charge.useraddres"
141
+ :value.sync="charge.useraddres"
142
+ :options='useraddresList'
143
+ :value-single="true"
144
+ @change="selectAddres()"
145
+ close-on-select ></input-select>
146
+ </div>
147
+ </div>
148
+ <div class="form-group col-sm-12" :class="[$v.paymentterm.required ? 'has-error' : '']">
149
+ <label class="col-sm-2 control-label">收费项目:</label>
150
+ <div class="col-sm-10">
151
+ <input type="text" class="input_search" style="width:60%" v-show="false" v-model="$refs.paymentterm.selectedItems" v-validate:paymentterm='{required: true }'>
152
+ <v-select width="100%" class="select select_list" placeholder='请选择'
153
+ v-model="charge.f_payment_term"
154
+ :value.sync="charge.f_payment_term"
155
+ :options='paymentTerm'
156
+ :multiple="true"
157
+ v-ref:paymentterm
158
+ ></v-select>
159
+ </div>
160
+ </div>
161
+ <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
162
+ <label class="col-sm-2 control-label">收费金额:</label>
163
+ <div class="col-sm-10">
164
+ <input type="text"
165
+ class="form-control input_view"
166
+ style="width: 100%"
167
+ placeholder="0.00"
168
+ @keyup="handleInput"
169
+ @change="moneyChange"
170
+ v-validate:f_charge_money = "['required']"
171
+ v-model="charge.f_charge_money" />
172
+ </div>
173
+ </div>
174
+ <div class="form-group col-sm-12" :class="[$v.f_payment_method.required ? 'has-error' : '']">
175
+ <label class="col-sm-2 control-label">付款方式:</label>
176
+ <div class="col-sm-10">
177
+ <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
178
+ <input-select
179
+ placeholder='请选择' width="100%"
180
+ v-model="charge.f_payment_method"
181
+ :value.sync="charge.f_payment_method"
182
+ :options='paymentMethod'
183
+ class="select select_list"
184
+ :value-single="true"
185
+ @change="changePaymentMethod()"
186
+ close-on-select ></input-select>
187
+ </div>
188
+ </div>
189
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
190
+ <label class="col-sm-2 control-label">付款方名称:</label>
191
+ <div class="col-sm-10">
192
+ <input type="text"
193
+ class="form-control input_view"
194
+ style="width: 100%"
195
+ v-validate:f_payer_name = "['required']"
196
+ v-model="charge.f_payer_name" value="" />
197
+ </div>
198
+ </div>
199
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
200
+ <label class="col-sm-2 control-label">付款方账号:</label>
201
+ <div class="col-sm-10">
202
+ <input type="text" style="width: 100%" class="form-control input_view"
203
+ v-validate:f_payer_account = "['required']"
204
+ v-model="charge.f_payer_account" value=""/>
205
+ </div>
206
+ </div>
207
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
208
+ <label class="col-sm-2 control-label">付款流水号:</label>
209
+ <div class="col-sm-10">
210
+ <input type="text"
211
+ class="form-control input_view"
212
+ style="width: 100%" @change="payerNumberChange()"
213
+ v-validate:f_payer_number = "['required']"
214
+ v-model="charge.f_payer_number" value="" />
215
+ </div>
216
+ </div>
217
+ <div class="form-group col-sm-12">
218
+ <label class="col-sm-2 control-label">金额大写:</label>
219
+ <div class="col-sm-10">
220
+ <input type="text"
221
+ class="form-control input_view"
222
+ style="width: 100%"
223
+ :value="smalltoBIG(0)"
224
+ readonly
225
+ v-model.sync="charge.f_amount_words" />
226
+ </div>
227
+ </div>
228
+ <div class="form-group col-sm-12"
229
+ v-if="selectdata.f_apply_type === '散户集体报建'"
230
+ >
231
+ <label class="col-sm-2 control-label">单价(户):</label>
232
+ <div class="col-sm-10">
233
+ <input type="text"
234
+ class="form-control input_view"
235
+ style="width: 100%"
236
+ readonly
237
+ v-model="selectdata.f_price" />
238
+ </div>
239
+ </div>
240
+ <div class="form-group col-sm-12"
241
+ v-if="selectdata.f_apply_type === '散户集体报建'"
242
+ >
243
+ <label class="col-sm-2 control-label">累计缴费金额:</label>
244
+ <div class="col-sm-10">
245
+ <input type="text"
246
+ class="form-control input_view"
247
+ style="width: 100%"
248
+ readonly
249
+ v-model="charge.f_cumulative_payment_money"
250
+ :value="charge.f_cumulative_payment_money || 0" />
251
+ </div>
252
+ </div>
253
+ <div class="form-group col-sm-12"
254
+ v-if="selectdata.f_apply_type === '散户集体报建'"
255
+ >
256
+ <label class="col-sm-2 control-label">未结金额:</label>
257
+ <div class="col-sm-10">
258
+ <input type="text"
259
+ class="form-control input_view"
260
+ style="width: 100%"
261
+ readonly
262
+ v-model="charge.f_outstanding_amount"
263
+ :value="charge.f_outstanding_amount || 0" />
264
+ </div>
265
+ </div>
266
+ <div class="form-group col-sm-12">
267
+ <label class="col-sm-2 control-label">应交总金额:</label>
268
+ <div class="col-sm-10">
269
+ <input type="text"
270
+ class="form-control input_view"
271
+ style="width: 100%"
272
+ readonly
273
+ v-model="selectdata.f_due_money" />
274
+ </div>
275
+ </div>
276
+ <div class="form-group col-sm-12">
277
+ <label class="col-sm-2 control-label">累计缴费总金额:</label>
278
+ <div class="col-sm-10">
279
+ <input type="text"
280
+ class="form-control input_view"
281
+ style="width: 100%"
282
+ readonly
283
+ v-model="selectdata.f_cumulative_payment_money" />
284
+ </div>
285
+ </div>
286
+ <div class="form-group col-sm-12">
287
+ <label class="col-sm-2 control-label">未结总金额:</label>
288
+ <div class="col-sm-10">
289
+ <input type="text"
290
+ class="form-control input_view"
291
+ style="width: 100%"
292
+ readonly
293
+ v-model="selectdata.f_surplus_money" />
294
+ </div>
295
+ </div>
296
+ <div class="form-group col-sm-12">
297
+ <label class="col-sm-2 control-label">备注:</label>
298
+ <div class="col-sm-10">
299
+ <input type="text"
300
+ class="form-control input_view"
301
+ style="width: 100%"
302
+ v-model="charge.f_charge_remarks" />
303
+ </div>
304
+ </div>
305
+ <div class="form-group col-sm-12">
306
+ <label class="col-sm-2 control-label">实际收款时间:</label>
307
+ <div class="col-sm-10">
308
+ <datepicker id="startDate" placeholder="实际收款时间"
309
+ style="width: 60%!important;"
310
+ v-model="charge.f_actual_date"
311
+ :value.sync="charge.f_actual_date"
312
+ :format="'yyyy-MM-dd HH:mm:ss'"
313
+ :show-reset-button="true"
314
+ >
315
+ </datepicker>
316
+ </div>
317
+ </div>
318
+ </article>
319
+ <footer slot="modal-footer" class="modal-footer">
320
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
321
+ </footer>
322
+ </modal>
323
+ </validator>
324
+
325
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
326
+ <header slot="modal-header" class="modal-header">
327
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
328
+ <h4 class="modal-title">作废收费</h4>
329
+ </header>
330
+ <article slot="modal-body" class="modal-body clearfix">
331
+ <div class="form-group col-sm-12" v-if="false">
332
+ <label class="col-sm-2 control-label">缴费地址:</label>
333
+ <div class="col-sm-10">
334
+ <input type="text"
335
+ class="form-control input_view"
336
+ style="width: 100%"
337
+ readonly
338
+ v-model="charge.f_useraddres" />
339
+ </div>
340
+ </div>
341
+ <div class="form-group col-sm-12">
342
+ <label class="col-sm-2 control-label">收费金额:</label>
343
+ <div class="col-sm-10">
344
+ <input type="text"
345
+ class="form-control input_view"
346
+ style="width: 100%"
347
+ readonly
348
+ v-model="charge.f_charge_money" />
349
+ </div>
350
+ </div>
351
+ <div class="form-group col-sm-12">
352
+ <label class="col-sm-2 control-label">付款方式:</label>
353
+ <div class="col-sm-10">
354
+ <input type="text"
355
+ class="form-control input_view"
356
+ style="width: 100%"
357
+ readonly
358
+ v-model="charge.f_payment_method" />
359
+ </div>
360
+ </div>
361
+ <div class="form-group col-sm-12">
362
+ <label class="col-sm-2 control-label">金额大写:</label>
363
+ <div class="col-sm-10">
364
+ <input type="text"
365
+ class="form-control input_view"
366
+ style="width: 100%"
367
+ readonly
368
+ v-model="charge.f_amount_words" />
369
+ </div>
370
+ </div>
371
+ <div class="form-group col-sm-12">
372
+ <label class="col-sm-2 control-label">收费人员:</label>
373
+ <div class="col-sm-10">
374
+ <input type="text"
375
+ class="form-control input_view"
376
+ style="width: 100%"
377
+ readonly
378
+ v-model="charge.f_charge_collectors" />
379
+ </div>
380
+ </div>
381
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
382
+ <label class="col-sm-2 control-label">作废原因:</label>
383
+ <div class="col-sm-10">
384
+ <input type="text"
385
+ class="form-control input_view"
386
+ style="width: 100%"
387
+ v-model="charge.f_void_remarks" />
388
+ </div>
389
+ </div>
390
+ </article>
391
+ <footer slot="modal-footer" class="modal-footer">
392
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
393
+ </footer>
394
+ </modal>
395
+ <modal v-if="showConfirm" :show.sync="showConfirm" v-ref:modal :backdrop="false" title="确认收款">
396
+ <header slot="modal-header" class="modal-header">
397
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
398
+ <h4 class="modal-title">确认收款</h4>
399
+ </header>
400
+ <article slot="modal-body" class="modal-body clearfix">
401
+ <div class="form-group col-sm-12" v-if="false">
402
+ <label class="col-sm-2 control-label">缴费地址:</label>
403
+ <div class="col-sm-10">
404
+ <input type="text"
405
+ class="form-control input_view"
406
+ style="width: 100%"
407
+ readonly
408
+ v-model="charge.f_useraddres" />
409
+ </div>
410
+ </div>
411
+ <div class="form-group col-sm-12">
412
+ <label class="col-sm-2 control-label">收费金额:</label>
413
+ <div class="col-sm-10">
414
+ <input type="text"
415
+ class="form-control input_view"
416
+ style="width: 100%"
417
+ readonly
418
+ v-model="charge.f_charge_money" />
419
+ </div>
420
+ </div>
421
+ <div class="form-group col-sm-12">
422
+ <label class="col-sm-2 control-label">付款方式:</label>
423
+ <div class="col-sm-10">
424
+ <input type="text"
425
+ class="form-control input_view"
426
+ style="width: 100%"
427
+ readonly
428
+ v-model="charge.f_payment_method" />
429
+ </div>
430
+ </div>
431
+ <div class="form-group col-sm-12">
432
+ <label class="col-sm-2 control-label">金额大写:</label>
433
+ <div class="col-sm-10">
434
+ <input type="text"
435
+ class="form-control input_view"
436
+ style="width: 100%"
437
+ readonly
438
+ v-model="charge.f_amount_words" />
439
+ </div>
440
+ </div>
441
+ <div class="form-group col-sm-12">
442
+ <label class="col-sm-2 control-label">收费人员:</label>
443
+ <div class="col-sm-10">
444
+ <input type="text"
445
+ class="form-control input_view"
446
+ style="width: 100%"
447
+ readonly
448
+ v-model="charge.f_charge_collectors" />
449
+ </div>
450
+ </div>
451
+ <div class="form-group col-sm-12">
452
+ <label class="col-sm-2 control-label">确认人:</label>
453
+ <div class="col-sm-10">
454
+ <input type="text"
455
+ class="form-control input_view"
456
+ style="width: 100%"
457
+ v-model="charge.f_confirm_person" />
458
+ </div>
459
+ </div>
460
+ <div class="form-group col-sm-12">
461
+ <label class="col-sm-2 control-label">确认时间:</label>
462
+ <div class="col-sm-10">
463
+ <datepicker id="startDate" placeholder="确认时间"
464
+ style="width: 60%!important;"
465
+ v-model="charge.f_confirm_date"
466
+ :value.sync="charge.f_confirm_date"
467
+ :default="true"
468
+ :format="'yyyy-MM-dd HH:mm:ss'"
469
+ :show-reset-button="true"
470
+ >
471
+ </datepicker>
472
+ </div>
473
+ </div>
474
+ <div class="form-group col-sm-12">
475
+ <label class="col-sm-2 control-label">备注:</label>
476
+ <div class="col-sm-10">
477
+ <input type="text"
478
+ class="form-control input_view"
479
+ style="width: 100%"
480
+ v-model="charge.f_charge_remarks" />
481
+ </div>
482
+ </div>
483
+ </article>
484
+ <footer slot="modal-footer" class="modal-footer">
485
+ <button type="button" class="btn btn-primary" @click="ConfirmPayment()">确认收款</button>
486
+ </footer>
487
+ </modal>
488
+ <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
489
+ <header slot="modal-header" class="modal-header">
490
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
491
+ <h4 class="modal-title">打印预览</h4>
492
+ </header>
493
+ <article slot="modal-body" class="modal-body clearfix">
494
+ <apply-print-chargepc :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-chargepc>
495
+ </article>
496
+ <footer slot="modal-footer" class="modal-footer">
497
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
498
+ </footer>
499
+ </modal>
500
+ </div>
501
+ </template>
502
+ <script>
503
+ import {getNowDate,isEmpty} from '../../../components/Util'
504
+ import {PagedList} from 'vue-client'
505
+ import {HttpResetClass} from 'vue-client'
506
+ import Vue from 'vue'
507
+
508
+ export default {
509
+ title: '收费管理',
510
+ props: {
511
+ selectdata: {
512
+ type: Object
513
+ },
514
+ mark: {
515
+ type: Number,
516
+ default: 0
517
+ }
518
+ },
519
+ data () {
520
+ return {
521
+ showCharge: false, // 收费明细
522
+ showInvalid: false, // 作废
523
+ showPrint: false, // 打印
524
+ showConfirm: false, // 确认收款
525
+ person:this.$login.f.name,
526
+ model: {
527
+ data: null
528
+ }, // 记录
529
+ useraddresList: [], // 地址列表
530
+ charge: {
531
+
532
+ }
533
+ }
534
+ },
535
+ ready () {
536
+ this.search()
537
+ },
538
+ methods: {
539
+ async payerNumberChange () {
540
+ if (isEmpty(this.charge.f_payer_number)) {
541
+ return
542
+ }
543
+ let http = new HttpResetClass()
544
+ let data = {
545
+ tablename: 't_charge_record',
546
+ condition: `f_payer_number = '${this.charge.f_payer_number}'`
547
+ }
548
+ let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
549
+ resolveMsg: null,
550
+ rejectMsg: '流水号查询失败!!!'
551
+ })
552
+ if (res.data.length > 0) {
553
+ this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
554
+ return
555
+ }
556
+ },
557
+ print () {
558
+ this.$refs.print.$refs.print.PrintTable()
559
+ },
560
+ showPrintModal(row) {
561
+ this.charge = row
562
+ this.showPrint = true
563
+ },
564
+ selectAddres () {
565
+ if (this.charge.useraddres) {
566
+ this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
567
+ this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
568
+ } else {
569
+ this.charge.f_cumulative_payment_money = 0
570
+ this.charge.f_outstanding_amount = this.selectdata.f_price
571
+ }
572
+ },
573
+ async invalidApplyCharge() {
574
+
575
+ let http = new HttpResetClass()
576
+ let data = {
577
+ apply: this.selectdata,
578
+ user: this.$login.f,
579
+ charge: this.charge
580
+ }
581
+ let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
582
+ resolveMsg: null,
583
+ rejectMsg: '作废失败!!!'
584
+ })
585
+ this.selectdata = res.data
586
+
587
+ this.$dispatch('breakControl', this.selectdata)
588
+ },
589
+ async ConfirmPayment() {
590
+ let http = new HttpResetClass()
591
+ let data = {
592
+ apply: this.selectdata,
593
+ user: this.$login.f,
594
+ charge: this.charge
595
+ }
596
+ let res = await http.load('POST', 'rs/logic/confirmCharge', {data: data}, {
597
+ resolveMsg: null,
598
+ rejectMsg: '确认收款失败!!!'
599
+ })
600
+ if(res.data==200){
601
+ this.$showAlert('确认收款成功!!!', 'success', 3000)
602
+ //延时1s
603
+ setTimeout(() => {
604
+ this.showConfirm= false
605
+ }, 1000)
606
+ }
607
+ //重新查询
608
+ this.search()
609
+ },
610
+ // 打开作废收费
611
+ showInvalidModal(row) {
612
+ this.charge = row
613
+ this.showInvalid = true
614
+ },
615
+ showConfirmModal(row){
616
+ this.charge = row
617
+ this.charge.f_confirm_person=this.person
618
+ this.showConfirm= true
619
+ },
620
+ // 新增收费
621
+ async saveCharge() {
622
+ let http = new HttpResetClass()
623
+ let data = {
624
+ apply: this.selectdata,
625
+ user: this.$login.f,
626
+ charge: this.charge
627
+ }
628
+
629
+ let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
630
+ resolveMsg: null,
631
+ rejectMsg: '缴费失败!!!'
632
+ })
633
+ this.selectdata = res.data
634
+
635
+ this.$dispatch('breakControl', this.selectdata)
636
+ },
637
+ moneyChange () {
638
+ if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
639
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
640
+ this.charge.f_charge_money = null
641
+ return
642
+ }
643
+ if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
644
+ this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
645
+ this.charge.f_charge_money = null
646
+ return
647
+ }
648
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
649
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
650
+ this.charge.f_charge_money = null
651
+ return
652
+ }
653
+ },
654
+ // 金额转大写
655
+ handleInput(e) {
656
+ // 通过正则过滤小数点后两位
657
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
658
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
659
+ },
660
+ // 金额转大写
661
+ smalltoBIG(n) {
662
+ let fraction = ['角', '分'];
663
+ let digit = ['零', '壹', '', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
664
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
665
+ let head = n < 0 ? '欠' : '';
666
+ n = Math.abs(n);
667
+
668
+ let s = '';
669
+
670
+ for (var i = 0; i < fraction.length; i++) {
671
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
672
+ }
673
+ s = s || '整';
674
+ n = Math.floor(n);
675
+
676
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
677
+ let p = '';
678
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
679
+ p = digit[n % 10] + unit[1][j] + p;
680
+ n = Math.floor(n / 10);
681
+ }
682
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
683
+ }
684
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
685
+ },
686
+ async changePaymentMethod () {
687
+ if (this.charge.f_payment_method === '银行转账' && this.selectdata.f_apply_type === '团购报建') {
688
+ let http = new HttpResetClass()
689
+ let data = {
690
+ tablename: 't_dev_info',
691
+ condition: `f_orgid = '${this.$login.f.orgid}' and id = '${this.selectdata.f_dev_id}'`
692
+ }
693
+ let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
694
+ resolveMsg: null,
695
+ rejectMsg: '开发商档案查询失败!!!'
696
+ })
697
+
698
+ this.charge.f_payer_name = res.data[0].f_dev_name
699
+ this.charge.f_payer_account = res.data[0].f_bank_account
700
+ }
701
+ },
702
+ async getUserAddress() {
703
+ let http = new HttpResetClass()
704
+ let data = {}
705
+ let url = null
706
+ if (this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
707
+ data = {
708
+ condition: `ui.f_userinfo_id = ${this.selectdata.f_userinfo_id}`
709
+ }
710
+ url = 'rs/sql/applyGetUserinfos'
711
+ } else {
712
+ data = {
713
+ condition: this.selectdata.f_apply_type === '散户集体报建' ? `nvl(cr.f_cumulative_payment_money, 0) < ${this.selectdata.f_price}` : '1=1',
714
+ f_process_id: this.selectdata.f_process_id
715
+ }
716
+ url = 'rs/sql/getAddresAndCumulativePayment'
717
+ }
718
+ let res = await http.load('POST', url, {data:data}, {
719
+ resolveMsg: null,
720
+ rejectMsg: '用户获取失败!!!'
721
+ })
722
+
723
+ if (res.data.length <= 0) {
724
+ this.$showAlert('暂无需要缴费用户!!!', 'warning', 3000)
725
+ }
726
+
727
+ this.useraddresList = res.data.map(item => {
728
+ return {
729
+ // 有用户姓名地址后拼接姓名
730
+ label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
731
+ value: item
732
+ }
733
+ })
734
+
735
+ },
736
+ async showChargeModal() {
737
+ // this.getUserAddress()
738
+
739
+ if (this.selectdata.f_apply_type === '团购报建') {
740
+ this.charge.f_dev_info_id = this.selectdata.f_dev_id
741
+ }
742
+
743
+ this.showCharge = true
744
+ },
745
+ async search () {
746
+ let http = new HttpResetClass()
747
+ let data = {
748
+ // condition: `cr.f_charge_status != '退款'`,
749
+ f_process_id: this.selectdata.f_process_id
750
+ }
751
+ let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
752
+ resolveMsg: null,
753
+ rejectMsg: '收费记录查询失败!!!'
754
+ })
755
+ this.model.data = res.data
756
+ },
757
+ // 关闭对话框
758
+ closeModal() {
759
+ this.showCharge = false
760
+ this.showInvalid = false
761
+ this.showPrint = false
762
+ this.showConfirm = false
763
+ this.charge = {}
764
+ this.search()
765
+ }
766
+ },
767
+ events: {
768
+ },
769
+ computed: {
770
+ paymentMethod() {
771
+ return this.$appdata.getParam("付款方式")
772
+ },
773
+ paymentTerm() {
774
+ return this.$appdata.getParam("收费项目")
775
+ }
776
+ },
777
+ watch: {
778
+ }
779
+ }
780
+ </script>
781
+ <style scoped>
782
+ .textNoLineBreak {
783
+ white-space: nowrap;
784
+ }
785
+ .head-but{
786
+ margin-left: 5px;
787
+ height: 34px;
788
+ /*background-color: #6aa6e2;*/
789
+ border-radius: 4px;
790
+ font-family: PingFang;
791
+ color: #ffffff;
792
+ }
793
+ </style>