apply-clients 3.4.64 → 3.4.66

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 (105) hide show
  1. package/build/dev-server.js +2 -2
  2. package/dist-android/static/18.js +2 -2
  3. package/dist-android/static/18.js.map +1 -1
  4. package/dist-android/static/19.js +2 -2
  5. package/dist-android/static/19.js.map +1 -1
  6. package/dist-android/static/24.js +2 -2
  7. package/dist-android/static/24.js.map +1 -1
  8. package/dist-android/static/25.js +2 -2
  9. package/dist-android/static/25.js.map +1 -1
  10. package/dist-android/static/26.js +2 -2
  11. package/dist-android/static/26.js.map +1 -1
  12. package/dist-android/static/28.js +2 -2
  13. package/dist-android/static/28.js.map +1 -1
  14. package/dist-android/static/30.js +2 -2
  15. package/dist-android/static/30.js.map +1 -1
  16. package/dist-android/static/34.js +2 -2
  17. package/dist-android/static/34.js.map +1 -1
  18. package/dist-android/static/43.js +2 -2
  19. package/dist-android/static/43.js.map +1 -1
  20. package/dist-android/static/47.js +2 -2
  21. package/dist-android/static/47.js.map +1 -1
  22. package/dist-android/static/50.js +2 -2
  23. package/dist-android/static/50.js.map +1 -1
  24. package/dist-android/static/52.js +2 -2
  25. package/dist-android/static/52.js.map +1 -1
  26. package/dist-android/static/53.js +2 -2
  27. package/dist-android/static/53.js.map +1 -1
  28. package/dist-android/static/54.js +2 -2
  29. package/dist-android/static/54.js.map +1 -1
  30. package/dist-android/static/60.js +2 -2
  31. package/dist-android/static/60.js.map +1 -1
  32. package/dist-android/static/63.js +2 -2
  33. package/dist-android/static/63.js.map +1 -1
  34. package/dist-android/static/64.js +2 -2
  35. package/dist-android/static/64.js.map +1 -1
  36. package/dist-android/static/78.js +2 -2
  37. package/dist-android/static/78.js.map +1 -1
  38. package/dist-android/static/83.js +2 -2
  39. package/dist-android/static/83.js.map +1 -1
  40. package/dist-android/static/84.js +2 -2
  41. package/dist-android/static/84.js.map +1 -1
  42. package/dist-android/static/86.js +2 -2
  43. package/dist-android/static/86.js.map +1 -1
  44. package/dist-android/static/87.js +2 -2
  45. package/dist-android/static/87.js.map +1 -1
  46. package/dist-android/static/89.js +2 -2
  47. package/dist-android/static/89.js.map +1 -1
  48. package/dist-android/static/97.js +2 -2
  49. package/dist-android/static/97.js.map +1 -1
  50. package/dist-android/static/app.js +80 -80
  51. package/dist-android/static/app.js.map +1 -1
  52. package/package.json +4 -3
  53. package/src/apply.js +5 -0
  54. package/src/applyAndroid.js +2 -0
  55. package/src/components/android/AppSign.vue +154 -154
  56. package/src/components/android/AppTakePic.vue +143 -143
  57. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
  58. package/src/components/android/Ignition/VentilationIgnition.vue +408 -0
  59. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +455 -0
  60. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  61. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  62. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  63. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  64. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  65. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -537
  66. package/src/components/product/ApplyCharge/ApplyChargeList.vue +470 -470
  67. package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -445
  68. package/src/components/product/Ignition/IgnitionDispatch.vue +92 -0
  69. package/src/components/product/Ignition/IgnitionList.vue +236 -0
  70. package/src/components/product/Ignition/IgnitionListManage.vue +413 -0
  71. package/src/components/product/Ignition/IgnitionRecord.vue +357 -0
  72. package/src/components/product/Process/ExplorationSelect.vue +0 -13
  73. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  74. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  75. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  76. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  77. package/src/components/product/Process/Service/ServiceControl.vue +56 -1
  78. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  79. package/src/components/product/Process/ShowBackReason.vue +33 -33
  80. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +882 -882
  81. package/src/components/product/VueUtils/ApplyUpload.vue +287 -287
  82. package/src/filiale/gehua/pc/ServiceControl.vue +1938 -1938
  83. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  84. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +520 -520
  85. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  86. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  87. package/src/filiale/guangxi/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  88. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  89. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +724 -724
  90. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  91. package/src/filiale/guangxi/pc/Process/Service/ShowBackReason.vue +33 -33
  92. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  93. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +517 -517
  94. package/src/filiale/guangxi/pc/Process/ShowBackReason.vue +33 -33
  95. package/src/filiale/shexian/pc/ExplorationSelect.vue +474 -0
  96. package/src/filiale/shexian/pc.js +6 -0
  97. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -735
  98. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  99. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  100. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  101. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  102. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  103. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -621
  104. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1108
  105. package/dist.7z +0 -0
