apply-clients 7.1.36-yuchuan-53 → 7.1.36-yuchuan-55

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