apply-clients 3.2.32 → 3.2.37

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 (37) hide show
  1. package/package.json +1 -1
  2. package/src/AndroidApp.vue +26 -26
  3. package/src/App.vue +20 -20
  4. package/src/apply.js +67 -67
  5. package/src/applyAndroid.js +24 -24
  6. package/src/components/Util.js +359 -359
  7. package/src/components/app_apply/AppOnetomany.vue +90 -90
  8. package/src/components/app_apply/AppServiceView.vue +664 -664
  9. package/src/components/app_apply/AppTakePic.vue +112 -112
  10. package/src/components/app_apply/Process/AppExplorationUser.vue +310 -310
  11. package/src/components/app_apply/Process/AppServiceControl.vue +409 -409
  12. package/src/components/app_apply/Process/Processes/AppInstallationDetails.vue +456 -456
  13. package/src/components/app_apply/Supervisory/AppProcessSupervisory.vue +300 -300
  14. package/src/components/app_apply/Supervisory/AppSupervisoryCart.vue +121 -121
  15. package/src/components/product/ApplyCharge/ApplyChargeList.vue +251 -251
  16. package/src/components/product/ApplyCharge/ApplyChargeReport.vue +107 -107
  17. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +30 -30
  18. package/src/components/product/Function/InstallFunction.vue +147 -147
  19. package/src/components/product/Function/InstallInfoSelect.vue +281 -281
  20. package/src/components/product/Function/Service/FunctionServiceControl.vue +245 -245
  21. package/src/components/product/Function/StopApplyCrrdList.vue +176 -176
  22. package/src/components/product/Function/functions/StopInstall.vue +106 -106
  23. package/src/components/product/Process/ExplorationSelect.vue +346 -346
  24. package/src/components/product/Process/ExplorationUser.vue +134 -134
  25. package/src/components/product/Process/Processes/InstallationDetails.vue +243 -233
  26. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +201 -201
  27. package/src/components/product/Process/Processes/chargeManagement.vue +555 -555
  28. package/src/components/product/Process/Processes/printCharge.vue +133 -133
  29. package/src/components/product/Process/Processes/supplementalAgreement.vue +297 -297
  30. package/src/components/product/Process/ShowBackReason.vue +32 -32
  31. package/src/components/product/ServiceView.vue +759 -759
  32. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +199 -199
  33. package/src/components/product/Supervisory/SupervisoryControl.vue +119 -119
  34. package/src/components/product/Supervisory/SupervisoryList.vue +208 -208
  35. package/src/components/product/Supervisory/SupervisoryhCart.vue +103 -103
  36. package/src/components/product/VueUtils/ApplyUpload.vue +261 -261
  37. package/src/main.js +23 -23
