apply-clients 3.5.4-96 → 3.5.4-97

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.
Files changed (46) hide show
  1. package/build/dev-server.js +6 -9
  2. package/package.json +1 -1
  3. package/src/App.vue +25 -25
  4. package/src/components/android/AppTakePic.vue +182 -182
  5. package/src/components/android/Process/AppExplorationUser.vue +508 -508
  6. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  7. package/src/filiale/ancheng/android/AppSign.vue +149 -149
  8. package/src/filiale/ancheng/android/AppTakePic.vue +143 -143
  9. package/src/filiale/ancheng/android.js +7 -7
  10. package/src/filiale/fugou/android/AppAddMaterialScience.vue +440 -440
  11. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -519
  12. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -541
  13. package/src/filiale/fugou/android/AppServiceControl.vue +1845 -1845
  14. package/src/filiale/fugou/android/printCharge.vue +162 -162
  15. package/src/filiale/fugou/android.js +16 -16
  16. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -525
  17. package/src/filiale/fugou/pc/ServiceControl.vue +1705 -1705
  18. package/src/filiale/fugou/pc/ServiceView.vue +941 -941
  19. package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
  20. package/src/filiale/fugou/pc/printChargepc.vue +148 -148
  21. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  22. package/src/filiale/hongda/pc/ApplyDetailsList.vue +329 -329
  23. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  24. package/src/filiale/qianneng/android/AppServiceView.vue +12 -12
  25. package/src/filiale/qianneng/android.js +15 -15
  26. package/src/filiale/qianneng/pc/ApplyChargeList.vue +639 -625
  27. package/src/filiale/qianneng/pc/ApplyMaterialDetailed.vue +261 -261
  28. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +769 -704
  29. package/src/filiale/qianneng/pc/Applydetail.vue +55 -16
  30. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  31. package/src/filiale/qianneng/pc/InstallInfoSelect.vue +434 -391
  32. package/src/filiale/qianneng/pc/ServiceControl.vue +1382 -1384
  33. package/src/filiale/qianneng/pc/StopApplyList.vue +334 -290
  34. package/src/filiale/qianneng/pc/SupervisoryList.vue +396 -382
  35. package/src/filiale/qianneng/pc/chargeManagement.vue +813 -810
  36. package/src/filiale/qianneng/pc.js +29 -29
  37. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +520 -520
  38. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +645 -645
  39. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1703 -1703
  40. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +547 -547
  41. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2112 -2112
  42. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +605 -605
  43. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +683 -683
  44. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1052 -1052
  45. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +574 -574
  46. package/src/main.js +23 -23
