apply-clients 3.5.4-90 → 3.5.4-91

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 (49) hide show
  1. package/build/dev-server.js +6 -11
  2. package/package.json +1 -1
  3. package/src/apply.js +139 -137
  4. package/src/components/android/AppCheckTakePic.vue +168 -168
  5. package/src/components/android/AppTakePic.vue +182 -182
  6. package/src/components/android/Process/AppServiceControl.vue +1755 -1755
  7. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  8. package/src/components/product/PcZhihuanManagement.vue +160 -160
  9. package/src/components/product/Process/Processes/selectApply.vue +251 -250
  10. package/src/components/product/Process/Processes/selectBcakApply.vue +250 -0
  11. package/src/filiale/fugou/android/AppAddMaterialScience.vue +440 -440
  12. package/src/filiale/fugou/android/AppAddReplacement.vue +341 -341
  13. package/src/filiale/fugou/android/AppChargeManagement.vue +739 -739
  14. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -519
  15. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -541
  16. package/src/filiale/fugou/android/AppServiceControl.vue +1845 -1845
  17. package/src/filiale/fugou/android/AppZhihuanManagement.vue +197 -197
  18. package/src/filiale/fugou/android/printCharge.vue +162 -162
  19. package/src/filiale/fugou/android.js +16 -16
  20. package/src/filiale/fugou/pc/AddReplacement.vue +340 -340
  21. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -525
  22. package/src/filiale/fugou/pc/ServiceControl.vue +1705 -1705
  23. package/src/filiale/fugou/pc/ServiceView.vue +941 -941
  24. package/src/filiale/fugou/pc/addMaterialScience.vue +481 -481
  25. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +216 -216
  26. package/src/filiale/fugou/pc/chargeReport.vue +143 -143
  27. package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
  28. package/src/filiale/fugou/pc/printChargepc.vue +148 -148
  29. package/src/filiale/fugou/pc.js +15 -15
  30. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  31. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  32. package/src/filiale/qianneng/android.js +15 -15
  33. package/src/filiale/qianneng/pc/ApplyMaterialDetailed.vue +261 -261
  34. package/src/filiale/qianneng/pc/Applydetail.vue +378 -378
  35. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  36. package/src/filiale/qianneng/pc.js +29 -29
  37. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +516 -516
  38. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +645 -645
  39. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1681 -1681
  40. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +547 -547
  41. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2112 -2112
  42. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +605 -605
  43. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +683 -683
  44. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1052 -1052
  45. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +574 -574
  46. package/src/main.js +3 -4
  47. package/src/test/SessionTestServlet.java +69 -0
  48. package/webapp/WEB-INF/web.xml +52 -0
  49. package/webapp/session-test.jsp +59 -0
