apply-clients 7.1.36-yuchuan-40 → 7.1.36-yuchuan-42

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 (68) hide show
  1. package/android.html +27 -27
  2. package/build/dev-server.js +172 -192
  3. package/package.json +119 -119
  4. package/src/apply.js +163 -163
  5. package/src/applyAndroid.js +98 -98
  6. package/src/components/android/AppSign.vue +232 -232
  7. package/src/components/android/Ignition/VentilationIgnition.vue +408 -408
  8. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +472 -472
  9. package/src/components/android/Process/AppExplorationUser.vue +454 -454
  10. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  11. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1018 -1018
  12. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  13. package/src/components/android/SealManage.vue +278 -278
  14. package/src/components/android/Sign/AppSignTask.vue +183 -183
  15. package/src/components/android/Supervisory/AppProcessSupervisory.vue +344 -344
  16. package/src/components/android/Task/Build/BuildTsak.vue +117 -117
  17. package/src/components/android/Task/BuildIgnition/BuildIgnition.vue +114 -114
  18. package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +317 -317
  19. package/src/components/android/Task/RepairFromSend/RepairFrom.vue +124 -124
  20. package/src/components/android/Task/RepairFromSend/RepairSend.vue +124 -124
  21. package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +431 -431
  22. package/src/components/android/Task/Survey/SurveyTsak.vue +141 -141
  23. package/src/components/android/Task/yiban/AppShowDone.vue +442 -442
  24. package/src/components/android/newPackage/customerServiceManager.vue +218 -218
  25. package/src/components/android/newPackage/projectPrice.vue +218 -218
  26. package/src/components/product/ApplyCharge/ApplyChargeList.vue +1101 -1101
  27. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
  28. package/src/components/product/ApplyGuanXian/GuanXianExplorationUser.vue +142 -142
  29. package/src/components/product/ApplyGuanXian/GuanXianSupervisoryhCart.vue +119 -119
  30. package/src/components/product/ApplyMap/AppMapLocation.vue +829 -829
  31. package/src/components/product/ApplyMap/ApplyMapInputSearch.vue +335 -335
  32. package/src/components/product/Function/InstallFunction.vue +132 -132
  33. package/src/components/product/Function/InstallInfoSelect.vue +374 -374
  34. package/src/components/product/GongJianPush/ApplyPushDispose.vue +12 -10
  35. package/src/components/product/GongJianPush/ApplyPushManage.vue +91 -91
  36. package/src/components/product/Ignition/IgnitionDispatch.vue +90 -90
  37. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  38. package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
  39. package/src/components/product/InsuranceApply/InsuranceReport.vue +188 -188
  40. package/src/components/product/List/OldShowDevices.vue +271 -271
  41. package/src/components/product/List/ShowAllActivity.vue +541 -541
  42. package/src/components/product/List/ShowDevices.vue +279 -279
  43. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  44. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  45. package/src/components/product/Process/ExplorationUser.vue +154 -154
  46. package/src/components/product/Process/New1ExplorationUser.vue +196 -199
  47. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  48. package/src/components/product/Process/NewExplorationUser.vue +216 -216
  49. package/src/components/product/Process/Processes/InstallationDetails.vue +1159 -1159
  50. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  51. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  52. package/src/components/product/Process/Processes/chargeManagement.vue +703 -703
  53. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  54. package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
  55. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  56. package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
  57. package/src/components/product/Process/Service/ServiceControl.vue +2216 -2216
  58. package/src/components/product/ServiceView.vue +644 -644
  59. package/src/components/product/Stop/StopApplyList.vue +224 -224
  60. package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
  61. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +593 -593
  62. package/src/components/product/Supervisory/SupervisoryControl.vue +114 -114
  63. package/src/components/product/Supervisory/SupervisoryList.vue +580 -580
  64. package/src/components/product/Supervisory/SupervisoryhCart.vue +120 -120
  65. package/src/components/product/Supervisory/YiBanSupervisoryControl.vue +111 -111
  66. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +539 -539
  67. package/src/components/product/VueUtils/ApplyUpload.vue +303 -303
  68. package/src/main.js +27 -27
