apply-clients 7.1.36-yuchuan-58 → 7.1.36-yuchuan-60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/android.html +27 -27
  2. package/build/dev-server.js +187 -187
  3. package/package.json +1 -1
  4. package/src/apply.js +166 -166
  5. package/src/applyAndroid.js +98 -98
  6. package/src/components/android/AppSign.vue +232 -232
  7. package/src/components/android/Ignition/VentilationIgnition.vue +409 -409
  8. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +472 -472
  9. package/src/components/android/Process/AppExplorationUser.vue +454 -454
  10. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  11. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1026 -1026
  12. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  13. package/src/components/android/SealBind.vue +382 -382
  14. package/src/components/android/SealManage.vue +278 -278
  15. package/src/components/android/Sign/AppSignTask.vue +183 -183
  16. package/src/components/android/Supervisory/AppProcessSupervisory.vue +344 -344
  17. package/src/components/android/Task/Build/BuildTsak.vue +117 -117
  18. package/src/components/android/Task/BuildIgnition/BuildIgnition.vue +114 -114
  19. package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +317 -317
  20. package/src/components/android/Task/RepairFromSend/RepairFrom.vue +124 -124
  21. package/src/components/android/Task/RepairFromSend/RepairSend.vue +124 -124
  22. package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +431 -431
  23. package/src/components/android/Task/Survey/SurveyTsak.vue +141 -141
  24. package/src/components/android/Task/yiban/AppShowDone.vue +442 -442
  25. package/src/components/android/newPackage/customerServiceManager.vue +218 -218
  26. package/src/components/android/newPackage/projectPrice.vue +218 -218
  27. package/src/components/product/ApplyCharge/ApplyChargeList.vue +1101 -1101
  28. package/src/components/product/ApplyGuanXian/GuanXianCaiLiao.vue +236 -236
  29. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
  30. package/src/components/product/ApplyGuanXian/GuanXianExplorationUser.vue +142 -142
  31. package/src/components/product/ApplyGuanXian/GuanXianExplorationsupervisory.vue +166 -166
  32. package/src/components/product/ApplyGuanXian/GuanXianSupervisoryhCart.vue +119 -119
  33. package/src/components/product/ApplyGuanXian/GuanXiansupsupervisory.vue +140 -140
  34. package/src/components/product/ApplyMap/AppMapLocation.vue +829 -829
  35. package/src/components/product/ApplyMap/ApplyMapInputSearch.vue +335 -335
  36. package/src/components/product/ChongZheng/ApplyChongZhengList.vue +417 -417
  37. package/src/components/product/Function/InstallFunction.vue +132 -132
  38. package/src/components/product/Function/InstallInfoSelect.vue +374 -374
  39. package/src/components/product/Ignition/IgnitionDispatch.vue +90 -90
  40. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  41. package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
  42. package/src/components/product/InsuranceApply/InsuranceReport.vue +188 -188
  43. package/src/components/product/List/ShowAllActivity.vue +541 -541
  44. package/src/components/product/List/ShowDevices.vue +279 -279
  45. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  46. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  47. package/src/components/product/Process/ExplorationUser.vue +154 -154
  48. package/src/components/product/Process/New1ExplorationUser.vue +196 -196
  49. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  50. package/src/components/product/Process/NewExplorationUser.vue +216 -216
  51. package/src/components/product/Process/Processes/chargeManagement.vue +714 -714
  52. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  53. package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
  54. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  55. package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
  56. package/src/components/product/Process/Service/ServiceControl.vue +2223 -2223
  57. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  58. package/src/components/product/ServiceView.vue +644 -644
  59. package/src/components/product/Stop/StopApplyList.vue +224 -224
  60. package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
  61. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +593 -593
  62. package/src/components/product/Supervisory/SupervisoryControl.vue +114 -114
  63. package/src/components/product/Supervisory/SupervisoryList.vue +586 -586
  64. package/src/components/product/Supervisory/SupervisoryhCart.vue +120 -120
  65. package/src/components/product/Supervisory/YiBanSupervisoryControl.vue +111 -111
  66. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +4 -0
  67. package/src/components/product/VueUtils/ApplyUpload.vue +303 -303
  68. package/src/main.js +27 -27