@@ -1,555 +1,555 @@
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="$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'">地址</th>
8
- <th class="textNoLineBreak">缴费编号</th>
9
- <th class="textNoLineBreak">收费金额</th>
10
- <th class="textNoLineBreak">金额大写</th>
11
- <th class="textNoLineBreak">付款方式</th>
12
- <th class="textNoLineBreak">收费人员</th>
13
- <th class="textNoLineBreak">收费日期</th>
14
- <th class="textNoLineBreak">备注</th>
15
- <th class="textNoLineBreak">缴费状态</th>
16
- <th class="textNoLineBreak">作废人员</th>
17
- <th class="textNoLineBreak">作废时间</th>
18
- <th class="textNoLineBreak">作废原因</th>
19
- <th class="textNoLineBreak">
20
- <button
21
- type="button"
22
- class="btn btn-info head-but"
23
- @click="$parent.$parent.showChargeModal()"
24
- :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)"
25
- >新增收费</button>
26
- </th>
27
- </tr>
28
- </template>
29
- <template partial='body'>
30
- <tr>
31
- <td style="text-align: center;">
32
- <nobr>{{$index+1}}</nobr>
33
- </td>
34
- <td style="text-align: center;" v-if="$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'">
35
- <nobr>{{row.f_useraddress}}</nobr>
36
- </td>
37
- <td style="text-align: center;">
38
- <nobr>{{row.f_charge_number}}</nobr>
39
- </td>
40
- <td style="text-align: center;">
41
- <nobr>{{row.f_charge_money}}</nobr>
42
- </td>
43
- <td style="text-align: center;">
44
- <nobr>{{row.f_amount_words}}</nobr>
45
- </td>
46
- <td style="text-align: center;">
47
- <nobr>{{row.f_payment_method}}</nobr>
48
- </td>
49
- <td style="text-align: center;">
50
- <nobr>{{row.f_charge_collectors}}</nobr>
51
- </td>
52
- <td style="text-align: center;">
53
- <nobr>{{row.f_charge_date}}</nobr>
54
- </td>
55
- <td style="text-align: center;">
56
- <nobr>{{row.f_charge_remarks}}</nobr>
57
- </td>
58
- <td style="text-align: center;">
59
- <nobr>{{row.f_charging_status}}</nobr>
60
- </td>
61
- <td style="text-align: center;">
62
- <nobr>{{row.f_void_staff}}</nobr>
63
- </td>
64
- <td style="text-align: center;">
65
- <nobr>{{row.f_void_date}}</nobr>
66
- </td>
67
- <td style="text-align: center;">
68
- <nobr>{{row.f_void_remarks}}</nobr>
69
- </td>
70
- <td style="text-align: center;">
71
- <nobr>
72
- <button
73
- type="button"
74
- name="button"
75
- class="btn btn-link"
76
- :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
77
- @click="$parent.$parent.showInvalidModal(row)"
78
- >作废</button>
79
-
80
- <button
81
- type="button"
82
- name="button"
83
- class="btn btn-link"
84
- @click="$parent.$parent.showPrintModal(row)"
85
- >打印预览</button>
86
- </nobr>
87
- </td>
88
- </tr>
89
- </template>
90
- </data-grid>
91
-
92
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
93
- <header slot="modal-header" class="modal-header">
94
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
95
- <h4 class="modal-title">收费明细</h4>
96
- </header>
97
- <article slot="modal-body" class="modal-body clearfix">
98
- <div class="form-group col-sm-12" :class="chargeUseraddress ? '':'has-error'" v-if="selectdata.f_apply_type !== '开发商集体报建'">
99
- <label class="col-sm-2 control-label">缴费地址:</label>
100
- <div class="col-sm-10">
101
- <input-select
102
- v-model="chargeUseraddress"
103
- placeholder='请选择'
104
- :value.sync="chargeUseraddress"
105
- :options='useraddressList'
106
- @change="changeUseraddress()"
107
- class="select select_list"
108
- :value-single="true"
109
- width="100%"
110
- close-on-select ></input-select>
111
- </div>
112
- </div>
113
- <div class="form-group col-sm-12" :class="charge.f_charge_money ? '':'has-error'">
114
- <label class="col-sm-2 control-label">收费金额:</label>
115
- <div class="col-sm-10">
116
- <input type="number"
117
- class="form-control input_view"
118
- style="width: 100%"
119
- placeholder="0.00"
120
- @keyup="handleInput"
121
- v-model="charge.f_charge_money" />
122
- </div>
123
- </div>
124
- <div class="form-group col-sm-12" :class="charge.f_payment_method ? '':'has-error'">
125
- <label class="col-sm-2 control-label">付款方式:</label>
126
- <div class="col-sm-10">
127
- <input-select
128
- v-model="charge.f_payment_method"
129
- placeholder='请选择'
130
- :value.sync="charge.f_payment_method"
131
- :options='paymentMethod'
132
- class="select select_list"
133
- :value-single="true"
134
- width="100%"
135
- close-on-select ></input-select>
136
- </div>
137
- </div>
138
- <div class="form-group col-sm-12">
139
- <label class="col-sm-2 control-label">金额大写:</label>
140
- <div class="col-sm-10">
141
- <input type="text"
142
- class="form-control input_view"
143
- style="width: 100%"
144
- :value="smalltoBIG(0)"
145
- readonly
146
- v-model.sync="charge.f_amount_words" />
147
- </div>
148
- </div>
149
- <div class="form-group col-sm-12"
150
- v-if="selectdata.f_apply_type === '散户集体报建' || selectdata.f_apply_type === '煤改气报建'"
151
- >
152
- <label class="col-sm-2 control-label">单价(户):</label>
153
- <div class="col-sm-10">
154
- <input type="text"
155
- class="form-control input_view"
156
- style="width: 100%"
157
- readonly
158
- v-model="selectdata.f_price" />
159
- </div>
160
- </div>
161
- <div class="form-group col-sm-12"
162
- v-if="selectdata.f_apply_type === '散户集体报建' || selectdata.f_apply_type === '煤改气报建'"
163
- >
164
- <label class="col-sm-2 control-label">累计缴费金额:</label>
165
- <div class="col-sm-10">
166
- <input type="text"
167
- class="form-control input_view"
168
- style="width: 100%"
169
- readonly
170
- :value="cumulativePaymentMoney" />
171
- </div>
172
- </div>
173
- <div class="form-group col-sm-12"
174
- v-if="selectdata.f_apply_type === '散户集体报建' || selectdata.f_apply_type === '煤改气报建'"
175
- >
176
- <label class="col-sm-2 control-label">未结金额:</label>
177
- <div class="col-sm-10">
178
- <input type="text"
179
- class="form-control input_view"
180
- style="width: 100%"
181
- readonly
182
- :value="outstandingAmount" />
183
- </div>
184
- </div>
185
- <div class="form-group col-sm-12">
186
- <label class="col-sm-2 control-label">应交总金额:</label>
187
- <div class="col-sm-10">
188
- <input type="text"
189
- class="form-control input_view"
190
- style="width: 100%"
191
- readonly
192
- v-model="selectdata.f_due_money" />
193
- </div>
194
- </div>
195
- <div class="form-group col-sm-12">
196
- <label class="col-sm-2 control-label">累计缴费总金额:</label>
197
- <div class="col-sm-10">
198
- <input type="text"
199
- class="form-control input_view"
200
- style="width: 100%"
201
- readonly
202
- v-model="selectdata.f_cumulative_payment_money" />
203
- </div>
204
- </div>
205
- <div class="form-group col-sm-12">
206
- <label class="col-sm-2 control-label">未结总金额:</label>
207
- <div class="col-sm-10">
208
- <input type="text"
209
- class="form-control input_view"
210
- style="width: 100%"
211
- readonly
212
- v-model="selectdata.f_surplus_money" />
213
- </div>
214
- </div>
215
- <div class="form-group col-sm-12">
216
- <label class="col-sm-2 control-label">备注:</label>
217
- <div class="col-sm-10">
218
- <input type="text"
219
- class="form-control input_view"
220
- style="width: 100%"
221
- v-model="charge.f_charge_remarks" />
222
- </div>
223
- </div>
224
- </article>
225
- <footer slot="modal-footer" class="modal-footer">
226
- <button type="button" class="btn btn-primary" @click="saveCharge()">新增收费</button>
227
- </footer>
228
- </modal>
229
-
230
- <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废收费">
231
- <header slot="modal-header" class="modal-header">
232
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
233
- <h4 class="modal-title">作废收费</h4>
234
- </header>
235
- <article slot="modal-body" class="modal-body clearfix">
236
- <div class="form-group col-sm-12" v-if="selectdata.f_apply_type !== '开发商集体报建'">
237
- <label class="col-sm-2 control-label">缴费地址:</label>
238
- <div class="col-sm-10">
239
- <input type="text"
240
- class="form-control input_view"
241
- style="width: 100%"
242
- readonly
243
- v-model="charge.f_useraddress" />
244
- </div>
245
- </div>
246
- <div class="form-group col-sm-12">
247
- <label class="col-sm-2 control-label">收费金额:</label>
248
- <div class="col-sm-10">
249
- <input type="text"
250
- class="form-control input_view"
251
- style="width: 100%"
252
- readonly
253
- v-model="charge.f_charge_money" />
254
- </div>
255
- </div>
256
- <div class="form-group col-sm-12">
257
- <label class="col-sm-2 control-label">付款方式:</label>
258
- <div class="col-sm-10">
259
- <input type="text"
260
- class="form-control input_view"
261
- style="width: 100%"
262
- readonly
263
- v-model="charge.f_payment_method" />
264
- </div>
265
- </div>
266
- <div class="form-group col-sm-12">
267
- <label class="col-sm-2 control-label">金额大写:</label>
268
- <div class="col-sm-10">
269
- <input type="text"
270
- class="form-control input_view"
271
- style="width: 100%"
272
- readonly
273
- v-model="charge.f_amount_words" />
274
- </div>
275
- </div>
276
- <div class="form-group col-sm-12">
277
- <label class="col-sm-2 control-label">收费人员:</label>
278
- <div class="col-sm-10">
279
- <input type="text"
280
- class="form-control input_view"
281
- style="width: 100%"
282
- readonly
283
- v-model="charge.f_charge_collectors" />
284
- </div>
285
- </div>
286
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
287
- <label class="col-sm-2 control-label">作废原因:</label>
288
- <div class="col-sm-10">
289
- <input type="text"
290
- class="form-control input_view"
291
- style="width: 100%"
292
- v-model="charge.f_void_remarks" />
293
- </div>
294
- </div>
295
- </article>
296
- <footer slot="modal-footer" class="modal-footer">
297
- <button type="button" class="btn btn-primary" @click="invalidApplyCharge()">确认作废</button>
298
- </footer>
299
- </modal>
300
-
301
- <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
302
- <header slot="modal-header" class="modal-header">
303
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
304
- <h4 class="modal-title">打印预览</h4>
305
- </header>
306
- <article slot="modal-body" class="modal-body clearfix">
307
- <apply-print-charge :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-charge>
308
- </article>
309
- <footer slot="modal-footer" class="modal-footer">
310
- <button type="button" class="btn btn-primary" @click="print()">打印</button>
311
- </footer>
312
- </modal>
313
- </div>
314
- </template>
315
- <script>
316
- import {getNowDate,isEmpty} from '../../../Util'
317
- import {PagedList} from 'vue-client'
318
- import {HttpResetClass} from 'vue-client'
319
-
320
- export default {
321
- title: '收费管理',
322
- props: {
323
- selectdata: {
324
- type: Object
325
- },
326
- mark: {
327
- type: Number,
328
- default: 0
329
- }
330
- },
331
- data () {
332
- return {
333
- showCharge: false,
334
- showInvalid: false,
335
- showPrint: false,
336
- model: {
337
- data: null
338
- },
339
- charge: {
340
-
341
- },
342
- useraddressList: [],
343
- chargeUseraddress: null
344
- }
345
- },
346
- ready () {
347
- this.search()
348
- },
349
- methods: {
350
- print () {
351
- this.$refs.print.showInput = false
352
- setTimeout(() => {
353
- this.$refs.print.$refs.print.PrintTable()
354
- }, 10)
355
- },
356
- showPrintModal(row) {
357
- this.charge = row
358
- this.showPrint = true
359
- },
360
- changeUseraddress() {
361
- this.charge.f_useraddress_id = this.chargeUseraddress.id
362
- },
363
- async invalidApplyCharge() {
364
- if (isEmpty(this.charge.f_void_remarks)) {
365
- this.$showAlert('请输入作废本次收费原因!!!', 'warning', 3000)
366
- return
367
- }
368
-
369
- let http = new HttpResetClass()
370
- let data = {
371
- apply: this.selectdata,
372
- user: this.$login.f,
373
- charge: this.charge
374
- }
375
- try {
376
- let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
377
- resolveMsg: null,
378
- rejectMsg: null
379
- })
380
- this.selectdata = res.data
381
- } catch (e) {
382
- this.$showAlert(e.data, 'danger', 3000)
383
- }
384
-
385
-
386
- this.$dispatch('breakControl', this.selectdata)
387
- },
388
- showInvalidModal(row) {
389
- this.charge = row
390
- this.showInvalid = true
391
- },
392
- handleInput(e) {
393
- // 通过正则过滤小数点后两位
394
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
395
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
396
- },
397
- async saveCharge() {
398
- if (isEmpty(this.charge.f_useraddress_id) && this.selectdata.f_apply_type !== '开发商集体报建') {
399
- this.$showAlert('请选择缴费的地址信息!!!', 'warning', 3000)
400
- return
401
- }
402
- if (Number(this.charge.f_charge_money) === 0 || isEmpty(this.charge.f_charge_money)) {
403
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
404
- return
405
- }
406
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
407
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
408
- return
409
- }
410
- if (this.selectdata.f_apply_type === '散户集体报建' || this.selectdata.f_apply_type === '煤改气报建') {
411
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_price)) {
412
- this.$showAlert('单笔收费不能超过单价!!!', 'warning', 3000)
413
- return
414
- }
415
- if (Number(this.charge.f_charge_money) > Number(this.outstandingAmount)) {
416
- this.$showAlert('单笔收费不能超过当前用户未结金额!!!', 'warning', 3000)
417
- return
418
- }
419
- }
420
- if (isEmpty(this.charge.f_payment_method)) {
421
- this.$showAlert('请选择付款方式!!!', 'warning', 3000)
422
- return
423
- }
424
- let http = new HttpResetClass()
425
- let data = {
426
- apply: this.selectdata,
427
- user: this.$login.f,
428
- charge: this.charge
429
- }
430
- try {
431
- let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
432
- resolveMsg: null,
433
- rejectMsg: null
434
- })
435
- this.selectdata = res.data
436
- } catch (e) {
437
- this.$showAlert(e.data, 'danger', 3000)
438
- }
439
-
440
-
441
- this.$dispatch('breakControl', this.selectdata)
442
- },
443
- // 金额转大写
444
- smalltoBIG(n) {
445
- let fraction = ['角', '分'];
446
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
447
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
448
- let head = n < 0 ? '欠' : '';
449
- n = Math.abs(n);
450
-
451
- let s = '';
452
-
453
- for (var i = 0; i < fraction.length; i++) {
454
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
455
- }
456
- s = s || '整';
457
- n = Math.floor(n);
458
-
459
- for (var i = 0; i < unit[0].length && n > 0; i++) {
460
- let p = '';
461
- for (var j = 0; j < unit[1].length && n > 0; j++) {
462
- p = digit[n % 10] + unit[1][j] + p;
463
- n = Math.floor(n / 10);
464
- }
465
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
466
- }
467
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
468
- },
469
- async getUserAddress() {
470
- let http = new HttpResetClass()
471
- let data = {
472
- condition: '1=1',
473
- f_process_id: this.selectdata.f_process_id
474
- }
475
- let res = await http.load('POST', 'rs/sql/getAddresAndCumulativePayment', {data:data}, {
476
- resolveMsg: null,
477
- rejectMsg: null
478
- })
479
-
480
- this.useraddressList = res.data
481
- if (this.selectdata.f_apply_type === '散户集体报建' || this.selectdata.f_apply_type === '煤改气报建') {
482
- // 去除累计缴费金额大于等于单价的用户地址
483
- this.useraddressList = res.data.filter(item => {
484
- let f_cumulative_payment_money = isEmpty(item.f_cumulative_payment_money) ? 0 : item.f_cumulative_payment_money
485
- return Number(f_cumulative_payment_money) < Number(isEmpty(this.selectdata.f_price) ? 0 : this.selectdata.f_price)
486
- })
487
- }
488
-
489
- if (this.useraddressList.length > 0) {
490
- this.useraddressList = this.useraddressList.map(item => {
491
- return {
492
- // 有用户姓名地址后拼接姓名
493
- label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
494
- value: item
495
- }
496
- })
497
- }
498
-
499
- },
500
- async showChargeModal() {
501
- this.getUserAddress()
502
-
503
- this.showCharge = true
504
- },
505
- async search () {
506
- let http = new HttpResetClass()
507
- let data = {
508
- f_process_id: this.selectdata.f_process_id
509
- }
510
- let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
511
- resolveMsg: null,
512
- rejectMsg: null
513
- })
514
- this.model.data = res.data
515
- },
516
- // 关闭对话框
517
- closeModal() {
518
- this.showCharge = false
519
- this.showInvalid = false
520
- this.showPrint = false
521
- this.charge = {}
522
- this.chargeUseraddress = null
523
- this.search()
524
- }
525
- },
526
- events: {
527
- },
528
- computed: {
529
- paymentMethod() {
530
- return this.$appdata.getParam("付款方式")
531
- },
532
- cumulativePaymentMoney() {
533
- return isEmpty(this.chargeUseraddress.f_cumulative_payment_money) ? 0 : this.chargeUseraddress.f_cumulative_payment_money
534
- },
535
- outstandingAmount() {
536
- return this.selectdata.f_price - this.cumulativePaymentMoney
537
- }
538
- },
539
- watch: {
540
- }
541
- }
542
- </script>
543
- <style scoped>
544
- .textNoLineBreak {
545
- white-space: nowrap;
546
- }
547
- .head-but{
548
- margin-left: 5px;
549
- height: 34px;
550
- /*background-color: #6aa6e2;*/
551
- border-radius: 4px;
552
- font-family: PingFang;
553
- color: #ffffff;
554
- }
555
- </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="$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'">地址</th>
8
+ <th class="textNoLineBreak">缴费编号</th>
9
+ <th class="textNoLineBreak">收费金额</th>
10
+ <th class="textNoLineBreak">金额大写</th>
11
+ <th class="textNoLineBreak">付款方式</th>
12
+ <th class="textNoLineBreak">收费人员</th>
13
+ <th class="textNoLineBreak">收费日期</th>
14
+ <th class="textNoLineBreak">备注</th>
15
+ <th class="textNoLineBreak">缴费状态</th>
16
+ <th class="textNoLineBreak">作废人员</th>
17
+ <th class="textNoLineBreak">作废时间</th>
18
+ <th class="textNoLineBreak">作废原因</th>
19
+ <th class="textNoLineBreak">
20
+ <button
21
+ type="button"
22
+ class="btn btn-info head-but"
23
+ @click="$parent.$parent.showChargeModal()"
24
+ :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)"
25
+ >新增收费</button>
26
+ </th>
27
+ </tr>
28
+ </template>
29
+ <template partial='body'>
30
+ <tr>
31
+ <td style="text-align: center;">
32
+ <nobr>{{$index+1}}</nobr>
33
+ </td>
34
+ <td style="text-align: center;" v-if="$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'">
35
+ <nobr>{{row.f_useraddress}}</nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{row.f_charge_number}}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr>{{row.f_charge_money}}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>{{row.f_amount_words}}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <nobr>{{row.f_payment_method}}</nobr>
48
+ </td>
49
+ <td style="text-align: center;">
50
+ <nobr>{{row.f_charge_collectors}}</nobr>
51
+ </td>
52
+ <td style="text-align: center;">
53
+ <nobr>{{row.f_charge_date}}</nobr>
54
+ </td>
55
+ <td style="text-align: center;">
56
+ <nobr>{{row.f_charge_remarks}}</nobr>
57
+ </td>
58
+ <td style="text-align: center;">
59
+ <nobr>{{row.f_charging_status}}</nobr>
60
+ </td>
61
+ <td style="text-align: center;">
62
+ <nobr>{{row.f_void_staff}}</nobr>
63
+ </td>
64
+ <td style="text-align: center;">
65
+ <nobr>{{row.f_void_date}}</nobr>
66
+ </td>
67
+ <td style="text-align: center;">
68
+ <nobr>{{row.f_void_remarks}}</nobr>
69
+ </td>
70
+ <td style="text-align: center;">
71
+ <nobr>
72
+ <button
73
+ type="button"
74
+ name="button"
75
+ class="btn btn-link"
76
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
77
+ @click="$parent.$parent.showInvalidModal(row)"
78
+ >作废</button>
79
+
80
+ <button
81
+ type="button"
82
+ name="button"
83
+ class="btn btn-link"
84
+ @click="$parent.$parent.showPrintModal(row)"
85
+ >打印预览</button>
86
+ </nobr>
87
+ </td>
88
+ </tr>
89
+ </template>
90
+ </data-grid>
91
+
92
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
93
+ <header slot="modal-header" class="modal-header">
94
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
95
+ <h4 class="modal-title">收费明细</h4>
96
+ </header>
97
+ <article slot="modal-body" class="modal-body clearfix">
98
+ <div class="form-group col-sm-12" :class="chargeUseraddress ? '':'has-error'" v-if="selectdata.f_apply_type !== '开发商集体报建'">
99
+ <label class="col-sm-2 control-label">缴费地址:</label>
100
+ <div class="col-sm-10">
101
+ <input-select
102
+ v-model="chargeUseraddress"
103
+ placeholder='请选择'
104
+ :value.sync="chargeUseraddress"
105
+ :options='useraddressList'
106
+ @change="changeUseraddress()"
107
+ class="select select_list"
108
+ :value-single="true"
109
+ width="100%"
110
+ close-on-select ></input-select>
111
+ </div>
112
+ </div>
113
+ <div class="form-group col-sm-12" :class="charge.f_charge_money ? '':'has-error'">
114
+ <label class="col-sm-2 control-label">收费金额:</label>
115
+ <div class="col-sm-10">
116
+ <input type="number"
117
+ class="form-control input_view"
118
+ style="width: 100%"
119
+ placeholder="0.00"
120
+ @keyup="handleInput"
121
+ v-model="charge.f_charge_money" />
122
+ </div>
123
+ </div>
124
+ <div class="form-group col-sm-12" :class="charge.f_payment_method ? '':'has-error'">
125
+ <label class="col-sm-2 control-label">付款方式:</label>
126
+ <div class="col-sm-10">
127
+ <input-select
128
+ v-model="charge.f_payment_method"
129
+ placeholder='请选择'
130
+ :value.sync="charge.f_payment_method"
131
+ :options='paymentMethod'
132
+ class="select select_list"
133
+ :value-single="true"
134
+ width="100%"
135
+ close-on-select ></input-select>
136
+ </div>
137
+ </div>
138
+ <div class="form-group col-sm-12">
139
+ <label class="col-sm-2 control-label">金额大写:</label>
140
+ <div class="col-sm-10">
141
+ <input type="text"
142
+ class="form-control input_view"
143
+ style="width: 100%"
144
+ :value="smalltoBIG(0)"
145
+ readonly
146
+ v-model.sync="charge.f_amount_words" />
147
+ </div>
148
+ </div>
149
+ <div class="form-group col-sm-12"
150
+ v-if="selectdata.f_apply_type === '散户集体报建' || selectdata.f_apply_type === '煤改气报建'"
151
+ >
152
+ <label class="col-sm-2 control-label">单价(户):</label>
153
+ <div class="col-sm-10">
154
+ <input type="text"
155
+ class="form-control input_view"
156
+ style="width: 100%"
157
+ readonly
158
+ v-model="selectdata.f_price" />
159
+ </div>
160
+ </div>
161
+ <div class="form-group col-sm-12"
162
+ v-if="selectdata.f_apply_type === '散户集体报建' || selectdata.f_apply_type === '煤改气报建'"
163
+ >
164
+ <label class="col-sm-2 control-label">累计缴费金额:</label>
165
+ <div class="col-sm-10">
166
+ <input type="text"
167
+ class="form-control input_view"
168
+ style="width: 100%"
169
+ readonly
170
+ :value="cumulativePaymentMoney" />
171
+ </div>
172
+ </div>
173
+ <div class="form-group col-sm-12"
174
+ v-if="selectdata.f_apply_type === '散户集体报建' || selectdata.f_apply_type === '煤改气报建'"
175
+ >
176
+ <label class="col-sm-2 control-label">未结金额:</label>
177
+ <div class="col-sm-10">
178
+ <input type="text"
179
+ class="form-control input_view"
180
+ style="width: 100%"
181
+ readonly
182
+ :value="outstandingAmount" />
183
+ </div>
184
+ </div>
185
+ <div class="form-group col-sm-12">
186
+ <label class="col-sm-2 control-label">应交总金额:</label>
187
+ <div class="col-sm-10">
188
+ <input type="text"
189
+ class="form-control input_view"
190
+ style="width: 100%"
191
+ readonly
192
+ v-model="selectdata.f_due_money" />
193
+ </div>
194
+ </div>
195
+ <div class="form-group col-sm-12">
196
+ <label class="col-sm-2 control-label">累计缴费总金额:</label>
197
+ <div class="col-sm-10">
198
+ <input type="text"
199
+ class="form-control input_view"
200
+ style="width: 100%"
201
+ readonly
202
+ v-model="selectdata.f_cumulative_payment_money" />
203
+ </div>
204
+ </div>
205
+ <div class="form-group col-sm-12">
206
+ <label class="col-sm-2 control-label">未结总金额:</label>
207
+ <div class="col-sm-10">
208
+ <input type="text"
209
+ class="form-control input_view"
210
+ style="width: 100%"
211
+ readonly
212
+ v-model="selectdata.f_surplus_money" />
213
+ </div>
214
+ </div>
215
+ <div class="form-group col-sm-12">
216
+ <label class="col-sm-2 control-label">备注:</label>
217
+ <div class="col-sm-10">
218
+ <input type="text"
219
+ class="form-control input_view"
220
+ style="width: 100%"
221
+ v-model="charge.f_charge_remarks" />
222
+ </div>
223
+ </div>
224
+ </article>
225
+ <footer slot="modal-footer" class="modal-footer">
226
+ <button type="button" class="btn btn-primary" @click="saveCharge()">新增收费</button>
227
+ </footer>
228
+ </modal>
229
+
230
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废收费">
231
+ <header slot="modal-header" class="modal-header">
232
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
233
+ <h4 class="modal-title">作废收费</h4>
234
+ </header>
235
+ <article slot="modal-body" class="modal-body clearfix">
236
+ <div class="form-group col-sm-12" v-if="selectdata.f_apply_type !== '开发商集体报建'">
237
+ <label class="col-sm-2 control-label">缴费地址:</label>
238
+ <div class="col-sm-10">
239
+ <input type="text"
240
+ class="form-control input_view"
241
+ style="width: 100%"
242
+ readonly
243
+ v-model="charge.f_useraddress" />
244
+ </div>
245
+ </div>
246
+ <div class="form-group col-sm-12">
247
+ <label class="col-sm-2 control-label">收费金额:</label>
248
+ <div class="col-sm-10">
249
+ <input type="text"
250
+ class="form-control input_view"
251
+ style="width: 100%"
252
+ readonly
253
+ v-model="charge.f_charge_money" />
254
+ </div>
255
+ </div>
256
+ <div class="form-group col-sm-12">
257
+ <label class="col-sm-2 control-label">付款方式:</label>
258
+ <div class="col-sm-10">
259
+ <input type="text"
260
+ class="form-control input_view"
261
+ style="width: 100%"
262
+ readonly
263
+ v-model="charge.f_payment_method" />
264
+ </div>
265
+ </div>
266
+ <div class="form-group col-sm-12">
267
+ <label class="col-sm-2 control-label">金额大写:</label>
268
+ <div class="col-sm-10">
269
+ <input type="text"
270
+ class="form-control input_view"
271
+ style="width: 100%"
272
+ readonly
273
+ v-model="charge.f_amount_words" />
274
+ </div>
275
+ </div>
276
+ <div class="form-group col-sm-12">
277
+ <label class="col-sm-2 control-label">收费人员:</label>
278
+ <div class="col-sm-10">
279
+ <input type="text"
280
+ class="form-control input_view"
281
+ style="width: 100%"
282
+ readonly
283
+ v-model="charge.f_charge_collectors" />
284
+ </div>
285
+ </div>
286
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
287
+ <label class="col-sm-2 control-label">作废原因:</label>
288
+ <div class="col-sm-10">
289
+ <input type="text"
290
+ class="form-control input_view"
291
+ style="width: 100%"
292
+ v-model="charge.f_void_remarks" />
293
+ </div>
294
+ </div>
295
+ </article>
296
+ <footer slot="modal-footer" class="modal-footer">
297
+ <button type="button" class="btn btn-primary" @click="invalidApplyCharge()">确认作废</button>
298
+ </footer>
299
+ </modal>
300
+
301
+ <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false" title="打印预览">
302
+ <header slot="modal-header" class="modal-header">
303
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
304
+ <h4 class="modal-title">打印预览</h4>
305
+ </header>
306
+ <article slot="modal-body" class="modal-body clearfix">
307
+ <apply-print-charge :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-charge>
308
+ </article>
309
+ <footer slot="modal-footer" class="modal-footer">
310
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
311
+ </footer>
312
+ </modal>
313
+ </div>
314
+ </template>
315
+ <script>
316
+ import {getNowDate,isEmpty} from '../../../Util'
317
+ import {PagedList} from 'vue-client'
318
+ import {HttpResetClass} from 'vue-client'
319
+
320
+ export default {
321
+ title: '收费管理',
322
+ props: {
323
+ selectdata: {
324
+ type: Object
325
+ },
326
+ mark: {
327
+ type: Number,
328
+ default: 0
329
+ }
330
+ },
331
+ data () {
332
+ return {
333
+ showCharge: false,
334
+ showInvalid: false,
335
+ showPrint: false,
336
+ model: {
337
+ data: null
338
+ },
339
+ charge: {
340
+
341
+ },
342
+ useraddressList: [],
343
+ chargeUseraddress: null
344
+ }
345
+ },
346
+ ready () {
347
+ this.search()
348
+ },
349
+ methods: {
350
+ print () {
351
+ this.$refs.print.showInput = false
352
+ setTimeout(() => {
353
+ this.$refs.print.$refs.print.PrintTable()
354
+ }, 10)
355
+ },
356
+ showPrintModal(row) {
357
+ this.charge = row
358
+ this.showPrint = true
359
+ },
360
+ changeUseraddress() {
361
+ this.charge.f_useraddress_id = this.chargeUseraddress.id
362
+ },
363
+ async invalidApplyCharge() {
364
+ if (isEmpty(this.charge.f_void_remarks)) {
365
+ this.$showAlert('请输入作废本次收费原因!!!', 'warning', 3000)
366
+ return
367
+ }
368
+
369
+ let http = new HttpResetClass()
370
+ let data = {
371
+ apply: this.selectdata,
372
+ user: this.$login.f,
373
+ charge: this.charge
374
+ }
375
+ try {
376
+ let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
377
+ resolveMsg: null,
378
+ rejectMsg: null
379
+ })
380
+ this.selectdata = res.data
381
+ } catch (e) {
382
+ this.$showAlert(e.data, 'danger', 3000)
383
+ }
384
+
385
+
386
+ this.$dispatch('breakControl', this.selectdata)
387
+ },
388
+ showInvalidModal(row) {
389
+ this.charge = row
390
+ this.showInvalid = true
391
+ },
392
+ handleInput(e) {
393
+ // 通过正则过滤小数点后两位
394
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
395
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
396
+ },
397
+ async saveCharge() {
398
+ if (isEmpty(this.charge.f_useraddress_id) && this.selectdata.f_apply_type !== '开发商集体报建') {
399
+ this.$showAlert('请选择缴费的地址信息!!!', 'warning', 3000)
400
+ return
401
+ }
402
+ if (Number(this.charge.f_charge_money) === 0 || isEmpty(this.charge.f_charge_money)) {
403
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
404
+ return
405
+ }
406
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
407
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
408
+ return
409
+ }
410
+ if (this.selectdata.f_apply_type === '散户集体报建' || this.selectdata.f_apply_type === '煤改气报建') {
411
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_price)) {
412
+ this.$showAlert('单笔收费不能超过单价!!!', 'warning', 3000)
413
+ return
414
+ }
415
+ if (Number(this.charge.f_charge_money) > Number(this.outstandingAmount)) {
416
+ this.$showAlert('单笔收费不能超过当前用户未结金额!!!', 'warning', 3000)
417
+ return
418
+ }
419
+ }
420
+ if (isEmpty(this.charge.f_payment_method)) {
421
+ this.$showAlert('请选择付款方式!!!', 'warning', 3000)
422
+ return
423
+ }
424
+ let http = new HttpResetClass()
425
+ let data = {
426
+ apply: this.selectdata,
427
+ user: this.$login.f,
428
+ charge: this.charge
429
+ }
430
+ try {
431
+ let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
432
+ resolveMsg: null,
433
+ rejectMsg: null
434
+ })
435
+ this.selectdata = res.data
436
+ } catch (e) {
437
+ this.$showAlert(e.data, 'danger', 3000)
438
+ }
439
+
440
+
441
+ this.$dispatch('breakControl', this.selectdata)
442
+ },
443
+ // 金额转大写
444
+ smalltoBIG(n) {
445
+ let fraction = ['角', '分'];
446
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
447
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
448
+ let head = n < 0 ? '欠' : '';
449
+ n = Math.abs(n);
450
+
451
+ let s = '';
452
+
453
+ for (var i = 0; i < fraction.length; i++) {
454
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
455
+ }
456
+ s = s || '整';
457
+ n = Math.floor(n);
458
+
459
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
460
+ let p = '';
461
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
462
+ p = digit[n % 10] + unit[1][j] + p;
463
+ n = Math.floor(n / 10);
464
+ }
465
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
466
+ }
467
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
468
+ },
469
+ async getUserAddress() {
470
+ let http = new HttpResetClass()
471
+ let data = {
472
+ condition: '1=1',
473
+ f_process_id: this.selectdata.f_process_id
474
+ }
475
+ let res = await http.load('POST', 'rs/sql/getAddresAndCumulativePayment', {data:data}, {
476
+ resolveMsg: null,
477
+ rejectMsg: null
478
+ })
479
+
480
+ this.useraddressList = res.data
481
+ if (this.selectdata.f_apply_type === '散户集体报建' || this.selectdata.f_apply_type === '煤改气报建') {
482
+ // 去除累计缴费金额大于等于单价的用户地址
483
+ this.useraddressList = res.data.filter(item => {
484
+ let f_cumulative_payment_money = isEmpty(item.f_cumulative_payment_money) ? 0 : item.f_cumulative_payment_money
485
+ return Number(f_cumulative_payment_money) < Number(isEmpty(this.selectdata.f_price) ? 0 : this.selectdata.f_price)
486
+ })
487
+ }
488
+
489
+ if (this.useraddressList.length > 0) {
490
+ this.useraddressList = this.useraddressList.map(item => {
491
+ return {
492
+ // 有用户姓名地址后拼接姓名
493
+ label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
494
+ value: item
495
+ }
496
+ })
497
+ }
498
+
499
+ },
500
+ async showChargeModal() {
501
+ this.getUserAddress()
502
+
503
+ this.showCharge = true
504
+ },
505
+ async search () {
506
+ let http = new HttpResetClass()
507
+ let data = {
508
+ f_process_id: this.selectdata.f_process_id
509
+ }
510
+ let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
511
+ resolveMsg: null,
512
+ rejectMsg: null
513
+ })
514
+ this.model.data = res.data
515
+ },
516
+ // 关闭对话框
517
+ closeModal() {
518
+ this.showCharge = false
519
+ this.showInvalid = false
520
+ this.showPrint = false
521
+ this.charge = {}
522
+ this.chargeUseraddress = null
523
+ this.search()
524
+ }
525
+ },
526
+ events: {
527
+ },
528
+ computed: {
529
+ paymentMethod() {
530
+ return this.$appdata.getParam("付款方式")
531
+ },
532
+ cumulativePaymentMoney() {
533
+ return isEmpty(this.chargeUseraddress.f_cumulative_payment_money) ? 0 : this.chargeUseraddress.f_cumulative_payment_money
534
+ },
535
+ outstandingAmount() {
536
+ return this.selectdata.f_price - this.cumulativePaymentMoney
537
+ }
538
+ },
539
+ watch: {
540
+ }
541
+ }
542
+ </script>
543
+ <style scoped>
544
+ .textNoLineBreak {
545
+ white-space: nowrap;
546
+ }
547
+ .head-but{
548
+ margin-left: 5px;
549
+ height: 34px;
550
+ /*background-color: #6aa6e2;*/
551
+ border-radius: 4px;
552
+ font-family: PingFang;
553
+ color: #ffffff;
554
+ }
555
+ </style>