@@ -1,739 +1,739 @@
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">
7
- <button
8
- type="button"
9
- class="btn btn-info head-but"
10
- @click="$parent.$parent.showChargeModal()"
11
- :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)"
12
- >新增收费</button>
13
- </th>
14
- <th class="textNoLineBreak">序号</th>
15
- <th class="textNoLineBreak" v-if="selectdata.f_apply_type !== '开发商集体报建'">地址</th>
16
- <th class="textNoLineBreak">缴费编号</th>
17
- <th class="textNoLineBreak">收费金额(退款金额)</th>
18
- <th class="textNoLineBreak">金额大写</th>
19
- <th class="textNoLineBreak">收费项目</th>
20
- <th class="textNoLineBreak">付款方式</th>
21
- <th class="textNoLineBreak">收费人员</th>
22
- <th class="textNoLineBreak">收费日期</th>
23
- <th class="textNoLineBreak">实际收费日期</th>
24
- <th class="textNoLineBreak">备注</th>
25
- <th class="textNoLineBreak">缴费状态</th>
26
- </tr>
27
- </template>
28
- <template partial='body'>
29
- <tr>
30
- <td style="text-align: center;">
31
- <nobr>{{$index+1}}</nobr>
32
- </td>
33
- <td style="text-align: center;" v-if="selectdata.f_apply_type !== '开发商集体报建'">
34
- <nobr>{{row.f_useraddres}}</nobr>
35
- </td>
36
- <td style="text-align: center;">
37
- <nobr>{{row.f_charge_number}}</nobr>
38
- </td>
39
- <td style="text-align: center;">
40
- <nobr>{{row.f_charge_money}}</nobr>
41
- </td>
42
- <td style="text-align: center;">
43
- <nobr>{{row.f_amount_words}}</nobr>
44
- </td>
45
- <td style="text-align: center;">
46
- <nobr>{{row.f_payment_term}}</nobr>
47
- </td>
48
- <td style="text-align: center;">
49
- <nobr>{{row.f_payment_method}}</nobr>
50
- </td>
51
- <td style="text-align: center;">
52
- <nobr>{{row.f_charge_collectors}}</nobr>
53
- </td>
54
- <td style="text-align: center;">
55
- <nobr>{{row.f_charge_date}}</nobr>
56
- </td>
57
- <td style="text-align: center;">
58
- <nobr>{{row.f_actual_date}}</nobr>
59
- </td>
60
- <td style="text-align: center;">
61
- <nobr>{{row.f_charge_remarks}}</nobr>
62
- </td>
63
- <td style="text-align: center;">
64
- <nobr>{{row.f_charge_status}}</nobr>
65
- </td>
66
- <td style="text-align: center;">
67
- <nobr v-if="row.f_charge_status !== '退款'">
68
- <button
69
- type="button"
70
- name="button"
71
- class="btn btn-link"
72
- :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
73
- @click="$parent.$parent.showInvalidModal(row)"
74
- >作废</button>
75
- </nobr>
76
- </td>
77
- </tr>
78
- </template>
79
- </data-grid>
80
-
81
- <validator name="v">
82
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
83
- <header slot="modal-header" class="modal-header">
84
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
85
- <h4 class="modal-title">收费明细</h4>
86
- </header>
87
- <article slot="modal-body" class="modal-body clearfix">
88
- <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
89
- <label class="col-sm-2 control-label">缴费地址:</label>
90
- <div class="col-sm-10">
91
- <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
92
- <input-select width="100%" class="select select_list" placeholder='请选择'
93
- v-model="charge.useraddres"
94
- :value.sync="charge.useraddres"
95
- :options='useraddresList'
96
- :value-single="true"
97
- @change="selectAddres()"
98
- close-on-select ></input-select>
99
- </div>
100
- </div>
101
- <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
102
- <label class="col-sm-2 control-label">收费项目:</label>
103
- <div class="col-sm-10">
104
- <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
105
- <input-select width="100%" class="select select_list" placeholder='请选择'
106
- v-model="charge.f_payment_term"
107
- :value.sync="charge.f_payment_term"
108
- :options='paymentTerm'
109
- :value-single="true"
110
- close-on-select ></input-select>
111
- </div>
112
- </div>
113
- <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
114
- <label class="col-sm-2 control-label">收费金额:</label>
115
- <div class="col-sm-10">
116
- <input type="text"
117
- class="form-control input_view"
118
- style="width: 100%"
119
- placeholder="0.00"
120
- @keyup="handleInput"
121
- @change="moneyChange"
122
- v-validate:f_charge_money = "['required']"
123
- v-model="charge.f_charge_money" />
124
- </div>
125
- </div>
126
- <div class="form-group col-sm-12" :class="[$v.f_payment_method.required ? 'has-error' : '']">
127
- <label class="col-sm-2 control-label">付款方式:</label>
128
- <div class="col-sm-10">
129
- <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
130
- <input-select
131
- placeholder='请选择' width="100%"
132
- v-model="charge.f_payment_method"
133
- :value.sync="charge.f_payment_method"
134
- :options='paymentMethod'
135
- class="select select_list"
136
- :value-single="true"
137
- @change="changePaymentMethod()"
138
- close-on-select ></input-select>
139
- </div>
140
- </div>
141
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
142
- <label class="col-sm-2 control-label">付款方名称:</label>
143
- <div class="col-sm-10">
144
- <input type="text"
145
- class="form-control input_view"
146
- style="width: 100%"
147
- v-validate:f_payer_name = "['required']"
148
- v-model="charge.f_payer_name" value="" />
149
- </div>
150
- </div>
151
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
152
- <label class="col-sm-2 control-label">付款方账号:</label>
153
- <div class="col-sm-10">
154
- <input type="text" style="width: 100%" class="form-control input_view"
155
- v-validate:f_payer_account = "['required']"
156
- v-model="charge.f_payer_account" value=""/>
157
- </div>
158
- </div>
159
- <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
160
- <label class="col-sm-2 control-label">付款流水号:</label>
161
- <div class="col-sm-10">
162
- <input type="text"
163
- class="form-control input_view"
164
- style="width: 100%" @change="payerNumberChange()"
165
- v-validate:f_payer_number = "['required']"
166
- v-model="charge.f_payer_number" value="" />
167
- </div>
168
- </div>
169
- <div class="form-group col-sm-12">
170
- <label class="col-sm-2 control-label">金额大写:</label>
171
- <div class="col-sm-10">
172
- <input type="text"
173
- class="form-control input_view"
174
- style="width: 100%"
175
- :value="smalltoBIG(0)"
176
- readonly
177
- v-model.sync="charge.f_amount_words" />
178
- </div>
179
- </div>
180
- <div class="form-group col-sm-12"
181
- v-if="selectdata.f_apply_type === '散户集体报建'"
182
- >
183
- <label class="col-sm-2 control-label">单价(户):</label>
184
- <div class="col-sm-10">
185
- <input type="text"
186
- class="form-control input_view"
187
- style="width: 100%"
188
- readonly
189
- v-model="selectdata.f_price" />
190
- </div>
191
- </div>
192
- <div class="form-group col-sm-12"
193
- v-if="selectdata.f_apply_type === '散户集体报建'"
194
- >
195
- <label class="col-sm-2 control-label">累计缴费金额:</label>
196
- <div class="col-sm-10">
197
- <input type="text"
198
- class="form-control input_view"
199
- style="width: 100%"
200
- readonly
201
- v-model="charge.f_cumulative_payment_money"
202
- :value="charge.f_cumulative_payment_money || 0" />
203
- </div>
204
- </div>
205
- <div class="form-group col-sm-12"
206
- v-if="selectdata.f_apply_type === '散户集体报建'"
207
- >
208
- <label class="col-sm-2 control-label">未结金额:</label>
209
- <div class="col-sm-10">
210
- <input type="text"
211
- class="form-control input_view"
212
- style="width: 100%"
213
- readonly
214
- v-model="charge.f_outstanding_amount"
215
- :value="charge.f_outstanding_amount || 0" />
216
- </div>
217
- </div>
218
- <div class="form-group col-sm-12">
219
- <label class="col-sm-2 control-label">应交总金额:</label>
220
- <div class="col-sm-10">
221
- <input type="text"
222
- class="form-control input_view"
223
- style="width: 100%"
224
- readonly
225
- v-model="selectdata.f_due_money" />
226
- </div>
227
- </div>
228
- <div class="form-group col-sm-12">
229
- <label class="col-sm-2 control-label">累计缴费总金额:</label>
230
- <div class="col-sm-10">
231
- <input type="text"
232
- class="form-control input_view"
233
- style="width: 100%"
234
- readonly
235
- v-model="selectdata.f_cumulative_payment_money" />
236
- </div>
237
- </div>
238
- <div class="form-group col-sm-12">
239
- <label class="col-sm-2 control-label">未结总金额:</label>
240
- <div class="col-sm-10">
241
- <input type="text"
242
- class="form-control input_view"
243
- style="width: 100%"
244
- readonly
245
- v-model="selectdata.f_surplus_money" />
246
- </div>
247
- </div>
248
- <div class="form-group col-sm-12">
249
- <label class="col-sm-2 control-label">备注:</label>
250
- <div class="col-sm-10">
251
- <input type="text"
252
- class="form-control input_view"
253
- style="width: 100%"
254
- v-model="charge.f_charge_remarks" />
255
- </div>
256
- </div>
257
- <div class="form-group col-sm-12">
258
- <label class="col-sm-2 control-label">实际收款时间:</label>
259
- <div class="col-sm-10">
260
- <datepicker id="startDate" placeholder="实际收款时间"
261
- style="width: 60%!important;"
262
- v-model="charge.f_actual_date"
263
- :value.sync="charge.f_actual_date"
264
- :format="'yyyy-MM-dd HH:mm:ss'"
265
- :show-reset-button="true"
266
- >
267
- </datepicker>
268
- </div>
269
- </div>
270
- </article>
271
- <footer slot="modal-footer" class="modal-footer">
272
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
273
- </footer>
274
- </modal>
275
- </validator>
276
-
277
- <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
278
- <header slot="modal-header" class="modal-header">
279
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
280
- <h4 class="modal-title">作废收费</h4>
281
- </header>
282
- <article slot="modal-body" class="modal-body clearfix">
283
- <div class="form-group col-sm-12" v-if="false">
284
- <label class="col-sm-2 control-label">缴费地址:</label>
285
- <div class="col-sm-10">
286
- <input type="text"
287
- class="form-control input_view"
288
- style="width: 100%"
289
- readonly
290
- v-model="charge.f_useraddres" />
291
- </div>
292
- </div>
293
- <div class="form-group col-sm-12">
294
- <label class="col-sm-2 control-label">收费金额:</label>
295
- <div class="col-sm-10">
296
- <input type="text"
297
- class="form-control input_view"
298
- style="width: 100%"
299
- readonly
300
- v-model="charge.f_charge_money" />
301
- </div>
302
- </div>
303
- <div class="form-group col-sm-12">
304
- <label class="col-sm-2 control-label">付款方式:</label>
305
- <div class="col-sm-10">
306
- <input type="text"
307
- class="form-control input_view"
308
- style="width: 100%"
309
- readonly
310
- v-model="charge.f_payment_method" />
311
- </div>
312
- </div>
313
- <div class="form-group col-sm-12">
314
- <label class="col-sm-2 control-label">金额大写:</label>
315
- <div class="col-sm-10">
316
- <input type="text"
317
- class="form-control input_view"
318
- style="width: 100%"
319
- readonly
320
- v-model="charge.f_amount_words" />
321
- </div>
322
- </div>
323
- <div class="form-group col-sm-12">
324
- <label class="col-sm-2 control-label">收费人员:</label>
325
- <div class="col-sm-10">
326
- <input type="text"
327
- class="form-control input_view"
328
- style="width: 100%"
329
- readonly
330
- v-model="charge.f_charge_collectors" />
331
- </div>
332
- </div>
333
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
334
- <label class="col-sm-2 control-label">作废原因:</label>
335
- <div class="col-sm-10">
336
- <input type="text"
337
- class="form-control input_view"
338
- style="width: 100%"
339
- v-model="charge.f_void_remarks" />
340
- </div>
341
- </div>
342
- </article>
343
- <footer slot="modal-footer" class="modal-footer">
344
- <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
345
- </footer>
346
- </modal>
347
-
348
-
349
- <modal v-if="showQrCode" :show.sync="showQrCode" v-ref:modal :large="true" :backdrop="false" title="二维码">
350
- <header slot="modal-header" class="modal-header">
351
- <button type="button" class="close" @click="closeQrCode"><span>&times;</span></button>
352
- </header>
353
- <article slot="modal-body" class="modal-body clearfix">
354
- <div partial>
355
- <div class="" align="center">
356
- <div style="margin-bottom:10px "><img src="../../../assets/scanCode.png">请扫描下方二维码进行付款</div>
357
- <div class="row app-row">
358
- <div class="col-xs-12">
359
- <label class="font text-left">订单编号:{{ order.body.tradeNo }}</label>
360
- </div>
361
- </div>
362
- </div>
363
- <div class="" align="center">
364
- <div class="QR-code" >
365
- <img src="../../../assets/qrcode_no.png" style="width: 266px;height: 266px"/>
366
- <div id="qrcode" style="margin-top: 25px;width: 266px;height: 266px"></div>
367
- </div>
368
- </div>
369
- </div>
370
- </article>
371
- <footer slot="modal-footer" class="modal-footer">
372
- <button type="button" class="btn btn-primary" @click="closeQrCode()">关闭</button>
373
- </footer>
374
- </modal>
375
- </div>
376
- </template>
377
- <script>
378
- import {getNowDate,isEmpty} from '../../../components/Util'
379
- import {PagedList} from 'vue-client'
380
- import {HttpResetClass} from 'vue-client'
381
- import Vue from 'vue'
382
- import QRCode from "qrcodejs2";
383
-
384
- export default {
385
- title: '收费管理',
386
- props: {
387
- selectdata: {
388
- type: Object
389
- },
390
- mark: {
391
- type: Number,
392
- default: 0
393
- }
394
- },
395
- data () {
396
- return {
397
- showCharge: false, // 收费明细
398
- showInvalid: false, // 作废
399
- model: {
400
- data: null
401
- }, // 记录
402
- useraddresList: [], // 地址列表
403
- charge: {
404
-
405
- },
406
- order:'',
407
- isTimeout:false,
408
- showQrCode:false
409
- }
410
- },
411
- ready () {
412
- this.search()
413
- },
414
- methods: {
415
- closeQrCode(){
416
- document.getElementById('qrcode').innerHTML = ''
417
- },
418
- async openQrCode() {
419
- const merchantMsg =this.$appdata.getSingleValue('商户号')
420
- if (!merchantMsg){
421
- this.$showMessage('未配备商户号,请联系管理员!')
422
- return
423
- }
424
- const outTradeNo = this.generateRandomString(30)
425
- // 下订单
426
- let http = new HttpResetClass()
427
- const val = {
428
- "body": this.charge.f_payment_term,
429
- "detail": this.charge.f_payment_term,
430
- "totalAmount": (this.charge.f_charge_money).toString(),
431
- "merchantMsg": merchantMsg,//商户id
432
- "outTradeNo": outTradeNo,//随机数30位
433
- "service": "nativePay",//死值
434
- "tradeType": "wechat_jsapi"//死值
435
- }
436
- try {
437
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/bank/rs/logic/BC_10001`, {data: val}, {
438
- resolveMsg: null,
439
- rejectMsg: null
440
- })
441
- if (res.data.status === 200) {
442
- console.log("调用结果", res.data, res.data.body.url)
443
- try {
444
- this.order = res.data
445
- this.isTimeout = false
446
- this.showQrCode = true
447
- console.log(this.order)
448
- this.$nextTick(() => {
449
- this.qrcode(res.data.body.url)
450
- })
451
- if (this.order.body.tradeNo) {
452
- this.timer1 = window.setInterval(this.getOrderInformation, 3000)
453
- }
454
- } catch (e) {
455
- this.$showMessage('创建订单失败!')
456
- }
457
- } else {
458
- this.$showMessage('获取二维码失败!')
459
- }
460
- } catch (e) {
461
- this.$showMessage('获取二维码失败,请检查网络!')
462
- }
463
- },
464
- // 获取订单信息
465
- async getOrderInformation() {
466
- const merchantMsg =this.$appdata.getSingleValue('商户号')
467
- // 查询订单信息
468
- console.log('查询订单信息!!!', this.order)
469
- try {
470
- let http = new HttpResetClass()
471
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/bank/rs/logic/BC_10003`, {
472
- data: {
473
- "service": "queryOrder",
474
- "outTradeNo": this.order.body.outTradeNo,
475
- "merchantMsg": merchantMsg,
476
- "tradeNo": ""
477
- }
478
- }, {
479
- resolveMsg: null,
480
- rejectMsg: null
481
- })
482
- // 支付成功
483
- this.orderstatus = res.data
484
- console.log('查询结果=======', res.data)
485
- if (res.data.status == '200') {
486
- window.clearInterval(this.timer1)
487
- console.log('支付成功', this.orderstatus)
488
- this.order = {}
489
- }
490
- } catch (e) {
491
- window.clearInterval(this.timer1)
492
- this.$showMessage('创建订单失败!')
493
- this.order = {}
494
- }
495
- },
496
- qrcode(url) {
497
- new QRCode('qrcode', {
498
- text: url, // 设置二维码内容或跳转地址
499
- width: 266, // 设置宽度,单位像素
500
- height: 266, // 设置高度,单位像素
501
- correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
502
- })
503
- },
504
- generateRandomString(length) {
505
- let result = new Date().getTime().toString()
506
- const characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
507
- const charactersLength = characters.length;
508
- for (let i = 0; i < length; i++) {
509
- result += characters.charAt(Math.floor(Math.random() * charactersLength));
510
- }
511
- return result.substring(0, 30);
512
- },
513
- async payerNumberChange () {
514
- if (isEmpty(this.charge.f_payer_number)) {
515
- return
516
- }
517
- let http = new HttpResetClass()
518
- let data = {
519
- tablename: 't_charge_record',
520
- condition: `f_payer_number = '${this.charge.f_payer_number}'`
521
- }
522
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
523
- resolveMsg: null,
524
- rejectMsg: '流水号查询失败!!!'
525
- })
526
- if (res.data.length > 0) {
527
- this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
528
- return
529
- }
530
- },
531
- print () {
532
- this.$refs.print.$refs.print.PrintTable()
533
- },
534
- selectAddres () {
535
- if (this.charge.useraddres) {
536
- this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
537
- this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
538
- } else {
539
- this.charge.f_cumulative_payment_money = 0
540
- this.charge.f_outstanding_amount = this.selectdata.f_price
541
- }
542
- },
543
- async invalidApplyCharge() {
544
-
545
- let http = new HttpResetClass()
546
- let data = {
547
- apply: this.selectdata,
548
- user: Vue.user,
549
- charge: this.charge
550
- }
551
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/invalidApplyCharge`, {data:data}, {
552
- resolveMsg: null,
553
- rejectMsg: '作废失败!!!'
554
- })
555
- this.selectdata = res.data
556
-
557
- this.$dispatch('breakControl', this.selectdata)
558
- },
559
-
560
- // 打开作废收费
561
- showInvalidModal(row) {
562
- this.charge = row
563
- this.showInvalid = true
564
- },
565
- // 新增收费
566
- async saveCharge() {
567
- if(this.charge.f_payment_method=='二维码收费'){
568
- this.openQrCode()
569
- }
570
- let http = new HttpResetClass()
571
- let data = {
572
- apply: this.selectdata,
573
- user: Vue.user,
574
- charge: this.charge
575
- }
576
-
577
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/addApplyChargeRecord`, {data:data}, {
578
- resolveMsg: null,
579
- rejectMsg: '缴费失败!!!'
580
- })
581
- this.selectdata = res.data
582
-
583
- this.$dispatch('breakControl', this.selectdata)
584
- },
585
- moneyChange () {
586
- if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
587
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
588
- this.charge.f_charge_money = null
589
- return
590
- }
591
- if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
592
- this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
593
- this.charge.f_charge_money = null
594
- return
595
- }
596
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
597
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
598
- this.charge.f_charge_money = null
599
- return
600
- }
601
- },
602
- // 金额转大写
603
- handleInput(e) {
604
- // 通过正则过滤小数点后两位
605
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
606
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
607
- },
608
- // 金额转大写
609
- smalltoBIG(n) {
610
- let fraction = ['角', '分'];
611
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
612
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
613
- let head = n < 0 ? '欠' : '';
614
- n = Math.abs(n);
615
-
616
- let s = '';
617
-
618
- for (var i = 0; i < fraction.length; i++) {
619
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
620
- }
621
- s = s || '整';
622
- n = Math.floor(n);
623
-
624
- for (var i = 0; i < unit[0].length && n > 0; i++) {
625
- let p = '';
626
- for (var j = 0; j < unit[1].length && n > 0; j++) {
627
- p = digit[n % 10] + unit[1][j] + p;
628
- n = Math.floor(n / 10);
629
- }
630
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
631
- }
632
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
633
- },
634
- async changePaymentMethod () {
635
- if (this.charge.f_payment_method === '银行转账' && this.selectdata.f_apply_type === '团购报建') {
636
- let http = new HttpResetClass()
637
- let data = {
638
- tablename: 't_dev_info',
639
- condition: `f_orgid = '${Vue.user.orgid}' and id = '${this.selectdata.f_dev_id}'`
640
- }
641
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
642
- resolveMsg: null,
643
- rejectMsg: '开发商档案查询失败!!!'
644
- })
645
-
646
- this.charge.f_payer_name = res.data[0].f_dev_name
647
- this.charge.f_payer_account = res.data[0].f_bank_account
648
- }
649
- },
650
- async getUserAddress() {
651
- let http = new HttpResetClass()
652
- let data = {}
653
- let url = null
654
- if (this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
655
- data = {
656
- condition: `ui.f_userinfo_id = ${this.selectdata.f_userinfo_id}`
657
- }
658
- url = `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetUserinfos`
659
- } else {
660
- data = {
661
- condition: this.selectdata.f_apply_type === '散户集体报建' ? `nvl(cr.f_cumulative_payment_money, 0) < ${this.selectdata.f_price}` : '1=1',
662
- f_process_id: this.selectdata.f_process_id
663
- }
664
- url = `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndCumulativePayment`
665
- }
666
- let res = await http.load('POST', url, {data:data}, {
667
- resolveMsg: null,
668
- rejectMsg: '用户获取失败!!!'
669
- })
670
-
671
- if (res.data.length <= 0) {
672
- this.$showAlert('暂无需要缴费用户!!!', 'warning', 3000)
673
- }
674
-
675
- this.useraddresList = res.data.map(item => {
676
- return {
677
- // 有用户姓名地址后拼接姓名
678
- label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
679
- value: item
680
- }
681
- })
682
-
683
- },
684
- async showChargeModal() {
685
- this.getUserAddress()
686
-
687
- if (this.selectdata.f_apply_type === '团购报建') {
688
- this.charge.f_dev_info_id = this.selectdata.f_dev_id
689
- }
690
-
691
- this.showCharge = true
692
- },
693
- async search () {
694
- let http = new HttpResetClass()
695
- let data = {
696
- // condition: `cr.f_charge_status != '退款'`,
697
- f_process_id: this.selectdata.f_process_id
698
- }
699
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyChargeRecord`, {data:data}, {
700
- resolveMsg: null,
701
- rejectMsg: '收费记录查询失败!!!'
702
- })
703
- this.model.data = res.data
704
- },
705
- // 关闭对话框
706
- closeModal() {
707
- this.showCharge = false
708
- this.showInvalid = false
709
- this.charge = {}
710
- this.search()
711
- }
712
- },
713
- events: {
714
- },
715
- computed: {
716
- paymentMethod() {
717
- return this.$appdata.getParam("付款方式")
718
- },
719
- paymentTerm() {
720
- return this.$appdata.getParam("收费项目")
721
- }
722
- },
723
- watch: {
724
- }
725
- }
726
- </script>
727
- <style scoped>
728
- .textNoLineBreak {
729
- white-space: nowrap;
730
- }
731
- .head-but{
732
- margin-left: 5px;
733
- height: 34px;
734
- /*background-color: #6aa6e2;*/
735
- border-radius: 4px;
736
- font-family: PingFang;
737
- color: #ffffff;
738
- }
739
- </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">
7
+ <button
8
+ type="button"
9
+ class="btn btn-info head-but"
10
+ @click="$parent.$parent.showChargeModal()"
11
+ :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)"
12
+ >新增收费</button>
13
+ </th>
14
+ <th class="textNoLineBreak">序号</th>
15
+ <th class="textNoLineBreak" v-if="selectdata.f_apply_type !== '开发商集体报建'">地址</th>
16
+ <th class="textNoLineBreak">缴费编号</th>
17
+ <th class="textNoLineBreak">收费金额(退款金额)</th>
18
+ <th class="textNoLineBreak">金额大写</th>
19
+ <th class="textNoLineBreak">收费项目</th>
20
+ <th class="textNoLineBreak">付款方式</th>
21
+ <th class="textNoLineBreak">收费人员</th>
22
+ <th class="textNoLineBreak">收费日期</th>
23
+ <th class="textNoLineBreak">实际收费日期</th>
24
+ <th class="textNoLineBreak">备注</th>
25
+ <th class="textNoLineBreak">缴费状态</th>
26
+ </tr>
27
+ </template>
28
+ <template partial='body'>
29
+ <tr>
30
+ <td style="text-align: center;">
31
+ <nobr>{{$index+1}}</nobr>
32
+ </td>
33
+ <td style="text-align: center;" v-if="selectdata.f_apply_type !== '开发商集体报建'">
34
+ <nobr>{{row.f_useraddres}}</nobr>
35
+ </td>
36
+ <td style="text-align: center;">
37
+ <nobr>{{row.f_charge_number}}</nobr>
38
+ </td>
39
+ <td style="text-align: center;">
40
+ <nobr>{{row.f_charge_money}}</nobr>
41
+ </td>
42
+ <td style="text-align: center;">
43
+ <nobr>{{row.f_amount_words}}</nobr>
44
+ </td>
45
+ <td style="text-align: center;">
46
+ <nobr>{{row.f_payment_term}}</nobr>
47
+ </td>
48
+ <td style="text-align: center;">
49
+ <nobr>{{row.f_payment_method}}</nobr>
50
+ </td>
51
+ <td style="text-align: center;">
52
+ <nobr>{{row.f_charge_collectors}}</nobr>
53
+ </td>
54
+ <td style="text-align: center;">
55
+ <nobr>{{row.f_charge_date}}</nobr>
56
+ </td>
57
+ <td style="text-align: center;">
58
+ <nobr>{{row.f_actual_date}}</nobr>
59
+ </td>
60
+ <td style="text-align: center;">
61
+ <nobr>{{row.f_charge_remarks}}</nobr>
62
+ </td>
63
+ <td style="text-align: center;">
64
+ <nobr>{{row.f_charge_status}}</nobr>
65
+ </td>
66
+ <td style="text-align: center;">
67
+ <nobr v-if="row.f_charge_status !== '退款'">
68
+ <button
69
+ type="button"
70
+ name="button"
71
+ class="btn btn-link"
72
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
73
+ @click="$parent.$parent.showInvalidModal(row)"
74
+ >作废</button>
75
+ </nobr>
76
+ </td>
77
+ </tr>
78
+ </template>
79
+ </data-grid>
80
+
81
+ <validator name="v">
82
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
83
+ <header slot="modal-header" class="modal-header">
84
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
85
+ <h4 class="modal-title">收费明细</h4>
86
+ </header>
87
+ <article slot="modal-body" class="modal-body clearfix">
88
+ <div class="form-group col-sm-12" v-if="false" :class="[$v.useraddres.required ? 'has-error' : '']">
89
+ <label class="col-sm-2 control-label">缴费地址:</label>
90
+ <div class="col-sm-10">
91
+ <input type="text" v-show="false" v-model="charge.useraddres.id" v-validate:useraddres = "['required']" >
92
+ <input-select width="100%" class="select select_list" placeholder='请选择'
93
+ v-model="charge.useraddres"
94
+ :value.sync="charge.useraddres"
95
+ :options='useraddresList'
96
+ :value-single="true"
97
+ @change="selectAddres()"
98
+ close-on-select ></input-select>
99
+ </div>
100
+ </div>
101
+ <div class="form-group col-sm-12" :class="[$v.f_payment_term.required ? 'has-error' : '']">
102
+ <label class="col-sm-2 control-label">收费项目:</label>
103
+ <div class="col-sm-10">
104
+ <input type="text" v-show="false" v-model="charge.f_payment_term" v-validate:f_payment_term = "['required']" >
105
+ <input-select width="100%" class="select select_list" placeholder='请选择'
106
+ v-model="charge.f_payment_term"
107
+ :value.sync="charge.f_payment_term"
108
+ :options='paymentTerm'
109
+ :value-single="true"
110
+ close-on-select ></input-select>
111
+ </div>
112
+ </div>
113
+ <div class="form-group col-sm-12" :class="[$v.f_charge_money.required ? 'has-error' : '']">
114
+ <label class="col-sm-2 control-label">收费金额:</label>
115
+ <div class="col-sm-10">
116
+ <input type="text"
117
+ class="form-control input_view"
118
+ style="width: 100%"
119
+ placeholder="0.00"
120
+ @keyup="handleInput"
121
+ @change="moneyChange"
122
+ v-validate:f_charge_money = "['required']"
123
+ v-model="charge.f_charge_money" />
124
+ </div>
125
+ </div>
126
+ <div class="form-group col-sm-12" :class="[$v.f_payment_method.required ? 'has-error' : '']">
127
+ <label class="col-sm-2 control-label">付款方式:</label>
128
+ <div class="col-sm-10">
129
+ <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
130
+ <input-select
131
+ placeholder='请选择' width="100%"
132
+ v-model="charge.f_payment_method"
133
+ :value.sync="charge.f_payment_method"
134
+ :options='paymentMethod'
135
+ class="select select_list"
136
+ :value-single="true"
137
+ @change="changePaymentMethod()"
138
+ close-on-select ></input-select>
139
+ </div>
140
+ </div>
141
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_name.required ? 'has-error' : '']">
142
+ <label class="col-sm-2 control-label">付款方名称:</label>
143
+ <div class="col-sm-10">
144
+ <input type="text"
145
+ class="form-control input_view"
146
+ style="width: 100%"
147
+ v-validate:f_payer_name = "['required']"
148
+ v-model="charge.f_payer_name" value="" />
149
+ </div>
150
+ </div>
151
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_account.required ? 'has-error' : '']">
152
+ <label class="col-sm-2 control-label">付款方账号:</label>
153
+ <div class="col-sm-10">
154
+ <input type="text" style="width: 100%" class="form-control input_view"
155
+ v-validate:f_payer_account = "['required']"
156
+ v-model="charge.f_payer_account" value=""/>
157
+ </div>
158
+ </div>
159
+ <div class="form-group col-sm-12" v-if="charge.f_payment_method === '银行转账'" :class="[$v.f_payer_number.required ? 'has-error' : '']">
160
+ <label class="col-sm-2 control-label">付款流水号:</label>
161
+ <div class="col-sm-10">
162
+ <input type="text"
163
+ class="form-control input_view"
164
+ style="width: 100%" @change="payerNumberChange()"
165
+ v-validate:f_payer_number = "['required']"
166
+ v-model="charge.f_payer_number" value="" />
167
+ </div>
168
+ </div>
169
+ <div class="form-group col-sm-12">
170
+ <label class="col-sm-2 control-label">金额大写:</label>
171
+ <div class="col-sm-10">
172
+ <input type="text"
173
+ class="form-control input_view"
174
+ style="width: 100%"
175
+ :value="smalltoBIG(0)"
176
+ readonly
177
+ v-model.sync="charge.f_amount_words" />
178
+ </div>
179
+ </div>
180
+ <div class="form-group col-sm-12"
181
+ v-if="selectdata.f_apply_type === '散户集体报建'"
182
+ >
183
+ <label class="col-sm-2 control-label">单价(户):</label>
184
+ <div class="col-sm-10">
185
+ <input type="text"
186
+ class="form-control input_view"
187
+ style="width: 100%"
188
+ readonly
189
+ v-model="selectdata.f_price" />
190
+ </div>
191
+ </div>
192
+ <div class="form-group col-sm-12"
193
+ v-if="selectdata.f_apply_type === '散户集体报建'"
194
+ >
195
+ <label class="col-sm-2 control-label">累计缴费金额:</label>
196
+ <div class="col-sm-10">
197
+ <input type="text"
198
+ class="form-control input_view"
199
+ style="width: 100%"
200
+ readonly
201
+ v-model="charge.f_cumulative_payment_money"
202
+ :value="charge.f_cumulative_payment_money || 0" />
203
+ </div>
204
+ </div>
205
+ <div class="form-group col-sm-12"
206
+ v-if="selectdata.f_apply_type === '散户集体报建'"
207
+ >
208
+ <label class="col-sm-2 control-label">未结金额:</label>
209
+ <div class="col-sm-10">
210
+ <input type="text"
211
+ class="form-control input_view"
212
+ style="width: 100%"
213
+ readonly
214
+ v-model="charge.f_outstanding_amount"
215
+ :value="charge.f_outstanding_amount || 0" />
216
+ </div>
217
+ </div>
218
+ <div class="form-group col-sm-12">
219
+ <label class="col-sm-2 control-label">应交总金额:</label>
220
+ <div class="col-sm-10">
221
+ <input type="text"
222
+ class="form-control input_view"
223
+ style="width: 100%"
224
+ readonly
225
+ v-model="selectdata.f_due_money" />
226
+ </div>
227
+ </div>
228
+ <div class="form-group col-sm-12">
229
+ <label class="col-sm-2 control-label">累计缴费总金额:</label>
230
+ <div class="col-sm-10">
231
+ <input type="text"
232
+ class="form-control input_view"
233
+ style="width: 100%"
234
+ readonly
235
+ v-model="selectdata.f_cumulative_payment_money" />
236
+ </div>
237
+ </div>
238
+ <div class="form-group col-sm-12">
239
+ <label class="col-sm-2 control-label">未结总金额:</label>
240
+ <div class="col-sm-10">
241
+ <input type="text"
242
+ class="form-control input_view"
243
+ style="width: 100%"
244
+ readonly
245
+ v-model="selectdata.f_surplus_money" />
246
+ </div>
247
+ </div>
248
+ <div class="form-group col-sm-12">
249
+ <label class="col-sm-2 control-label">备注:</label>
250
+ <div class="col-sm-10">
251
+ <input type="text"
252
+ class="form-control input_view"
253
+ style="width: 100%"
254
+ v-model="charge.f_charge_remarks" />
255
+ </div>
256
+ </div>
257
+ <div class="form-group col-sm-12">
258
+ <label class="col-sm-2 control-label">实际收款时间:</label>
259
+ <div class="col-sm-10">
260
+ <datepicker id="startDate" placeholder="实际收款时间"
261
+ style="width: 60%!important;"
262
+ v-model="charge.f_actual_date"
263
+ :value.sync="charge.f_actual_date"
264
+ :format="'yyyy-MM-dd HH:mm:ss'"
265
+ :show-reset-button="true"
266
+ >
267
+ </datepicker>
268
+ </div>
269
+ </div>
270
+ </article>
271
+ <footer slot="modal-footer" class="modal-footer">
272
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
273
+ </footer>
274
+ </modal>
275
+ </validator>
276
+
277
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
278
+ <header slot="modal-header" class="modal-header">
279
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
280
+ <h4 class="modal-title">作废收费</h4>
281
+ </header>
282
+ <article slot="modal-body" class="modal-body clearfix">
283
+ <div class="form-group col-sm-12" v-if="false">
284
+ <label class="col-sm-2 control-label">缴费地址:</label>
285
+ <div class="col-sm-10">
286
+ <input type="text"
287
+ class="form-control input_view"
288
+ style="width: 100%"
289
+ readonly
290
+ v-model="charge.f_useraddres" />
291
+ </div>
292
+ </div>
293
+ <div class="form-group col-sm-12">
294
+ <label class="col-sm-2 control-label">收费金额:</label>
295
+ <div class="col-sm-10">
296
+ <input type="text"
297
+ class="form-control input_view"
298
+ style="width: 100%"
299
+ readonly
300
+ v-model="charge.f_charge_money" />
301
+ </div>
302
+ </div>
303
+ <div class="form-group col-sm-12">
304
+ <label class="col-sm-2 control-label">付款方式:</label>
305
+ <div class="col-sm-10">
306
+ <input type="text"
307
+ class="form-control input_view"
308
+ style="width: 100%"
309
+ readonly
310
+ v-model="charge.f_payment_method" />
311
+ </div>
312
+ </div>
313
+ <div class="form-group col-sm-12">
314
+ <label class="col-sm-2 control-label">金额大写:</label>
315
+ <div class="col-sm-10">
316
+ <input type="text"
317
+ class="form-control input_view"
318
+ style="width: 100%"
319
+ readonly
320
+ v-model="charge.f_amount_words" />
321
+ </div>
322
+ </div>
323
+ <div class="form-group col-sm-12">
324
+ <label class="col-sm-2 control-label">收费人员:</label>
325
+ <div class="col-sm-10">
326
+ <input type="text"
327
+ class="form-control input_view"
328
+ style="width: 100%"
329
+ readonly
330
+ v-model="charge.f_charge_collectors" />
331
+ </div>
332
+ </div>
333
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
334
+ <label class="col-sm-2 control-label">作废原因:</label>
335
+ <div class="col-sm-10">
336
+ <input type="text"
337
+ class="form-control input_view"
338
+ style="width: 100%"
339
+ v-model="charge.f_void_remarks" />
340
+ </div>
341
+ </div>
342
+ </article>
343
+ <footer slot="modal-footer" class="modal-footer">
344
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
345
+ </footer>
346
+ </modal>
347
+
348
+
349
+ <modal v-if="showQrCode" :show.sync="showQrCode" v-ref:modal :large="true" :backdrop="false" title="二维码">
350
+ <header slot="modal-header" class="modal-header">
351
+ <button type="button" class="close" @click="closeQrCode"><span>&times;</span></button>
352
+ </header>
353
+ <article slot="modal-body" class="modal-body clearfix">
354
+ <div partial>
355
+ <div class="" align="center">
356
+ <div style="margin-bottom:10px "><img src="../../../assets/scanCode.png">请扫描下方二维码进行付款</div>
357
+ <div class="row app-row">
358
+ <div class="col-xs-12">
359
+ <label class="font text-left">订单编号:{{ order.body.tradeNo }}</label>
360
+ </div>
361
+ </div>
362
+ </div>
363
+ <div class="" align="center">
364
+ <div class="QR-code" >
365
+ <img src="../../../assets/qrcode_no.png" style="width: 266px;height: 266px"/>
366
+ <div id="qrcode" style="margin-top: 25px;width: 266px;height: 266px"></div>
367
+ </div>
368
+ </div>
369
+ </div>
370
+ </article>
371
+ <footer slot="modal-footer" class="modal-footer">
372
+ <button type="button" class="btn btn-primary" @click="closeQrCode()">关闭</button>
373
+ </footer>
374
+ </modal>
375
+ </div>
376
+ </template>
377
+ <script>
378
+ import {getNowDate,isEmpty} from '../../../components/Util'
379
+ import {PagedList} from 'vue-client'
380
+ import {HttpResetClass} from 'vue-client'
381
+ import Vue from 'vue'
382
+ import QRCode from "qrcodejs2";
383
+
384
+ export default {
385
+ title: '收费管理',
386
+ props: {
387
+ selectdata: {
388
+ type: Object
389
+ },
390
+ mark: {
391
+ type: Number,
392
+ default: 0
393
+ }
394
+ },
395
+ data () {
396
+ return {
397
+ showCharge: false, // 收费明细
398
+ showInvalid: false, // 作废
399
+ model: {
400
+ data: null
401
+ }, // 记录
402
+ useraddresList: [], // 地址列表
403
+ charge: {
404
+
405
+ },
406
+ order:'',
407
+ isTimeout:false,
408
+ showQrCode:false
409
+ }
410
+ },
411
+ ready () {
412
+ this.search()
413
+ },
414
+ methods: {
415
+ closeQrCode(){
416
+ document.getElementById('qrcode').innerHTML = ''
417
+ },
418
+ async openQrCode() {
419
+ const merchantMsg =this.$appdata.getSingleValue('商户号')
420
+ if (!merchantMsg){
421
+ this.$showMessage('未配备商户号,请联系管理员!')
422
+ return
423
+ }
424
+ const outTradeNo = this.generateRandomString(30)
425
+ // 下订单
426
+ let http = new HttpResetClass()
427
+ const val = {
428
+ "body": this.charge.f_payment_term,
429
+ "detail": this.charge.f_payment_term,
430
+ "totalAmount": (this.charge.f_charge_money).toString(),
431
+ "merchantMsg": merchantMsg,//商户id
432
+ "outTradeNo": outTradeNo,//随机数30位
433
+ "service": "nativePay",//死值
434
+ "tradeType": "wechat_jsapi"//死值
435
+ }
436
+ try {
437
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/bank/rs/logic/BC_10001`, {data: val}, {
438
+ resolveMsg: null,
439
+ rejectMsg: null
440
+ })
441
+ if (res.data.status === 200) {
442
+ console.log("调用结果", res.data, res.data.body.url)
443
+ try {
444
+ this.order = res.data
445
+ this.isTimeout = false
446
+ this.showQrCode = true
447
+ console.log(this.order)
448
+ this.$nextTick(() => {
449
+ this.qrcode(res.data.body.url)
450
+ })
451
+ if (this.order.body.tradeNo) {
452
+ this.timer1 = window.setInterval(this.getOrderInformation, 3000)
453
+ }
454
+ } catch (e) {
455
+ this.$showMessage('创建订单失败!')
456
+ }
457
+ } else {
458
+ this.$showMessage('获取二维码失败!')
459
+ }
460
+ } catch (e) {
461
+ this.$showMessage('获取二维码失败,请检查网络!')
462
+ }
463
+ },
464
+ // 获取订单信息
465
+ async getOrderInformation() {
466
+ const merchantMsg =this.$appdata.getSingleValue('商户号')
467
+ // 查询订单信息
468
+ console.log('查询订单信息!!!', this.order)
469
+ try {
470
+ let http = new HttpResetClass()
471
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/bank/rs/logic/BC_10003`, {
472
+ data: {
473
+ "service": "queryOrder",
474
+ "outTradeNo": this.order.body.outTradeNo,
475
+ "merchantMsg": merchantMsg,
476
+ "tradeNo": ""
477
+ }
478
+ }, {
479
+ resolveMsg: null,
480
+ rejectMsg: null
481
+ })
482
+ // 支付成功
483
+ this.orderstatus = res.data
484
+ console.log('查询结果=======', res.data)
485
+ if (res.data.status == '200') {
486
+ window.clearInterval(this.timer1)
487
+ console.log('支付成功', this.orderstatus)
488
+ this.order = {}
489
+ }
490
+ } catch (e) {
491
+ window.clearInterval(this.timer1)
492
+ this.$showMessage('创建订单失败!')
493
+ this.order = {}
494
+ }
495
+ },
496
+ qrcode(url) {
497
+ new QRCode('qrcode', {
498
+ text: url, // 设置二维码内容或跳转地址
499
+ width: 266, // 设置宽度,单位像素
500
+ height: 266, // 设置高度,单位像素
501
+ correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
502
+ })
503
+ },
504
+ generateRandomString(length) {
505
+ let result = new Date().getTime().toString()
506
+ const characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
507
+ const charactersLength = characters.length;
508
+ for (let i = 0; i < length; i++) {
509
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
510
+ }
511
+ return result.substring(0, 30);
512
+ },
513
+ async payerNumberChange () {
514
+ if (isEmpty(this.charge.f_payer_number)) {
515
+ return
516
+ }
517
+ let http = new HttpResetClass()
518
+ let data = {
519
+ tablename: 't_charge_record',
520
+ condition: `f_payer_number = '${this.charge.f_payer_number}'`
521
+ }
522
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
523
+ resolveMsg: null,
524
+ rejectMsg: '流水号查询失败!!!'
525
+ })
526
+ if (res.data.length > 0) {
527
+ this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
528
+ return
529
+ }
530
+ },
531
+ print () {
532
+ this.$refs.print.$refs.print.PrintTable()
533
+ },
534
+ selectAddres () {
535
+ if (this.charge.useraddres) {
536
+ this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
537
+ this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
538
+ } else {
539
+ this.charge.f_cumulative_payment_money = 0
540
+ this.charge.f_outstanding_amount = this.selectdata.f_price
541
+ }
542
+ },
543
+ async invalidApplyCharge() {
544
+
545
+ let http = new HttpResetClass()
546
+ let data = {
547
+ apply: this.selectdata,
548
+ user: Vue.user,
549
+ charge: this.charge
550
+ }
551
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/invalidApplyCharge`, {data:data}, {
552
+ resolveMsg: null,
553
+ rejectMsg: '作废失败!!!'
554
+ })
555
+ this.selectdata = res.data
556
+
557
+ this.$dispatch('breakControl', this.selectdata)
558
+ },
559
+
560
+ // 打开作废收费
561
+ showInvalidModal(row) {
562
+ this.charge = row
563
+ this.showInvalid = true
564
+ },
565
+ // 新增收费
566
+ async saveCharge() {
567
+ if(this.charge.f_payment_method=='二维码收费'){
568
+ this.openQrCode()
569
+ }
570
+ let http = new HttpResetClass()
571
+ let data = {
572
+ apply: this.selectdata,
573
+ user: Vue.user,
574
+ charge: this.charge
575
+ }
576
+
577
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/addApplyChargeRecord`, {data:data}, {
578
+ resolveMsg: null,
579
+ rejectMsg: '缴费失败!!!'
580
+ })
581
+ this.selectdata = res.data
582
+
583
+ this.$dispatch('breakControl', this.selectdata)
584
+ },
585
+ moneyChange () {
586
+ if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
587
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
588
+ this.charge.f_charge_money = null
589
+ return
590
+ }
591
+ if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
592
+ this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
593
+ this.charge.f_charge_money = null
594
+ return
595
+ }
596
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
597
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
598
+ this.charge.f_charge_money = null
599
+ return
600
+ }
601
+ },
602
+ // 金额转大写
603
+ handleInput(e) {
604
+ // 通过正则过滤小数点后两位
605
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
606
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
607
+ },
608
+ // 金额转大写
609
+ smalltoBIG(n) {
610
+ let fraction = ['角', '分'];
611
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
612
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
613
+ let head = n < 0 ? '欠' : '';
614
+ n = Math.abs(n);
615
+
616
+ let s = '';
617
+
618
+ for (var i = 0; i < fraction.length; i++) {
619
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
620
+ }
621
+ s = s || '整';
622
+ n = Math.floor(n);
623
+
624
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
625
+ let p = '';
626
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
627
+ p = digit[n % 10] + unit[1][j] + p;
628
+ n = Math.floor(n / 10);
629
+ }
630
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
631
+ }
632
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
633
+ },
634
+ async changePaymentMethod () {
635
+ if (this.charge.f_payment_method === '银行转账' && this.selectdata.f_apply_type === '团购报建') {
636
+ let http = new HttpResetClass()
637
+ let data = {
638
+ tablename: 't_dev_info',
639
+ condition: `f_orgid = '${Vue.user.orgid}' and id = '${this.selectdata.f_dev_id}'`
640
+ }
641
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
642
+ resolveMsg: null,
643
+ rejectMsg: '开发商档案查询失败!!!'
644
+ })
645
+
646
+ this.charge.f_payer_name = res.data[0].f_dev_name
647
+ this.charge.f_payer_account = res.data[0].f_bank_account
648
+ }
649
+ },
650
+ async getUserAddress() {
651
+ let http = new HttpResetClass()
652
+ let data = {}
653
+ let url = null
654
+ if (this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
655
+ data = {
656
+ condition: `ui.f_userinfo_id = ${this.selectdata.f_userinfo_id}`
657
+ }
658
+ url = `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetUserinfos`
659
+ } else {
660
+ data = {
661
+ condition: this.selectdata.f_apply_type === '散户集体报建' ? `nvl(cr.f_cumulative_payment_money, 0) < ${this.selectdata.f_price}` : '1=1',
662
+ f_process_id: this.selectdata.f_process_id
663
+ }
664
+ url = `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndCumulativePayment`
665
+ }
666
+ let res = await http.load('POST', url, {data:data}, {
667
+ resolveMsg: null,
668
+ rejectMsg: '用户获取失败!!!'
669
+ })
670
+
671
+ if (res.data.length <= 0) {
672
+ this.$showAlert('暂无需要缴费用户!!!', 'warning', 3000)
673
+ }
674
+
675
+ this.useraddresList = res.data.map(item => {
676
+ return {
677
+ // 有用户姓名地址后拼接姓名
678
+ label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
679
+ value: item
680
+ }
681
+ })
682
+
683
+ },
684
+ async showChargeModal() {
685
+ this.getUserAddress()
686
+
687
+ if (this.selectdata.f_apply_type === '团购报建') {
688
+ this.charge.f_dev_info_id = this.selectdata.f_dev_id
689
+ }
690
+
691
+ this.showCharge = true
692
+ },
693
+ async search () {
694
+ let http = new HttpResetClass()
695
+ let data = {
696
+ // condition: `cr.f_charge_status != '退款'`,
697
+ f_process_id: this.selectdata.f_process_id
698
+ }
699
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyChargeRecord`, {data:data}, {
700
+ resolveMsg: null,
701
+ rejectMsg: '收费记录查询失败!!!'
702
+ })
703
+ this.model.data = res.data
704
+ },
705
+ // 关闭对话框
706
+ closeModal() {
707
+ this.showCharge = false
708
+ this.showInvalid = false
709
+ this.charge = {}
710
+ this.search()
711
+ }
712
+ },
713
+ events: {
714
+ },
715
+ computed: {
716
+ paymentMethod() {
717
+ return this.$appdata.getParam("付款方式")
718
+ },
719
+ paymentTerm() {
720
+ return this.$appdata.getParam("收费项目")
721
+ }
722
+ },
723
+ watch: {
724
+ }
725
+ }
726
+ </script>
727
+ <style scoped>
728
+ .textNoLineBreak {
729
+ white-space: nowrap;
730
+ }
731
+ .head-but{
732
+ margin-left: 5px;
733
+ height: 34px;
734
+ /*background-color: #6aa6e2;*/
735
+ border-radius: 4px;
736
+ font-family: PingFang;
737
+ color: #ffffff;
738
+ }
739
+ </style>