apply-clients 3.5.1 → 3.5.2

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 (44) hide show
  1. package/build/dev-server.js +142 -133
  2. package/package.json +118 -118
  3. package/src/App.vue +26 -21
  4. package/src/applyAndroid.js +58 -58
  5. package/src/components/android/AppSign.vue +152 -152
  6. package/src/components/android/AppTakePic.vue +181 -181
  7. package/src/components/android/Process/AppChargeList.vue +224 -224
  8. package/src/components/android/Process/AppExplorationUser.vue +508 -508
  9. package/src/components/product/Install/ContractCharge.vue +210 -210
  10. package/src/filiale/fugou/android/AppChargeManagement.vue +625 -625
  11. package/src/filiale/hongda/pc/FunctionServiceControl.vue +526 -525
  12. package/src/filiale/qianneng/android/AppExplorationUser.vue +441 -441
  13. package/src/filiale/qianneng/android/AppServiceControl.vue +1608 -1608
  14. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +685 -685
  15. package/src/filiale/qianneng/pc/ExplorationSelect.vue +492 -492
  16. package/src/filiale/qianneng/pc/FunctionServiceControl.vue +521 -521
  17. package/src/filiale/qianneng/pc/InstallInfoSelect.vue +392 -392
  18. package/src/filiale/qianneng/pc/InstallationDetails.vue +561 -561
  19. package/src/filiale/qianneng/pc/ServiceControl.vue +1351 -1340
  20. package/src/filiale/qianneng/pc/SupervisoryList.vue +344 -344
  21. package/src/filiale/qianneng/pc/SupervisoryServiceControl.vue +871 -871
  22. package/src/filiale/qianneng/pc/chargeManagement.vue +656 -656
  23. package/src/filiale/qianneng/pc/printactivatecard.vue +295 -295
  24. package/src/filiale/qianneng/pc/supplementalAgreement.vue +344 -344
  25. package/src/filiale/yangchunboneng/android/AppAddMaterialScience.vue +390 -390
  26. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +120 -120
  27. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +552 -552
  28. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +507 -507
  29. package/src/filiale/yangchunboneng/android/AppInstallationDetails.vue +492 -492
  30. package/src/filiale/yangchunboneng/android/AppOtherChargeManagement.vue +116 -116
  31. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1552 -1552
  32. package/src/filiale/yangchunboneng/android/AppTakePic.vue +181 -181
  33. package/src/filiale/yangchunboneng/android/chargesList.vue +170 -170
  34. package/src/filiale/yangchunboneng/android.js +16 -16
  35. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +496 -496
  36. package/src/filiale/yangchunboneng/pc/InstallationDetails.vue +609 -609
  37. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +1782 -1782
  38. package/src/filiale/yangchunboneng/pc/ServiceView.vue +1005 -1005
  39. package/src/filiale/yangchunboneng/pc/addMaterialScience.vue +374 -374
  40. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +960 -960
  41. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +511 -511
  42. package/src/filiale/yangchunboneng/pc/otherchargeManagement.vue +214 -214
  43. package/src/filiale/yangchunboneng/pc.js +17 -17
  44. package/src/main.js +23 -23
