apply-clients 3.4.2 → 3.4.3

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