@@ -1,621 +1,621 @@
1
- <template>
2
- <div class="col-sm-12" style="margin: 20px 0px;">
3
- <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
- <template partial='head'>
5
- <tr>
6
- <th class="textNoLineBreak">序号</th>
7
- <th class="textNoLineBreak">缴费编号</th>
8
- <th class="textNoLineBreak">收费金额</th>
9
- <th class="textNoLineBreak">金额大写</th>
10
- <th class="textNoLineBreak">付款方式</th>
11
- <th class="textNoLineBreak">收费人员</th>
12
- <th class="textNoLineBreak">收费日期</th>
13
- <th class="textNoLineBreak">备注</th>
14
- <th class="textNoLineBreak">缴费状态</th>
15
- <th class="textNoLineBreak">作废人员</th>
16
- <th class="textNoLineBreak">作废时间</th>
17
- <th class="textNoLineBreak">作废原因</th>
18
- <th class="textNoLineBreak">票据类型</th>
19
- <th class="textNoLineBreak">票据状态</th>
20
- <th class="textNoLineBreak">
21
- <button
22
- type="button"
23
- class="btn btn-info head-but"
24
- @click="$parent.$parent.showChargeModal()"
25
- :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)"
26
- >新增收费</button>
27
- </th>
28
- </tr>
29
- </template>
30
- <template partial='body'>
31
- <tr>
32
- <td style="text-align: center;">
33
- <nobr>{{$index+1}}</nobr>
34
- </td>
35
- <td style="text-align: center;">
36
- <nobr>{{row.f_charge_number}}</nobr>
37
- </td>
38
- <td style="text-align: center;">
39
- <nobr>{{row.f_charge_money}}</nobr>
40
- </td>
41
- <td style="text-align: center;">
42
- <nobr>{{row.f_amount_words}}</nobr>
43
- </td>
44
- <td style="text-align: center;">
45
- <nobr>{{row.f_payment_method}}</nobr>
46
- </td>
47
- <td style="text-align: center;">
48
- <nobr>{{row.f_charge_collectors}}</nobr>
49
- </td>
50
- <td style="text-align: center;">
51
- <nobr>{{row.f_charge_date}}</nobr>
52
- </td>
53
- <td style="text-align: center;">
54
- <nobr>{{row.f_charge_remarks}}</nobr>
55
- </td>
56
- <td style="text-align: center;">
57
- <nobr>{{row.f_charge_status}}</nobr>
58
- </td>
59
- <td style="text-align: center;">
60
- <nobr>{{row.f_void_staff}}</nobr>
61
- </td>
62
- <td style="text-align: center;">
63
- <nobr>{{row.f_void_date}}</nobr>
64
- </td>
65
- <td style="text-align: center;">
66
- <nobr>{{row.f_void_remarks}}</nobr>
67
- </td>
68
- <td style="text-align: center;">
69
- <nobr>{{row.f_bill_style}}</nobr>
70
- </td>
71
- <td style="text-align: center;">
72
- <nobr>{{row.f_bill_state}}</nobr>
73
- </td>
74
- <td style="text-align: center;">
75
- <nobr v-if="row.f_charge_status !== '退款'">
76
- <button
77
- type="button"
78
- name="button"
79
- class="btn btn-link"
80
- :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
81
- @click="$parent.$parent.showInvalidModal(row)"
82
- >作废</button>
83
- <button
84
- type="button"
85
- name="button"
86
- class="btn btn-link"
87
- @click="$parent.$parent.showPrintModal(row, '普通收据')"
88
- >打印收据</button>
89
-
90
- <button
91
- type="button" name="button" class="btn btn-link"
92
- v-if="row.f_bill_state !== '开票成功'"
93
- @click="$parent.$parent.openBill(row)"
94
- >开票</button>
95
- <button
96
- type="button" name="button" class="btn btn-link"
97
- v-else
98
- @click="$parent.$parent.showPrintModal(row)"
99
- >查看发票</button>
100
- </nobr>
101
- </td>
102
- </tr>
103
- </template>
104
- </data-grid>
105
-
106
- <validator name="v">
107
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
108
- <header slot="modal-header" class="modal-header">
109
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
110
- <h4 class="modal-title">收费明细</h4>
111
- </header>
112
- <article slot="modal-body" class="modal-body clearfix">
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="number"
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
- close-on-select ></input-select>
138
- </div>
139
- </div>
140
- <div class="form-group col-sm-12" :class="[$v.f_bill_style.required ? 'has-error' : '']">
141
- <label class="col-sm-2 control-label">票据类型:</label>
142
- <div class="col-sm-10">
143
- <input type="text" v-show="false" v-model="charge.f_bill_style" v-validate:f_bill_style = "['required']" >
144
- <input-select
145
- placeholder='请选择' width="100%"
146
- v-model="charge.f_bill_style"
147
- :value.sync="charge.f_bill_style"
148
- :options='billStyleList'
149
- class="select select_list"
150
- :value-single="true"
151
- close-on-select ></input-select>
152
- </div>
153
- </div>
154
- <div class="form-group col-sm-12"
155
- v-if="charge.f_bill_style !== '普通收据'"
156
- :class="[$v.f_taxpayer_id.required ? 'has-error' : '']">
157
- <label class="col-sm-2 control-label">购货单位识别号:</label>
158
- <div class="col-sm-10">
159
- <input type="text" class="form-control input_view" style="width: 100%"
160
- v-validate:f_taxpayer_id = "['required']"
161
- v-model="charge.f_taxpayer_id" :value="selectdata.f_taxpayer_id" />
162
- </div>
163
- </div>
164
- <div class="form-group col-sm-12"
165
- v-if="charge.f_bill_style !== '普通收据'"
166
- :class="[$v.f_paper_name.required ? 'has-error' : '']">
167
- <label class="col-sm-2 control-label">购货单位名称:</label>
168
- <div class="col-sm-10">
169
- <input type="text" class="form-control input_view" style="width: 100%"
170
- v-validate:f_paper_name = "['required']"
171
- v-model="charge.f_paper_name" :value="selectdata.f_paper_name" />
172
- </div>
173
- </div>
174
- <div class="form-group col-sm-12"
175
- v-if="charge.f_bill_style !== '普通收据'"
176
- :class="[$v.f_paper_account.required ? 'has-error' : '']">
177
- <label class="col-sm-2 control-label">购货单位银行账号:</label>
178
- <div class="col-sm-10">
179
- <input type="text" class="form-control input_view" style="width: 100%"
180
- v-validate:f_paper_account = "['required']"
181
- v-model="charge.f_paper_account" :value="selectdata.f_paper_account" />
182
- </div>
183
- </div>
184
- <div class="form-group col-sm-12"
185
- v-if="charge.f_bill_style !== '普通收据'"
186
- :class="[$v.f_address_phone.required ? 'has-error' : '']">
187
- <label class="col-sm-2 control-label">购货单位地址电话:</label>
188
- <div class="col-sm-10">
189
- <input type="text" class="form-control input_view" style="width: 100%"
190
- v-validate:f_address_phone = "['required']"
191
- v-model="charge.f_address_phone" :value="selectdata.f_address_phone" />
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
- :value="smalltoBIG(0)"
201
- readonly
202
- v-model.sync="charge.f_amount_words" />
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_due_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
- readonly
222
- v-model="selectdata.f_cumulative_payment_money" />
223
- </div>
224
- </div>
225
- <div class="form-group col-sm-12">
226
- <label class="col-sm-2 control-label">未结总金额:</label>
227
- <div class="col-sm-10">
228
- <input type="text"
229
- class="form-control input_view"
230
- style="width: 100%"
231
- readonly
232
- v-model="selectdata.f_surplus_money" />
233
- </div>
234
- </div>
235
- <div class="form-group col-sm-12">
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
- v-model="charge.f_charge_remarks" />
242
- </div>
243
- </div>
244
- </article>
245
- <footer slot="modal-footer" class="modal-footer">
246
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
247
- </footer>
248
- </modal>
249
- </validator>
250
-
251
- <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
252
- <header slot="modal-header" class="modal-header">
253
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
254
- <h4 class="modal-title">作废收费</h4>
255
- </header>
256
- <article slot="modal-body" class="modal-body clearfix">
257
- <div class="form-group col-sm-12" v-if="false">
258
- <label class="col-sm-2 control-label">缴费地址:</label>
259
- <div class="col-sm-10">
260
- <input type="text"
261
- class="form-control input_view"
262
- style="width: 100%"
263
- readonly
264
- v-model="charge.f_useraddres" />
265
- </div>
266
- </div>
267
- <div class="form-group col-sm-12">
268
- <label class="col-sm-2 control-label">收费金额:</label>
269
- <div class="col-sm-10">
270
- <input type="text"
271
- class="form-control input_view"
272
- style="width: 100%"
273
- readonly
274
- v-model="charge.f_charge_money" />
275
- </div>
276
- </div>
277
- <div class="form-group col-sm-12">
278
- <label class="col-sm-2 control-label">付款方式:</label>
279
- <div class="col-sm-10">
280
- <input type="text"
281
- class="form-control input_view"
282
- style="width: 100%"
283
- readonly
284
- v-model="charge.f_payment_method" />
285
- </div>
286
- </div>
287
- <div class="form-group col-sm-12">
288
- <label class="col-sm-2 control-label">金额大写:</label>
289
- <div class="col-sm-10">
290
- <input type="text"
291
- class="form-control input_view"
292
- style="width: 100%"
293
- readonly
294
- v-model="charge.f_amount_words" />
295
- </div>
296
- </div>
297
- <div class="form-group col-sm-12">
298
- <label class="col-sm-2 control-label">收费人员:</label>
299
- <div class="col-sm-10">
300
- <input type="text"
301
- class="form-control input_view"
302
- style="width: 100%"
303
- readonly
304
- v-model="charge.f_charge_collectors" />
305
- </div>
306
- </div>
307
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
308
- <label class="col-sm-2 control-label">作废原因:</label>
309
- <div class="col-sm-10">
310
- <input type="text"
311
- class="form-control input_view"
312
- style="width: 100%"
313
- v-model="charge.f_void_remarks" />
314
- </div>
315
- </div>
316
- </article>
317
- <footer slot="modal-footer" class="modal-footer">
318
- <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
319
- </footer>
320
- </modal>
321
-
322
- <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false">
323
- <header slot="modal-header" class="modal-header">
324
- <button type="button" class="close" @click="$dispatch('breakControl', this.selectdata)"><span>&times;</span></button>
325
- <h4 class="modal-title">票据信息</h4>
326
- </header>
327
- <article slot="modal-body" class="modal-body clearfix">
328
- <template v-if="charge.f_bill_style === '普通收据'">
329
- <apply-print-charge :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-charge>
330
- </template>
331
- <template v-else>
332
- <iframe width="100%" height="500px" :src="charge.f_bill_url" v-if="charge.f_bill_url"></iframe>
333
- </template>
334
- </article>
335
- <footer slot="modal-footer" class="modal-footer">
336
- <button type="button" class="btn btn-primary" v-if="charge.f_bill_style === '普通收据'" @click="print()">打印</button>
337
- </footer>
338
- </modal>
339
- </div>
340
- </template>
341
- <script>
342
- import {PagedList} from 'vue-client'
343
- import {HttpResetClass} from 'vue-client'
344
- import Vue from 'vue'
345
- import {isEmpty} from '../../../../../components/Util'
346
-
347
- export default {
348
- title: '收费管理',
349
- props: {
350
- selectdata: {
351
- type: Object
352
- },
353
- mark: {
354
- type: Number,
355
- default: 0
356
- }
357
- },
358
- data () {
359
- return {
360
- showCharge: false, // 收费明细
361
- showInvalid: false, // 作废
362
- showPrint: false, // 打印
363
- model: {
364
- data: null
365
- }, // 记录
366
- useraddresList: [], // 地址列表
367
- charge: {
368
-
369
- }
370
- }
371
- },
372
- ready () {
373
- this.search()
374
- },
375
- methods: {
376
- async openBill (charge) {
377
- this.charge = charge
378
- let data = null
379
- let res = null
380
-
381
- let http = new HttpResetClass()
382
-
383
- if (isEmpty(this.charge.f_bill_id)) {
384
- data = {
385
- id: this.charge.id,
386
- charge_type: '报装收费'
387
- }
388
- res = await http.load('POST', 'rs/logic/bjEticketCharge', {data:data}, {
389
- resolveMsg: null,
390
- rejectMsg: '开票失败!!!'
391
- })
392
- this.charge.f_bill_id = res.data.id
393
- }
394
-
395
- data = {
396
- id: this.charge.f_bill_id,
397
- f_sell_id: this.charge.id
398
- }
399
- try {
400
- res = await http.load('POST', 'rs/logic/bjOpenEticket', {data:data}, {
401
- resolveMsg: null,
402
- rejectMsg: '开票失败!!!'
403
- })
404
-
405
- res.data.f_bill_url = 'https://dlj.51fapiao.cn/dlj/v7/de4c9b985021111ef1c722c2914e34d9273291'
406
-
407
- if (res.data.f_bill_state !== '开票成功') {
408
- throw '开票失败!!!'
409
- }
410
- this.charge.f_bill_state = res.data.f_bill_state
411
- this.charge.f_bill_url = res.data.f_bill_url
412
-
413
- this.showPrint = true
414
- } catch (e) {
415
- console.error(e)
416
- this.charge.f_bill_state = '开票失败'
417
-
418
- data = {
419
- id: this.charge.id
420
- }
421
- res = await http.load('POST', 'rs/logic/updateChargeBill', {data:data}, {
422
- resolveMsg: null,
423
- rejectMsg: '收费信息更新失败!!!'
424
- })
425
-
426
- throw e
427
- }
428
- },
429
- async payerNumberChange () {
430
- if (isEmpty(this.charge.f_payer_number)) {
431
- return
432
- }
433
- let http = new HttpResetClass()
434
- let data = {
435
- tablename: 't_charge_record',
436
- condition: `f_payer_number = '${this.charge.f_payer_number}'`
437
- }
438
- let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
439
- resolveMsg: null,
440
- rejectMsg: '流水号查询失败!!!'
441
- })
442
- if (res.data.length > 0) {
443
- this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
444
- return
445
- }
446
- },
447
- print () {
448
- this.$refs.print.$refs.print.PrintTable()
449
- this.$dispatch('breakControl', this.selectdata)
450
- },
451
- showPrintModal(row, type) {
452
- this.charge = row
453
-
454
- if (type === '普通收据') {
455
- this.charge.f_bill_style = type
456
- }
457
-
458
- this.showPrint = true
459
- },
460
- selectAddres () {
461
- if (this.charge.useraddres) {
462
- this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
463
- this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
464
- } else {
465
- this.charge.f_cumulative_payment_money = 0
466
- this.charge.f_outstanding_amount = this.selectdata.f_price
467
- }
468
- },
469
- async invalidApplyCharge() {
470
-
471
- let http = new HttpResetClass()
472
- let data = {
473
- apply: this.selectdata,
474
- user: this.$login.f,
475
- charge: this.charge
476
- }
477
- let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
478
- resolveMsg: null,
479
- rejectMsg: '作废失败!!!'
480
- })
481
- this.selectdata = res.data
482
-
483
- this.$dispatch('breakControl', this.selectdata)
484
- },
485
- // 打开作废收费
486
- showInvalidModal(row) {
487
- this.charge = row
488
- this.showInvalid = true
489
- },
490
- // 新增收费
491
- async saveCharge() {
492
- let http = new HttpResetClass()
493
- let data = {
494
- apply: this.selectdata,
495
- user: this.$login.f,
496
- charge: this.charge
497
- }
498
-
499
- let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
500
- resolveMsg: null,
501
- rejectMsg: '缴费失败!!!'
502
- })
503
-
504
- this.charge = res.data
505
-
506
- this.showCharge = false
507
-
508
- if (this.charge.f_bill_style !== '普通收据') {
509
-
510
- try {
511
- await this.openBill(this.charge)
512
- } catch (e) {
513
- this.$dispatch('breakControl', this.selectdata)
514
- }
515
- } else {
516
- this.showPrint = true
517
- }
518
-
519
- },
520
- moneyChange () {
521
- if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
522
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
523
- this.charge.f_charge_money = null
524
- return
525
- }
526
- if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
527
- this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
528
- this.charge.f_charge_money = null
529
- return
530
- }
531
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
532
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
533
- this.charge.f_charge_money = null
534
- return
535
- }
536
- },
537
- // 金额转大写
538
- handleInput(e) {
539
- // 通过正则过滤小数点后两位
540
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
541
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
542
- },
543
- // 金额转大写
544
- smalltoBIG(n) {
545
- let fraction = ['角', '分'];
546
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
547
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
548
- let head = n < 0 ? '欠' : '';
549
- n = Math.abs(n);
550
-
551
- let s = '';
552
-
553
- for (var i = 0; i < fraction.length; i++) {
554
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
555
- }
556
- s = s || '整';
557
- n = Math.floor(n);
558
-
559
- for (var i = 0; i < unit[0].length && n > 0; i++) {
560
- let p = '';
561
- for (var j = 0; j < unit[1].length && n > 0; j++) {
562
- p = digit[n % 10] + unit[1][j] + p;
563
- n = Math.floor(n / 10);
564
- }
565
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
566
- }
567
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
568
- },
569
- async showChargeModal() {
570
- this.showCharge = true
571
- },
572
- async search () {
573
- let http = new HttpResetClass()
574
- let data = {
575
- f_process_id: this.selectdata.f_process_id
576
- }
577
- let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
578
- resolveMsg: null,
579
- rejectMsg: '收费记录查询失败!!!'
580
- })
581
- this.model.data = res.data
582
- },
583
- // 关闭对话框
584
- closeModal() {
585
- this.showCharge = false
586
- this.showInvalid = false
587
- this.showPrint = false
588
- this.charge = {}
589
- this.search()
590
- }
591
- },
592
- events: {
593
- },
594
- computed: {
595
- billStyleList () {
596
- return this.$appdata.getParam("打印格式")
597
- },
598
- paymentMethod() {
599
- return this.$appdata.getParam("付款方式")
600
- },
601
- paymentTerm() {
602
- return this.$appdata.getParam("收费项目")
603
- }
604
- },
605
- watch: {
606
- }
607
- }
608
- </script>
609
- <style scoped>
610
- .textNoLineBreak {
611
- white-space: nowrap;
612
- }
613
- .head-but{
614
- margin-left: 5px;
615
- height: 34px;
616
- /*background-color: #6aa6e2;*/
617
- border-radius: 4px;
618
- font-family: PingFang;
619
- color: #ffffff;
620
- }
621
- </style>
1
+ <template>
2
+ <div class="col-sm-12" style="margin: 20px 0px;">
3
+ <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">缴费编号</th>
8
+ <th class="textNoLineBreak">收费金额</th>
9
+ <th class="textNoLineBreak">金额大写</th>
10
+ <th class="textNoLineBreak">付款方式</th>
11
+ <th class="textNoLineBreak">收费人员</th>
12
+ <th class="textNoLineBreak">收费日期</th>
13
+ <th class="textNoLineBreak">备注</th>
14
+ <th class="textNoLineBreak">缴费状态</th>
15
+ <th class="textNoLineBreak">作废人员</th>
16
+ <th class="textNoLineBreak">作废时间</th>
17
+ <th class="textNoLineBreak">作废原因</th>
18
+ <th class="textNoLineBreak">票据类型</th>
19
+ <th class="textNoLineBreak">票据状态</th>
20
+ <th class="textNoLineBreak">
21
+ <button
22
+ type="button"
23
+ class="btn btn-info head-but"
24
+ @click="$parent.$parent.showChargeModal()"
25
+ :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)"
26
+ >新增收费</button>
27
+ </th>
28
+ </tr>
29
+ </template>
30
+ <template partial='body'>
31
+ <tr>
32
+ <td style="text-align: center;">
33
+ <nobr>{{$index+1}}</nobr>
34
+ </td>
35
+ <td style="text-align: center;">
36
+ <nobr>{{row.f_charge_number}}</nobr>
37
+ </td>
38
+ <td style="text-align: center;">
39
+ <nobr>{{row.f_charge_money}}</nobr>
40
+ </td>
41
+ <td style="text-align: center;">
42
+ <nobr>{{row.f_amount_words}}</nobr>
43
+ </td>
44
+ <td style="text-align: center;">
45
+ <nobr>{{row.f_payment_method}}</nobr>
46
+ </td>
47
+ <td style="text-align: center;">
48
+ <nobr>{{row.f_charge_collectors}}</nobr>
49
+ </td>
50
+ <td style="text-align: center;">
51
+ <nobr>{{row.f_charge_date}}</nobr>
52
+ </td>
53
+ <td style="text-align: center;">
54
+ <nobr>{{row.f_charge_remarks}}</nobr>
55
+ </td>
56
+ <td style="text-align: center;">
57
+ <nobr>{{row.f_charge_status}}</nobr>
58
+ </td>
59
+ <td style="text-align: center;">
60
+ <nobr>{{row.f_void_staff}}</nobr>
61
+ </td>
62
+ <td style="text-align: center;">
63
+ <nobr>{{row.f_void_date}}</nobr>
64
+ </td>
65
+ <td style="text-align: center;">
66
+ <nobr>{{row.f_void_remarks}}</nobr>
67
+ </td>
68
+ <td style="text-align: center;">
69
+ <nobr>{{row.f_bill_style}}</nobr>
70
+ </td>
71
+ <td style="text-align: center;">
72
+ <nobr>{{row.f_bill_state}}</nobr>
73
+ </td>
74
+ <td style="text-align: center;">
75
+ <nobr v-if="row.f_charge_status !== '退款'">
76
+ <button
77
+ type="button"
78
+ name="button"
79
+ class="btn btn-link"
80
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
81
+ @click="$parent.$parent.showInvalidModal(row)"
82
+ >作废</button>
83
+ <button
84
+ type="button"
85
+ name="button"
86
+ class="btn btn-link"
87
+ @click="$parent.$parent.showPrintModal(row, '普通收据')"
88
+ >打印收据</button>
89
+
90
+ <button
91
+ type="button" name="button" class="btn btn-link"
92
+ v-if="row.f_bill_state !== '开票成功'"
93
+ @click="$parent.$parent.openBill(row)"
94
+ >开票</button>
95
+ <button
96
+ type="button" name="button" class="btn btn-link"
97
+ v-else
98
+ @click="$parent.$parent.showPrintModal(row)"
99
+ >查看发票</button>
100
+ </nobr>
101
+ </td>
102
+ </tr>
103
+ </template>
104
+ </data-grid>
105
+
106
+ <validator name="v">
107
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
108
+ <header slot="modal-header" class="modal-header">
109
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
110
+ <h4 class="modal-title">收费明细</h4>
111
+ </header>
112
+ <article slot="modal-body" class="modal-body clearfix">
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="number"
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
+ close-on-select ></input-select>
138
+ </div>
139
+ </div>
140
+ <div class="form-group col-sm-12" :class="[$v.f_bill_style.required ? 'has-error' : '']">
141
+ <label class="col-sm-2 control-label">票据类型:</label>
142
+ <div class="col-sm-10">
143
+ <input type="text" v-show="false" v-model="charge.f_bill_style" v-validate:f_bill_style = "['required']" >
144
+ <input-select
145
+ placeholder='请选择' width="100%"
146
+ v-model="charge.f_bill_style"
147
+ :value.sync="charge.f_bill_style"
148
+ :options='billStyleList'
149
+ class="select select_list"
150
+ :value-single="true"
151
+ close-on-select ></input-select>
152
+ </div>
153
+ </div>
154
+ <div class="form-group col-sm-12"
155
+ v-if="charge.f_bill_style !== '普通收据'"
156
+ :class="[$v.f_taxpayer_id.required ? 'has-error' : '']">
157
+ <label class="col-sm-2 control-label">购货单位识别号:</label>
158
+ <div class="col-sm-10">
159
+ <input type="text" class="form-control input_view" style="width: 100%"
160
+ v-validate:f_taxpayer_id = "['required']"
161
+ v-model="charge.f_taxpayer_id" :value="selectdata.f_taxpayer_id" />
162
+ </div>
163
+ </div>
164
+ <div class="form-group col-sm-12"
165
+ v-if="charge.f_bill_style !== '普通收据'"
166
+ :class="[$v.f_paper_name.required ? 'has-error' : '']">
167
+ <label class="col-sm-2 control-label">购货单位名称:</label>
168
+ <div class="col-sm-10">
169
+ <input type="text" class="form-control input_view" style="width: 100%"
170
+ v-validate:f_paper_name = "['required']"
171
+ v-model="charge.f_paper_name" :value="selectdata.f_paper_name" />
172
+ </div>
173
+ </div>
174
+ <div class="form-group col-sm-12"
175
+ v-if="charge.f_bill_style !== '普通收据'"
176
+ :class="[$v.f_paper_account.required ? 'has-error' : '']">
177
+ <label class="col-sm-2 control-label">购货单位银行账号:</label>
178
+ <div class="col-sm-10">
179
+ <input type="text" class="form-control input_view" style="width: 100%"
180
+ v-validate:f_paper_account = "['required']"
181
+ v-model="charge.f_paper_account" :value="selectdata.f_paper_account" />
182
+ </div>
183
+ </div>
184
+ <div class="form-group col-sm-12"
185
+ v-if="charge.f_bill_style !== '普通收据'"
186
+ :class="[$v.f_address_phone.required ? 'has-error' : '']">
187
+ <label class="col-sm-2 control-label">购货单位地址电话:</label>
188
+ <div class="col-sm-10">
189
+ <input type="text" class="form-control input_view" style="width: 100%"
190
+ v-validate:f_address_phone = "['required']"
191
+ v-model="charge.f_address_phone" :value="selectdata.f_address_phone" />
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
+ :value="smalltoBIG(0)"
201
+ readonly
202
+ v-model.sync="charge.f_amount_words" />
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_due_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
+ readonly
222
+ v-model="selectdata.f_cumulative_payment_money" />
223
+ </div>
224
+ </div>
225
+ <div class="form-group col-sm-12">
226
+ <label class="col-sm-2 control-label">未结总金额:</label>
227
+ <div class="col-sm-10">
228
+ <input type="text"
229
+ class="form-control input_view"
230
+ style="width: 100%"
231
+ readonly
232
+ v-model="selectdata.f_surplus_money" />
233
+ </div>
234
+ </div>
235
+ <div class="form-group col-sm-12">
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
+ v-model="charge.f_charge_remarks" />
242
+ </div>
243
+ </div>
244
+ </article>
245
+ <footer slot="modal-footer" class="modal-footer">
246
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
247
+ </footer>
248
+ </modal>
249
+ </validator>
250
+
251
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
252
+ <header slot="modal-header" class="modal-header">
253
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
254
+ <h4 class="modal-title">作废收费</h4>
255
+ </header>
256
+ <article slot="modal-body" class="modal-body clearfix">
257
+ <div class="form-group col-sm-12" v-if="false">
258
+ <label class="col-sm-2 control-label">缴费地址:</label>
259
+ <div class="col-sm-10">
260
+ <input type="text"
261
+ class="form-control input_view"
262
+ style="width: 100%"
263
+ readonly
264
+ v-model="charge.f_useraddres" />
265
+ </div>
266
+ </div>
267
+ <div class="form-group col-sm-12">
268
+ <label class="col-sm-2 control-label">收费金额:</label>
269
+ <div class="col-sm-10">
270
+ <input type="text"
271
+ class="form-control input_view"
272
+ style="width: 100%"
273
+ readonly
274
+ v-model="charge.f_charge_money" />
275
+ </div>
276
+ </div>
277
+ <div class="form-group col-sm-12">
278
+ <label class="col-sm-2 control-label">付款方式:</label>
279
+ <div class="col-sm-10">
280
+ <input type="text"
281
+ class="form-control input_view"
282
+ style="width: 100%"
283
+ readonly
284
+ v-model="charge.f_payment_method" />
285
+ </div>
286
+ </div>
287
+ <div class="form-group col-sm-12">
288
+ <label class="col-sm-2 control-label">金额大写:</label>
289
+ <div class="col-sm-10">
290
+ <input type="text"
291
+ class="form-control input_view"
292
+ style="width: 100%"
293
+ readonly
294
+ v-model="charge.f_amount_words" />
295
+ </div>
296
+ </div>
297
+ <div class="form-group col-sm-12">
298
+ <label class="col-sm-2 control-label">收费人员:</label>
299
+ <div class="col-sm-10">
300
+ <input type="text"
301
+ class="form-control input_view"
302
+ style="width: 100%"
303
+ readonly
304
+ v-model="charge.f_charge_collectors" />
305
+ </div>
306
+ </div>
307
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
308
+ <label class="col-sm-2 control-label">作废原因:</label>
309
+ <div class="col-sm-10">
310
+ <input type="text"
311
+ class="form-control input_view"
312
+ style="width: 100%"
313
+ v-model="charge.f_void_remarks" />
314
+ </div>
315
+ </div>
316
+ </article>
317
+ <footer slot="modal-footer" class="modal-footer">
318
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
319
+ </footer>
320
+ </modal>
321
+
322
+ <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false">
323
+ <header slot="modal-header" class="modal-header">
324
+ <button type="button" class="close" @click="$dispatch('breakControl', this.selectdata)"><span>&times;</span></button>
325
+ <h4 class="modal-title">票据信息</h4>
326
+ </header>
327
+ <article slot="modal-body" class="modal-body clearfix">
328
+ <template v-if="charge.f_bill_style === '普通收据'">
329
+ <apply-print-charge :selectdata="selectdata" :charge="charge" v-ref:print></apply-print-charge>
330
+ </template>
331
+ <template v-else>
332
+ <iframe width="100%" height="500px" :src="charge.f_bill_url" v-if="charge.f_bill_url"></iframe>
333
+ </template>
334
+ </article>
335
+ <footer slot="modal-footer" class="modal-footer">
336
+ <button type="button" class="btn btn-primary" v-if="charge.f_bill_style === '普通收据'" @click="print()">打印</button>
337
+ </footer>
338
+ </modal>
339
+ </div>
340
+ </template>
341
+ <script>
342
+ import {PagedList} from 'vue-client'
343
+ import {HttpResetClass} from 'vue-client'
344
+ import Vue from 'vue'
345
+ import {isEmpty} from '../../../../../components/Util'
346
+
347
+ export default {
348
+ title: '收费管理',
349
+ props: {
350
+ selectdata: {
351
+ type: Object
352
+ },
353
+ mark: {
354
+ type: Number,
355
+ default: 0
356
+ }
357
+ },
358
+ data () {
359
+ return {
360
+ showCharge: false, // 收费明细
361
+ showInvalid: false, // 作废
362
+ showPrint: false, // 打印
363
+ model: {
364
+ data: null
365
+ }, // 记录
366
+ useraddresList: [], // 地址列表
367
+ charge: {
368
+
369
+ }
370
+ }
371
+ },
372
+ ready () {
373
+ this.search()
374
+ },
375
+ methods: {
376
+ async openBill (charge) {
377
+ this.charge = charge
378
+ let data = null
379
+ let res = null
380
+
381
+ let http = new HttpResetClass()
382
+
383
+ if (isEmpty(this.charge.f_bill_id)) {
384
+ data = {
385
+ id: this.charge.id,
386
+ charge_type: '报装收费'
387
+ }
388
+ res = await http.load('POST', 'rs/logic/bjEticketCharge', {data:data}, {
389
+ resolveMsg: null,
390
+ rejectMsg: '开票失败!!!'
391
+ })
392
+ this.charge.f_bill_id = res.data.id
393
+ }
394
+
395
+ data = {
396
+ id: this.charge.f_bill_id,
397
+ f_sell_id: this.charge.id
398
+ }
399
+ try {
400
+ res = await http.load('POST', 'rs/logic/bjOpenEticket', {data:data}, {
401
+ resolveMsg: null,
402
+ rejectMsg: '开票失败!!!'
403
+ })
404
+
405
+ res.data.f_bill_url = 'https://dlj.51fapiao.cn/dlj/v7/de4c9b985021111ef1c722c2914e34d9273291'
406
+
407
+ if (res.data.f_bill_state !== '开票成功') {
408
+ throw '开票失败!!!'
409
+ }
410
+ this.charge.f_bill_state = res.data.f_bill_state
411
+ this.charge.f_bill_url = res.data.f_bill_url
412
+
413
+ this.showPrint = true
414
+ } catch (e) {
415
+ console.error(e)
416
+ this.charge.f_bill_state = '开票失败'
417
+
418
+ data = {
419
+ id: this.charge.id
420
+ }
421
+ res = await http.load('POST', 'rs/logic/updateChargeBill', {data:data}, {
422
+ resolveMsg: null,
423
+ rejectMsg: '收费信息更新失败!!!'
424
+ })
425
+
426
+ throw e
427
+ }
428
+ },
429
+ async payerNumberChange () {
430
+ if (isEmpty(this.charge.f_payer_number)) {
431
+ return
432
+ }
433
+ let http = new HttpResetClass()
434
+ let data = {
435
+ tablename: 't_charge_record',
436
+ condition: `f_payer_number = '${this.charge.f_payer_number}'`
437
+ }
438
+ let res = await http.load('POST', 'rs/sql/apply_singleTable', {data:data}, {
439
+ resolveMsg: null,
440
+ rejectMsg: '流水号查询失败!!!'
441
+ })
442
+ if (res.data.length > 0) {
443
+ this.$showAlert('该流水号已经使用!!!', 'warning', 3000)
444
+ return
445
+ }
446
+ },
447
+ print () {
448
+ this.$refs.print.$refs.print.PrintTable()
449
+ this.$dispatch('breakControl', this.selectdata)
450
+ },
451
+ showPrintModal(row, type) {
452
+ this.charge = row
453
+
454
+ if (type === '普通收据') {
455
+ this.charge.f_bill_style = type
456
+ }
457
+
458
+ this.showPrint = true
459
+ },
460
+ selectAddres () {
461
+ if (this.charge.useraddres) {
462
+ this.charge.f_cumulative_payment_money = this.charge.useraddres.f_cumulative_payment_money
463
+ this.charge.f_outstanding_amount = this.selectdata.f_price - this.charge.useraddres.f_cumulative_payment_money
464
+ } else {
465
+ this.charge.f_cumulative_payment_money = 0
466
+ this.charge.f_outstanding_amount = this.selectdata.f_price
467
+ }
468
+ },
469
+ async invalidApplyCharge() {
470
+
471
+ let http = new HttpResetClass()
472
+ let data = {
473
+ apply: this.selectdata,
474
+ user: this.$login.f,
475
+ charge: this.charge
476
+ }
477
+ let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
478
+ resolveMsg: null,
479
+ rejectMsg: '作废失败!!!'
480
+ })
481
+ this.selectdata = res.data
482
+
483
+ this.$dispatch('breakControl', this.selectdata)
484
+ },
485
+ // 打开作废收费
486
+ showInvalidModal(row) {
487
+ this.charge = row
488
+ this.showInvalid = true
489
+ },
490
+ // 新增收费
491
+ async saveCharge() {
492
+ let http = new HttpResetClass()
493
+ let data = {
494
+ apply: this.selectdata,
495
+ user: this.$login.f,
496
+ charge: this.charge
497
+ }
498
+
499
+ let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
500
+ resolveMsg: null,
501
+ rejectMsg: '缴费失败!!!'
502
+ })
503
+
504
+ this.charge = res.data
505
+
506
+ this.showCharge = false
507
+
508
+ if (this.charge.f_bill_style !== '普通收据') {
509
+
510
+ try {
511
+ await this.openBill(this.charge)
512
+ } catch (e) {
513
+ this.$dispatch('breakControl', this.selectdata)
514
+ }
515
+ } else {
516
+ this.showPrint = true
517
+ }
518
+
519
+ },
520
+ moneyChange () {
521
+ if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
522
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
523
+ this.charge.f_charge_money = null
524
+ return
525
+ }
526
+ if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
527
+ this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
528
+ this.charge.f_charge_money = null
529
+ return
530
+ }
531
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
532
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
533
+ this.charge.f_charge_money = null
534
+ return
535
+ }
536
+ },
537
+ // 金额转大写
538
+ handleInput(e) {
539
+ // 通过正则过滤小数点后两位
540
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
541
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
542
+ },
543
+ // 金额转大写
544
+ smalltoBIG(n) {
545
+ let fraction = ['角', '分'];
546
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
547
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
548
+ let head = n < 0 ? '欠' : '';
549
+ n = Math.abs(n);
550
+
551
+ let s = '';
552
+
553
+ for (var i = 0; i < fraction.length; i++) {
554
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
555
+ }
556
+ s = s || '整';
557
+ n = Math.floor(n);
558
+
559
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
560
+ let p = '';
561
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
562
+ p = digit[n % 10] + unit[1][j] + p;
563
+ n = Math.floor(n / 10);
564
+ }
565
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
566
+ }
567
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
568
+ },
569
+ async showChargeModal() {
570
+ this.showCharge = true
571
+ },
572
+ async search () {
573
+ let http = new HttpResetClass()
574
+ let data = {
575
+ f_process_id: this.selectdata.f_process_id
576
+ }
577
+ let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
578
+ resolveMsg: null,
579
+ rejectMsg: '收费记录查询失败!!!'
580
+ })
581
+ this.model.data = res.data
582
+ },
583
+ // 关闭对话框
584
+ closeModal() {
585
+ this.showCharge = false
586
+ this.showInvalid = false
587
+ this.showPrint = false
588
+ this.charge = {}
589
+ this.search()
590
+ }
591
+ },
592
+ events: {
593
+ },
594
+ computed: {
595
+ billStyleList () {
596
+ return this.$appdata.getParam("打印格式")
597
+ },
598
+ paymentMethod() {
599
+ return this.$appdata.getParam("付款方式")
600
+ },
601
+ paymentTerm() {
602
+ return this.$appdata.getParam("收费项目")
603
+ }
604
+ },
605
+ watch: {
606
+ }
607
+ }
608
+ </script>
609
+ <style scoped>
610
+ .textNoLineBreak {
611
+ white-space: nowrap;
612
+ }
613
+ .head-but{
614
+ margin-left: 5px;
615
+ height: 34px;
616
+ /*background-color: #6aa6e2;*/
617
+ border-radius: 4px;
618
+ font-family: PingFang;
619
+ color: #ffffff;
620
+ }
621
+ </style>