@@ -1,810 +1,813 @@
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">缴费编号</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" v-if="$parent.$parent.selectdata.f_apply_type == '居民团体用户报建'">可派工数</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">
25
- <button
26
- type="button"
27
- class="btn btn-info head-but"
28
- @click="$parent.$parent.showChargeModal()"
29
- :disabled="$parent.$parent.mark === 1 || ($parent.$parent.parseCurrency($parent.$parent.selectdata.f_cumulative_payment_money)>= $parent.$parent.parseCurrency($parent.$parent.selectdata.f_due_money) || $parent.$parent.parseCurrency($parent.$parent.selectdata.f_surplus_money) === 0)"
30
- >新增收费</button>
31
- </th>
32
- </tr>
33
- </template>
34
- <template partial='body'>
35
- <tr>
36
- <td style="text-align: center;">
37
- <nobr>{{$index+1}}</nobr>
38
- </td>
39
- <td style="text-align: center;">
40
- <nobr>{{row.f_charge_number}}</nobr>
41
- </td>
42
- <td style="text-align: center;">
43
- <nobr>{{$parent.$parent.formatCurrency(row.f_charge_money,2)}}</nobr>
44
- </td>
45
- <td style="text-align: center;">
46
- <nobr>{{row.f_amount_words}}</nobr>
47
- </td>
48
- <td style="text-align: center;">
49
- <nobr>{{row.f_payment_term}}</nobr>
50
- </td>
51
- <td style="text-align: center;">
52
- <nobr>{{row.f_payment_method}}</nobr>
53
- </td>
54
- <td style="text-align: center;">
55
- <nobr>{{row.f_payer_name}}</nobr>
56
- </td>
57
- <td style="text-align: center;">
58
- <nobr>{{row.f_payer_account}}</nobr>
59
- </td>
60
- <td style="text-align: center;">
61
- <nobr>{{row.f_payer_number}}</nobr>
62
- </td>
63
- <td style="text-align: center;">
64
- <nobr>{{row.f_charge_collectors}}</nobr>
65
- </td>
66
- <td style="text-align: center;" v-if="$parent.$parent.selectdata.f_apply_type == '居民团体用户报建'">
67
- <nobr>{{row.f_installed_households}}</nobr>
68
- </td>
69
- <td style="text-align: center;">
70
- <nobr>{{row.f_charge_date}}</nobr>
71
- </td>
72
- <td style="text-align: center;">
73
- <nobr>{{row.f_actual_date}}</nobr>
74
- </td>
75
- <td style="text-align: center;">
76
- <nobr>{{row.f_charge_remarks}}</nobr>
77
- </td>
78
- <td style="text-align: center;">
79
- <nobr>{{row.f_charge_status}}</nobr>
80
- </td>
81
- <td style="text-align: center;">
82
- <nobr>{{row.f_void_staff}}</nobr>
83
- </td>
84
- <td style="text-align: center;">
85
- <nobr>{{row.f_void_date}}</nobr>
86
- </td>
87
- <td style="text-align: center;">
88
- <nobr>{{row.f_void_remarks}}</nobr>
89
- </td>
90
- <td style="text-align: center;">
91
- <nobr v-if="row.f_charge_status !== '退款'">
92
- <!-- <button
93
- type="button"
94
- name="button"
95
- class="btn btn-link"
96
- :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
97
- @click="$parent.$parent.showInvalidModal(row)"
98
- >作废</button>-->
99
- <button
100
- type="button"
101
- name="button"
102
- class="btn btn-link"
103
- :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'|| row.f_charge_status === '冲正'|| row.f_charge_status === '撤销'|| ($parent.$parent.selectdata.defname== '财务审核')"
104
- @click="$parent.$parent.showreversalModal(row)"
105
- >冲正</button>
106
-
107
- <button
108
- type="button"
109
- name="button"
110
- class="btn btn-link"
111
- @click="$parent.$parent.showPrintModal(row)"
112
- >打印预览</button>
113
- </nobr>
114
- </td>
115
- </tr>
116
- </template>
117
- </data-grid>
118
-
119
- <validator name="v">
120
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
121
- <header slot="modal-header" class="modal-header">
122
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
123
- <h4 class="modal-title">收费明细</h4>
124
- </header>
125
- <article slot="modal-body" class="modal-body clearfix">
126
- <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
127
- <label class="col-sm-2 control-label">缴费地址:</label>
128
- <div class="col-sm-10">
129
- <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
130
- <input-select width="100%" class="select select_list" placeholder='请选择'
131
- v-model="charge.useraddres"
132
- :value.sync="charge.useraddres"
133
- :options='useraddresList'
134
- :value-single="true"
135
- @change="selectAddres()"
136
- close-on-select ></input-select>
137
- </div>
138
- </div>
139
- <div class="form-group col-sm-12" :class="[$v.f_payment_type.required ? 'has-error' : '']">
140
- <label class="col-sm-2 control-label">收费类型:</label>
141
- <div class="col-sm-10">
142
- <input type="text" v-show="false" v-model="charge.f_payment_type" v-validate:f_payment_term = "['required']" >
143
- <input-select width="100%" class="select select_list" placeholder='请选择'
144
- v-model="charge.f_payment_type"
145
- :value.sync="charge.f_payment_type"
146
- :options='paymentTypes'
147
- :value-single="true"
148
- @change="onchangetype(charge.f_payment_type)"
149
- close-on-select ></input-select>
150
- </div>
151
- </div>
152
- <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
153
- <label class="col-sm-2 control-label">收费项目:</label>
154
- <div class="col-sm-10">
155
- <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
156
- <input-select width="100%" class="select select_list" placeholder='请选择'
157
- v-model="charge.f_payment_term"
158
- :value.sync="charge.f_payment_term"
159
- :options='paymentTerm'
160
- :value-single="true"
161
- close-on-select ></input-select>
162
- </div>
163
- </div>
164
- <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
165
- <label class="col-sm-2 control-label">收费金额:</label>
166
- <div class="col-sm-10">
167
- <input type="text"
168
- class="form-control input_view"
169
- style="width: 100%"
170
- placeholder="0.00"
171
- @keyup="handleInput"
172
- @change="moneyChange"
173
- v-validate:f_charge_money = "['required']"
174
- v-model="charge.f_charge_money" />
175
- </div>
176
- </div>
177
- <div class="form-group col-sm-12" :class="[$v.f_payment_method.required ? 'has-error' : '']">
178
- <label class="col-sm-2 control-label">付款方式:</label>
179
- <div class="col-sm-10">
180
- <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
181
- <input-select
182
- placeholder='请选择' width="100%"
183
- v-model="charge.f_payment_method"
184
- :value.sync="charge.f_payment_method"
185
- :options='paymentMethod'
186
- class="select select_list"
187
- :value-single="true"
188
- close-on-select ></input-select>
189
- </div>
190
- </div>
191
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
192
- <label class="col-sm-2 control-label">付款方名称:</label>
193
- <div class="col-sm-10">
194
- <input type="text"
195
- class="form-control input_view"
196
- style="width: 100%"
197
-
198
- v-model="charge.f_payer_name" value="" />
199
- </div>
200
- </div>
201
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
202
- <label class="col-sm-2 control-label">付款方账号:</label>
203
- <div class="col-sm-10">
204
- <input type="text" style="width: 100%" class="form-control input_view"
205
-
206
- v-model="charge.f_payer_account" value=""/>
207
- </div>
208
- </div>
209
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
210
- <label class="col-sm-2 control-label">付款流水号:</label>
211
- <div class="col-sm-10">
212
- <input type="text"
213
- class="form-control input_view"
214
- style="width: 100%" @change="payerNumberChange()"
215
-
216
- v-model="charge.f_payer_number" value="" />
217
- </div>
218
- </div>
219
- <div class="form-group col-sm-12">
220
- <label class="col-sm-2 control-label">金额大写:</label>
221
- <div class="col-sm-10">
222
- <input type="text"
223
- class="form-control input_view"
224
- style="width: 100%"
225
- :value="smalltoBIG(0)"
226
- readonly
227
- v-model.sync="charge.f_amount_words" />
228
- </div>
229
- </div>
230
- <div class="form-group col-sm-12"
231
- v-if="selectdata.f_apply_type === '居民团体用户报建'&& charge.f_payment_term.includes('安装费')"
232
- :class="[$v.f_installed_households.required ? 'has-error' : '']"
233
- >
234
- <label class="col-sm-2 control-label">可派工数:</label>
235
- <div class="col-sm-10">
236
- <input type="text"
237
- class="form-control input_view"
238
- style="width: 100%"
239
- v-validate:f_installed_households = "['required']"
240
- v-model="charge.f_installed_households" />
241
- </div>
242
- </div>
243
- <div class="form-group col-sm-12">
244
- <label class="col-sm-2 control-label">应交总金额:</label>
245
- <div class="col-sm-10">
246
- <input type="text"
247
- class="form-control input_view"
248
- style="width: 100%"
249
- readonly
250
- v-model="selectdata.f_due_money" />
251
- </div>
252
- </div>
253
- <div class="form-group col-sm-12">
254
- <label class="col-sm-2 control-label">累计缴费总金额:</label>
255
- <div class="col-sm-10">
256
- <input type="text"
257
- class="form-control input_view"
258
- style="width: 100%"
259
- readonly
260
- v-model="selectdata.f_cumulative_payment_money" />
261
- </div>
262
- </div>
263
- <div class="form-group col-sm-12">
264
- <label class="col-sm-2 control-label">未结总金额:</label>
265
- <div class="col-sm-10">
266
- <input type="text"
267
- class="form-control input_view"
268
- style="width: 100%"
269
- readonly
270
- v-model="selectdata.f_surplus_money" />
271
- </div>
272
- </div>
273
- <div class="form-group col-sm-12">
274
- <label class="col-sm-2 control-label">备注:</label>
275
- <div class="col-sm-10">
276
- <input type="text"
277
- class="form-control input_view"
278
- style="width: 100%"
279
- v-model="charge.f_charge_remarks" />
280
- </div>
281
- </div>
282
- <div class="form-group col-sm-12">
283
- <label class="col-sm-2 control-label">实际收款时间:</label>
284
- <div class="col-sm-10">
285
- <datepicker id="startDate" placeholder="实际收款时间"
286
- style="width: 60%!important;"
287
- v-model="charge.f_actual_date"
288
- :value.sync="charge.f_actual_date"
289
- :default="true"
290
- aria-required="true"
291
- :format="'yyyy-MM-dd HH:mm:ss'"
292
- :show-reset-button="true"
293
- >
294
- </datepicker>
295
- </div>
296
- </div>
297
- </article>
298
- <footer slot="modal-footer" class="modal-footer">
299
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
300
- </footer>
301
- </modal>
302
- </validator>
303
-
304
- <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
305
- <header slot="modal-header" class="modal-header">
306
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
307
- <h4 class="modal-title">作废收费</h4>
308
- </header>
309
- <article slot="modal-body" class="modal-body clearfix">
310
- <div class="form-group col-sm-12" v-if="false">
311
- <label class="col-sm-2 control-label">缴费地址:</label>
312
- <div class="col-sm-10">
313
- <input type="text"
314
- class="form-control input_view"
315
- style="width: 100%"
316
- readonly
317
- v-model="charge.f_useraddres" />
318
- </div>
319
- </div>
320
- <div class="form-group col-sm-12">
321
- <label class="col-sm-2 control-label">收费金额:</label>
322
- <div class="col-sm-10">
323
- <input type="text"
324
- class="form-control input_view"
325
- style="width: 100%"
326
- readonly
327
- v-model="charge.f_charge_money"
328
- />
329
- </div>
330
- </div>
331
- <div class="form-group col-sm-12">
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_payment_method" />
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_amount_words" />
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_charge_collectors" />
359
- </div>
360
- </div>
361
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
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
- v-model="charge.f_void_remarks" />
368
- </div>
369
- </div>
370
- </article>
371
- <footer slot="modal-footer" class="modal-footer">
372
- <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
373
- </footer>
374
- </modal>
375
- <modal v-if="showreversal" :show.sync="showreversal" v-ref:modal :backdrop="false" title="冲正收费">
376
- <header slot="modal-header" class="modal-header">
377
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
378
- <h4 class="modal-title">冲正收费</h4>
379
- </header>
380
- <article slot="modal-body" class="modal-body clearfix">
381
- <div class="form-group col-sm-12" v-if="false">
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
- readonly
388
- v-model="charge.f_useraddres" />
389
- </div>
390
- </div>
391
- <div class="form-group col-sm-12">
392
- <label class="col-sm-2 control-label">收费金额:</label>
393
- <div class="col-sm-10">
394
- <input type="text"
395
- class="form-control input_view"
396
- style="width: 100%"
397
- readonly
398
- v-model="charge.f_charge_money"
399
- />
400
- </div>
401
- </div>
402
- <div class="form-group col-sm-12">
403
- <label class="col-sm-2 control-label">付款方式:</label>
404
- <div class="col-sm-10">
405
- <input type="text"
406
- class="form-control input_view"
407
- style="width: 100%"
408
- readonly
409
- v-model="charge.f_payment_method" />
410
- </div>
411
- </div>
412
- <div class="form-group col-sm-12">
413
- <label class="col-sm-2 control-label">金额大写:</label>
414
- <div class="col-sm-10">
415
- <input type="text"
416
- class="form-control input_view"
417
- style="width: 100%"
418
- readonly
419
- v-model="charge.f_amount_words" />
420
- </div>
421
- </div>
422
- <div class="form-group col-sm-12">
423
- <label class="col-sm-2 control-label">收费人员:</label>
424
- <div class="col-sm-10">
425
- <input type="text"
426
- class="form-control input_view"
427
- style="width: 100%"
428
- readonly
429
- v-model="charge.f_charge_collectors" />
430
- </div>
431
- </div>
432
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
433
- <label class="col-sm-2 control-label">冲正原因:</label>
434
- <div class="col-sm-10">
435
- <input type="text"
436
- class="form-control input_view"
437
- style="width: 100%"
438
- v-model="charge.f_void_remarks" />
439
- </div>
440
- </div>
441
- </article>
442
- <footer slot="modal-footer" class="modal-footer">
443
- <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="reversalApplyCharge()">确认冲正</button>
444
- </footer>
445
- </modal>
446
-
447
- <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
448
- <header slot="modal-header" class="modal-header">
449
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
450
- <h4 class="modal-title">打印预览</h4>
451
- </header>
452
- <article slot="modal-body" class="modal-body clearfix">
453
- <apply-print-chargepc :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-chargepc>
454
- </article>
455
- <footer slot="modal-footer" class="modal-footer">
456
- <button type="button" class="btn btn-primary" @click="print()">打印</button>
457
- </footer>
458
- </modal>
459
- </div>
460
- </template>
461
- <script>
462
- import {getNowDate,isEmpty} from '../../../components/Util'
463
- import {PagedList} from 'vue-client'
464
- import {HttpResetClass} from 'vue-client'
465
- import Vue from 'vue'
466
-
467
- export default {
468
- title: '收费管理',
469
- props: {
470
- selectdata: {
471
- type: Object
472
- },
473
- mark: {
474
- type: Number,
475
- default: 0
476
- }
477
- },
478
- data () {
479
- return {
480
- showCharge: false, // 收费明细
481
- showInvalid: false, // 作废
482
- showreversal: false, // 冲正
483
- showPrint: false, // 打印
484
- model: {
485
- data: null
486
- }, // 记录
487
- useraddresList: [], // 地址列表
488
- paymentTerm: [], // 地址列表
489
- charge: {
490
-
491
- }
492
- }
493
- },
494
- ready () {
495
- this.search()
496
- },
497
- methods: {
498
- onchangetype(row){
499
- this.paymentTerm = this.$appdata.getParam(row)
500
- },
501
- //将千分位金额转换为数字
502
- parseCurrency(str) {
503
- // 用正则表达式移除千分位分隔符,并转换为数字
504
- return parseFloat(str.replace(/,/g, ''));
505
- },
506
- //将金额转换为千分位
507
- formatCurrency(number, decimalPlaces) {
508
- var num = parseFloat(number);
509
- if (!isNaN(num)) {
510
- num = num.toFixed(decimalPlaces || 0); // 将金额保留指定位数,四舍五入
511
- num = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); // 按照千分位进行分隔
512
- return num;
513
- } else {
514
- return ''; // 如果输入框中的值不是数字,则返回空字符串
515
- }
516
- },
517
- async payerNumberChange () {
518
- if (isEmpty(this.charge.f_payer_number)) {
519
- return
520
- }
521
- let http = new HttpResetClass()
522
- let data = {
523
- tablename: 't_charge_record',
524
- condition: `f_payer_number = '${this.charge.f_payer_number}'`
525
- }
526
- let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
527
- resolveMsg: null,
528
- rejectMsg: '流水号查询失败!!!'
529
- })
530
- if (res.data.length > 0) {
531
- this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
532
- return
533
- }
534
- },
535
- print () {
536
- this.$refs.print.$refs.print.PrintTable()
537
- let http = new HttpResetClass()
538
- if (!isEmpty(this.charge.f_out_trade_no)){
539
- this.charge.f_out_trade_no += 1
540
- }else {
541
- this.charge.f_out_trade_no = 0
542
- }
543
-
544
- http.load('post', 'rs/entity/t_charge_record', this.charge, {resolveMsg: null, rejectMsg: null})
545
- },
546
- showPrintModal(row) {
547
- this.charge = row
548
- this.showPrint = true
549
- },
550
- selectAddres () {
551
- if (this.charge.useraddres) {
552
- this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
553
- this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
554
- } else {
555
- this.charge.f_cumulative_payment_money = 0
556
- this.charge.f_outstanding_amount = this.selectdata.f_price
557
- }
558
- },
559
- async invalidApplyCharge() {
560
-
561
- let http = new HttpResetClass()
562
- if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
563
- if(!isEmpty(this.selectdata.f_installed_households)&& this.selectdata.f_installed_households>0){
564
- this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
565
- this.selectdata.f_installed_households -= parseInt(this.charge.f_installed_households)
566
- }
567
- }
568
- if(this.charge.f_charge_money.includes(",")){
569
- let money= this.parseCurrency(this.charge.f_charge_money)
570
- this.charge.f_charge_money=money
571
- }else{
572
- //转为数字
573
- let money= Number(this.charge.f_charge_money)
574
- this.charge.f_charge_money=money
575
- debugger
576
- }
577
-
578
- //将千分位金额转成数字
579
- for (const item of this.selectdata.fields) {
580
- if (item.percentiles) {
581
- if(item.value.includes(",")){
582
- let Money=this.parseCurrency(item.value)
583
- this.selectdata[item.field]=Money
584
- debugger
585
- }else{
586
- //转为数字
587
- let Money= Number(item.value)
588
- this.selectdata[item.field]=Money
589
- debugger
590
- }
591
- }
592
- }
593
- let data = {
594
- apply: this.selectdata,
595
- user: this.$login.f,
596
- charge: this.charge
597
- }
598
- let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
599
- resolveMsg: null,
600
- rejectMsg: '作废失败!!!'
601
- })
602
- this.selectdata = res.data
603
-
604
- this.$dispatch('breakControl', this.selectdata)
605
- },
606
-
607
- // 打开作废收费
608
- showInvalidModal(row) {
609
- row.f_charge_money = this.formatCurrency(row.f_charge_money,2)
610
- this.charge = row
611
- this.showInvalid = true
612
- },
613
- showreversalModal(row) {
614
- row.f_charge_money = this.formatCurrency(row.f_charge_money,2)
615
- this.charge = row
616
- this.showreversal = true
617
- },
618
- async reversalApplyCharge(){
619
- let http = new HttpResetClass()
620
- if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
621
- if(!isEmpty(this.selectdata.f_installed_households)&& this.selectdata.f_installed_households>0){
622
- this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
623
- this.selectdata.f_installed_households -= parseInt(this.charge.f_installed_households)
624
- }
625
- }
626
- if(this.charge.f_charge_money.includes(",")){
627
- let money= this.parseCurrency(this.charge.f_charge_money)
628
- this.charge.f_charge_money=money
629
- }else{
630
- //转为数字
631
- let money= Number(this.charge.f_charge_money)
632
- this.charge.f_charge_money=money
633
- }
634
- //将千分位金额转成数字
635
- for (const item of this.selectdata.fields) {
636
- if (item.percentiles) {
637
- if(item.value.includes(",")){
638
- let Money=this.parseCurrency(item.value)
639
- this.selectdata[item.field]=Money
640
- }else{
641
- //转为数字
642
- let Money= Number(item.value)
643
- this.selectdata[item.field]=Money
644
- }
645
- }
646
- }
647
- let data = {
648
- apply: this.selectdata,
649
- user: this.$login.f,
650
- charge: this.charge
651
- }
652
- let res = await http.load('POST', 'rs/logic/reversalApplyCharge', {data: data}, {
653
- resolveMsg: null,
654
- rejectMsg: '冲正失败!!!'
655
- })
656
- this.selectdata = res.data
657
- this.$dispatch('breakControl', this.selectdata)
658
- },
659
- // 新增收费
660
- async saveCharge() {
661
- let http = new HttpResetClass()
662
- if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
663
- if(!isEmpty(this.selectdata.f_installed_households)){
664
- this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
665
- this.selectdata.f_installed_households += parseInt(this.charge.f_installed_households)
666
- }else {
667
- this.selectdata.f_installed_households = 0
668
- this.selectdata.f_installed_households += parseInt(this.charge.f_installed_households)
669
- }
670
- }
671
- //去掉千分位
672
- for (const item of this.selectdata.fields) {
673
- if (item.percentiles) {
674
- if(item.value.includes(",")){
675
- let Money=this.parseCurrency(item.value)
676
- this.selectdata[item.field]=Money
677
- }else{
678
- //转为数字
679
- let Money= Number(item.value)
680
- this.selectdata[item.field]=Money
681
- }
682
- }
683
- }
684
- if(this.charge.f_charge_money.includes(",")){
685
- this.charge.f_charge_money=this.parseCurrency(this.charge.f_charge_money)
686
- }else{
687
- //转为数字
688
- let Money= Number(this.charge.f_charge_money)
689
- this.charge.f_charge_money=Money
690
- }
691
- let data = {
692
- apply: this.selectdata,
693
- user: this.$login.f,
694
- charge: this.charge
695
- }
696
-
697
- let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
698
- resolveMsg: null,
699
- rejectMsg: '缴费失败!!!'
700
- })
701
- this.selectdata = res.data
702
-
703
- this.$dispatch('breakControl', this.selectdata)
704
- },
705
- moneyChange () {
706
- /*if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
707
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
708
- this.charge.f_charge_money = null
709
- return
710
- }*/
711
- if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
712
- this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
713
- this.charge.f_charge_money = null
714
- return
715
- }
716
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
717
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
718
- this.charge.f_charge_money = null
719
- return
720
- }
721
- //
722
- this.charge.f_charge_money = this.formatCurrency(this.charge.f_charge_money,2)
723
- },
724
- // 金额转大写
725
- handleInput(e) {
726
- // 通过正则过滤小数点后两位
727
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
728
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
729
- },
730
- // 金额转大写
731
- smalltoBIG(n) {
732
- let fraction = ['角', '分'];
733
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
734
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
735
- let head = n < 0 ? '' : '';
736
- n = Math.abs(n);
737
-
738
- let s = '';
739
-
740
- for (var i = 0; i < fraction.length; i++) {
741
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
742
- }
743
- s = s || '整';
744
- n = Math.floor(n);
745
-
746
- for (var i = 0; i < unit[0].length && n > 0; i++) {
747
- let p = '';
748
- for (var j = 0; j < unit[1].length && n > 0; j++) {
749
- p = digit[n % 10] + unit[1][j] + p;
750
- n = Math.floor(n / 10);
751
- }
752
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
753
- }
754
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
755
- },
756
- async showChargeModal() {
757
- this.showCharge = true
758
- },
759
- async search () {
760
- let http = new HttpResetClass()
761
- let data = {
762
- // condition: `cr.f_charge_status != '退款'`,
763
- f_process_id: this.selectdata.f_process_id
764
- }
765
- let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
766
- resolveMsg: null,
767
- rejectMsg: '收费记录查询失败!!!'
768
- })
769
- this.model.data = res.data
770
- },
771
- // 关闭对话框
772
- closeModal() {
773
- this.showCharge = false
774
- this.showInvalid = false
775
- this.showreversal = false
776
- this.showPrint = false
777
- this.charge = {}
778
- this.search()
779
- }
780
- },
781
- events: {
782
- },
783
- computed: {
784
- paymentMethod() {
785
- return this.$appdata.getParam("付款方式")
786
- },
787
- /*paymentTerm() {
788
- return this.$appdata.getParam("收费项目")
789
- },*/
790
- paymentTypes() {
791
- return this.$appdata.getParam("报建-收费类型")
792
- }
793
- },
794
- watch: {
795
- }
796
- }
797
- </script>
798
- <style scoped>
799
- .textNoLineBreak {
800
- white-space: nowrap;
801
- }
802
- .head-but{
803
- margin-left: 5px;
804
- height: 34px;
805
- /*background-color: #6aa6e2;*/
806
- border-radius: 4px;
807
- font-family: PingFang;
808
- color: #ffffff;
809
- }
810
- </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">缴费编号</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" v-if="$parent.$parent.selectdata.f_apply_type == '居民团体用户报建'">可派工数</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">
25
+ <button
26
+ type="button"
27
+ class="btn btn-info head-but"
28
+ @click="$parent.$parent.showChargeModal()"
29
+ :disabled="$parent.$parent.mark === 1 || ($parent.$parent.parseCurrency($parent.$parent.selectdata.f_cumulative_payment_money)>= $parent.$parent.parseCurrency($parent.$parent.selectdata.f_due_money) || $parent.$parent.parseCurrency($parent.$parent.selectdata.f_surplus_money) === 0)"
30
+ >新增收费</button>
31
+ </th>
32
+ </tr>
33
+ </template>
34
+ <template partial='body'>
35
+ <tr>
36
+ <td style="text-align: center;">
37
+ <nobr>{{$index+1}}</nobr>
38
+ </td>
39
+ <td style="text-align: center;">
40
+ <nobr>{{row.f_charge_number}}</nobr>
41
+ </td>
42
+ <td style="text-align: center;">
43
+ <nobr>{{$parent.$parent.formatCurrency(row.f_charge_money,2)}}</nobr>
44
+ </td>
45
+ <td style="text-align: center;">
46
+ <nobr>{{row.f_amount_words}}</nobr>
47
+ </td>
48
+ <td style="text-align: center;">
49
+ <nobr>{{row.f_payment_term}}</nobr>
50
+ </td>
51
+ <td style="text-align: center;">
52
+ <nobr>{{row.f_payment_method}}</nobr>
53
+ </td>
54
+ <td style="text-align: center;">
55
+ <nobr>{{row.f_payer_name}}</nobr>
56
+ </td>
57
+ <td style="text-align: center;">
58
+ <nobr>{{row.f_payer_account}}</nobr>
59
+ </td>
60
+ <td style="text-align: center;">
61
+ <nobr>{{row.f_payer_number}}</nobr>
62
+ </td>
63
+ <td style="text-align: center;">
64
+ <nobr>{{row.f_charge_collectors}}</nobr>
65
+ </td>
66
+ <td style="text-align: center;" v-if="$parent.$parent.selectdata.f_apply_type == '居民团体用户报建'">
67
+ <nobr>{{row.f_installed_households}}</nobr>
68
+ </td>
69
+ <td style="text-align: center;">
70
+ <nobr>{{row.f_charge_date}}</nobr>
71
+ </td>
72
+ <td style="text-align: center;">
73
+ <nobr>{{row.f_actual_date}}</nobr>
74
+ </td>
75
+ <td style="text-align: center;">
76
+ <nobr>{{row.f_charge_remarks}}</nobr>
77
+ </td>
78
+ <td style="text-align: center;">
79
+ <nobr>{{row.f_charge_status}}</nobr>
80
+ </td>
81
+ <td style="text-align: center;">
82
+ <nobr>{{row.f_void_staff}}</nobr>
83
+ </td>
84
+ <td style="text-align: center;">
85
+ <nobr>{{row.f_void_date}}</nobr>
86
+ </td>
87
+ <td style="text-align: center;">
88
+ <nobr>{{row.f_void_remarks}}</nobr>
89
+ </td>
90
+ <td style="text-align: center;">
91
+ <nobr v-if="row.f_charge_status !== '退款'">
92
+ <!-- <button
93
+ type="button"
94
+ name="button"
95
+ class="btn btn-link"
96
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
97
+ @click="$parent.$parent.showInvalidModal(row)"
98
+ >作废</button>-->
99
+ <button
100
+ type="button"
101
+ name="button"
102
+ class="btn btn-link"
103
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'|| row.f_charge_status === '冲正'|| row.f_charge_status === '撤销'|| ($parent.$parent.selectdata.defname== '财务审核')"
104
+ @click="$parent.$parent.showreversalModal(row)"
105
+ >冲正</button>
106
+
107
+ <button
108
+ type="button"
109
+ name="button"
110
+ class="btn btn-link"
111
+ @click="$parent.$parent.showPrintModal(row)"
112
+ >打印预览</button>
113
+ </nobr>
114
+ </td>
115
+ </tr>
116
+ </template>
117
+ </data-grid>
118
+
119
+ <validator name="v">
120
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
121
+ <header slot="modal-header" class="modal-header">
122
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
123
+ <h4 class="modal-title">收费明细</h4>
124
+ </header>
125
+ <article slot="modal-body" class="modal-body clearfix">
126
+ <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
127
+ <label class="col-sm-2 control-label">缴费地址:</label>
128
+ <div class="col-sm-10">
129
+ <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
130
+ <input-select width="100%" class="select select_list" placeholder='请选择'
131
+ v-model="charge.useraddres"
132
+ :value.sync="charge.useraddres"
133
+ :options='useraddresList'
134
+ :value-single="true"
135
+ @change="selectAddres()"
136
+ close-on-select ></input-select>
137
+ </div>
138
+ </div>
139
+ <div class="form-group col-sm-12" :class="[$v.f_payment_type.required ? 'has-error' : '']">
140
+ <label class="col-sm-2 control-label">收费类型:</label>
141
+ <div class="col-sm-10">
142
+ <input type="text" v-show="false" v-model="charge.f_payment_type" v-validate:f_payment_term = "['required']" >
143
+ <input-select width="100%" class="select select_list" placeholder='请选择'
144
+ v-model="charge.f_payment_type"
145
+ :value.sync="charge.f_payment_type"
146
+ :options='paymentTypes'
147
+ :value-single="true"
148
+ @change="onchangetype(charge.f_payment_type)"
149
+ close-on-select ></input-select>
150
+ </div>
151
+ </div>
152
+ <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
153
+ <label class="col-sm-2 control-label">收费项目:</label>
154
+ <div class="col-sm-10">
155
+ <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
156
+ <input-select width="100%" class="select select_list" placeholder='请选择'
157
+ v-model="charge.f_payment_term"
158
+ :value.sync="charge.f_payment_term"
159
+ :options='paymentTerm'
160
+ :value-single="true"
161
+ close-on-select ></input-select>
162
+ </div>
163
+ </div>
164
+ <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
165
+ <label class="col-sm-2 control-label">收费金额:</label>
166
+ <div class="col-sm-10">
167
+ <input type="text"
168
+ class="form-control input_view"
169
+ style="width: 100%"
170
+ placeholder="0.00"
171
+ @keyup="handleInput"
172
+ @change="moneyChange"
173
+ v-validate:f_charge_money = "['required']"
174
+ v-model="charge.f_charge_money" />
175
+ </div>
176
+ </div>
177
+ <div class="form-group col-sm-12" :class="[$v.f_payment_method.required ? 'has-error' : '']">
178
+ <label class="col-sm-2 control-label">付款方式:</label>
179
+ <div class="col-sm-10">
180
+ <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
181
+ <input-select
182
+ placeholder='请选择' width="100%"
183
+ v-model="charge.f_payment_method"
184
+ :value.sync="charge.f_payment_method"
185
+ :options='paymentMethod'
186
+ class="select select_list"
187
+ :value-single="true"
188
+ close-on-select ></input-select>
189
+ </div>
190
+ </div>
191
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
192
+ <label class="col-sm-2 control-label">付款方名称:</label>
193
+ <div class="col-sm-10">
194
+ <input type="text"
195
+ class="form-control input_view"
196
+ style="width: 100%"
197
+
198
+ v-model="charge.f_payer_name" value="" />
199
+ </div>
200
+ </div>
201
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
202
+ <label class="col-sm-2 control-label">付款方账号:</label>
203
+ <div class="col-sm-10">
204
+ <input type="text" style="width: 100%" class="form-control input_view"
205
+
206
+ v-model="charge.f_payer_account" value=""/>
207
+ </div>
208
+ </div>
209
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
210
+ <label class="col-sm-2 control-label">付款流水号:</label>
211
+ <div class="col-sm-10">
212
+ <input type="text"
213
+ class="form-control input_view"
214
+ style="width: 100%" @change="payerNumberChange()"
215
+
216
+ v-model="charge.f_payer_number" value="" />
217
+ </div>
218
+ </div>
219
+ <div class="form-group col-sm-12">
220
+ <label class="col-sm-2 control-label">金额大写:</label>
221
+ <div class="col-sm-10">
222
+ <input type="text"
223
+ class="form-control input_view"
224
+ style="width: 100%"
225
+ :value="smalltoBIG(0)"
226
+ readonly
227
+ v-model.sync="charge.f_amount_words" />
228
+ </div>
229
+ </div>
230
+ <div class="form-group col-sm-12"
231
+ v-if="selectdata.f_apply_type === '居民团体用户报建'&& charge.f_payment_term.includes('安装费')"
232
+ :class="[$v.f_installed_households.required ? 'has-error' : '']"
233
+ >
234
+ <label class="col-sm-2 control-label">可派工数:</label>
235
+ <div class="col-sm-10">
236
+ <input type="text"
237
+ class="form-control input_view"
238
+ style="width: 100%"
239
+ v-validate:f_installed_households = "['required']"
240
+ v-model="charge.f_installed_households" />
241
+ </div>
242
+ </div>
243
+ <div class="form-group col-sm-12">
244
+ <label class="col-sm-2 control-label">应交总金额:</label>
245
+ <div class="col-sm-10">
246
+ <input type="text"
247
+ class="form-control input_view"
248
+ style="width: 100%"
249
+ readonly
250
+ v-model="selectdata.f_due_money" />
251
+ </div>
252
+ </div>
253
+ <div class="form-group col-sm-12">
254
+ <label class="col-sm-2 control-label">累计缴费总金额:</label>
255
+ <div class="col-sm-10">
256
+ <input type="text"
257
+ class="form-control input_view"
258
+ style="width: 100%"
259
+ readonly
260
+ v-model="selectdata.f_cumulative_payment_money" />
261
+ </div>
262
+ </div>
263
+ <div class="form-group col-sm-12">
264
+ <label class="col-sm-2 control-label">未结总金额:</label>
265
+ <div class="col-sm-10">
266
+ <input type="text"
267
+ class="form-control input_view"
268
+ style="width: 100%"
269
+ readonly
270
+ v-model="selectdata.f_surplus_money" />
271
+ </div>
272
+ </div>
273
+ <div class="form-group col-sm-12">
274
+ <label class="col-sm-2 control-label">备注:</label>
275
+ <div class="col-sm-10">
276
+ <input type="text"
277
+ class="form-control input_view"
278
+ style="width: 100%"
279
+ v-model="charge.f_charge_remarks" />
280
+ </div>
281
+ </div>
282
+ <div class="form-group col-sm-12">
283
+ <label class="col-sm-2 control-label">实际收款时间:</label>
284
+ <div class="col-sm-10">
285
+ <datepicker id="startDate" placeholder="实际收款时间"
286
+ style="width: 60%!important;"
287
+ v-model="charge.f_actual_date"
288
+ :value.sync="charge.f_actual_date"
289
+ :default="true"
290
+ aria-required="true"
291
+ :format="'yyyy-MM-dd HH:mm:ss'"
292
+ :show-reset-button="true"
293
+ >
294
+ </datepicker>
295
+ </div>
296
+ </div>
297
+ </article>
298
+ <footer slot="modal-footer" class="modal-footer">
299
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
300
+ </footer>
301
+ </modal>
302
+ </validator>
303
+
304
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
305
+ <header slot="modal-header" class="modal-header">
306
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
307
+ <h4 class="modal-title">作废收费</h4>
308
+ </header>
309
+ <article slot="modal-body" class="modal-body clearfix">
310
+ <div class="form-group col-sm-12" v-if="false">
311
+ <label class="col-sm-2 control-label">缴费地址:</label>
312
+ <div class="col-sm-10">
313
+ <input type="text"
314
+ class="form-control input_view"
315
+ style="width: 100%"
316
+ readonly
317
+ v-model="charge.f_useraddres" />
318
+ </div>
319
+ </div>
320
+ <div class="form-group col-sm-12">
321
+ <label class="col-sm-2 control-label">收费金额:</label>
322
+ <div class="col-sm-10">
323
+ <input type="text"
324
+ class="form-control input_view"
325
+ style="width: 100%"
326
+ readonly
327
+ v-model="charge.f_charge_money"
328
+ />
329
+ </div>
330
+ </div>
331
+ <div class="form-group col-sm-12">
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_payment_method" />
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_amount_words" />
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_charge_collectors" />
359
+ </div>
360
+ </div>
361
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
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
+ v-model="charge.f_void_remarks" />
368
+ </div>
369
+ </div>
370
+ </article>
371
+ <footer slot="modal-footer" class="modal-footer">
372
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
373
+ </footer>
374
+ </modal>
375
+ <modal v-if="showreversal" :show.sync="showreversal" v-ref:modal :backdrop="false" title="冲正收费">
376
+ <header slot="modal-header" class="modal-header">
377
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
378
+ <h4 class="modal-title">冲正收费</h4>
379
+ </header>
380
+ <article slot="modal-body" class="modal-body clearfix">
381
+ <div class="form-group col-sm-12" v-if="false">
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
+ readonly
388
+ v-model="charge.f_useraddres" />
389
+ </div>
390
+ </div>
391
+ <div class="form-group col-sm-12">
392
+ <label class="col-sm-2 control-label">收费金额:</label>
393
+ <div class="col-sm-10">
394
+ <input type="text"
395
+ class="form-control input_view"
396
+ style="width: 100%"
397
+ readonly
398
+ v-model="charge.f_charge_money"
399
+ />
400
+ </div>
401
+ </div>
402
+ <div class="form-group col-sm-12">
403
+ <label class="col-sm-2 control-label">付款方式:</label>
404
+ <div class="col-sm-10">
405
+ <input-select
406
+ placeholder='请选择' width="100%"
407
+ v-model="charge.f_payment_method"
408
+ :value.sync="charge.f_payment_method"
409
+ :options='paymentMethod'
410
+ class="select select_list"
411
+ :value-single="true"
412
+ close-on-select ></input-select>
413
+ </div>
414
+ </div>
415
+ <div class="form-group col-sm-12">
416
+ <label class="col-sm-2 control-label">金额大写:</label>
417
+ <div class="col-sm-10">
418
+ <input type="text"
419
+ class="form-control input_view"
420
+ style="width: 100%"
421
+ readonly
422
+ v-model="charge.f_amount_words" />
423
+ </div>
424
+ </div>
425
+ <div class="form-group col-sm-12">
426
+ <label class="col-sm-2 control-label">收费人员:</label>
427
+ <div class="col-sm-10">
428
+ <input type="text"
429
+ class="form-control input_view"
430
+ style="width: 100%"
431
+ readonly
432
+ v-model="charge.f_charge_collectors" />
433
+ </div>
434
+ </div>
435
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
436
+ <label class="col-sm-2 control-label">冲正原因:</label>
437
+ <div class="col-sm-10">
438
+ <input type="text"
439
+ class="form-control input_view"
440
+ style="width: 100%"
441
+ v-model="charge.f_void_remarks" />
442
+ </div>
443
+ </div>
444
+ </article>
445
+ <footer slot="modal-footer" class="modal-footer">
446
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="reversalApplyCharge()">确认冲正</button>
447
+ </footer>
448
+ </modal>
449
+
450
+ <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
451
+ <header slot="modal-header" class="modal-header">
452
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
453
+ <h4 class="modal-title">打印预览</h4>
454
+ </header>
455
+ <article slot="modal-body" class="modal-body clearfix">
456
+ <apply-print-chargepc :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-chargepc>
457
+ </article>
458
+ <footer slot="modal-footer" class="modal-footer">
459
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
460
+ </footer>
461
+ </modal>
462
+ </div>
463
+ </template>
464
+ <script>
465
+ import {getNowDate,isEmpty} from '../../../components/Util'
466
+ import {PagedList} from 'vue-client'
467
+ import {HttpResetClass} from 'vue-client'
468
+ import Vue from 'vue'
469
+
470
+ export default {
471
+ title: '收费管理',
472
+ props: {
473
+ selectdata: {
474
+ type: Object
475
+ },
476
+ mark: {
477
+ type: Number,
478
+ default: 0
479
+ }
480
+ },
481
+ data () {
482
+ return {
483
+ showCharge: false, // 收费明细
484
+ showInvalid: false, // 作废
485
+ showreversal: false, // 冲正
486
+ showPrint: false, // 打印
487
+ model: {
488
+ data: null
489
+ }, // 记录
490
+ useraddresList: [], // 地址列表
491
+ paymentTerm: [], // 地址列表
492
+ charge: {
493
+
494
+ }
495
+ }
496
+ },
497
+ ready () {
498
+ this.search()
499
+ },
500
+ methods: {
501
+ onchangetype(row){
502
+ this.paymentTerm = this.$appdata.getParam(row)
503
+ },
504
+ //将千分位金额转换为数字
505
+ parseCurrency(str) {
506
+ // 用正则表达式移除千分位分隔符,并转换为数字
507
+ return parseFloat(str.replace(/,/g, ''));
508
+ },
509
+ //将金额转换为千分位
510
+ formatCurrency(number, decimalPlaces) {
511
+ var num = parseFloat(number);
512
+ if (!isNaN(num)) {
513
+ num = num.toFixed(decimalPlaces || 0); // 将金额保留指定位数,四舍五入
514
+ num = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); // 按照千分位进行分隔
515
+ return num;
516
+ } else {
517
+ return ''; // 如果输入框中的值不是数字,则返回空字符串
518
+ }
519
+ },
520
+ async payerNumberChange () {
521
+ if (isEmpty(this.charge.f_payer_number)) {
522
+ return
523
+ }
524
+ let http = new HttpResetClass()
525
+ let data = {
526
+ tablename: 't_charge_record',
527
+ condition: `f_payer_number = '${this.charge.f_payer_number}'`
528
+ }
529
+ let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
530
+ resolveMsg: null,
531
+ rejectMsg: '流水号查询失败!!!'
532
+ })
533
+ if (res.data.length > 0) {
534
+ this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
535
+ return
536
+ }
537
+ },
538
+ print () {
539
+ this.$refs.print.$refs.print.PrintTable()
540
+ let http = new HttpResetClass()
541
+ if (!isEmpty(this.charge.f_out_trade_no)){
542
+ this.charge.f_out_trade_no += 1
543
+ }else {
544
+ this.charge.f_out_trade_no = 0
545
+ }
546
+
547
+ http.load('post', 'rs/entity/t_charge_record', this.charge, {resolveMsg: null, rejectMsg: null})
548
+ },
549
+ showPrintModal(row) {
550
+ this.charge = row
551
+ this.showPrint = true
552
+ },
553
+ selectAddres () {
554
+ if (this.charge.useraddres) {
555
+ this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
556
+ this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
557
+ } else {
558
+ this.charge.f_cumulative_payment_money = 0
559
+ this.charge.f_outstanding_amount = this.selectdata.f_price
560
+ }
561
+ },
562
+ async invalidApplyCharge() {
563
+
564
+ let http = new HttpResetClass()
565
+ if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
566
+ if(!isEmpty(this.selectdata.f_installed_households)&& this.selectdata.f_installed_households>0){
567
+ this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
568
+ this.selectdata.f_installed_households -= parseInt(this.charge.f_installed_households)
569
+ }
570
+ }
571
+ if(this.charge.f_charge_money.includes(",")){
572
+ let money= this.parseCurrency(this.charge.f_charge_money)
573
+ this.charge.f_charge_money=money
574
+ }else{
575
+ //转为数字
576
+ let money= Number(this.charge.f_charge_money)
577
+ this.charge.f_charge_money=money
578
+ debugger
579
+ }
580
+
581
+ //将千分位金额转成数字
582
+ for (const item of this.selectdata.fields) {
583
+ if (item.percentiles) {
584
+ if(item.value.includes(",")){
585
+ let Money=this.parseCurrency(item.value)
586
+ this.selectdata[item.field]=Money
587
+ debugger
588
+ }else{
589
+ //转为数字
590
+ let Money= Number(item.value)
591
+ this.selectdata[item.field]=Money
592
+ debugger
593
+ }
594
+ }
595
+ }
596
+ let data = {
597
+ apply: this.selectdata,
598
+ user: this.$login.f,
599
+ charge: this.charge
600
+ }
601
+ let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
602
+ resolveMsg: null,
603
+ rejectMsg: '作废失败!!!'
604
+ })
605
+ this.selectdata = res.data
606
+
607
+ this.$dispatch('breakControl', this.selectdata)
608
+ },
609
+
610
+ // 打开作废收费
611
+ showInvalidModal(row) {
612
+ row.f_charge_money = this.formatCurrency(row.f_charge_money,2)
613
+ this.charge = row
614
+ this.showInvalid = true
615
+ },
616
+ showreversalModal(row) {
617
+ row.f_charge_money = this.formatCurrency(row.f_charge_money,2)
618
+ this.charge = row
619
+ this.showreversal = true
620
+ },
621
+ async reversalApplyCharge(){
622
+ let http = new HttpResetClass()
623
+ if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
624
+ if(!isEmpty(this.selectdata.f_installed_households)&& this.selectdata.f_installed_households>0){
625
+ this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
626
+ this.selectdata.f_installed_households -= parseInt(this.charge.f_installed_households)
627
+ }
628
+ }
629
+ if(this.charge.f_charge_money.includes(",")){
630
+ let money= this.parseCurrency(this.charge.f_charge_money)
631
+ this.charge.f_charge_money=money
632
+ }else{
633
+ //转为数字
634
+ let money= Number(this.charge.f_charge_money)
635
+ this.charge.f_charge_money=money
636
+ }
637
+ //将千分位金额转成数字
638
+ for (const item of this.selectdata.fields) {
639
+ if (item.percentiles) {
640
+ if(item.value.includes(",")){
641
+ let Money=this.parseCurrency(item.value)
642
+ this.selectdata[item.field]=Money
643
+ }else{
644
+ //转为数字
645
+ let Money= Number(item.value)
646
+ this.selectdata[item.field]=Money
647
+ }
648
+ }
649
+ }
650
+ let data = {
651
+ apply: this.selectdata,
652
+ user: this.$login.f,
653
+ charge: this.charge
654
+ }
655
+ let res = await http.load('POST', 'rs/logic/reversalApplyCharge', {data: data}, {
656
+ resolveMsg: null,
657
+ rejectMsg: '冲正失败!!!'
658
+ })
659
+ this.selectdata = res.data
660
+ this.$dispatch('breakControl', this.selectdata)
661
+ },
662
+ // 新增收费
663
+ async saveCharge() {
664
+ let http = new HttpResetClass()
665
+ if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
666
+ if(!isEmpty(this.selectdata.f_installed_households)){
667
+ this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
668
+ this.selectdata.f_installed_households += parseInt(this.charge.f_installed_households)
669
+ }else {
670
+ this.selectdata.f_installed_households = 0
671
+ this.selectdata.f_installed_households += parseInt(this.charge.f_installed_households)
672
+ }
673
+ }
674
+ //去掉千分位
675
+ for (const item of this.selectdata.fields) {
676
+ if (item.percentiles) {
677
+ if(item.value.includes(",")){
678
+ let Money=this.parseCurrency(item.value)
679
+ this.selectdata[item.field]=Money
680
+ }else{
681
+ //转为数字
682
+ let Money= Number(item.value)
683
+ this.selectdata[item.field]=Money
684
+ }
685
+ }
686
+ }
687
+ if(this.charge.f_charge_money.includes(",")){
688
+ this.charge.f_charge_money=this.parseCurrency(this.charge.f_charge_money)
689
+ }else{
690
+ //转为数字
691
+ let Money= Number(this.charge.f_charge_money)
692
+ this.charge.f_charge_money=Money
693
+ }
694
+ let data = {
695
+ apply: this.selectdata,
696
+ user: this.$login.f,
697
+ charge: this.charge
698
+ }
699
+
700
+ let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
701
+ resolveMsg: null,
702
+ rejectMsg: '缴费失败!!!'
703
+ })
704
+ this.selectdata = res.data
705
+
706
+ this.$dispatch('breakControl', this.selectdata)
707
+ },
708
+ moneyChange () {
709
+ /*if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
710
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
711
+ this.charge.f_charge_money = null
712
+ return
713
+ }*/
714
+ if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
715
+ this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
716
+ this.charge.f_charge_money = null
717
+ return
718
+ }
719
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
720
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
721
+ this.charge.f_charge_money = null
722
+ return
723
+ }
724
+ //
725
+ this.charge.f_charge_money = this.formatCurrency(this.charge.f_charge_money,2)
726
+ },
727
+ // 金额转大写
728
+ handleInput(e) {
729
+ // 通过正则过滤小数点后两位
730
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
731
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
732
+ },
733
+ // 金额转大写
734
+ smalltoBIG(n) {
735
+ let fraction = ['', ''];
736
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
737
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
738
+ let head = n < 0 ? '' : '';
739
+ n = Math.abs(n);
740
+
741
+ let s = '';
742
+
743
+ for (var i = 0; i < fraction.length; i++) {
744
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
745
+ }
746
+ s = s || '整';
747
+ n = Math.floor(n);
748
+
749
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
750
+ let p = '';
751
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
752
+ p = digit[n % 10] + unit[1][j] + p;
753
+ n = Math.floor(n / 10);
754
+ }
755
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
756
+ }
757
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
758
+ },
759
+ async showChargeModal() {
760
+ this.showCharge = true
761
+ },
762
+ async search () {
763
+ let http = new HttpResetClass()
764
+ let data = {
765
+ // condition: `cr.f_charge_status != '退款'`,
766
+ f_process_id: this.selectdata.f_process_id
767
+ }
768
+ let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
769
+ resolveMsg: null,
770
+ rejectMsg: '收费记录查询失败!!!'
771
+ })
772
+ this.model.data = res.data
773
+ },
774
+ // 关闭对话框
775
+ closeModal() {
776
+ this.showCharge = false
777
+ this.showInvalid = false
778
+ this.showreversal = false
779
+ this.showPrint = false
780
+ this.charge = {}
781
+ this.search()
782
+ }
783
+ },
784
+ events: {
785
+ },
786
+ computed: {
787
+ paymentMethod() {
788
+ return this.$appdata.getParam("付款方式")
789
+ },
790
+ /*paymentTerm() {
791
+ return this.$appdata.getParam("收费项目")
792
+ },*/
793
+ paymentTypes() {
794
+ return this.$appdata.getParam("报建-收费类型")
795
+ }
796
+ },
797
+ watch: {
798
+ }
799
+ }
800
+ </script>
801
+ <style scoped>
802
+ .textNoLineBreak {
803
+ white-space: nowrap;
804
+ }
805
+ .head-but{
806
+ margin-left: 5px;
807
+ height: 34px;
808
+ /*background-color: #6aa6e2;*/
809
+ border-radius: 4px;
810
+ font-family: PingFang;
811
+ color: #ffffff;
812
+ }
813
+ </style>