@@ -1,625 +1,625 @@
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">
19
- <button
20
- type="button"
21
- class="btn btn-info head-but"
22
- @click="$parent.$parent.showChargeModal()"
23
- :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)"
24
- >新增收费</button>
25
- </th>
26
- </tr>
27
- </template>
28
- <template partial='body'>
29
- <tr>
30
- <td style="text-align: center;">
31
- <nobr>{{$index+1}}</nobr>
32
- </td>
33
- <td style="text-align: center;" v-if="selectdata.f_apply_type !== '开发商集体报建'">
34
- <nobr>{{row.f_useraddres}}</nobr>
35
- </td>
36
- <td style="text-align: center;">
37
- <nobr>{{row.f_charge_number}}</nobr>
38
- </td>
39
- <td style="text-align: center;">
40
- <nobr>{{row.f_charge_money}}</nobr>
41
- </td>
42
- <td style="text-align: center;">
43
- <nobr>{{row.f_amount_words}}</nobr>
44
- </td>
45
- <td style="text-align: center;">
46
- <nobr>{{row.f_payment_term}}</nobr>
47
- </td>
48
- <td style="text-align: center;">
49
- <nobr>{{row.f_payment_method}}</nobr>
50
- </td>
51
- <td style="text-align: center;">
52
- <nobr>{{row.f_charge_collectors}}</nobr>
53
- </td>
54
- <td style="text-align: center;">
55
- <nobr>{{row.f_charge_date}}</nobr>
56
- </td>
57
- <td style="text-align: center;">
58
- <nobr>{{row.f_actual_date}}</nobr>
59
- </td>
60
- <td style="text-align: center;">
61
- <nobr>{{row.f_charge_remarks}}</nobr>
62
- </td>
63
- <td style="text-align: center;">
64
- <nobr>{{row.f_charge_status}}</nobr>
65
- </td>
66
- <td style="text-align: center;">
67
- <nobr v-if="row.f_charge_status !== '退款'">
68
- <button
69
- type="button"
70
- name="button"
71
- class="btn btn-link"
72
- :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
73
- @click="$parent.$parent.showInvalidModal(row)"
74
- >作废</button>
75
- </nobr>
76
- </td>
77
- </tr>
78
- </template>
79
- </data-grid>
80
-
81
- <validator name="v">
82
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
83
- <header slot="modal-header" class="modal-header">
84
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
85
- <h4 class="modal-title">收费明细</h4>
86
- </header>
87
- <article slot="modal-body" class="modal-body clearfix">
88
- <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
89
- <label class="col-sm-2 control-label">缴费地址:</label>
90
- <div class="col-sm-10">
91
- <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
92
- <input-select width="100%" class="select select_list" placeholder='请选择'
93
- v-model="charge.useraddres"
94
- :value.sync="charge.useraddres"
95
- :options='useraddresList'
96
- :value-single="true"
97
- @change="selectAddres()"
98
- close-on-select ></input-select>
99
- </div>
100
- </div>
101
- <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
102
- <label class="col-sm-2 control-label">收费项目:</label>
103
- <div class="col-sm-10">
104
- <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
105
- <input-select width="100%" class="select select_list" placeholder='请选择'
106
- v-model="charge.f_payment_term"
107
- :value.sync="charge.f_payment_term"
108
- :options='paymentTerm'
109
- :value-single="true"
110
- close-on-select ></input-select>
111
- </div>
112
- </div>
113
- <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
114
- <label class="col-sm-2 control-label">收费金额:</label>
115
- <div class="col-sm-10">
116
- <input type="text"
117
- class="form-control input_view"
118
- style="width: 100%"
119
- placeholder="0.00"
120
- @keyup="handleInput"
121
- @change="moneyChange"
122
- v-validate:f_charge_money = "['required']"
123
- v-model="charge.f_charge_money" />
124
- </div>
125
- </div>
126
- <div class="form-group col-sm-12" :class="[$v.f_payment_method.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.f_payment_method" v-validate:f_payment_method = "['required']" >
130
- <input-select
131
- placeholder='请选择' width="100%"
132
- v-model="charge.f_payment_method"
133
- :value.sync="charge.f_payment_method"
134
- :options='paymentMethod'
135
- class="select select_list"
136
- :value-single="true"
137
- @change="changePaymentMethod()"
138
- close-on-select ></input-select>
139
- </div>
140
- </div>
141
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
142
- <label class="col-sm-2 control-label">付款方名称:</label>
143
- <div class="col-sm-10">
144
- <input type="text"
145
- class="form-control input_view"
146
- style="width: 100%"
147
- v-validate:f_payer_name = "['required']"
148
- v-model="charge.f_payer_name" value="" />
149
- </div>
150
- </div>
151
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
152
- <label class="col-sm-2 control-label">付款方账号:</label>
153
- <div class="col-sm-10">
154
- <input type="text" style="width: 100%" class="form-control input_view"
155
- v-validate:f_payer_account = "['required']"
156
- v-model="charge.f_payer_account" value=""/>
157
- </div>
158
- </div>
159
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
160
- <label class="col-sm-2 control-label">付款流水号:</label>
161
- <div class="col-sm-10">
162
- <input type="text"
163
- class="form-control input_view"
164
- style="width: 100%" @change="payerNumberChange()"
165
- v-validate:f_payer_number = "['required']"
166
- v-model="charge.f_payer_number" value="" />
167
- </div>
168
- </div>
169
- <div class="form-group col-sm-12">
170
- <label class="col-sm-2 control-label">金额大写:</label>
171
- <div class="col-sm-10">
172
- <input type="text"
173
- class="form-control input_view"
174
- style="width: 100%"
175
- :value="smalltoBIG(0)"
176
- readonly
177
- v-model.sync="charge.f_amount_words" />
178
- </div>
179
- </div>
180
- <div class="form-group col-sm-12"
181
- v-if="selectdata.f_apply_type === '散户集体报建'"
182
- >
183
- <label class="col-sm-2 control-label">单价(户):</label>
184
- <div class="col-sm-10">
185
- <input type="text"
186
- class="form-control input_view"
187
- style="width: 100%"
188
- readonly
189
- v-model="selectdata.f_price" />
190
- </div>
191
- </div>
192
- <div class="form-group col-sm-12"
193
- v-if="selectdata.f_apply_type === '散户集体报建'"
194
- >
195
- <label class="col-sm-2 control-label">累计缴费金额:</label>
196
- <div class="col-sm-10">
197
- <input type="text"
198
- class="form-control input_view"
199
- style="width: 100%"
200
- readonly
201
- v-model="charge.f_cumulative_payment_money"
202
- :value="charge.f_cumulative_payment_money || 0" />
203
- </div>
204
- </div>
205
- <div class="form-group col-sm-12"
206
- v-if="selectdata.f_apply_type === '散户集体报建'"
207
- >
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%"
213
- readonly
214
- v-model="charge.f_outstanding_amount"
215
- :value="charge.f_outstanding_amount || 0" />
216
- </div>
217
- </div>
218
- <div class="form-group col-sm-12">
219
- <label class="col-sm-2 control-label">应交总金额:</label>
220
- <div class="col-sm-10">
221
- <input type="text"
222
- class="form-control input_view"
223
- style="width: 100%"
224
- readonly
225
- v-model="selectdata.f_due_money" />
226
- </div>
227
- </div>
228
- <div class="form-group col-sm-12">
229
- <label class="col-sm-2 control-label">累计缴费总金额:</label>
230
- <div class="col-sm-10">
231
- <input type="text"
232
- class="form-control input_view"
233
- style="width: 100%"
234
- readonly
235
- v-model="selectdata.f_cumulative_payment_money" />
236
- </div>
237
- </div>
238
- <div class="form-group col-sm-12">
239
- <label class="col-sm-2 control-label">未结总金额:</label>
240
- <div class="col-sm-10">
241
- <input type="text"
242
- class="form-control input_view"
243
- style="width: 100%"
244
- readonly
245
- v-model="selectdata.f_surplus_money" />
246
- </div>
247
- </div>
248
- <div class="form-group col-sm-12">
249
- <label class="col-sm-2 control-label">备注:</label>
250
- <div class="col-sm-10">
251
- <input type="text"
252
- class="form-control input_view"
253
- style="width: 100%"
254
- v-model="charge.f_charge_remarks" />
255
- </div>
256
- </div>
257
- <div class="form-group col-sm-12">
258
- <label class="col-sm-2 control-label">实际收款时间:</label>
259
- <div class="col-sm-10">
260
- <datepicker id="startDate" placeholder="实际收款时间"
261
- style="width: 60%!important;"
262
- v-model="charge.f_actual_date"
263
- :value.sync="charge.f_actual_date"
264
- :format="'yyyy-MM-dd HH:mm:ss'"
265
- :show-reset-button="true"
266
- >
267
- </datepicker>
268
- </div>
269
- </div>
270
- </article>
271
- <footer slot="modal-footer" class="modal-footer">
272
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
273
- </footer>
274
- </modal>
275
- </validator>
276
-
277
- <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
278
- <header slot="modal-header" class="modal-header">
279
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
280
- <h4 class="modal-title">作废收费</h4>
281
- </header>
282
- <article slot="modal-body" class="modal-body clearfix">
283
- <div class="form-group col-sm-12" v-if="false">
284
- <label class="col-sm-2 control-label">缴费地址:</label>
285
- <div class="col-sm-10">
286
- <input type="text"
287
- class="form-control input_view"
288
- style="width: 100%"
289
- readonly
290
- v-model="charge.f_useraddres" />
291
- </div>
292
- </div>
293
- <div class="form-group col-sm-12">
294
- <label class="col-sm-2 control-label">收费金额:</label>
295
- <div class="col-sm-10">
296
- <input type="text"
297
- class="form-control input_view"
298
- style="width: 100%"
299
- readonly
300
- v-model="charge.f_charge_money" />
301
- </div>
302
- </div>
303
- <div class="form-group col-sm-12">
304
- <label class="col-sm-2 control-label">付款方式:</label>
305
- <div class="col-sm-10">
306
- <input type="text"
307
- class="form-control input_view"
308
- style="width: 100%"
309
- readonly
310
- v-model="charge.f_payment_method" />
311
- </div>
312
- </div>
313
- <div class="form-group col-sm-12">
314
- <label class="col-sm-2 control-label">金额大写:</label>
315
- <div class="col-sm-10">
316
- <input type="text"
317
- class="form-control input_view"
318
- style="width: 100%"
319
- readonly
320
- v-model="charge.f_amount_words" />
321
- </div>
322
- </div>
323
- <div class="form-group col-sm-12">
324
- <label class="col-sm-2 control-label">收费人员:</label>
325
- <div class="col-sm-10">
326
- <input type="text"
327
- class="form-control input_view"
328
- style="width: 100%"
329
- readonly
330
- v-model="charge.f_charge_collectors" />
331
- </div>
332
- </div>
333
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
334
- <label class="col-sm-2 control-label">作废原因:</label>
335
- <div class="col-sm-10">
336
- <input type="text"
337
- class="form-control input_view"
338
- style="width: 100%"
339
- v-model="charge.f_void_remarks" />
340
- </div>
341
- </div>
342
- </article>
343
- <footer slot="modal-footer" class="modal-footer">
344
- <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
345
- </footer>
346
- </modal>
347
-
348
- <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
349
- <header slot="modal-header" class="modal-header">
350
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
351
- <h4 class="modal-title">打印预览</h4>
352
- </header>
353
- <article slot="modal-body" class="modal-body clearfix">
354
- <apply-print-chargepc :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-chargepc>
355
- </article>
356
- <footer slot="modal-footer" class="modal-footer">
357
- <button type="button" class="btn btn-primary" @click="print()">打印</button>
358
- </footer>
359
- </modal>
360
- </div>
361
- </template>
362
- <script>
363
- import {getNowDate,isEmpty} from '../../../components/Util'
364
- import {PagedList} from 'vue-client'
365
- import {HttpResetClass} from 'vue-client'
366
- import Vue from 'vue'
367
-
368
- export default {
369
- title: '收费管理',
370
- props: {
371
- selectdata: {
372
- type: Object
373
- },
374
- mark: {
375
- type: Number,
376
- default: 0
377
- }
378
- },
379
- data () {
380
- return {
381
- showCharge: false, // 收费明细
382
- showInvalid: false, // 作废
383
- showPrint: false, // 打印
384
- model: {
385
- data: null
386
- }, // 记录
387
- useraddresList: [], // 地址列表
388
- charge: {
389
-
390
- }
391
- }
392
- },
393
- ready () {
394
- this.search()
395
- },
396
- methods: {
397
- async payerNumberChange () {
398
- if (isEmpty(this.charge.f_payer_number)) {
399
- return
400
- }
401
- let http = new HttpResetClass()
402
- let data = {
403
- tablename: 't_charge_record',
404
- condition: `f_payer_number = '${this.charge.f_payer_number}'`
405
- }
406
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
407
- resolveMsg: null,
408
- rejectMsg: '流水号查询失败!!!'
409
- })
410
- if (res.data.length > 0) {
411
- this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
412
- return
413
- }
414
- },
415
- print () {
416
- this.$refs.print.$refs.print.PrintTable()
417
- },
418
- showPrintModal(row) {
419
- this.charge = row
420
- this.showPrint = true
421
- },
422
- selectAddres () {
423
- if (this.charge.useraddres) {
424
- this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
425
- this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
426
- } else {
427
- this.charge.f_cumulative_payment_money = 0
428
- this.charge.f_outstanding_amount = this.selectdata.f_price
429
- }
430
- },
431
- async invalidApplyCharge() {
432
-
433
- let http = new HttpResetClass()
434
- let data = {
435
- apply: this.selectdata,
436
- user: Vue.user,
437
- charge: this.charge
438
- }
439
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/invalidApplyCharge`, {data:data}, {
440
- resolveMsg: null,
441
- rejectMsg: '作废失败!!!'
442
- })
443
- this.selectdata = res.data
444
-
445
- this.$dispatch('breakControl', this.selectdata)
446
- },
447
-
448
- // 打开作废收费
449
- showInvalidModal(row) {
450
- this.charge = row
451
- this.showInvalid = true
452
- },
453
- // 新增收费
454
- async saveCharge() {
455
- let http = new HttpResetClass()
456
- let data = {
457
- apply: this.selectdata,
458
- user: Vue.user,
459
- charge: this.charge
460
- }
461
-
462
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/addApplyChargeRecord`, {data:data}, {
463
- resolveMsg: null,
464
- rejectMsg: '缴费失败!!!'
465
- })
466
- this.selectdata = res.data
467
-
468
- this.$dispatch('breakControl', this.selectdata)
469
- },
470
- moneyChange () {
471
- if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
472
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
473
- this.charge.f_charge_money = null
474
- return
475
- }
476
- if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
477
- this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
478
- this.charge.f_charge_money = null
479
- return
480
- }
481
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
482
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
483
- this.charge.f_charge_money = null
484
- return
485
- }
486
- },
487
- // 金额转大写
488
- handleInput(e) {
489
- // 通过正则过滤小数点后两位
490
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
491
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
492
- },
493
- // 金额转大写
494
- smalltoBIG(n) {
495
- let fraction = ['角', '分'];
496
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
497
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
498
- let head = n < 0 ? '欠' : '';
499
- n = Math.abs(n);
500
-
501
- let s = '';
502
-
503
- for (var i = 0; i < fraction.length; i++) {
504
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
505
- }
506
- s = s || '整';
507
- n = Math.floor(n);
508
-
509
- for (var i = 0; i < unit[0].length && n > 0; i++) {
510
- let p = '';
511
- for (var j = 0; j < unit[1].length && n > 0; j++) {
512
- p = digit[n % 10] + unit[1][j] + p;
513
- n = Math.floor(n / 10);
514
- }
515
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
516
- }
517
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
518
- },
519
- async changePaymentMethod () {
520
- if (this.charge.f_payment_method === '银行转账' && this.selectdata.f_apply_type === '团购报建') {
521
- let http = new HttpResetClass()
522
- let data = {
523
- tablename: 't_dev_info',
524
- condition: `f_orgid = '${Vue.user.orgid}' and id = '${this.selectdata.f_dev_id}'`
525
- }
526
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
527
- resolveMsg: null,
528
- rejectMsg: '开发商档案查询失败!!!'
529
- })
530
-
531
- this.charge.f_payer_name = res.data[0].f_dev_name
532
- this.charge.f_payer_account = res.data[0].f_bank_account
533
- }
534
- },
535
- async getUserAddress() {
536
- let http = new HttpResetClass()
537
- let data = {}
538
- let url = null
539
- if (this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
540
- data = {
541
- condition: `ui.f_userinfo_id = ${this.selectdata.f_userinfo_id}`
542
- }
543
- url = `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetUserinfos`
544
- } else {
545
- data = {
546
- condition: this.selectdata.f_apply_type === '散户集体报建' ? `nvl(cr.f_cumulative_payment_money, 0) < ${this.selectdata.f_price}` : '1=1',
547
- f_process_id: this.selectdata.f_process_id
548
- }
549
- url = `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndCumulativePayment`
550
- }
551
- let res = await http.load('POST', url, {data:data}, {
552
- resolveMsg: null,
553
- rejectMsg: '用户获取失败!!!'
554
- })
555
-
556
- if (res.data.length <= 0) {
557
- this.$showAlert('暂无需要缴费用户!!!', 'warning', 3000)
558
- }
559
-
560
- this.useraddresList = res.data.map(item => {
561
- return {
562
- // 有用户姓名地址后拼接姓名
563
- label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
564
- value: item
565
- }
566
- })
567
-
568
- },
569
- async showChargeModal() {
570
- this.getUserAddress()
571
-
572
- if (this.selectdata.f_apply_type === '团购报建') {
573
- this.charge.f_dev_info_id = this.selectdata.f_dev_id
574
- }
575
-
576
- this.showCharge = true
577
- },
578
- async search () {
579
- let http = new HttpResetClass()
580
- let data = {
581
- // condition: `cr.f_charge_status != '退款'`,
582
- f_process_id: this.selectdata.f_process_id
583
- }
584
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyChargeRecord`, {data:data}, {
585
- resolveMsg: null,
586
- rejectMsg: '收费记录查询失败!!!'
587
- })
588
- this.model.data = res.data
589
- },
590
- // 关闭对话框
591
- closeModal() {
592
- this.showCharge = false
593
- this.showInvalid = false
594
- this.showPrint = false
595
- this.charge = {}
596
- this.search()
597
- }
598
- },
599
- events: {
600
- },
601
- computed: {
602
- paymentMethod() {
603
- return this.$appdata.getParam("付款方式")
604
- },
605
- paymentTerm() {
606
- return this.$appdata.getParam("收费项目")
607
- }
608
- },
609
- watch: {
610
- }
611
- }
612
- </script>
613
- <style scoped>
614
- .textNoLineBreak {
615
- white-space: nowrap;
616
- }
617
- .head-but{
618
- margin-left: 5px;
619
- height: 34px;
620
- /*background-color: #6aa6e2;*/
621
- border-radius: 4px;
622
- font-family: PingFang;
623
- color: #ffffff;
624
- }
625
- </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">
19
+ <button
20
+ type="button"
21
+ class="btn btn-info head-but"
22
+ @click="$parent.$parent.showChargeModal()"
23
+ :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)"
24
+ >新增收费</button>
25
+ </th>
26
+ </tr>
27
+ </template>
28
+ <template partial='body'>
29
+ <tr>
30
+ <td style="text-align: center;">
31
+ <nobr>{{$index+1}}</nobr>
32
+ </td>
33
+ <td style="text-align: center;" v-if="selectdata.f_apply_type !== '开发商集体报建'">
34
+ <nobr>{{row.f_useraddres}}</nobr>
35
+ </td>
36
+ <td style="text-align: center;">
37
+ <nobr>{{row.f_charge_number}}</nobr>
38
+ </td>
39
+ <td style="text-align: center;">
40
+ <nobr>{{row.f_charge_money}}</nobr>
41
+ </td>
42
+ <td style="text-align: center;">
43
+ <nobr>{{row.f_amount_words}}</nobr>
44
+ </td>
45
+ <td style="text-align: center;">
46
+ <nobr>{{row.f_payment_term}}</nobr>
47
+ </td>
48
+ <td style="text-align: center;">
49
+ <nobr>{{row.f_payment_method}}</nobr>
50
+ </td>
51
+ <td style="text-align: center;">
52
+ <nobr>{{row.f_charge_collectors}}</nobr>
53
+ </td>
54
+ <td style="text-align: center;">
55
+ <nobr>{{row.f_charge_date}}</nobr>
56
+ </td>
57
+ <td style="text-align: center;">
58
+ <nobr>{{row.f_actual_date}}</nobr>
59
+ </td>
60
+ <td style="text-align: center;">
61
+ <nobr>{{row.f_charge_remarks}}</nobr>
62
+ </td>
63
+ <td style="text-align: center;">
64
+ <nobr>{{row.f_charge_status}}</nobr>
65
+ </td>
66
+ <td style="text-align: center;">
67
+ <nobr v-if="row.f_charge_status !== '退款'">
68
+ <button
69
+ type="button"
70
+ name="button"
71
+ class="btn btn-link"
72
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
73
+ @click="$parent.$parent.showInvalidModal(row)"
74
+ >作废</button>
75
+ </nobr>
76
+ </td>
77
+ </tr>
78
+ </template>
79
+ </data-grid>
80
+
81
+ <validator name="v">
82
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
83
+ <header slot="modal-header" class="modal-header">
84
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
85
+ <h4 class="modal-title">收费明细</h4>
86
+ </header>
87
+ <article slot="modal-body" class="modal-body clearfix">
88
+ <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
89
+ <label class="col-sm-2 control-label">缴费地址:</label>
90
+ <div class="col-sm-10">
91
+ <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
92
+ <input-select width="100%" class="select select_list" placeholder='请选择'
93
+ v-model="charge.useraddres"
94
+ :value.sync="charge.useraddres"
95
+ :options='useraddresList'
96
+ :value-single="true"
97
+ @change="selectAddres()"
98
+ close-on-select ></input-select>
99
+ </div>
100
+ </div>
101
+ <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
102
+ <label class="col-sm-2 control-label">收费项目:</label>
103
+ <div class="col-sm-10">
104
+ <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
105
+ <input-select width="100%" class="select select_list" placeholder='请选择'
106
+ v-model="charge.f_payment_term"
107
+ :value.sync="charge.f_payment_term"
108
+ :options='paymentTerm'
109
+ :value-single="true"
110
+ close-on-select ></input-select>
111
+ </div>
112
+ </div>
113
+ <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
114
+ <label class="col-sm-2 control-label">收费金额:</label>
115
+ <div class="col-sm-10">
116
+ <input type="text"
117
+ class="form-control input_view"
118
+ style="width: 100%"
119
+ placeholder="0.00"
120
+ @keyup="handleInput"
121
+ @change="moneyChange"
122
+ v-validate:f_charge_money = "['required']"
123
+ v-model="charge.f_charge_money" />
124
+ </div>
125
+ </div>
126
+ <div class="form-group col-sm-12" :class="[$v.f_payment_method.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.f_payment_method" v-validate:f_payment_method = "['required']" >
130
+ <input-select
131
+ placeholder='请选择' width="100%"
132
+ v-model="charge.f_payment_method"
133
+ :value.sync="charge.f_payment_method"
134
+ :options='paymentMethod'
135
+ class="select select_list"
136
+ :value-single="true"
137
+ @change="changePaymentMethod()"
138
+ close-on-select ></input-select>
139
+ </div>
140
+ </div>
141
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
142
+ <label class="col-sm-2 control-label">付款方名称:</label>
143
+ <div class="col-sm-10">
144
+ <input type="text"
145
+ class="form-control input_view"
146
+ style="width: 100%"
147
+ v-validate:f_payer_name = "['required']"
148
+ v-model="charge.f_payer_name" value="" />
149
+ </div>
150
+ </div>
151
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
152
+ <label class="col-sm-2 control-label">付款方账号:</label>
153
+ <div class="col-sm-10">
154
+ <input type="text" style="width: 100%" class="form-control input_view"
155
+ v-validate:f_payer_account = "['required']"
156
+ v-model="charge.f_payer_account" value=""/>
157
+ </div>
158
+ </div>
159
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
160
+ <label class="col-sm-2 control-label">付款流水号:</label>
161
+ <div class="col-sm-10">
162
+ <input type="text"
163
+ class="form-control input_view"
164
+ style="width: 100%" @change="payerNumberChange()"
165
+ v-validate:f_payer_number = "['required']"
166
+ v-model="charge.f_payer_number" value="" />
167
+ </div>
168
+ </div>
169
+ <div class="form-group col-sm-12">
170
+ <label class="col-sm-2 control-label">金额大写:</label>
171
+ <div class="col-sm-10">
172
+ <input type="text"
173
+ class="form-control input_view"
174
+ style="width: 100%"
175
+ :value="smalltoBIG(0)"
176
+ readonly
177
+ v-model.sync="charge.f_amount_words" />
178
+ </div>
179
+ </div>
180
+ <div class="form-group col-sm-12"
181
+ v-if="selectdata.f_apply_type === '散户集体报建'"
182
+ >
183
+ <label class="col-sm-2 control-label">单价(户):</label>
184
+ <div class="col-sm-10">
185
+ <input type="text"
186
+ class="form-control input_view"
187
+ style="width: 100%"
188
+ readonly
189
+ v-model="selectdata.f_price" />
190
+ </div>
191
+ </div>
192
+ <div class="form-group col-sm-12"
193
+ v-if="selectdata.f_apply_type === '散户集体报建'"
194
+ >
195
+ <label class="col-sm-2 control-label">累计缴费金额:</label>
196
+ <div class="col-sm-10">
197
+ <input type="text"
198
+ class="form-control input_view"
199
+ style="width: 100%"
200
+ readonly
201
+ v-model="charge.f_cumulative_payment_money"
202
+ :value="charge.f_cumulative_payment_money || 0" />
203
+ </div>
204
+ </div>
205
+ <div class="form-group col-sm-12"
206
+ v-if="selectdata.f_apply_type === '散户集体报建'"
207
+ >
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%"
213
+ readonly
214
+ v-model="charge.f_outstanding_amount"
215
+ :value="charge.f_outstanding_amount || 0" />
216
+ </div>
217
+ </div>
218
+ <div class="form-group col-sm-12">
219
+ <label class="col-sm-2 control-label">应交总金额:</label>
220
+ <div class="col-sm-10">
221
+ <input type="text"
222
+ class="form-control input_view"
223
+ style="width: 100%"
224
+ readonly
225
+ v-model="selectdata.f_due_money" />
226
+ </div>
227
+ </div>
228
+ <div class="form-group col-sm-12">
229
+ <label class="col-sm-2 control-label">累计缴费总金额:</label>
230
+ <div class="col-sm-10">
231
+ <input type="text"
232
+ class="form-control input_view"
233
+ style="width: 100%"
234
+ readonly
235
+ v-model="selectdata.f_cumulative_payment_money" />
236
+ </div>
237
+ </div>
238
+ <div class="form-group col-sm-12">
239
+ <label class="col-sm-2 control-label">未结总金额:</label>
240
+ <div class="col-sm-10">
241
+ <input type="text"
242
+ class="form-control input_view"
243
+ style="width: 100%"
244
+ readonly
245
+ v-model="selectdata.f_surplus_money" />
246
+ </div>
247
+ </div>
248
+ <div class="form-group col-sm-12">
249
+ <label class="col-sm-2 control-label">备注:</label>
250
+ <div class="col-sm-10">
251
+ <input type="text"
252
+ class="form-control input_view"
253
+ style="width: 100%"
254
+ v-model="charge.f_charge_remarks" />
255
+ </div>
256
+ </div>
257
+ <div class="form-group col-sm-12">
258
+ <label class="col-sm-2 control-label">实际收款时间:</label>
259
+ <div class="col-sm-10">
260
+ <datepicker id="startDate" placeholder="实际收款时间"
261
+ style="width: 60%!important;"
262
+ v-model="charge.f_actual_date"
263
+ :value.sync="charge.f_actual_date"
264
+ :format="'yyyy-MM-dd HH:mm:ss'"
265
+ :show-reset-button="true"
266
+ >
267
+ </datepicker>
268
+ </div>
269
+ </div>
270
+ </article>
271
+ <footer slot="modal-footer" class="modal-footer">
272
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
273
+ </footer>
274
+ </modal>
275
+ </validator>
276
+
277
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
278
+ <header slot="modal-header" class="modal-header">
279
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
280
+ <h4 class="modal-title">作废收费</h4>
281
+ </header>
282
+ <article slot="modal-body" class="modal-body clearfix">
283
+ <div class="form-group col-sm-12" v-if="false">
284
+ <label class="col-sm-2 control-label">缴费地址:</label>
285
+ <div class="col-sm-10">
286
+ <input type="text"
287
+ class="form-control input_view"
288
+ style="width: 100%"
289
+ readonly
290
+ v-model="charge.f_useraddres" />
291
+ </div>
292
+ </div>
293
+ <div class="form-group col-sm-12">
294
+ <label class="col-sm-2 control-label">收费金额:</label>
295
+ <div class="col-sm-10">
296
+ <input type="text"
297
+ class="form-control input_view"
298
+ style="width: 100%"
299
+ readonly
300
+ v-model="charge.f_charge_money" />
301
+ </div>
302
+ </div>
303
+ <div class="form-group col-sm-12">
304
+ <label class="col-sm-2 control-label">付款方式:</label>
305
+ <div class="col-sm-10">
306
+ <input type="text"
307
+ class="form-control input_view"
308
+ style="width: 100%"
309
+ readonly
310
+ v-model="charge.f_payment_method" />
311
+ </div>
312
+ </div>
313
+ <div class="form-group col-sm-12">
314
+ <label class="col-sm-2 control-label">金额大写:</label>
315
+ <div class="col-sm-10">
316
+ <input type="text"
317
+ class="form-control input_view"
318
+ style="width: 100%"
319
+ readonly
320
+ v-model="charge.f_amount_words" />
321
+ </div>
322
+ </div>
323
+ <div class="form-group col-sm-12">
324
+ <label class="col-sm-2 control-label">收费人员:</label>
325
+ <div class="col-sm-10">
326
+ <input type="text"
327
+ class="form-control input_view"
328
+ style="width: 100%"
329
+ readonly
330
+ v-model="charge.f_charge_collectors" />
331
+ </div>
332
+ </div>
333
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
334
+ <label class="col-sm-2 control-label">作废原因:</label>
335
+ <div class="col-sm-10">
336
+ <input type="text"
337
+ class="form-control input_view"
338
+ style="width: 100%"
339
+ v-model="charge.f_void_remarks" />
340
+ </div>
341
+ </div>
342
+ </article>
343
+ <footer slot="modal-footer" class="modal-footer">
344
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
345
+ </footer>
346
+ </modal>
347
+
348
+ <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
349
+ <header slot="modal-header" class="modal-header">
350
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
351
+ <h4 class="modal-title">打印预览</h4>
352
+ </header>
353
+ <article slot="modal-body" class="modal-body clearfix">
354
+ <apply-print-chargepc :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-chargepc>
355
+ </article>
356
+ <footer slot="modal-footer" class="modal-footer">
357
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
358
+ </footer>
359
+ </modal>
360
+ </div>
361
+ </template>
362
+ <script>
363
+ import {getNowDate,isEmpty} from '../../../components/Util'
364
+ import {PagedList} from 'vue-client'
365
+ import {HttpResetClass} from 'vue-client'
366
+ import Vue from 'vue'
367
+
368
+ export default {
369
+ title: '收费管理',
370
+ props: {
371
+ selectdata: {
372
+ type: Object
373
+ },
374
+ mark: {
375
+ type: Number,
376
+ default: 0
377
+ }
378
+ },
379
+ data () {
380
+ return {
381
+ showCharge: false, // 收费明细
382
+ showInvalid: false, // 作废
383
+ showPrint: false, // 打印
384
+ model: {
385
+ data: null
386
+ }, // 记录
387
+ useraddresList: [], // 地址列表
388
+ charge: {
389
+
390
+ }
391
+ }
392
+ },
393
+ ready () {
394
+ this.search()
395
+ },
396
+ methods: {
397
+ async payerNumberChange () {
398
+ if (isEmpty(this.charge.f_payer_number)) {
399
+ return
400
+ }
401
+ let http = new HttpResetClass()
402
+ let data = {
403
+ tablename: 't_charge_record',
404
+ condition: `f_payer_number = '${this.charge.f_payer_number}'`
405
+ }
406
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
407
+ resolveMsg: null,
408
+ rejectMsg: '流水号查询失败!!!'
409
+ })
410
+ if (res.data.length > 0) {
411
+ this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
412
+ return
413
+ }
414
+ },
415
+ print () {
416
+ this.$refs.print.$refs.print.PrintTable()
417
+ },
418
+ showPrintModal(row) {
419
+ this.charge = row
420
+ this.showPrint = true
421
+ },
422
+ selectAddres () {
423
+ if (this.charge.useraddres) {
424
+ this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
425
+ this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
426
+ } else {
427
+ this.charge.f_cumulative_payment_money = 0
428
+ this.charge.f_outstanding_amount = this.selectdata.f_price
429
+ }
430
+ },
431
+ async invalidApplyCharge() {
432
+
433
+ let http = new HttpResetClass()
434
+ let data = {
435
+ apply: this.selectdata,
436
+ user: Vue.user,
437
+ charge: this.charge
438
+ }
439
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/invalidApplyCharge`, {data:data}, {
440
+ resolveMsg: null,
441
+ rejectMsg: '作废失败!!!'
442
+ })
443
+ this.selectdata = res.data
444
+
445
+ this.$dispatch('breakControl', this.selectdata)
446
+ },
447
+
448
+ // 打开作废收费
449
+ showInvalidModal(row) {
450
+ this.charge = row
451
+ this.showInvalid = true
452
+ },
453
+ // 新增收费
454
+ async saveCharge() {
455
+ let http = new HttpResetClass()
456
+ let data = {
457
+ apply: this.selectdata,
458
+ user: Vue.user,
459
+ charge: this.charge
460
+ }
461
+
462
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/addApplyChargeRecord`, {data:data}, {
463
+ resolveMsg: null,
464
+ rejectMsg: '缴费失败!!!'
465
+ })
466
+ this.selectdata = res.data
467
+
468
+ this.$dispatch('breakControl', this.selectdata)
469
+ },
470
+ moneyChange () {
471
+ if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
472
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
473
+ this.charge.f_charge_money = null
474
+ return
475
+ }
476
+ if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
477
+ this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
478
+ this.charge.f_charge_money = null
479
+ return
480
+ }
481
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
482
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
483
+ this.charge.f_charge_money = null
484
+ return
485
+ }
486
+ },
487
+ // 金额转大写
488
+ handleInput(e) {
489
+ // 通过正则过滤小数点后两位
490
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
491
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
492
+ },
493
+ // 金额转大写
494
+ smalltoBIG(n) {
495
+ let fraction = ['角', '分'];
496
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
497
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
498
+ let head = n < 0 ? '欠' : '';
499
+ n = Math.abs(n);
500
+
501
+ let s = '';
502
+
503
+ for (var i = 0; i < fraction.length; i++) {
504
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
505
+ }
506
+ s = s || '整';
507
+ n = Math.floor(n);
508
+
509
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
510
+ let p = '';
511
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
512
+ p = digit[n % 10] + unit[1][j] + p;
513
+ n = Math.floor(n / 10);
514
+ }
515
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
516
+ }
517
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
518
+ },
519
+ async changePaymentMethod () {
520
+ if (this.charge.f_payment_method === '银行转账' && this.selectdata.f_apply_type === '团购报建') {
521
+ let http = new HttpResetClass()
522
+ let data = {
523
+ tablename: 't_dev_info',
524
+ condition: `f_orgid = '${Vue.user.orgid}' and id = '${this.selectdata.f_dev_id}'`
525
+ }
526
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
527
+ resolveMsg: null,
528
+ rejectMsg: '开发商档案查询失败!!!'
529
+ })
530
+
531
+ this.charge.f_payer_name = res.data[0].f_dev_name
532
+ this.charge.f_payer_account = res.data[0].f_bank_account
533
+ }
534
+ },
535
+ async getUserAddress() {
536
+ let http = new HttpResetClass()
537
+ let data = {}
538
+ let url = null
539
+ if (this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
540
+ data = {
541
+ condition: `ui.f_userinfo_id = ${this.selectdata.f_userinfo_id}`
542
+ }
543
+ url = `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetUserinfos`
544
+ } else {
545
+ data = {
546
+ condition: this.selectdata.f_apply_type === '散户集体报建' ? `nvl(cr.f_cumulative_payment_money, 0) < ${this.selectdata.f_price}` : '1=1',
547
+ f_process_id: this.selectdata.f_process_id
548
+ }
549
+ url = `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndCumulativePayment`
550
+ }
551
+ let res = await http.load('POST', url, {data:data}, {
552
+ resolveMsg: null,
553
+ rejectMsg: '用户获取失败!!!'
554
+ })
555
+
556
+ if (res.data.length <= 0) {
557
+ this.$showAlert('暂无需要缴费用户!!!', 'warning', 3000)
558
+ }
559
+
560
+ this.useraddresList = res.data.map(item => {
561
+ return {
562
+ // 有用户姓名地址后拼接姓名
563
+ label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
564
+ value: item
565
+ }
566
+ })
567
+
568
+ },
569
+ async showChargeModal() {
570
+ this.getUserAddress()
571
+
572
+ if (this.selectdata.f_apply_type === '团购报建') {
573
+ this.charge.f_dev_info_id = this.selectdata.f_dev_id
574
+ }
575
+
576
+ this.showCharge = true
577
+ },
578
+ async search () {
579
+ let http = new HttpResetClass()
580
+ let data = {
581
+ // condition: `cr.f_charge_status != '退款'`,
582
+ f_process_id: this.selectdata.f_process_id
583
+ }
584
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyChargeRecord`, {data:data}, {
585
+ resolveMsg: null,
586
+ rejectMsg: '收费记录查询失败!!!'
587
+ })
588
+ this.model.data = res.data
589
+ },
590
+ // 关闭对话框
591
+ closeModal() {
592
+ this.showCharge = false
593
+ this.showInvalid = false
594
+ this.showPrint = false
595
+ this.charge = {}
596
+ this.search()
597
+ }
598
+ },
599
+ events: {
600
+ },
601
+ computed: {
602
+ paymentMethod() {
603
+ return this.$appdata.getParam("付款方式")
604
+ },
605
+ paymentTerm() {
606
+ return this.$appdata.getParam("收费项目")
607
+ }
608
+ },
609
+ watch: {
610
+ }
611
+ }
612
+ </script>
613
+ <style scoped>
614
+ .textNoLineBreak {
615
+ white-space: nowrap;
616
+ }
617
+ .head-but{
618
+ margin-left: 5px;
619
+ height: 34px;
620
+ /*background-color: #6aa6e2;*/
621
+ border-radius: 4px;
622
+ font-family: PingFang;
623
+ color: #ffffff;
624
+ }
625
+ </style>