apply-clients 4.1.63-weinan → 4.1.64-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 (31) hide show
  1. package/index.html +30 -30
  2. package/package.json +1 -1
  3. package/src/apply.js +81 -81
  4. package/src/applyAndroid.js +52 -52
  5. package/src/components/app_apply/AppChargeManagement.vue +753 -749
  6. package/src/components/app_apply/AppInstallationDetails.vue +529 -529
  7. package/src/components/app_apply/AppProcessSupervisory.vue +214 -214
  8. package/src/components/app_apply/AppSupervisoryCart.vue +68 -68
  9. package/src/components/app_apply/AppTakePic.vue +146 -146
  10. package/src/components/app_apply/AppdevicesDetails.vue +867 -867
  11. package/src/components/app_apply/ApplyInfo.vue +56 -56
  12. package/src/components/app_apply/ApplyToDoList.vue +292 -292
  13. package/src/components/app_apply/PlaceControler.vue +274 -274
  14. package/src/components/app_apply/ServiceControl.vue +440 -440
  15. package/src/components/app_apply/ServiceView.vue +394 -394
  16. package/src/components/app_apply/materialshoufei.vue +248 -248
  17. package/src/components/product/ApplyCharge/ApplyChargeList.vue +252 -252
  18. package/src/components/product/Process/ExplorationSelect.vue +377 -377
  19. package/src/components/product/Process/ExplorationUser.vue +134 -134
  20. package/src/components/product/Process/Processes/InstallationDetails.vue +515 -515
  21. package/src/components/product/Process/Processes/chargeManagement.vue +545 -545
  22. package/src/components/product/Process/Processes/devicesDetails.vue +843 -843
  23. package/src/components/product/Process/Processes/materialshoufei.vue +187 -187
  24. package/src/components/product/Process/Service/ServiceControl.vue +1490 -1490
  25. package/src/components/product/Stop/StopApply.vue +101 -101
  26. package/src/components/product/Stop/StopApplyList.vue +266 -266
  27. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +200 -200
  28. package/src/components/product/Supervisory/SupervisoryControl.vue +124 -124
  29. package/src/components/product/Supervisory/SupervisoryList.vue +221 -221
  30. package/src/components/product/VueUtils/ApplyUpload.vue +276 -276
  31. package/src/main.js +25 -25
@@ -1,545 +1,545 @@
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
- let http = new HttpResetClass()
487
- await http.load('POST', 'rs/entity/t_apply', {data:this.selectdata}, {
488
- resolveMsg: null,
489
- rejectMsg: null
490
- })
491
- this.getUserAddress()
492
-
493
- this.showCharge = true
494
- },
495
- async search () {
496
- let http = new HttpResetClass()
497
- let data = {
498
- f_process_id: this.selectdata.f_process_id
499
- }
500
- let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
501
- resolveMsg: null,
502
- rejectMsg: null
503
- })
504
- this.model.data = res.data
505
- },
506
- // 关闭对话框
507
- closeModal() {
508
- this.showCharge = false
509
- this.showInvalid = false
510
- this.showPrint = false
511
- this.charge = {}
512
- this.chargeUseraddress = null
513
- this.search()
514
- }
515
- },
516
- events: {
517
- },
518
- computed: {
519
- paymentMethod() {
520
- return this.$appdata.getParam("付款方式")
521
- },
522
- cumulativePaymentMoney() {
523
- return isEmpty(this.chargeUseraddress.f_cumulative_payment_money) ? 0 : this.chargeUseraddress.f_cumulative_payment_money
524
- },
525
- outstandingAmount() {
526
- return this.selectdata.f_price - this.cumulativePaymentMoney
527
- }
528
- },
529
- watch: {
530
- }
531
- }
532
- </script>
533
- <style scoped>
534
- .textNoLineBreak {
535
- white-space: nowrap;
536
- }
537
- .head-but{
538
- margin-left: 5px;
539
- height: 34px;
540
- /*background-color: #6aa6e2;*/
541
- border-radius: 4px;
542
- font-family: PingFang;
543
- color: #ffffff;
544
- }
545
- </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
+ let http = new HttpResetClass()
487
+ await http.load('POST', 'rs/entity/t_apply', {data:this.selectdata}, {
488
+ resolveMsg: null,
489
+ rejectMsg: null
490
+ })
491
+ this.getUserAddress()
492
+
493
+ this.showCharge = true
494
+ },
495
+ async search () {
496
+ let http = new HttpResetClass()
497
+ let data = {
498
+ f_process_id: this.selectdata.f_process_id
499
+ }
500
+ let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
501
+ resolveMsg: null,
502
+ rejectMsg: null
503
+ })
504
+ this.model.data = res.data
505
+ },
506
+ // 关闭对话框
507
+ closeModal() {
508
+ this.showCharge = false
509
+ this.showInvalid = false
510
+ this.showPrint = false
511
+ this.charge = {}
512
+ this.chargeUseraddress = null
513
+ this.search()
514
+ }
515
+ },
516
+ events: {
517
+ },
518
+ computed: {
519
+ paymentMethod() {
520
+ return this.$appdata.getParam("付款方式")
521
+ },
522
+ cumulativePaymentMoney() {
523
+ return isEmpty(this.chargeUseraddress.f_cumulative_payment_money) ? 0 : this.chargeUseraddress.f_cumulative_payment_money
524
+ },
525
+ outstandingAmount() {
526
+ return this.selectdata.f_price - this.cumulativePaymentMoney
527
+ }
528
+ },
529
+ watch: {
530
+ }
531
+ }
532
+ </script>
533
+ <style scoped>
534
+ .textNoLineBreak {
535
+ white-space: nowrap;
536
+ }
537
+ .head-but{
538
+ margin-left: 5px;
539
+ height: 34px;
540
+ /*background-color: #6aa6e2;*/
541
+ border-radius: 4px;
542
+ font-family: PingFang;
543
+ color: #ffffff;
544
+ }
545
+ </style>