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,656 +1,656 @@
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.selectdata.f_cumulative_payment_money >= $parent.$parent.selectdata.f_due_money || $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
-
100
- <button
101
- type="button"
102
- name="button"
103
- class="btn btn-link"
104
- @click="$parent.$parent.showPrintModal(row)"
105
- >打印预览</button>
106
- </nobr>
107
- </td>
108
- </tr>
109
- </template>
110
- </data-grid>
111
-
112
- <validator name="v">
113
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
114
- <header slot="modal-header" class="modal-header">
115
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
116
- <h4 class="modal-title">收费明细</h4>
117
- </header>
118
- <article slot="modal-body" class="modal-body clearfix">
119
- <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
120
- <label class="col-sm-2 control-label">缴费地址:</label>
121
- <div class="col-sm-10">
122
- <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
123
- <input-select width="100%" class="select select_list" placeholder='请选择'
124
- v-model="charge.useraddres"
125
- :value.sync="charge.useraddres"
126
- :options='useraddresList'
127
- :value-single="true"
128
- @change="selectAddres()"
129
- close-on-select ></input-select>
130
- </div>
131
- </div>
132
- <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
133
- <label class="col-sm-2 control-label">收费项目:</label>
134
- <div class="col-sm-10">
135
- <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
136
- <input-select width="100%" class="select select_list" placeholder='请选择'
137
- v-model="charge.f_payment_term"
138
- :value.sync="charge.f_payment_term"
139
- :options='paymentTerm'
140
- :value-single="true"
141
- close-on-select ></input-select>
142
- </div>
143
- </div>
144
- <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
145
- <label class="col-sm-2 control-label">收费金额:</label>
146
- <div class="col-sm-10">
147
- <input type="text"
148
- class="form-control input_view"
149
- style="width: 100%"
150
- placeholder="0.00"
151
- @keyup="handleInput"
152
- @change="moneyChange"
153
- v-validate:f_charge_money = "['required']"
154
- v-model="charge.f_charge_money" />
155
- </div>
156
- </div>
157
- <div class="form-group col-sm-12" :class="[$v.f_payment_method.required ? 'has-error' : '']">
158
- <label class="col-sm-2 control-label">付款方式:</label>
159
- <div class="col-sm-10">
160
- <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
161
- <input-select
162
- placeholder='请选择' width="100%"
163
- v-model="charge.f_payment_method"
164
- :value.sync="charge.f_payment_method"
165
- :options='paymentMethod'
166
- class="select select_list"
167
- :value-single="true"
168
- close-on-select ></input-select>
169
- </div>
170
- </div>
171
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
172
- <label class="col-sm-2 control-label">付款方名称:</label>
173
- <div class="col-sm-10">
174
- <input type="text"
175
- class="form-control input_view"
176
- style="width: 100%"
177
-
178
- v-model="charge.f_payer_name" value="" />
179
- </div>
180
- </div>
181
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
182
- <label class="col-sm-2 control-label">付款方账号:</label>
183
- <div class="col-sm-10">
184
- <input type="text" style="width: 100%" class="form-control input_view"
185
-
186
- v-model="charge.f_payer_account" value=""/>
187
- </div>
188
- </div>
189
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
190
- <label class="col-sm-2 control-label">付款流水号:</label>
191
- <div class="col-sm-10">
192
- <input type="text"
193
- class="form-control input_view"
194
- style="width: 100%" @change="payerNumberChange()"
195
-
196
- v-model="charge.f_payer_number" value="" />
197
- </div>
198
- </div>
199
- <div class="form-group col-sm-12">
200
- <label class="col-sm-2 control-label">金额大写:</label>
201
- <div class="col-sm-10">
202
- <input type="text"
203
- class="form-control input_view"
204
- style="width: 100%"
205
- :value="smalltoBIG(0)"
206
- readonly
207
- v-model.sync="charge.f_amount_words" />
208
- </div>
209
- </div>
210
- <div class="form-group col-sm-12"
211
- v-if="selectdata.f_apply_type === '居民团体用户报建'&& charge.f_payment_term == '安装费'"
212
- :class="[$v.f_installed_households.required ? 'has-error' : '']"
213
- >
214
- <label class="col-sm-2 control-label">可派工数:</label>
215
- <div class="col-sm-10">
216
- <input type="text"
217
- class="form-control input_view"
218
- style="width: 100%"
219
- v-validate:f_installed_households = "['required']"
220
- v-model="charge.f_installed_households" />
221
- </div>
222
- </div>
223
- <div class="form-group col-sm-12">
224
- <label class="col-sm-2 control-label">应交总金额:</label>
225
- <div class="col-sm-10">
226
- <input type="text"
227
- class="form-control input_view"
228
- style="width: 100%"
229
- readonly
230
- v-model="selectdata.f_due_money" />
231
- </div>
232
- </div>
233
- <div class="form-group col-sm-12">
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
- readonly
240
- v-model="selectdata.f_cumulative_payment_money" />
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_surplus_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
- v-model="charge.f_charge_remarks" />
260
- </div>
261
- </div>
262
- <div class="form-group col-sm-12">
263
- <label class="col-sm-2 control-label">实际收款时间:</label>
264
- <div class="col-sm-10">
265
- <datepicker id="startDate" placeholder="实际收款时间"
266
- style="width: 60%!important;"
267
- v-model="charge.f_actual_date"
268
- :value.sync="charge.f_actual_date"
269
- :default="true"
270
- aria-required="true"
271
- :format="'yyyy-MM-dd HH:mm:ss'"
272
- :show-reset-button="true"
273
- >
274
- </datepicker>
275
- </div>
276
- </div>
277
- </article>
278
- <footer slot="modal-footer" class="modal-footer">
279
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
280
- </footer>
281
- </modal>
282
- </validator>
283
-
284
- <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
285
- <header slot="modal-header" class="modal-header">
286
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
287
- <h4 class="modal-title">作废收费</h4>
288
- </header>
289
- <article slot="modal-body" class="modal-body clearfix">
290
- <div class="form-group col-sm-12" v-if="false">
291
- <label class="col-sm-2 control-label">缴费地址:</label>
292
- <div class="col-sm-10">
293
- <input type="text"
294
- class="form-control input_view"
295
- style="width: 100%"
296
- readonly
297
- v-model="charge.f_useraddres" />
298
- </div>
299
- </div>
300
- <div class="form-group col-sm-12">
301
- <label class="col-sm-2 control-label">收费金额:</label>
302
- <div class="col-sm-10">
303
- <input type="text"
304
- class="form-control input_view"
305
- style="width: 100%"
306
- readonly
307
- v-model="charge.f_charge_money"
308
- />
309
- </div>
310
- </div>
311
- <div class="form-group col-sm-12">
312
- <label class="col-sm-2 control-label">付款方式:</label>
313
- <div class="col-sm-10">
314
- <input type="text"
315
- class="form-control input_view"
316
- style="width: 100%"
317
- readonly
318
- v-model="charge.f_payment_method" />
319
- </div>
320
- </div>
321
- <div class="form-group col-sm-12">
322
- <label class="col-sm-2 control-label">金额大写:</label>
323
- <div class="col-sm-10">
324
- <input type="text"
325
- class="form-control input_view"
326
- style="width: 100%"
327
- readonly
328
- v-model="charge.f_amount_words" />
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_charge_collectors" />
339
- </div>
340
- </div>
341
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
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
- v-model="charge.f_void_remarks" />
348
- </div>
349
- </div>
350
- </article>
351
- <footer slot="modal-footer" class="modal-footer">
352
- <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
353
- </footer>
354
- </modal>
355
-
356
- <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
357
- <header slot="modal-header" class="modal-header">
358
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
359
- <h4 class="modal-title">打印预览</h4>
360
- </header>
361
- <article slot="modal-body" class="modal-body clearfix">
362
- <apply-print-chargepc :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-chargepc>
363
- </article>
364
- <footer slot="modal-footer" class="modal-footer">
365
- <button type="button" class="btn btn-primary" @click="print()">打印</button>
366
- </footer>
367
- </modal>
368
- </div>
369
- </template>
370
- <script>
371
- import {getNowDate,isEmpty} from '../../../components/Util'
372
- import {PagedList} from 'vue-client'
373
- import {HttpResetClass} from 'vue-client'
374
- import Vue from 'vue'
375
-
376
- export default {
377
- title: '收费管理',
378
- props: {
379
- selectdata: {
380
- type: Object
381
- },
382
- mark: {
383
- type: Number,
384
- default: 0
385
- }
386
- },
387
- data () {
388
- return {
389
- showCharge: false, // 收费明细
390
- showInvalid: false, // 作废
391
- showPrint: false, // 打印
392
- model: {
393
- data: null
394
- }, // 记录
395
- useraddresList: [], // 地址列表
396
- charge: {
397
-
398
- }
399
- }
400
- },
401
- ready () {
402
- this.search()
403
- },
404
- methods: {
405
- //将千分位金额转换为数字
406
- parseCurrency(str) {
407
- // 用正则表达式移除千分位分隔符,并转换为数字
408
- return parseFloat(str.replace(/,/g, ''));
409
- },
410
- //将金额转换为千分位
411
- formatCurrency(number, decimalPlaces) {
412
- var num = parseFloat(number);
413
- if (!isNaN(num)) {
414
- num = num.toFixed(decimalPlaces || 0); // 将金额保留指定位数,四舍五入
415
- num = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); // 按照千分位进行分隔
416
- return num;
417
- } else {
418
- return ''; // 如果输入框中的值不是数字,则返回空字符串
419
- }
420
- },
421
- async payerNumberChange () {
422
- if (isEmpty(this.charge.f_payer_number)) {
423
- return
424
- }
425
- let http = new HttpResetClass()
426
- let data = {
427
- tablename: 't_charge_record',
428
- condition: `f_payer_number = '${this.charge.f_payer_number}'`
429
- }
430
- let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
431
- resolveMsg: null,
432
- rejectMsg: '流水号查询失败!!!'
433
- })
434
- if (res.data.length > 0) {
435
- this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
436
- return
437
- }
438
- },
439
- print () {
440
- this.$refs.print.$refs.print.PrintTable()
441
- },
442
- showPrintModal(row) {
443
- this.charge = row
444
- this.showPrint = true
445
- },
446
- selectAddres () {
447
- if (this.charge.useraddres) {
448
- this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
449
- this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
450
- } else {
451
- this.charge.f_cumulative_payment_money = 0
452
- this.charge.f_outstanding_amount = this.selectdata.f_price
453
- }
454
- },
455
- async invalidApplyCharge() {
456
-
457
- let http = new HttpResetClass()
458
- if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
459
- if(!isEmpty(this.selectdata.f_installed_households)&& this.selectdata.f_installed_households>0){
460
- this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
461
- this.selectdata.f_installed_households -= parseInt(this.charge.f_installed_households)
462
- }
463
- }
464
- if(this.charge.f_charge_money.includes(",")){
465
- let money= this.parseCurrency(this.charge.f_charge_money)
466
- this.charge.f_charge_money=money
467
- }else{
468
- //转为数字
469
- let money= Number(this.charge.f_charge_money)
470
- this.charge.f_charge_money=money
471
- debugger
472
- }
473
-
474
- //将千分位金额转成数字
475
- for (const item of this.selectdata.fields) {
476
- if (item.percentiles) {
477
- if(item.value.includes(",")){
478
- let Money=this.parseCurrency(item.value)
479
- this.selectdata[item.field]=Money
480
- debugger
481
- }else{
482
- //转为数字
483
- let Money= Number(item.value)
484
- this.selectdata[item.field]=Money
485
- debugger
486
- }
487
- }
488
- }
489
- let data = {
490
- apply: this.selectdata,
491
- user: this.$login.f,
492
- charge: this.charge
493
- }
494
- let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
495
- resolveMsg: null,
496
- rejectMsg: '作废失败!!!'
497
- })
498
- this.selectdata = res.data
499
-
500
- this.$dispatch('breakControl', this.selectdata)
501
- },
502
-
503
- // 打开作废收费
504
- showInvalidModal(row) {
505
- row.f_charge_money = this.formatCurrency(row.f_charge_money,2)
506
- this.charge = row
507
- this.showInvalid = true
508
- },
509
- // 新增收费
510
- async saveCharge() {
511
- let http = new HttpResetClass()
512
- if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
513
- if(!isEmpty(this.selectdata.f_installed_households)){
514
- this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
515
- this.selectdata.f_installed_households += parseInt(this.charge.f_installed_households)
516
- }else {
517
- this.selectdata.f_installed_households = 0
518
- this.selectdata.f_installed_households += parseInt(this.charge.f_installed_households)
519
- }
520
- }
521
- //去掉千分位
522
- for (const item of this.selectdata.fields) {
523
- if (item.percentiles) {
524
- if(item.value.includes(",")){
525
- let Money=this.parseCurrency(item.value)
526
- this.selectdata[item.field]=Money
527
- }else{
528
- //转为数字
529
- let Money= Number(item.value)
530
- this.selectdata[item.field]=Money
531
- }
532
- }
533
- }
534
- if(this.charge.f_charge_money.includes(",")){
535
- this.charge.f_charge_money=this.parseCurrency(this.charge.f_charge_money)
536
- }else{
537
- //转为数字
538
- let Money= Number(this.charge.f_charge_money)
539
- this.charge.f_charge_money=Money
540
- }
541
- let data = {
542
- apply: this.selectdata,
543
- user: this.$login.f,
544
- charge: this.charge
545
- }
546
-
547
- let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
548
- resolveMsg: null,
549
- rejectMsg: '缴费失败!!!'
550
- })
551
- this.selectdata = res.data
552
-
553
- this.$dispatch('breakControl', this.selectdata)
554
- },
555
- moneyChange () {
556
- if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
557
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
558
- this.charge.f_charge_money = null
559
- return
560
- }
561
- if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
562
- this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
563
- this.charge.f_charge_money = null
564
- return
565
- }
566
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
567
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
568
- this.charge.f_charge_money = null
569
- return
570
- }
571
- //
572
- this.charge.f_charge_money = this.formatCurrency(this.charge.f_charge_money,2)
573
- },
574
- // 金额转大写
575
- handleInput(e) {
576
- // 通过正则过滤小数点后两位
577
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
578
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
579
- },
580
- // 金额转大写
581
- smalltoBIG(n) {
582
- let fraction = ['角', '分'];
583
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
584
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
585
- let head = n < 0 ? '欠' : '';
586
- n = Math.abs(n);
587
-
588
- let s = '';
589
-
590
- for (var i = 0; i < fraction.length; i++) {
591
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
592
- }
593
- s = s || '整';
594
- n = Math.floor(n);
595
-
596
- for (var i = 0; i < unit[0].length && n > 0; i++) {
597
- let p = '';
598
- for (var j = 0; j < unit[1].length && n > 0; j++) {
599
- p = digit[n % 10] + unit[1][j] + p;
600
- n = Math.floor(n / 10);
601
- }
602
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
603
- }
604
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
605
- },
606
- async showChargeModal() {
607
- this.showCharge = true
608
- },
609
- async search () {
610
- let http = new HttpResetClass()
611
- let data = {
612
- // condition: `cr.f_charge_status != '退款'`,
613
- f_process_id: this.selectdata.f_process_id
614
- }
615
- let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
616
- resolveMsg: null,
617
- rejectMsg: '收费记录查询失败!!!'
618
- })
619
- this.model.data = res.data
620
- },
621
- // 关闭对话框
622
- closeModal() {
623
- this.showCharge = false
624
- this.showInvalid = false
625
- this.showPrint = false
626
- this.charge = {}
627
- this.search()
628
- }
629
- },
630
- events: {
631
- },
632
- computed: {
633
- paymentMethod() {
634
- return this.$appdata.getParam("付款方式")
635
- },
636
- paymentTerm() {
637
- return this.$appdata.getParam("收费项目")
638
- }
639
- },
640
- watch: {
641
- }
642
- }
643
- </script>
644
- <style scoped>
645
- .textNoLineBreak {
646
- white-space: nowrap;
647
- }
648
- .head-but{
649
- margin-left: 5px;
650
- height: 34px;
651
- /*background-color: #6aa6e2;*/
652
- border-radius: 4px;
653
- font-family: PingFang;
654
- color: #ffffff;
655
- }
656
- </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.selectdata.f_cumulative_payment_money >= $parent.$parent.selectdata.f_due_money || $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
+
100
+ <button
101
+ type="button"
102
+ name="button"
103
+ class="btn btn-link"
104
+ @click="$parent.$parent.showPrintModal(row)"
105
+ >打印预览</button>
106
+ </nobr>
107
+ </td>
108
+ </tr>
109
+ </template>
110
+ </data-grid>
111
+
112
+ <validator name="v">
113
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
114
+ <header slot="modal-header" class="modal-header">
115
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
116
+ <h4 class="modal-title">收费明细</h4>
117
+ </header>
118
+ <article slot="modal-body" class="modal-body clearfix">
119
+ <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
120
+ <label class="col-sm-2 control-label">缴费地址:</label>
121
+ <div class="col-sm-10">
122
+ <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
123
+ <input-select width="100%" class="select select_list" placeholder='请选择'
124
+ v-model="charge.useraddres"
125
+ :value.sync="charge.useraddres"
126
+ :options='useraddresList'
127
+ :value-single="true"
128
+ @change="selectAddres()"
129
+ close-on-select ></input-select>
130
+ </div>
131
+ </div>
132
+ <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
133
+ <label class="col-sm-2 control-label">收费项目:</label>
134
+ <div class="col-sm-10">
135
+ <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
136
+ <input-select width="100%" class="select select_list" placeholder='请选择'
137
+ v-model="charge.f_payment_term"
138
+ :value.sync="charge.f_payment_term"
139
+ :options='paymentTerm'
140
+ :value-single="true"
141
+ close-on-select ></input-select>
142
+ </div>
143
+ </div>
144
+ <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
145
+ <label class="col-sm-2 control-label">收费金额:</label>
146
+ <div class="col-sm-10">
147
+ <input type="text"
148
+ class="form-control input_view"
149
+ style="width: 100%"
150
+ placeholder="0.00"
151
+ @keyup="handleInput"
152
+ @change="moneyChange"
153
+ v-validate:f_charge_money = "['required']"
154
+ v-model="charge.f_charge_money" />
155
+ </div>
156
+ </div>
157
+ <div class="form-group col-sm-12" :class="[$v.f_payment_method.required ? 'has-error' : '']">
158
+ <label class="col-sm-2 control-label">付款方式:</label>
159
+ <div class="col-sm-10">
160
+ <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
161
+ <input-select
162
+ placeholder='请选择' width="100%"
163
+ v-model="charge.f_payment_method"
164
+ :value.sync="charge.f_payment_method"
165
+ :options='paymentMethod'
166
+ class="select select_list"
167
+ :value-single="true"
168
+ close-on-select ></input-select>
169
+ </div>
170
+ </div>
171
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
172
+ <label class="col-sm-2 control-label">付款方名称:</label>
173
+ <div class="col-sm-10">
174
+ <input type="text"
175
+ class="form-control input_view"
176
+ style="width: 100%"
177
+
178
+ v-model="charge.f_payer_name" value="" />
179
+ </div>
180
+ </div>
181
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
182
+ <label class="col-sm-2 control-label">付款方账号:</label>
183
+ <div class="col-sm-10">
184
+ <input type="text" style="width: 100%" class="form-control input_view"
185
+
186
+ v-model="charge.f_payer_account" value=""/>
187
+ </div>
188
+ </div>
189
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
190
+ <label class="col-sm-2 control-label">付款流水号:</label>
191
+ <div class="col-sm-10">
192
+ <input type="text"
193
+ class="form-control input_view"
194
+ style="width: 100%" @change="payerNumberChange()"
195
+
196
+ v-model="charge.f_payer_number" value="" />
197
+ </div>
198
+ </div>
199
+ <div class="form-group col-sm-12">
200
+ <label class="col-sm-2 control-label">金额大写:</label>
201
+ <div class="col-sm-10">
202
+ <input type="text"
203
+ class="form-control input_view"
204
+ style="width: 100%"
205
+ :value="smalltoBIG(0)"
206
+ readonly
207
+ v-model.sync="charge.f_amount_words" />
208
+ </div>
209
+ </div>
210
+ <div class="form-group col-sm-12"
211
+ v-if="selectdata.f_apply_type === '居民团体用户报建'&& charge.f_payment_term == '安装费'"
212
+ :class="[$v.f_installed_households.required ? 'has-error' : '']"
213
+ >
214
+ <label class="col-sm-2 control-label">可派工数:</label>
215
+ <div class="col-sm-10">
216
+ <input type="text"
217
+ class="form-control input_view"
218
+ style="width: 100%"
219
+ v-validate:f_installed_households = "['required']"
220
+ v-model="charge.f_installed_households" />
221
+ </div>
222
+ </div>
223
+ <div class="form-group col-sm-12">
224
+ <label class="col-sm-2 control-label">应交总金额:</label>
225
+ <div class="col-sm-10">
226
+ <input type="text"
227
+ class="form-control input_view"
228
+ style="width: 100%"
229
+ readonly
230
+ v-model="selectdata.f_due_money" />
231
+ </div>
232
+ </div>
233
+ <div class="form-group col-sm-12">
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
+ readonly
240
+ v-model="selectdata.f_cumulative_payment_money" />
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_surplus_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
+ v-model="charge.f_charge_remarks" />
260
+ </div>
261
+ </div>
262
+ <div class="form-group col-sm-12">
263
+ <label class="col-sm-2 control-label">实际收款时间:</label>
264
+ <div class="col-sm-10">
265
+ <datepicker id="startDate" placeholder="实际收款时间"
266
+ style="width: 60%!important;"
267
+ v-model="charge.f_actual_date"
268
+ :value.sync="charge.f_actual_date"
269
+ :default="true"
270
+ aria-required="true"
271
+ :format="'yyyy-MM-dd HH:mm:ss'"
272
+ :show-reset-button="true"
273
+ >
274
+ </datepicker>
275
+ </div>
276
+ </div>
277
+ </article>
278
+ <footer slot="modal-footer" class="modal-footer">
279
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
280
+ </footer>
281
+ </modal>
282
+ </validator>
283
+
284
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
285
+ <header slot="modal-header" class="modal-header">
286
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
287
+ <h4 class="modal-title">作废收费</h4>
288
+ </header>
289
+ <article slot="modal-body" class="modal-body clearfix">
290
+ <div class="form-group col-sm-12" v-if="false">
291
+ <label class="col-sm-2 control-label">缴费地址:</label>
292
+ <div class="col-sm-10">
293
+ <input type="text"
294
+ class="form-control input_view"
295
+ style="width: 100%"
296
+ readonly
297
+ v-model="charge.f_useraddres" />
298
+ </div>
299
+ </div>
300
+ <div class="form-group col-sm-12">
301
+ <label class="col-sm-2 control-label">收费金额:</label>
302
+ <div class="col-sm-10">
303
+ <input type="text"
304
+ class="form-control input_view"
305
+ style="width: 100%"
306
+ readonly
307
+ v-model="charge.f_charge_money"
308
+ />
309
+ </div>
310
+ </div>
311
+ <div class="form-group col-sm-12">
312
+ <label class="col-sm-2 control-label">付款方式:</label>
313
+ <div class="col-sm-10">
314
+ <input type="text"
315
+ class="form-control input_view"
316
+ style="width: 100%"
317
+ readonly
318
+ v-model="charge.f_payment_method" />
319
+ </div>
320
+ </div>
321
+ <div class="form-group col-sm-12">
322
+ <label class="col-sm-2 control-label">金额大写:</label>
323
+ <div class="col-sm-10">
324
+ <input type="text"
325
+ class="form-control input_view"
326
+ style="width: 100%"
327
+ readonly
328
+ v-model="charge.f_amount_words" />
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_charge_collectors" />
339
+ </div>
340
+ </div>
341
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
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
+ v-model="charge.f_void_remarks" />
348
+ </div>
349
+ </div>
350
+ </article>
351
+ <footer slot="modal-footer" class="modal-footer">
352
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
353
+ </footer>
354
+ </modal>
355
+
356
+ <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
357
+ <header slot="modal-header" class="modal-header">
358
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
359
+ <h4 class="modal-title">打印预览</h4>
360
+ </header>
361
+ <article slot="modal-body" class="modal-body clearfix">
362
+ <apply-print-chargepc :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-chargepc>
363
+ </article>
364
+ <footer slot="modal-footer" class="modal-footer">
365
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
366
+ </footer>
367
+ </modal>
368
+ </div>
369
+ </template>
370
+ <script>
371
+ import {getNowDate,isEmpty} from '../../../components/Util'
372
+ import {PagedList} from 'vue-client'
373
+ import {HttpResetClass} from 'vue-client'
374
+ import Vue from 'vue'
375
+
376
+ export default {
377
+ title: '收费管理',
378
+ props: {
379
+ selectdata: {
380
+ type: Object
381
+ },
382
+ mark: {
383
+ type: Number,
384
+ default: 0
385
+ }
386
+ },
387
+ data () {
388
+ return {
389
+ showCharge: false, // 收费明细
390
+ showInvalid: false, // 作废
391
+ showPrint: false, // 打印
392
+ model: {
393
+ data: null
394
+ }, // 记录
395
+ useraddresList: [], // 地址列表
396
+ charge: {
397
+
398
+ }
399
+ }
400
+ },
401
+ ready () {
402
+ this.search()
403
+ },
404
+ methods: {
405
+ //将千分位金额转换为数字
406
+ parseCurrency(str) {
407
+ // 用正则表达式移除千分位分隔符,并转换为数字
408
+ return parseFloat(str.replace(/,/g, ''));
409
+ },
410
+ //将金额转换为千分位
411
+ formatCurrency(number, decimalPlaces) {
412
+ var num = parseFloat(number);
413
+ if (!isNaN(num)) {
414
+ num = num.toFixed(decimalPlaces || 0); // 将金额保留指定位数,四舍五入
415
+ num = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); // 按照千分位进行分隔
416
+ return num;
417
+ } else {
418
+ return ''; // 如果输入框中的值不是数字,则返回空字符串
419
+ }
420
+ },
421
+ async payerNumberChange () {
422
+ if (isEmpty(this.charge.f_payer_number)) {
423
+ return
424
+ }
425
+ let http = new HttpResetClass()
426
+ let data = {
427
+ tablename: 't_charge_record',
428
+ condition: `f_payer_number = '${this.charge.f_payer_number}'`
429
+ }
430
+ let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
431
+ resolveMsg: null,
432
+ rejectMsg: '流水号查询失败!!!'
433
+ })
434
+ if (res.data.length > 0) {
435
+ this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
436
+ return
437
+ }
438
+ },
439
+ print () {
440
+ this.$refs.print.$refs.print.PrintTable()
441
+ },
442
+ showPrintModal(row) {
443
+ this.charge = row
444
+ this.showPrint = true
445
+ },
446
+ selectAddres () {
447
+ if (this.charge.useraddres) {
448
+ this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
449
+ this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
450
+ } else {
451
+ this.charge.f_cumulative_payment_money = 0
452
+ this.charge.f_outstanding_amount = this.selectdata.f_price
453
+ }
454
+ },
455
+ async invalidApplyCharge() {
456
+
457
+ let http = new HttpResetClass()
458
+ if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
459
+ if(!isEmpty(this.selectdata.f_installed_households)&& this.selectdata.f_installed_households>0){
460
+ this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
461
+ this.selectdata.f_installed_households -= parseInt(this.charge.f_installed_households)
462
+ }
463
+ }
464
+ if(this.charge.f_charge_money.includes(",")){
465
+ let money= this.parseCurrency(this.charge.f_charge_money)
466
+ this.charge.f_charge_money=money
467
+ }else{
468
+ //转为数字
469
+ let money= Number(this.charge.f_charge_money)
470
+ this.charge.f_charge_money=money
471
+ debugger
472
+ }
473
+
474
+ //将千分位金额转成数字
475
+ for (const item of this.selectdata.fields) {
476
+ if (item.percentiles) {
477
+ if(item.value.includes(",")){
478
+ let Money=this.parseCurrency(item.value)
479
+ this.selectdata[item.field]=Money
480
+ debugger
481
+ }else{
482
+ //转为数字
483
+ let Money= Number(item.value)
484
+ this.selectdata[item.field]=Money
485
+ debugger
486
+ }
487
+ }
488
+ }
489
+ let data = {
490
+ apply: this.selectdata,
491
+ user: this.$login.f,
492
+ charge: this.charge
493
+ }
494
+ let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
495
+ resolveMsg: null,
496
+ rejectMsg: '作废失败!!!'
497
+ })
498
+ this.selectdata = res.data
499
+
500
+ this.$dispatch('breakControl', this.selectdata)
501
+ },
502
+
503
+ // 打开作废收费
504
+ showInvalidModal(row) {
505
+ row.f_charge_money = this.formatCurrency(row.f_charge_money,2)
506
+ this.charge = row
507
+ this.showInvalid = true
508
+ },
509
+ // 新增收费
510
+ async saveCharge() {
511
+ let http = new HttpResetClass()
512
+ if (this.selectdata.f_apply_type=='居民团体用户报建' && !isEmpty(this.charge.f_installed_households)){
513
+ if(!isEmpty(this.selectdata.f_installed_households)){
514
+ this.selectdata.f_installed_households = parseInt(this.selectdata.f_installed_households)
515
+ this.selectdata.f_installed_households += parseInt(this.charge.f_installed_households)
516
+ }else {
517
+ this.selectdata.f_installed_households = 0
518
+ this.selectdata.f_installed_households += parseInt(this.charge.f_installed_households)
519
+ }
520
+ }
521
+ //去掉千分位
522
+ for (const item of this.selectdata.fields) {
523
+ if (item.percentiles) {
524
+ if(item.value.includes(",")){
525
+ let Money=this.parseCurrency(item.value)
526
+ this.selectdata[item.field]=Money
527
+ }else{
528
+ //转为数字
529
+ let Money= Number(item.value)
530
+ this.selectdata[item.field]=Money
531
+ }
532
+ }
533
+ }
534
+ if(this.charge.f_charge_money.includes(",")){
535
+ this.charge.f_charge_money=this.parseCurrency(this.charge.f_charge_money)
536
+ }else{
537
+ //转为数字
538
+ let Money= Number(this.charge.f_charge_money)
539
+ this.charge.f_charge_money=Money
540
+ }
541
+ let data = {
542
+ apply: this.selectdata,
543
+ user: this.$login.f,
544
+ charge: this.charge
545
+ }
546
+
547
+ let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
548
+ resolveMsg: null,
549
+ rejectMsg: '缴费失败!!!'
550
+ })
551
+ this.selectdata = res.data
552
+
553
+ this.$dispatch('breakControl', this.selectdata)
554
+ },
555
+ moneyChange () {
556
+ if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
557
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
558
+ this.charge.f_charge_money = null
559
+ return
560
+ }
561
+ if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
562
+ this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
563
+ this.charge.f_charge_money = null
564
+ return
565
+ }
566
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
567
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
568
+ this.charge.f_charge_money = null
569
+ return
570
+ }
571
+ //
572
+ this.charge.f_charge_money = this.formatCurrency(this.charge.f_charge_money,2)
573
+ },
574
+ // 金额转大写
575
+ handleInput(e) {
576
+ // 通过正则过滤小数点后两位
577
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
578
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
579
+ },
580
+ // 金额转大写
581
+ smalltoBIG(n) {
582
+ let fraction = ['角', '分'];
583
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
584
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
585
+ let head = n < 0 ? '欠' : '';
586
+ n = Math.abs(n);
587
+
588
+ let s = '';
589
+
590
+ for (var i = 0; i < fraction.length; i++) {
591
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
592
+ }
593
+ s = s || '整';
594
+ n = Math.floor(n);
595
+
596
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
597
+ let p = '';
598
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
599
+ p = digit[n % 10] + unit[1][j] + p;
600
+ n = Math.floor(n / 10);
601
+ }
602
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
603
+ }
604
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
605
+ },
606
+ async showChargeModal() {
607
+ this.showCharge = true
608
+ },
609
+ async search () {
610
+ let http = new HttpResetClass()
611
+ let data = {
612
+ // condition: `cr.f_charge_status != '退款'`,
613
+ f_process_id: this.selectdata.f_process_id
614
+ }
615
+ let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
616
+ resolveMsg: null,
617
+ rejectMsg: '收费记录查询失败!!!'
618
+ })
619
+ this.model.data = res.data
620
+ },
621
+ // 关闭对话框
622
+ closeModal() {
623
+ this.showCharge = false
624
+ this.showInvalid = false
625
+ this.showPrint = false
626
+ this.charge = {}
627
+ this.search()
628
+ }
629
+ },
630
+ events: {
631
+ },
632
+ computed: {
633
+ paymentMethod() {
634
+ return this.$appdata.getParam("付款方式")
635
+ },
636
+ paymentTerm() {
637
+ return this.$appdata.getParam("收费项目")
638
+ }
639
+ },
640
+ watch: {
641
+ }
642
+ }
643
+ </script>
644
+ <style scoped>
645
+ .textNoLineBreak {
646
+ white-space: nowrap;
647
+ }
648
+ .head-but{
649
+ margin-left: 5px;
650
+ height: 34px;
651
+ /*background-color: #6aa6e2;*/
652
+ border-radius: 4px;
653
+ font-family: PingFang;
654
+ color: #ffffff;
655
+ }
656
+ </style>