apply-clients 7.1.36-yuchuan-83 → 7.1.36-yuchuan-84

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