@@ -1,714 +1,714 @@
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
- this.showInvalid=false
372
- this.charge = {}
373
- this.$dispatch('breakControl', this.selectdata)
374
- },
375
- // 打开作废收费
376
- showInvalidModal(row) {
377
- this.charge = row
378
- this.showInvalid = true
379
- },
380
- // 查看发票
381
- showPrintModal(row, type) {
382
- this.charge = row
383
- if (!this.charge.f_bill_link && this.charge.f_filepath){
384
- let date = new Date(this.charge.f_charge_date)
385
- let year = date.getFullYear()
386
- let month = date.getMonth() + 1
387
- let month2 = month <= 9 ? '0' + month : month
388
- let day = date.getDate()
389
- let day2 = day <= 9 ? '0' + day : day
390
- let chargedate = year + '-' + month2 + '-' + day2
391
- this.charge.f_bill_link = `http://193.168.1.6:8082/eticket/` + chargedate + '/' + this.charge.f_filepath + '.pdf'
392
- }else if(!this.charge.f_bill_link){
393
- this.charge.f_bill_link = this.charge.f_bill_url
394
- }
395
- this.showPrint = true
396
- },
397
- // 开票组织数据
398
- async openBill (charge) {
399
- this.charge = charge
400
- let data = null
401
- let res = null
402
-
403
- let http = new HttpResetClass()
404
-
405
- if (isEmpty(this.charge.f_bill_id)) {
406
- try {
407
- data = {
408
- id: this.charge.id,
409
- charge_type: '报装收费',
410
- f_user_name: this.selectdata.f_user_name
411
- }
412
- if (this.selectdata.f_apply_type === '改线业务'){
413
- data.charge_type = '整改收费'
414
- }
415
- res = await http.load('POST', 'rs/logic/bjEticketCharge', {data:data}, {
416
- resolveMsg: null,
417
- rejectMsg: '开票组织数据失败!!!'
418
- }).then((res) => {
419
- this.charge.f_bill_id = res.data
420
- this.outBill()
421
- })
422
- }catch (e){
423
- console.error("错误信息",e)
424
- this.charge.f_bill_state = '开票失败'
425
-
426
- data = {
427
- f_bill_id: '',
428
- id: this.charge.id,
429
- apply: this.selectdata,
430
- user: this.$login.f
431
- }
432
- res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
433
- resolveMsg: null,
434
- rejectMsg: '收费信息更新失败!!!'
435
- })
436
- this.$showMessage(`开票信息组织失败!!`, ['confirm']).then(async (res) => {
437
- if (res === 'confirm') {
438
- this.$dispatch('loadPage')
439
- }else {
440
- this.$dispatch('loadPage')
441
- }
442
- })
443
- }
444
- }else {
445
- await this.outBill()
446
- }
447
- },
448
- //开票
449
- async outBill () {
450
-
451
- let data = null
452
- let res = null
453
- let http = new HttpResetClass()
454
- if (this.charge.f_bill_style === '电子票') {
455
- data = {
456
- id: this.charge.f_bill_id,
457
- f_sell_id: this.charge.id
458
- }
459
- try {
460
- res = await http.load('POST', 'rs/logic/bjOpenEticket', {data: data}, {
461
- resolveMsg: null,
462
- rejectMsg: '开票失败!!!'
463
- })
464
-
465
- // res.data.f_bill_url = 'https://dlj.51fapiao.cn/dlj/v7/de4c9b985021111ef1c722c2914e34d9273291'
466
-
467
- if (res.data.f_bill_state !== '开票成功') {
468
- throw '开票失败!!!'
469
- } else {
470
- this.charge.f_bill_state = res.data.f_bill_state
471
- this.charge.f_bill_url = res.data.f_bill_url
472
- let date = new Date(this.charge.f_charge_date)
473
- let year = date.getFullYear()
474
- let month = date.getMonth() + 1
475
- let month2 = month <= 9 ? '0' + month : month
476
- let day = date.getDate()
477
- let day2 = day <= 9 ? '0' + day : day
478
- let chargedate = year + '-' + month2 + '-' + day2
479
- this.charge.f_bill_link = `http://193.168.1.6:8082/eticket/` + chargedate + '/' + res.data.f_filepath + '.pdf'
480
- this.showPrint = true
481
- let pram = {
482
- f_bill_link: this.charge.f_bill_link,
483
- f_sell_id: this.charge.id,
484
- apply: this.selectdata,
485
- user: this.$login.f
486
- }
487
- await http.load('POST', 'rs/logic/updataChargeRecord', {data: pram}, {
488
- resolveMsg: null,
489
- rejectMsg: null
490
- })
491
- }
492
- } catch (e) {
493
- console.error(e)
494
- this.charge.f_bill_state = '开票失败'
495
-
496
- data = {
497
- f_bill_id: this.charge.f_bill_id,
498
- id: this.charge.id,
499
- apply: this.selectdata,
500
- user: this.$login.f
501
- }
502
- res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
503
- resolveMsg: null,
504
- rejectMsg: '收费信息更新失败!!!'
505
- })
506
- this.$showMessage(`开票失败!!`, ['confirm']).then(async (res) => {
507
- if (res === 'confirm') {
508
- this.$dispatch('loadPage')
509
- }else {
510
- this.$dispatch('loadPage')
511
- }
512
- })
513
- }
514
- } else if (this.charge.f_bill_style === '专票') {
515
- data = {
516
- id: this.charge.f_bill_id
517
- }
518
- res = await http.load('POST', 'rs/sql/getEticketData', {data: data}, {
519
- resolveMsg: null,
520
- rejectMsg: '开票数据查询失败!!!'
521
- })
522
- let openBillData = JSON.parse(res.data[0].f_bill_data)
523
- openBillData.kpzdbs = this.$login.f.taxnum
524
- const nowDate = new Date()
525
- let year = nowDate.getFullYear()
526
- let mouth = nowDate.getMonth() + 1
527
- let day = nowDate.getDate()
528
- openBillData.f_operate_date = year + '-' + mouth + '-' + day
529
- openBillData.f_operator = this.$login.f.name
530
- openBillData.outlets = this.$login.f.f_department_name
531
- openBillData.hjse = ''
532
- openBillData.jshh = ''
533
- openBillData.tzdbh = ''
534
- openBillData.yfpdm = ''
535
- openBillData.yfphm = ''
536
- console.log('返回开票信息。。 ', openBillData)
537
- let billInfo = await this.$resetpost('http://127.0.0.1:8003/Goldtax', openBillData, {
538
- resolveMsg: null,
539
- rejectMsg: '专用发票开具失败!'
540
- })
541
- console.log('返回票据信息。。 ', JSON.parse(billInfo.data))//保存发票明细
542
- if (!JSON.parse(billInfo.data).fphm) {
543
- this.charge.f_bill_state = '开票失败'
544
- data = {
545
- f_bill_id: this.charge.f_bill_id,
546
- id: this.charge.id,
547
- apply: this.selectdata,
548
- user: this.$login.f
549
- }
550
- res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
551
- resolveMsg: null,
552
- rejectMsg: '收费信息更新失败!!!'
553
- })
554
- this.$showMessage(`开票失败!!`, ['confirm']).then(async (res) => {
555
- if (res === 'confirm') {
556
- this.$dispatch('loadPage')
557
- }else {
558
- this.$dispatch('loadPage')
559
- }
560
- })
561
- } else {
562
- data = {
563
- id: this.charge.f_bill_id,
564
- f_bill_number: JSON.parse(billInfo.data).fphm,
565
- f_bill_code: JSON.parse(billInfo.data).fpdm,
566
- f_filepath: JSON.parse(billInfo.data).dzpkex ? JSON.parse(billInfo.data).dzpkex : '',
567
- charge_id: this.charge.id,
568
- apply: this.selectdata,
569
- user: this.$login.f
570
- }
571
- res = await http.load('POST', 'rs/logic/updateEticketBill', {data: data}, {
572
- resolveMsg: null,
573
- rejectMsg: '开票信息更新失败!!!'
574
- })
575
-
576
- this.charge.f_bill_state = '开票成功'
577
- this.charge.f_bill_url = ''
578
- this.charge.f_bill_link = ''
579
- }
580
- }
581
- },
582
- // 新增收费
583
- async saveCharge() {
584
- let http = new HttpResetClass()
585
- let data = {
586
- apply: this.selectdata,
587
- user: this.$login.f,
588
- charge: this.charge
589
- }
590
-
591
- let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
592
- resolveMsg: null,
593
- rejectMsg: '缴费失败!!!'
594
- }).then((res) => {
595
- this.charge = res.data.charge
596
- this.selectdata = res.data.apply
597
-
598
- this.showCharge = false
599
- try {
600
- if (this.charge.id) {
601
- this.openBill(this.charge)
602
- }
603
- } catch (e) {
604
- this.$dispatch('breakControl', this.selectdata)
605
- }
606
- })
607
- },
608
- moneyChange () {
609
- if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
610
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
611
- this.charge.f_charge_money = null
612
- return
613
- }
614
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
615
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
616
- this.charge.f_charge_money = null
617
- return
618
- }
619
- },
620
- // 金额转大写
621
- handleInput(e) {
622
- // 通过正则过滤小数点后两位
623
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
624
- this.charge.f_amount_words = this.smalltoBIG(e.target.value)
625
- },
626
- // 金额转大写
627
- smalltoBIG(n) {
628
- let fraction = ['角', '分'];
629
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
630
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
631
- let head = n < 0 ? '欠' : '';
632
- n = Math.abs(n);
633
-
634
- let s = '';
635
-
636
- for (var i = 0; i < fraction.length; i++) {
637
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
638
- }
639
- s = s || '整';
640
- n = Math.floor(n);
641
-
642
- for (var i = 0; i < unit[0].length && n > 0; i++) {
643
- let p = '';
644
- for (var j = 0; j < unit[1].length && n > 0; j++) {
645
- p = digit[n % 10] + unit[1][j] + p;
646
- n = Math.floor(n / 10);
647
- }
648
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
649
- }
650
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
651
- },
652
- async showChargeModal() {
653
- this.feecountchange()
654
- this.showCharge = true
655
- },
656
- async search () {
657
- let http = new HttpResetClass()
658
- let data = {
659
- f_process_id: this.selectdata.f_process_id
660
- }
661
- let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
662
- resolveMsg: null,
663
- rejectMsg: '收费记录查询失败!!!'
664
- })
665
- this.model.data = res.data
666
- },
667
- // 关闭对话框
668
- closeModal() {
669
- this.showCharge = false
670
- this.showInvalid = false
671
- this.showPrint = false
672
- this.charge = {}
673
- this.search()
674
- },
675
- feecountchange(){
676
- if(this.selectdata.f_apply_type == '民用报建'){
677
- this.charge.f_charge_money = Number(this.selectdata.f_price) * Number(this.charge.f_feecount || this.selectdata.f_install_count)
678
- this.charge.f_amount_words = this.smalltoBIG(this.charge.f_charge_money)
679
- }
680
- }
681
- },
682
- events: {
683
- },
684
- computed: {
685
- billStyleList () {
686
- return this.$appdata.getParam("打印格式")
687
- },
688
- paymentMethod() {
689
- return this.$appdata.getParam("付款方式")
690
- },
691
- paymentTerm() {
692
- return this.$appdata.getParam("收费项目")
693
- }
694
- },
695
- watch: {
696
- }
697
- }
698
- </script>
699
- <style scoped>
700
- .textNoLineBreak {
701
- white-space: nowrap;
702
- }
703
- .head-but{
704
- margin-left: 5px;
705
- height: 34px;
706
- /*background-color: #6aa6e2;*/
707
- border-radius: 4px;
708
- font-family: PingFang;
709
- color: #ffffff;
710
- }
711
- .form-control{
712
- padding: 8px 12px;
713
- }
714
- </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
+ this.showInvalid=false
372
+ this.charge = {}
373
+ this.$dispatch('breakControl', this.selectdata)
374
+ },
375
+ // 打开作废收费
376
+ showInvalidModal(row) {
377
+ this.charge = row
378
+ this.showInvalid = true
379
+ },
380
+ // 查看发票
381
+ showPrintModal(row, type) {
382
+ this.charge = row
383
+ if (!this.charge.f_bill_link && this.charge.f_filepath){
384
+ let date = new Date(this.charge.f_charge_date)
385
+ let year = date.getFullYear()
386
+ let month = date.getMonth() + 1
387
+ let month2 = month <= 9 ? '0' + month : month
388
+ let day = date.getDate()
389
+ let day2 = day <= 9 ? '0' + day : day
390
+ let chargedate = year + '-' + month2 + '-' + day2
391
+ this.charge.f_bill_link = `http://193.168.1.6:8082/eticket/` + chargedate + '/' + this.charge.f_filepath + '.pdf'
392
+ }else if(!this.charge.f_bill_link){
393
+ this.charge.f_bill_link = this.charge.f_bill_url
394
+ }
395
+ this.showPrint = true
396
+ },
397
+ // 开票组织数据
398
+ async openBill (charge) {
399
+ this.charge = charge
400
+ let data = null
401
+ let res = null
402
+
403
+ let http = new HttpResetClass()
404
+
405
+ if (isEmpty(this.charge.f_bill_id)) {
406
+ try {
407
+ data = {
408
+ id: this.charge.id,
409
+ charge_type: '报装收费',
410
+ f_user_name: this.selectdata.f_user_name
411
+ }
412
+ if (this.selectdata.f_apply_type === '改线业务'){
413
+ data.charge_type = '整改收费'
414
+ }
415
+ res = await http.load('POST', 'rs/logic/bjEticketCharge', {data:data}, {
416
+ resolveMsg: null,
417
+ rejectMsg: '开票组织数据失败!!!'
418
+ }).then((res) => {
419
+ this.charge.f_bill_id = res.data
420
+ this.outBill()
421
+ })
422
+ }catch (e){
423
+ console.error("错误信息",e)
424
+ this.charge.f_bill_state = '开票失败'
425
+
426
+ data = {
427
+ f_bill_id: '',
428
+ id: this.charge.id,
429
+ apply: this.selectdata,
430
+ user: this.$login.f
431
+ }
432
+ res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
433
+ resolveMsg: null,
434
+ rejectMsg: '收费信息更新失败!!!'
435
+ })
436
+ this.$showMessage(`开票信息组织失败!!`, ['confirm']).then(async (res) => {
437
+ if (res === 'confirm') {
438
+ this.$dispatch('loadPage')
439
+ }else {
440
+ this.$dispatch('loadPage')
441
+ }
442
+ })
443
+ }
444
+ }else {
445
+ await this.outBill()
446
+ }
447
+ },
448
+ //开票
449
+ async outBill () {
450
+
451
+ let data = null
452
+ let res = null
453
+ let http = new HttpResetClass()
454
+ if (this.charge.f_bill_style === '电子票') {
455
+ data = {
456
+ id: this.charge.f_bill_id,
457
+ f_sell_id: this.charge.id
458
+ }
459
+ try {
460
+ res = await http.load('POST', 'rs/logic/bjOpenEticket', {data: data}, {
461
+ resolveMsg: null,
462
+ rejectMsg: '开票失败!!!'
463
+ })
464
+
465
+ // res.data.f_bill_url = 'https://dlj.51fapiao.cn/dlj/v7/de4c9b985021111ef1c722c2914e34d9273291'
466
+
467
+ if (res.data.f_bill_state !== '开票成功') {
468
+ throw '开票失败!!!'
469
+ } else {
470
+ this.charge.f_bill_state = res.data.f_bill_state
471
+ this.charge.f_bill_url = res.data.f_bill_url
472
+ let date = new Date(this.charge.f_charge_date)
473
+ let year = date.getFullYear()
474
+ let month = date.getMonth() + 1
475
+ let month2 = month <= 9 ? '0' + month : month
476
+ let day = date.getDate()
477
+ let day2 = day <= 9 ? '0' + day : day
478
+ let chargedate = year + '-' + month2 + '-' + day2
479
+ this.charge.f_bill_link = `http://193.168.1.6:8082/eticket/` + chargedate + '/' + res.data.f_filepath + '.pdf'
480
+ this.showPrint = true
481
+ let pram = {
482
+ f_bill_link: this.charge.f_bill_link,
483
+ f_sell_id: this.charge.id,
484
+ apply: this.selectdata,
485
+ user: this.$login.f
486
+ }
487
+ await http.load('POST', 'rs/logic/updataChargeRecord', {data: pram}, {
488
+ resolveMsg: null,
489
+ rejectMsg: null
490
+ })
491
+ }
492
+ } catch (e) {
493
+ console.error(e)
494
+ this.charge.f_bill_state = '开票失败'
495
+
496
+ data = {
497
+ f_bill_id: this.charge.f_bill_id,
498
+ id: this.charge.id,
499
+ apply: this.selectdata,
500
+ user: this.$login.f
501
+ }
502
+ res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
503
+ resolveMsg: null,
504
+ rejectMsg: '收费信息更新失败!!!'
505
+ })
506
+ this.$showMessage(`开票失败!!`, ['confirm']).then(async (res) => {
507
+ if (res === 'confirm') {
508
+ this.$dispatch('loadPage')
509
+ }else {
510
+ this.$dispatch('loadPage')
511
+ }
512
+ })
513
+ }
514
+ } else if (this.charge.f_bill_style === '专票') {
515
+ data = {
516
+ id: this.charge.f_bill_id
517
+ }
518
+ res = await http.load('POST', 'rs/sql/getEticketData', {data: data}, {
519
+ resolveMsg: null,
520
+ rejectMsg: '开票数据查询失败!!!'
521
+ })
522
+ let openBillData = JSON.parse(res.data[0].f_bill_data)
523
+ openBillData.kpzdbs = this.$login.f.taxnum
524
+ const nowDate = new Date()
525
+ let year = nowDate.getFullYear()
526
+ let mouth = nowDate.getMonth() + 1
527
+ let day = nowDate.getDate()
528
+ openBillData.f_operate_date = year + '-' + mouth + '-' + day
529
+ openBillData.f_operator = this.$login.f.name
530
+ openBillData.outlets = this.$login.f.f_department_name
531
+ openBillData.hjse = ''
532
+ openBillData.jshh = ''
533
+ openBillData.tzdbh = ''
534
+ openBillData.yfpdm = ''
535
+ openBillData.yfphm = ''
536
+ console.log('返回开票信息。。 ', openBillData)
537
+ let billInfo = await this.$resetpost('http://127.0.0.1:8003/Goldtax', openBillData, {
538
+ resolveMsg: null,
539
+ rejectMsg: '专用发票开具失败!'
540
+ })
541
+ console.log('返回票据信息。。 ', JSON.parse(billInfo.data))//保存发票明细
542
+ if (!JSON.parse(billInfo.data).fphm) {
543
+ this.charge.f_bill_state = '开票失败'
544
+ data = {
545
+ f_bill_id: this.charge.f_bill_id,
546
+ id: this.charge.id,
547
+ apply: this.selectdata,
548
+ user: this.$login.f
549
+ }
550
+ res = await http.load('POST', 'rs/logic/updateChargeBill', {data: data}, {
551
+ resolveMsg: null,
552
+ rejectMsg: '收费信息更新失败!!!'
553
+ })
554
+ this.$showMessage(`开票失败!!`, ['confirm']).then(async (res) => {
555
+ if (res === 'confirm') {
556
+ this.$dispatch('loadPage')
557
+ }else {
558
+ this.$dispatch('loadPage')
559
+ }
560
+ })
561
+ } else {
562
+ data = {
563
+ id: this.charge.f_bill_id,
564
+ f_bill_number: JSON.parse(billInfo.data).fphm,
565
+ f_bill_code: JSON.parse(billInfo.data).fpdm,
566
+ f_filepath: JSON.parse(billInfo.data).dzpkex ? JSON.parse(billInfo.data).dzpkex : '',
567
+ charge_id: this.charge.id,
568
+ apply: this.selectdata,
569
+ user: this.$login.f
570
+ }
571
+ res = await http.load('POST', 'rs/logic/updateEticketBill', {data: data}, {
572
+ resolveMsg: null,
573
+ rejectMsg: '开票信息更新失败!!!'
574
+ })
575
+
576
+ this.charge.f_bill_state = '开票成功'
577
+ this.charge.f_bill_url = ''
578
+ this.charge.f_bill_link = ''
579
+ }
580
+ }
581
+ },
582
+ // 新增收费
583
+ async saveCharge() {
584
+ let http = new HttpResetClass()
585
+ let data = {
586
+ apply: this.selectdata,
587
+ user: this.$login.f,
588
+ charge: this.charge
589
+ }
590
+
591
+ let res = await http.load('POST', 'rs/logic/addApplyChargeRecord', {data:data}, {
592
+ resolveMsg: null,
593
+ rejectMsg: '缴费失败!!!'
594
+ }).then((res) => {
595
+ this.charge = res.data.charge
596
+ this.selectdata = res.data.apply
597
+
598
+ this.showCharge = false
599
+ try {
600
+ if (this.charge.id) {
601
+ this.openBill(this.charge)
602
+ }
603
+ } catch (e) {
604
+ this.$dispatch('breakControl', this.selectdata)
605
+ }
606
+ })
607
+ },
608
+ moneyChange () {
609
+ if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
610
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
611
+ this.charge.f_charge_money = null
612
+ return
613
+ }
614
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
615
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
616
+ this.charge.f_charge_money = null
617
+ return
618
+ }
619
+ },
620
+ // 金额转大写
621
+ handleInput(e) {
622
+ // 通过正则过滤小数点后两位
623
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
624
+ this.charge.f_amount_words = this.smalltoBIG(e.target.value)
625
+ },
626
+ // 金额转大写
627
+ smalltoBIG(n) {
628
+ let fraction = ['角', '分'];
629
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
630
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
631
+ let head = n < 0 ? '欠' : '';
632
+ n = Math.abs(n);
633
+
634
+ let s = '';
635
+
636
+ for (var i = 0; i < fraction.length; i++) {
637
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
638
+ }
639
+ s = s || '整';
640
+ n = Math.floor(n);
641
+
642
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
643
+ let p = '';
644
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
645
+ p = digit[n % 10] + unit[1][j] + p;
646
+ n = Math.floor(n / 10);
647
+ }
648
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
649
+ }
650
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
651
+ },
652
+ async showChargeModal() {
653
+ this.feecountchange()
654
+ this.showCharge = true
655
+ },
656
+ async search () {
657
+ let http = new HttpResetClass()
658
+ let data = {
659
+ f_process_id: this.selectdata.f_process_id
660
+ }
661
+ let res = await http.load('POST', 'rs/sql/getApplyChargeRecord', {data:data}, {
662
+ resolveMsg: null,
663
+ rejectMsg: '收费记录查询失败!!!'
664
+ })
665
+ this.model.data = res.data
666
+ },
667
+ // 关闭对话框
668
+ closeModal() {
669
+ this.showCharge = false
670
+ this.showInvalid = false
671
+ this.showPrint = false
672
+ this.charge = {}
673
+ this.search()
674
+ },
675
+ feecountchange(){
676
+ if(this.selectdata.f_apply_type == '民用报建'){
677
+ this.charge.f_charge_money = Number(this.selectdata.f_price) * Number(this.charge.f_feecount || this.selectdata.f_install_count)
678
+ this.charge.f_amount_words = this.smalltoBIG(this.charge.f_charge_money)
679
+ }
680
+ }
681
+ },
682
+ events: {
683
+ },
684
+ computed: {
685
+ billStyleList () {
686
+ return this.$appdata.getParam("打印格式")
687
+ },
688
+ paymentMethod() {
689
+ return this.$appdata.getParam("付款方式")
690
+ },
691
+ paymentTerm() {
692
+ return this.$appdata.getParam("收费项目")
693
+ }
694
+ },
695
+ watch: {
696
+ }
697
+ }
698
+ </script>
699
+ <style scoped>
700
+ .textNoLineBreak {
701
+ white-space: nowrap;
702
+ }
703
+ .head-but{
704
+ margin-left: 5px;
705
+ height: 34px;
706
+ /*background-color: #6aa6e2;*/
707
+ border-radius: 4px;
708
+ font-family: PingFang;
709
+ color: #ffffff;
710
+ }
711
+ .form-control{
712
+ padding: 8px 12px;
713
+ }
714
+ </style>