@@ -1,703 +1,703 @@
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">
20
- <button
21
- type="button"
22
- class="btn btn-info head-but"
23
- @click="$parent.$parent.showChargeModal()"
24
- :disabled="$parent.$parent.mark === 1 || ($parent.$parent.selectdata.f_cumulative_payment_money >= $parent.$parent.selectdata.f_due_money || $parent.$parent.selectdata.f_surplus_money === 0)"
25
- >新增收费</button>
26
- </th>
27
- </tr>
28
- </template>
29
- <template partial='body'>
30
- <tr>
31
- <td style="text-align: center;">
32
- <nobr>{{$index+1}}</nobr>
33
- </td>
34
- <td style="text-align: center;">
35
- <nobr>{{row.f_charge_money}}</nobr>
36
- </td>
37
- <td style="text-align: center;">
38
- <nobr>{{row.f_amount_words}}</nobr>
39
- </td>
40
- <td style="text-align: center;">
41
- <nobr>{{row.f_payment_method}}</nobr>
42
- </td>
43
- <td style="text-align: center;">
44
- <nobr>{{row.f_charge_collectors}}</nobr>
45
- </td>
46
- <td style="text-align: center;">
47
- <nobr>{{row.f_charge_date}}</nobr>
48
- </td>
49
- <td style="text-align: center;">
50
- <nobr>{{row.f_charge_remarks}}</nobr>
51
- </td>
52
- <td style="text-align: center;">
53
- <nobr>{{row.f_charge_status}}</nobr>
54
- </td>
55
- <td style="text-align: center;">
56
- <nobr>{{row.f_void_staff}}</nobr>
57
- </td>
58
- <td style="text-align: center;">
59
- <nobr>{{row.f_void_date}}</nobr>
60
- </td>
61
- <td style="text-align: center;">
62
- <nobr>{{row.f_void_remarks}}</nobr>
63
- </td>
64
- <td style="text-align: center;">
65
- <nobr>{{row.f_bill_style}}</nobr>
66
- </td>
67
- <td style="text-align: center;">
68
- <nobr>{{row.f_bill_state}}</nobr>
69
- </td>
70
- <td style="text-align: center;">
71
- <nobr v-if="row.f_charge_status !== '退款'">
72
- <button
73
- type="button"
74
- name="button"
75
- class="btn btn-link"
76
- v-if = false
77
- :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
78
- @click="$parent.$parent.showInvalidModal(row)"
79
- >作废</button>
80
-
81
- <button
82
- type="button" name="button" class="btn btn-link"
83
- v-if="row.f_bill_state !== '开票成功' && row.f_charge_status !== '作废'"
84
- @click="$parent.$parent.openBill(row)"
85
- >开票</button>
86
-
87
- <button
88
- type="button" name="button" class="btn btn-link"
89
- v-if = "row.f_bill_state === '开票成功'"
90
- @click="$parent.$parent.showPrintModal(row)"
91
- >查看发票</button>
92
- </nobr>
93
- </td>
94
- </tr>
95
- </template>
96
- </data-grid>
97
-
98
- <validator name="v">
99
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
100
- <header slot="modal-header" class="modal-header">
101
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
102
- <h4 class="modal-title">收费明细</h4>
103
- </header>
104
- <article slot="modal-body" class="modal-body clearfix">
105
- <div class="form-group col-sm-6" :class="[$v.f_charge_money.required ? 'has-error' : '']">
106
- <label class="col-sm-4 control-label">收费金额:</label>
107
- <div class="col-sm-8">
108
- <input type="text"
109
- class="form-control input_view"
110
- style="width: 100%"
111
- placeholder="0.00"
112
- @keyup="handleInput"
113
- @change="moneyChange"
114
- v-validate:f_charge_money = "['required']"
115
- v-model="charge.f_charge_money" />
116
- </div>
117
- </div>
118
- <div class="form-group col-sm-6" :class="[$v.f_feecount.required ? 'has-error' : '']">
119
- <label class="col-sm-4 control-label">缴费户数:</label>
120
- <div class="col-sm-8">
121
- <input type="text"
122
- class="form-control input_view"
123
- style="width: 100%"
124
- v-validate:f_feecount = "['required']"
125
- v-model="charge.f_feecount"
126
- :value="selectdata.f_install_count"
127
- />
128
- </div>
129
- </div>
130
- <div class="form-group col-sm-6">
131
- <label class="col-sm-4 control-label">金额大写:</label>
132
- <div class="col-sm-8">
133
- <input type="text" class="form-control input_view" style="width: 100%" readonly
134
- :value="smalltoBIG(0)" v-model.sync="charge.f_amount_words"/>
135
- </div>
136
- </div>
137
- <div class="form-group col-sm-6" :class="[$v.f_payment_method.required ? 'has-error' : '']">
138
- <label class="col-sm-4 control-label">付款方式:</label>
139
- <div class="col-sm-8">
140
- <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
141
- <input-select
142
- placeholder='请选择' width="100%"
143
- v-model="charge.f_payment_method"
144
- :value.sync="charge.f_payment_method"
145
- :options='paymentMethod'
146
- class="select select_list"
147
- :value-single="true"
148
- close-on-select ></input-select>
149
- </div>
150
- </div>
151
- <div class="form-group col-sm-6" :class="[$v.f_bill_style.required ? 'has-error' : '']">
152
- <label class="col-sm-4 control-label">票据类型:</label>
153
- <div class="col-sm-8">
154
- <input type="text" v-show="false" v-model="charge.f_bill_style" :value.sync="selectdata.f_paper_type" v-validate:f_bill_style = "['required']" >
155
- <input-select
156
- placeholder='请选择' width="100%"
157
- v-model="charge.f_bill_style"
158
- :value.sync="selectdata.f_paper_type"
159
- :options='billStyleList'
160
- class="select select_list"
161
- :value-single="true"
162
- close-on-select ></input-select>
163
- </div>
164
- </div>
165
- <div class="form-group col-sm-6">
166
- <label class="col-sm-4 control-label">应交总金额:</label>
167
- <div class="col-sm-8">
168
- <input type="text" class="form-control input_view" style="width: 100%" readonly
169
- v-model="selectdata.f_due_money" />
170
- </div>
171
- </div>
172
- <div class="form-group col-sm-6">
173
- <label class="col-sm-4 control-label">未结总金额:</label>
174
- <div class="col-sm-8">
175
- <input type="text" class="form-control input_view" style="width: 100%" readonly
176
- v-model="selectdata.f_surplus_money" />
177
- </div>
178
- </div>
179
- <div class="form-group col-sm-6">
180
- <label class="col-sm-4 control-label">累计缴费总金额:</label>
181
- <div class="col-sm-8">
182
- <input type="text" class="form-control input_view" style="width: 100%" readonly
183
- v-model="selectdata.f_cumulative_payment_money" />
184
- </div>
185
- </div>
186
- <div class="form-group col-sm-12">
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-model="charge.f_charge_remarks" />
191
- </div>
192
- </div>
193
- <div class="form-group col-sm-6">
194
- <label class="col-sm-4 control-label">购货单位识别号:</label>
195
- <div class="col-sm-8">
196
- <input type="text" class="form-control input_view" style="width: 100%"
197
- v-model="charge.f_taxpayer_id" :value="selectdata.f_taxpayer_id" />
198
- </div>
199
- </div>
200
- <div class="form-group col-sm-6" :class="[$v.f_paper_name.required ? 'has-error' : '']">
201
- <label class="col-sm-4 control-label">购货单位名称:</label>
202
- <div class="col-sm-8">
203
- <input type="text" class="form-control input_view" style="width: 100%"
204
- v-validate:f_paper_name = "['required']"
205
- v-model="charge.f_paper_name" :value="selectdata.f_paper_name" />
206
- </div>
207
- </div>
208
- <div class="form-group col-sm-6">
209
- <label class="col-sm-4 control-label">购货单位银行账号:</label>
210
- <div class="col-sm-8">
211
- <input type="text" class="form-control input_view" style="width: 100%"
212
- v-model="charge.f_paper_account" :value="selectdata.f_paper_account" />
213
- </div>
214
- </div>
215
- <div class="form-group col-sm-6">
216
- <label class="col-sm-4 control-label">购货单位地址电话:</label>
217
- <div class="col-sm-8">
218
- <input type="text" class="form-control input_view" style="width: 100%"
219
- v-model="charge.f_address_phone" :value="selectdata.f_address_phone" />
220
- </div>
221
- </div>
222
- <div class="form-group col-sm-12">
223
- <label class="col-sm-2 control-label">发票备注:</label>
224
- <div class="col-sm-10">
225
- <input type="text" class="form-control input_view" style="width: 100%"
226
- v-model="charge.f_bill_remarks" :value="selectdata.f_paper_remarks"/>
227
- </div>
228
- </div>
229
- </article>
230
- <footer slot="modal-footer" class="modal-footer">
231
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
232
- </footer>
233
- </modal>
234
- </validator>
235
-
236
- <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
237
- <header slot="modal-header" class="modal-header">
238
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
239
- <h4 class="modal-title">作废收费</h4>
240
- </header>
241
- <article slot="modal-body" class="modal-body clearfix">
242
- <div class="form-group col-sm-12" v-if="false">
243
- <label class="col-sm-2 control-label">缴费地址:</label>
244
- <div class="col-sm-10">
245
- <input type="text"
246
- class="form-control input_view"
247
- style="width: 100%"
248
- readonly
249
- v-model="charge.f_useraddres" />
250
- </div>
251
- </div>
252
- <div class="form-group col-sm-12">
253
- <label class="col-sm-2 control-label">收费金额:</label>
254
- <div class="col-sm-10">
255
- <input type="text"
256
- class="form-control input_view"
257
- style="width: 100%"
258
- readonly
259
- v-model="charge.f_charge_money" />
260
- </div>
261
- </div>
262
- <div class="form-group col-sm-12">
263
- <label class="col-sm-2 control-label">付款方式:</label>
264
- <div class="col-sm-10">
265
- <input type="text"
266
- class="form-control input_view"
267
- style="width: 100%"
268
- readonly
269
- v-model="charge.f_payment_method" />
270
- </div>
271
- </div>
272
- <div class="form-group col-sm-12">
273
- <label class="col-sm-2 control-label">金额大写:</label>
274
- <div class="col-sm-10">
275
- <input type="text"
276
- class="form-control input_view"
277
- style="width: 100%"
278
- readonly
279
- v-model="charge.f_amount_words" />
280
- </div>
281
- </div>
282
- <div class="form-group col-sm-12">
283
- <label class="col-sm-2 control-label">收费人员:</label>
284
- <div class="col-sm-10">
285
- <input type="text"
286
- class="form-control input_view"
287
- style="width: 100%"
288
- readonly
289
- v-model="charge.f_charge_collectors" />
290
- </div>
291
- </div>
292
- <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
293
- <label class="col-sm-2 control-label">作废原因:</label>
294
- <div class="col-sm-10">
295
- <input type="text"
296
- class="form-control input_view"
297
- style="width: 100%"
298
- v-model="charge.f_void_remarks" />
299
- </div>
300
- </div>
301
- </article>
302
- <footer slot="modal-footer" class="modal-footer">
303
- <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
304
- </footer>
305
- </modal>
306
-
307
- <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false">
308
- <header slot="modal-header" class="modal-header">
309
- <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
310
- <h4 class="modal-title">票据信息</h4>
311
- </header>
312
- <article slot="modal-body" class="modal-body clearfix">
313
- <iframe width="100%" height="500px" :src="charge.f_bill_link" v-if="charge.f_bill_link"></iframe>
314
- </article>
315
- <footer slot="modal-footer" class="modal-footer">
316
- </footer>
317
- </modal>
318
- </div>
319
- </template>
320
- <script>
321
- import {PagedList} from 'vue-client'
322
- import {HttpResetClass} from 'vue-client'
323
- import Vue from 'vue'
324
- import {isEmpty} from '../../../Util'
325
-
326
- export default {
327
- title: '收费管理',
328
- props: {
329
- selectdata: {
330
- type: Object
331
- },
332
- mark: {
333
- type: Number,
334
- default: 0
335
- }
336
- },
337
- data () {
338
- return {
339
- showCharge: false, // 收费明细
340
- showInvalid: false, // 作废
341
- showPrint: false, // 打印
342
- model: {
343
- data: null
344
- }, // 记录
345
- charge: {
346
-
347
- }
348
- }
349
- },
350
- ready () {
351
- this.search()
352
- },
353
- methods: {
354
-
355
- async invalidApplyCharge() {
356
-
357
- let http = new HttpResetClass()
358
- let data = {
359
- apply: this.selectdata,
360
- user: this.$login.f,
361
- charge: this.charge
362
- }
363
- let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
364
- resolveMsg: null,
365
- rejectMsg: '作废失败!!!'
366
- })
367
- this.selectdata = res.data
368
-
369
- this.$dispatch('breakControl', this.selectdata)
370
- },
371
- // 打开作废收费
372
- showInvalidModal(row) {
373
- this.charge = row
374
- this.showInvalid = true
375
- },
376
- // 查看发票
377
- showPrintModal(row, type) {
378
- this.charge = row
379
- if (!this.charge.f_bill_link && this.charge.f_filepath){
380
- let date = new Date(this.charge.f_charge_date)
381
- let year = date.getFullYear()
382
- let month = date.getMonth() + 1
383
- let month2 = month <= 9 ? '0' + month : month
384
- let day = date.getDate()
385
- let day2 = day <= 9 ? '0' + day : day
386
- let chargedate = year + '-' + month2 + '-' + day2
387
- this.charge.f_bill_link = `http://193.168.1.6:8082/eticket/` + chargedate + '/' + this.charge.f_filepath + '.pdf'
388
- }else if(!this.charge.f_bill_link){
389
- this.charge.f_bill_link = this.charge.f_bill_url
390
- }
391
- this.showPrint = true
392
- },
393
- // 开票组织数据
394
- async openBill (charge) {
395
- this.charge = charge
396
- let data = null
397
- let res = null
398
-
399
- let http = new HttpResetClass()
400
-
401
- if (isEmpty(this.charge.f_bill_id)) {
402
- try {
403
- data = {
404
- id: this.charge.id,
405
- charge_type: '报装收费',
406
- f_user_name: this.selectdata.f_user_name
407
- }
408
- if (this.selectdata.f_apply_type === '改线业务'){
409
- data.charge_type = '整改收费'
410
- }
411
- res = await http.load('POST', 'rs/logic/bjEticketCharge', {data:data}, {
412
- resolveMsg: null,
413
- rejectMsg: '开票组织数据失败!!!'
414
- }).then((res) => {
415
- this.charge.f_bill_id = res.data
416
- this.outBill()
417
- })
418
- }catch (e){
419
- console.error("错误信息",e)
420
- this.charge.f_bill_state = '开票失败'
421
-
422
- data = {
423
- f_bill_id: '',
424
- id: this.charge.id,
425
- apply: this.selectdata,
426
- user: this.$login.f
427
- }
428
- res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
429
- resolveMsg: null,
430
- rejectMsg: '收费信息更新失败!!!'
431
- })
432
- this.$showMessage(`开票信息组织失败!!`, ['confirm']).then(async (res) => {
433
- if (res === 'confirm') {
434
- this.$dispatch('loadPage')
435
- }else {
436
- this.$dispatch('loadPage')
437
- }
438
- })
439
- }
440
- }else {
441
- await this.outBill()
442
- }
443
- },
444
- //开票
445
- async outBill () {
446
-
447
- let data = null
448
- let res = null
449
- let http = new HttpResetClass()
450
- if (this.charge.f_bill_style === '电子票') {
451
- data = {
452
- id: this.charge.f_bill_id,
453
- f_sell_id: this.charge.id
454
- }
455
- try {
456
- res = await http.load('POST', 'rs/logic/bjOpenEticket', {data: data}, {
457
- resolveMsg: null,
458
- rejectMsg: '开票失败!!!'
459
- })
460
-
461
- // res.data.f_bill_url = 'https://dlj.51fapiao.cn/dlj/v7/de4c9b985021111ef1c722c2914e34d9273291'
462
-
463
- if (res.data.f_bill_state !== '开票成功') {
464
- throw '开票失败!!!'
465
- } else {
466
- this.charge.f_bill_state = res.data.f_bill_state
467
- this.charge.f_bill_url = res.data.f_bill_url
468
- let date = new Date(this.charge.f_charge_date)
469
- let year = date.getFullYear()
470
- let month = date.getMonth() + 1
471
- let month2 = month <= 9 ? '0' + month : month
472
- let day = date.getDate()
473
- let day2 = day <= 9 ? '0' + day : day
474
- let chargedate = year + '-' + month2 + '-' + day2
475
- this.charge.f_bill_link = `http://193.168.1.6:8082/eticket/` + chargedate + '/' + res.data.f_filepath + '.pdf'
476
- this.showPrint = true
477
- let pram = {
478
- f_bill_link: this.charge.f_bill_link,
479
- f_sell_id: this.charge.id,
480
- apply: this.selectdata,
481
- user: this.$login.f
482
- }
483
- await http.load('POST', 'rs/logic/updataChargeRecord', {data: pram}, {
484
- resolveMsg: null,
485
- rejectMsg: null
486
- })
487
- }
488
- } catch (e) {
489
- console.error(e)
490
- this.charge.f_bill_state = '开票失败'
491
-
492
- data = {
493
- f_bill_id: this.charge.f_bill_id,
494
- id: this.charge.id,
495
- apply: this.selectdata,
496
- user: this.$login.f
497
- }
498
- res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
499
- resolveMsg: null,
500
- rejectMsg: '收费信息更新失败!!!'
501
- })
502
- this.$showMessage(`开票失败!!`, ['confirm']).then(async (res) => {
503
- if (res === 'confirm') {
504
- this.$dispatch('loadPage')
505
- }else {
506
- this.$dispatch('loadPage')
507
- }
508
- })
509
- }
510
- } else if (this.charge.f_bill_style === '专票') {
511
- data = {
512
- id: this.charge.f_bill_id
513
- }
514
- res = await http.load('POST', 'rs/sql/getEticketData', {data: data}, {
515
- resolveMsg: null,
516
- rejectMsg: '开票数据查询失败!!!'
517
- })
518
- let openBillData = JSON.parse(res.data[0].f_bill_data)
519
- openBillData.kpzdbs = this.$login.f.taxnum
520
- const nowDate = new Date()
521
- let year = nowDate.getFullYear()
522
- let mouth = nowDate.getMonth() + 1
523
- let day = nowDate.getDate()
524
- openBillData.f_operate_date = year + '-' + mouth + '-' + day
525
- openBillData.f_operator = this.$login.f.name
526
- openBillData.outlets = this.$login.f.f_department_name
527
- openBillData.hjse = ''
528
- openBillData.jshh = ''
529
- openBillData.tzdbh = ''
530
- openBillData.yfpdm = ''
531
- openBillData.yfphm = ''
532
- console.log('返回开票信息。。 ', openBillData)
533
- let billInfo = await this.$resetpost('http://127.0.0.1:8003/Goldtax', openBillData, {
534
- resolveMsg: null,
535
- rejectMsg: '专用发票开具失败!'
536
- })
537
- console.log('返回票据信息。。 ', JSON.parse(billInfo.data))//保存发票明细
538
- if (!JSON.parse(billInfo.data).fphm) {
539
- this.charge.f_bill_state = '开票失败'
540
- data = {
541
- f_bill_id: this.charge.f_bill_id,
542
- id: this.charge.id,
543
- apply: this.selectdata,
544
- user: this.$login.f
545
- }
546
- res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
547
- resolveMsg: null,
548
- rejectMsg: '收费信息更新失败!!!'
549
- })
550
- this.$showMessage(`开票失败!!`, ['confirm']).then(async (res) => {
551
- if (res === 'confirm') {
552
- this.$dispatch('loadPage')
553
- }else {
554
- this.$dispatch('loadPage')
555
- }
556
- })
557
- } else {
558
- data = {
559
- id: this.charge.f_bill_id,
560
- f_bill_number: JSON.parse(billInfo.data).fphm,
561
- f_bill_code: JSON.parse(billInfo.data).fpdm,
562
- f_filepath: JSON.parse(billInfo.data).dzpkex ? JSON.parse(billInfo.data).dzpkex : '',
563
- charge_id: this.charge.id,
564
- apply: this.selectdata,
565
- user: this.$login.f
566
- }
567
- res = await http.load('POST', 'rs/logic/updateEticketBill', {data: data}, {
568
- resolveMsg: null,
569
- rejectMsg: '开票信息更新失败!!!'
570
- })
571
-
572
- this.charge.f_bill_state = '开票成功'
573
- this.charge.f_bill_url = ''
574
- this.charge.f_bill_link = ''
575
- }
576
- }
577
- },
578
- // 新增收费
579
- async saveCharge() {
580
- let http = new HttpResetClass()
581
- let data = {
582
- apply: this.selectdata,
583
- user: this.$login.f,
584
- charge: this.charge
585
- }
586
-
587
- let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
588
- resolveMsg: null,
589
- rejectMsg: '缴费失败!!!'
590
- }).then((res) => {
591
- this.charge = res.data.charge
592
- this.selectdata = res.data.apply
593
-
594
- this.showCharge = false
595
- try {
596
- if (this.charge.id) {
597
- this.openBill(this.charge)
598
- }
599
- } catch (e) {
600
- this.$dispatch('breakControl', this.selectdata)
601
- }
602
- })
603
- },
604
- moneyChange () {
605
- if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
606
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
607
- this.charge.f_charge_money = null
608
- return
609
- }
610
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
611
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
612
- this.charge.f_charge_money = null
613
- return
614
- }
615
- },
616
- // 金额转大写
617
- handleInput(e) {
618
- // 通过正则过滤小数点后两位
619
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
620
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
621
- },
622
- // 金额转大写
623
- smalltoBIG(n) {
624
- let fraction = ['角', '分'];
625
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
626
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
627
- let head = n < 0 ? '欠' : '';
628
- n = Math.abs(n);
629
-
630
- let s = '';
631
-
632
- for (var i = 0; i < fraction.length; i++) {
633
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
634
- }
635
- s = s || '整';
636
- n = Math.floor(n);
637
-
638
- for (var i = 0; i < unit[0].length && n > 0; i++) {
639
- let p = '';
640
- for (var j = 0; j < unit[1].length && n > 0; j++) {
641
- p = digit[n % 10] + unit[1][j] + p;
642
- n = Math.floor(n / 10);
643
- }
644
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
645
- }
646
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
647
- },
648
- async showChargeModal() {
649
- this.showCharge = true
650
- },
651
- async search () {
652
- let http = new HttpResetClass()
653
- let data = {
654
- f_process_id: this.selectdata.f_process_id
655
- }
656
- let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
657
- resolveMsg: null,
658
- rejectMsg: '收费记录查询失败!!!'
659
- })
660
- this.model.data = res.data
661
- },
662
- // 关闭对话框
663
- closeModal() {
664
- this.showCharge = false
665
- this.showInvalid = false
666
- this.showPrint = false
667
- this.charge = {}
668
- this.search()
669
- }
670
- },
671
- events: {
672
- },
673
- computed: {
674
- billStyleList () {
675
- return this.$appdata.getParam("打印格式")
676
- },
677
- paymentMethod() {
678
- return this.$appdata.getParam("付款方式")
679
- },
680
- paymentTerm() {
681
- return this.$appdata.getParam("收费项目")
682
- }
683
- },
684
- watch: {
685
- }
686
- }
687
- </script>
688
- <style scoped>
689
- .textNoLineBreak {
690
- white-space: nowrap;
691
- }
692
- .head-but{
693
- margin-left: 5px;
694
- height: 34px;
695
- /*background-color: #6aa6e2;*/
696
- border-radius: 4px;
697
- font-family: PingFang;
698
- color: #ffffff;
699
- }
700
- .form-control{
701
- padding: 8px 12px;
702
- }
703
- </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">
20
+ <button
21
+ type="button"
22
+ class="btn btn-info head-but"
23
+ @click="$parent.$parent.showChargeModal()"
24
+ :disabled="$parent.$parent.mark === 1 || ($parent.$parent.selectdata.f_cumulative_payment_money >= $parent.$parent.selectdata.f_due_money || $parent.$parent.selectdata.f_surplus_money === 0)"
25
+ >新增收费</button>
26
+ </th>
27
+ </tr>
28
+ </template>
29
+ <template partial='body'>
30
+ <tr>
31
+ <td style="text-align: center;">
32
+ <nobr>{{$index+1}}</nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <nobr>{{row.f_charge_money}}</nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{row.f_amount_words}}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr>{{row.f_payment_method}}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>{{row.f_charge_collectors}}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <nobr>{{row.f_charge_date}}</nobr>
48
+ </td>
49
+ <td style="text-align: center;">
50
+ <nobr>{{row.f_charge_remarks}}</nobr>
51
+ </td>
52
+ <td style="text-align: center;">
53
+ <nobr>{{row.f_charge_status}}</nobr>
54
+ </td>
55
+ <td style="text-align: center;">
56
+ <nobr>{{row.f_void_staff}}</nobr>
57
+ </td>
58
+ <td style="text-align: center;">
59
+ <nobr>{{row.f_void_date}}</nobr>
60
+ </td>
61
+ <td style="text-align: center;">
62
+ <nobr>{{row.f_void_remarks}}</nobr>
63
+ </td>
64
+ <td style="text-align: center;">
65
+ <nobr>{{row.f_bill_style}}</nobr>
66
+ </td>
67
+ <td style="text-align: center;">
68
+ <nobr>{{row.f_bill_state}}</nobr>
69
+ </td>
70
+ <td style="text-align: center;">
71
+ <nobr v-if="row.f_charge_status !== '退款'">
72
+ <button
73
+ type="button"
74
+ name="button"
75
+ class="btn btn-link"
76
+ v-if = false
77
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_status === '作废'"
78
+ @click="$parent.$parent.showInvalidModal(row)"
79
+ >作废</button>
80
+
81
+ <button
82
+ type="button" name="button" class="btn btn-link"
83
+ v-if="row.f_bill_state !== '开票成功' && row.f_charge_status !== '作废'"
84
+ @click="$parent.$parent.openBill(row)"
85
+ >开票</button>
86
+
87
+ <button
88
+ type="button" name="button" class="btn btn-link"
89
+ v-if = "row.f_bill_state === '开票成功'"
90
+ @click="$parent.$parent.showPrintModal(row)"
91
+ >查看发票</button>
92
+ </nobr>
93
+ </td>
94
+ </tr>
95
+ </template>
96
+ </data-grid>
97
+
98
+ <validator name="v">
99
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
100
+ <header slot="modal-header" class="modal-header">
101
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
102
+ <h4 class="modal-title">收费明细</h4>
103
+ </header>
104
+ <article slot="modal-body" class="modal-body clearfix">
105
+ <div class="form-group col-sm-6" :class="[$v.f_charge_money.required ? 'has-error' : '']">
106
+ <label class="col-sm-4 control-label">收费金额:</label>
107
+ <div class="col-sm-8">
108
+ <input type="text"
109
+ class="form-control input_view"
110
+ style="width: 100%"
111
+ placeholder="0.00"
112
+ @keyup="handleInput"
113
+ @change="moneyChange"
114
+ v-validate:f_charge_money = "['required']"
115
+ v-model="charge.f_charge_money" />
116
+ </div>
117
+ </div>
118
+ <div class="form-group col-sm-6" :class="[$v.f_feecount.required ? 'has-error' : '']">
119
+ <label class="col-sm-4 control-label">缴费户数:</label>
120
+ <div class="col-sm-8">
121
+ <input type="text"
122
+ class="form-control input_view"
123
+ style="width: 100%"
124
+ v-validate:f_feecount = "['required']"
125
+ v-model="charge.f_feecount"
126
+ :value="selectdata.f_install_count"
127
+ />
128
+ </div>
129
+ </div>
130
+ <div class="form-group col-sm-6">
131
+ <label class="col-sm-4 control-label">金额大写:</label>
132
+ <div class="col-sm-8">
133
+ <input type="text" class="form-control input_view" style="width: 100%" readonly
134
+ :value="smalltoBIG(0)" v-model.sync="charge.f_amount_words"/>
135
+ </div>
136
+ </div>
137
+ <div class="form-group col-sm-6" :class="[$v.f_payment_method.required ? 'has-error' : '']">
138
+ <label class="col-sm-4 control-label">付款方式:</label>
139
+ <div class="col-sm-8">
140
+ <input type="text" v-show="false" v-model="charge.f_payment_method" v-validate:f_payment_method = "['required']" >
141
+ <input-select
142
+ placeholder='请选择' width="100%"
143
+ v-model="charge.f_payment_method"
144
+ :value.sync="charge.f_payment_method"
145
+ :options='paymentMethod'
146
+ class="select select_list"
147
+ :value-single="true"
148
+ close-on-select ></input-select>
149
+ </div>
150
+ </div>
151
+ <div class="form-group col-sm-6" :class="[$v.f_bill_style.required ? 'has-error' : '']">
152
+ <label class="col-sm-4 control-label">票据类型:</label>
153
+ <div class="col-sm-8">
154
+ <input type="text" v-show="false" v-model="charge.f_bill_style" :value.sync="selectdata.f_paper_type" v-validate:f_bill_style = "['required']" >
155
+ <input-select
156
+ placeholder='请选择' width="100%"
157
+ v-model="charge.f_bill_style"
158
+ :value.sync="selectdata.f_paper_type"
159
+ :options='billStyleList'
160
+ class="select select_list"
161
+ :value-single="true"
162
+ close-on-select ></input-select>
163
+ </div>
164
+ </div>
165
+ <div class="form-group col-sm-6">
166
+ <label class="col-sm-4 control-label">应交总金额:</label>
167
+ <div class="col-sm-8">
168
+ <input type="text" class="form-control input_view" style="width: 100%" readonly
169
+ v-model="selectdata.f_due_money" />
170
+ </div>
171
+ </div>
172
+ <div class="form-group col-sm-6">
173
+ <label class="col-sm-4 control-label">未结总金额:</label>
174
+ <div class="col-sm-8">
175
+ <input type="text" class="form-control input_view" style="width: 100%" readonly
176
+ v-model="selectdata.f_surplus_money" />
177
+ </div>
178
+ </div>
179
+ <div class="form-group col-sm-6">
180
+ <label class="col-sm-4 control-label">累计缴费总金额:</label>
181
+ <div class="col-sm-8">
182
+ <input type="text" class="form-control input_view" style="width: 100%" readonly
183
+ v-model="selectdata.f_cumulative_payment_money" />
184
+ </div>
185
+ </div>
186
+ <div class="form-group col-sm-12">
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-model="charge.f_charge_remarks" />
191
+ </div>
192
+ </div>
193
+ <div class="form-group col-sm-6">
194
+ <label class="col-sm-4 control-label">购货单位识别号:</label>
195
+ <div class="col-sm-8">
196
+ <input type="text" class="form-control input_view" style="width: 100%"
197
+ v-model="charge.f_taxpayer_id" :value="selectdata.f_taxpayer_id" />
198
+ </div>
199
+ </div>
200
+ <div class="form-group col-sm-6" :class="[$v.f_paper_name.required ? 'has-error' : '']">
201
+ <label class="col-sm-4 control-label">购货单位名称:</label>
202
+ <div class="col-sm-8">
203
+ <input type="text" class="form-control input_view" style="width: 100%"
204
+ v-validate:f_paper_name = "['required']"
205
+ v-model="charge.f_paper_name" :value="selectdata.f_paper_name" />
206
+ </div>
207
+ </div>
208
+ <div class="form-group col-sm-6">
209
+ <label class="col-sm-4 control-label">购货单位银行账号:</label>
210
+ <div class="col-sm-8">
211
+ <input type="text" class="form-control input_view" style="width: 100%"
212
+ v-model="charge.f_paper_account" :value="selectdata.f_paper_account" />
213
+ </div>
214
+ </div>
215
+ <div class="form-group col-sm-6">
216
+ <label class="col-sm-4 control-label">购货单位地址电话:</label>
217
+ <div class="col-sm-8">
218
+ <input type="text" class="form-control input_view" style="width: 100%"
219
+ v-model="charge.f_address_phone" :value="selectdata.f_address_phone" />
220
+ </div>
221
+ </div>
222
+ <div class="form-group col-sm-12">
223
+ <label class="col-sm-2 control-label">发票备注:</label>
224
+ <div class="col-sm-10">
225
+ <input type="text" class="form-control input_view" style="width: 100%"
226
+ v-model="charge.f_bill_remarks" :value="selectdata.f_paper_remarks"/>
227
+ </div>
228
+ </div>
229
+ </article>
230
+ <footer slot="modal-footer" class="modal-footer">
231
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveCharge()">新增收费</button>
232
+ </footer>
233
+ </modal>
234
+ </validator>
235
+
236
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :backdrop="false" title="作废收费">
237
+ <header slot="modal-header" class="modal-header">
238
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
239
+ <h4 class="modal-title">作废收费</h4>
240
+ </header>
241
+ <article slot="modal-body" class="modal-body clearfix">
242
+ <div class="form-group col-sm-12" v-if="false">
243
+ <label class="col-sm-2 control-label">缴费地址:</label>
244
+ <div class="col-sm-10">
245
+ <input type="text"
246
+ class="form-control input_view"
247
+ style="width: 100%"
248
+ readonly
249
+ v-model="charge.f_useraddres" />
250
+ </div>
251
+ </div>
252
+ <div class="form-group col-sm-12">
253
+ <label class="col-sm-2 control-label">收费金额:</label>
254
+ <div class="col-sm-10">
255
+ <input type="text"
256
+ class="form-control input_view"
257
+ style="width: 100%"
258
+ readonly
259
+ v-model="charge.f_charge_money" />
260
+ </div>
261
+ </div>
262
+ <div class="form-group col-sm-12">
263
+ <label class="col-sm-2 control-label">付款方式:</label>
264
+ <div class="col-sm-10">
265
+ <input type="text"
266
+ class="form-control input_view"
267
+ style="width: 100%"
268
+ readonly
269
+ v-model="charge.f_payment_method" />
270
+ </div>
271
+ </div>
272
+ <div class="form-group col-sm-12">
273
+ <label class="col-sm-2 control-label">金额大写:</label>
274
+ <div class="col-sm-10">
275
+ <input type="text"
276
+ class="form-control input_view"
277
+ style="width: 100%"
278
+ readonly
279
+ v-model="charge.f_amount_words" />
280
+ </div>
281
+ </div>
282
+ <div class="form-group col-sm-12">
283
+ <label class="col-sm-2 control-label">收费人员:</label>
284
+ <div class="col-sm-10">
285
+ <input type="text"
286
+ class="form-control input_view"
287
+ style="width: 100%"
288
+ readonly
289
+ v-model="charge.f_charge_collectors" />
290
+ </div>
291
+ </div>
292
+ <div class="form-group col-sm-12" :class="charge.f_void_remarks ? '':'has-error'">
293
+ <label class="col-sm-2 control-label">作废原因:</label>
294
+ <div class="col-sm-10">
295
+ <input type="text"
296
+ class="form-control input_view"
297
+ style="width: 100%"
298
+ v-model="charge.f_void_remarks" />
299
+ </div>
300
+ </div>
301
+ </article>
302
+ <footer slot="modal-footer" class="modal-footer">
303
+ <button type="button" class="btn btn-primary" :disabled="!charge.f_void_remarks" @click="invalidApplyCharge()">确认作废</button>
304
+ </footer>
305
+ </modal>
306
+
307
+ <modal v-if="showPrint" :show.sync="showPrint" v-ref:modal :large="true" :backdrop="false">
308
+ <header slot="modal-header" class="modal-header">
309
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
310
+ <h4 class="modal-title">票据信息</h4>
311
+ </header>
312
+ <article slot="modal-body" class="modal-body clearfix">
313
+ <iframe width="100%" height="500px" :src="charge.f_bill_link" v-if="charge.f_bill_link"></iframe>
314
+ </article>
315
+ <footer slot="modal-footer" class="modal-footer">
316
+ </footer>
317
+ </modal>
318
+ </div>
319
+ </template>
320
+ <script>
321
+ import {PagedList} from 'vue-client'
322
+ import {HttpResetClass} from 'vue-client'
323
+ import Vue from 'vue'
324
+ import {isEmpty} from '../../../Util'
325
+
326
+ export default {
327
+ title: '收费管理',
328
+ props: {
329
+ selectdata: {
330
+ type: Object
331
+ },
332
+ mark: {
333
+ type: Number,
334
+ default: 0
335
+ }
336
+ },
337
+ data () {
338
+ return {
339
+ showCharge: false, // 收费明细
340
+ showInvalid: false, // 作废
341
+ showPrint: false, // 打印
342
+ model: {
343
+ data: null
344
+ }, // 记录
345
+ charge: {
346
+
347
+ }
348
+ }
349
+ },
350
+ ready () {
351
+ this.search()
352
+ },
353
+ methods: {
354
+
355
+ async invalidApplyCharge() {
356
+
357
+ let http = new HttpResetClass()
358
+ let data = {
359
+ apply: this.selectdata,
360
+ user: this.$login.f,
361
+ charge: this.charge
362
+ }
363
+ let res = await http.load('POST', 'rs/logic/invalidApplyCharge', {data:data}, {
364
+ resolveMsg: null,
365
+ rejectMsg: '作废失败!!!'
366
+ })
367
+ this.selectdata = res.data
368
+
369
+ this.$dispatch('breakControl', this.selectdata)
370
+ },
371
+ // 打开作废收费
372
+ showInvalidModal(row) {
373
+ this.charge = row
374
+ this.showInvalid = true
375
+ },
376
+ // 查看发票
377
+ showPrintModal(row, type) {
378
+ this.charge = row
379
+ if (!this.charge.f_bill_link && this.charge.f_filepath){
380
+ let date = new Date(this.charge.f_charge_date)
381
+ let year = date.getFullYear()
382
+ let month = date.getMonth() + 1
383
+ let month2 = month <= 9 ? '0' + month : month
384
+ let day = date.getDate()
385
+ let day2 = day <= 9 ? '0' + day : day
386
+ let chargedate = year + '-' + month2 + '-' + day2
387
+ this.charge.f_bill_link = `http://193.168.1.6:8082/eticket/` + chargedate + '/' + this.charge.f_filepath + '.pdf'
388
+ }else if(!this.charge.f_bill_link){
389
+ this.charge.f_bill_link = this.charge.f_bill_url
390
+ }
391
+ this.showPrint = true
392
+ },
393
+ // 开票组织数据
394
+ async openBill (charge) {
395
+ this.charge = charge
396
+ let data = null
397
+ let res = null
398
+
399
+ let http = new HttpResetClass()
400
+
401
+ if (isEmpty(this.charge.f_bill_id)) {
402
+ try {
403
+ data = {
404
+ id: this.charge.id,
405
+ charge_type: '报装收费',
406
+ f_user_name: this.selectdata.f_user_name
407
+ }
408
+ if (this.selectdata.f_apply_type === '改线业务'){
409
+ data.charge_type = '整改收费'
410
+ }
411
+ res = await http.load('POST', 'rs/logic/bjEticketCharge', {data:data}, {
412
+ resolveMsg: null,
413
+ rejectMsg: '开票组织数据失败!!!'
414
+ }).then((res) => {
415
+ this.charge.f_bill_id = res.data
416
+ this.outBill()
417
+ })
418
+ }catch (e){
419
+ console.error("错误信息",e)
420
+ this.charge.f_bill_state = '开票失败'
421
+
422
+ data = {
423
+ f_bill_id: '',
424
+ id: this.charge.id,
425
+ apply: this.selectdata,
426
+ user: this.$login.f
427
+ }
428
+ res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
429
+ resolveMsg: null,
430
+ rejectMsg: '收费信息更新失败!!!'
431
+ })
432
+ this.$showMessage(`开票信息组织失败!!`, ['confirm']).then(async (res) => {
433
+ if (res === 'confirm') {
434
+ this.$dispatch('loadPage')
435
+ }else {
436
+ this.$dispatch('loadPage')
437
+ }
438
+ })
439
+ }
440
+ }else {
441
+ await this.outBill()
442
+ }
443
+ },
444
+ //开票
445
+ async outBill () {
446
+
447
+ let data = null
448
+ let res = null
449
+ let http = new HttpResetClass()
450
+ if (this.charge.f_bill_style === '电子票') {
451
+ data = {
452
+ id: this.charge.f_bill_id,
453
+ f_sell_id: this.charge.id
454
+ }
455
+ try {
456
+ res = await http.load('POST', 'rs/logic/bjOpenEticket', {data: data}, {
457
+ resolveMsg: null,
458
+ rejectMsg: '开票失败!!!'
459
+ })
460
+
461
+ // res.data.f_bill_url = 'https://dlj.51fapiao.cn/dlj/v7/de4c9b985021111ef1c722c2914e34d9273291'
462
+
463
+ if (res.data.f_bill_state !== '开票成功') {
464
+ throw '开票失败!!!'
465
+ } else {
466
+ this.charge.f_bill_state = res.data.f_bill_state
467
+ this.charge.f_bill_url = res.data.f_bill_url
468
+ let date = new Date(this.charge.f_charge_date)
469
+ let year = date.getFullYear()
470
+ let month = date.getMonth() + 1
471
+ let month2 = month <= 9 ? '0' + month : month
472
+ let day = date.getDate()
473
+ let day2 = day <= 9 ? '0' + day : day
474
+ let chargedate = year + '-' + month2 + '-' + day2
475
+ this.charge.f_bill_link = `http://193.168.1.6:8082/eticket/` + chargedate + '/' + res.data.f_filepath + '.pdf'
476
+ this.showPrint = true
477
+ let pram = {
478
+ f_bill_link: this.charge.f_bill_link,
479
+ f_sell_id: this.charge.id,
480
+ apply: this.selectdata,
481
+ user: this.$login.f
482
+ }
483
+ await http.load('POST', 'rs/logic/updataChargeRecord', {data: pram}, {
484
+ resolveMsg: null,
485
+ rejectMsg: null
486
+ })
487
+ }
488
+ } catch (e) {
489
+ console.error(e)
490
+ this.charge.f_bill_state = '开票失败'
491
+
492
+ data = {
493
+ f_bill_id: this.charge.f_bill_id,
494
+ id: this.charge.id,
495
+ apply: this.selectdata,
496
+ user: this.$login.f
497
+ }
498
+ res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
499
+ resolveMsg: null,
500
+ rejectMsg: '收费信息更新失败!!!'
501
+ })
502
+ this.$showMessage(`开票失败!!`, ['confirm']).then(async (res) => {
503
+ if (res === 'confirm') {
504
+ this.$dispatch('loadPage')
505
+ }else {
506
+ this.$dispatch('loadPage')
507
+ }
508
+ })
509
+ }
510
+ } else if (this.charge.f_bill_style === '专票') {
511
+ data = {
512
+ id: this.charge.f_bill_id
513
+ }
514
+ res = await http.load('POST', 'rs/sql/getEticketData', {data: data}, {
515
+ resolveMsg: null,
516
+ rejectMsg: '开票数据查询失败!!!'
517
+ })
518
+ let openBillData = JSON.parse(res.data[0].f_bill_data)
519
+ openBillData.kpzdbs = this.$login.f.taxnum
520
+ const nowDate = new Date()
521
+ let year = nowDate.getFullYear()
522
+ let mouth = nowDate.getMonth() + 1
523
+ let day = nowDate.getDate()
524
+ openBillData.f_operate_date = year + '-' + mouth + '-' + day
525
+ openBillData.f_operator = this.$login.f.name
526
+ openBillData.outlets = this.$login.f.f_department_name
527
+ openBillData.hjse = ''
528
+ openBillData.jshh = ''
529
+ openBillData.tzdbh = ''
530
+ openBillData.yfpdm = ''
531
+ openBillData.yfphm = ''
532
+ console.log('返回开票信息。。 ', openBillData)
533
+ let billInfo = await this.$resetpost('http://127.0.0.1:8003/Goldtax', openBillData, {
534
+ resolveMsg: null,
535
+ rejectMsg: '专用发票开具失败!'
536
+ })
537
+ console.log('返回票据信息。。 ', JSON.parse(billInfo.data))//保存发票明细
538
+ if (!JSON.parse(billInfo.data).fphm) {
539
+ this.charge.f_bill_state = '开票失败'
540
+ data = {
541
+ f_bill_id: this.charge.f_bill_id,
542
+ id: this.charge.id,
543
+ apply: this.selectdata,
544
+ user: this.$login.f
545
+ }
546
+ res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
547
+ resolveMsg: null,
548
+ rejectMsg: '收费信息更新失败!!!'
549
+ })
550
+ this.$showMessage(`开票失败!!`, ['confirm']).then(async (res) => {
551
+ if (res === 'confirm') {
552
+ this.$dispatch('loadPage')
553
+ }else {
554
+ this.$dispatch('loadPage')
555
+ }
556
+ })
557
+ } else {
558
+ data = {
559
+ id: this.charge.f_bill_id,
560
+ f_bill_number: JSON.parse(billInfo.data).fphm,
561
+ f_bill_code: JSON.parse(billInfo.data).fpdm,
562
+ f_filepath: JSON.parse(billInfo.data).dzpkex ? JSON.parse(billInfo.data).dzpkex : '',
563
+ charge_id: this.charge.id,
564
+ apply: this.selectdata,
565
+ user: this.$login.f
566
+ }
567
+ res = await http.load('POST', 'rs/logic/updateEticketBill', {data: data}, {
568
+ resolveMsg: null,
569
+ rejectMsg: '开票信息更新失败!!!'
570
+ })
571
+
572
+ this.charge.f_bill_state = '开票成功'
573
+ this.charge.f_bill_url = ''
574
+ this.charge.f_bill_link = ''
575
+ }
576
+ }
577
+ },
578
+ // 新增收费
579
+ async saveCharge() {
580
+ let http = new HttpResetClass()
581
+ let data = {
582
+ apply: this.selectdata,
583
+ user: this.$login.f,
584
+ charge: this.charge
585
+ }
586
+
587
+ let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
588
+ resolveMsg: null,
589
+ rejectMsg: '缴费失败!!!'
590
+ }).then((res) => {
591
+ this.charge = res.data.charge
592
+ this.selectdata = res.data.apply
593
+
594
+ this.showCharge = false
595
+ try {
596
+ if (this.charge.id) {
597
+ this.openBill(this.charge)
598
+ }
599
+ } catch (e) {
600
+ this.$dispatch('breakControl', this.selectdata)
601
+ }
602
+ })
603
+ },
604
+ moneyChange () {
605
+ if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
606
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
607
+ this.charge.f_charge_money = null
608
+ return
609
+ }
610
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
611
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
612
+ this.charge.f_charge_money = null
613
+ return
614
+ }
615
+ },
616
+ // 金额转大写
617
+ handleInput(e) {
618
+ // 通过正则过滤小数点后两位
619
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
620
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
621
+ },
622
+ // 金额转大写
623
+ smalltoBIG(n) {
624
+ let fraction = ['角', '分'];
625
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
626
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
627
+ let head = n < 0 ? '欠' : '';
628
+ n = Math.abs(n);
629
+
630
+ let s = '';
631
+
632
+ for (var i = 0; i < fraction.length; i++) {
633
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
634
+ }
635
+ s = s || '整';
636
+ n = Math.floor(n);
637
+
638
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
639
+ let p = '';
640
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
641
+ p = digit[n % 10] + unit[1][j] + p;
642
+ n = Math.floor(n / 10);
643
+ }
644
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
645
+ }
646
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
647
+ },
648
+ async showChargeModal() {
649
+ this.showCharge = true
650
+ },
651
+ async search () {
652
+ let http = new HttpResetClass()
653
+ let data = {
654
+ f_process_id: this.selectdata.f_process_id
655
+ }
656
+ let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
657
+ resolveMsg: null,
658
+ rejectMsg: '收费记录查询失败!!!'
659
+ })
660
+ this.model.data = res.data
661
+ },
662
+ // 关闭对话框
663
+ closeModal() {
664
+ this.showCharge = false
665
+ this.showInvalid = false
666
+ this.showPrint = false
667
+ this.charge = {}
668
+ this.search()
669
+ }
670
+ },
671
+ events: {
672
+ },
673
+ computed: {
674
+ billStyleList () {
675
+ return this.$appdata.getParam("打印格式")
676
+ },
677
+ paymentMethod() {
678
+ return this.$appdata.getParam("付款方式")
679
+ },
680
+ paymentTerm() {
681
+ return this.$appdata.getParam("收费项目")
682
+ }
683
+ },
684
+ watch: {
685
+ }
686
+ }
687
+ </script>
688
+ <style scoped>
689
+ .textNoLineBreak {
690
+ white-space: nowrap;
691
+ }
692
+ .head-but{
693
+ margin-left: 5px;
694
+ height: 34px;
695
+ /*background-color: #6aa6e2;*/
696
+ border-radius: 4px;
697
+ font-family: PingFang;
698
+ color: #ffffff;
699
+ }
700
+ .form-control{
701
+ padding: 8px 12px;
702
+ }
703
+ </style>