apply-clients 4.1.1 → 4.1.2-weinan

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