apply-clients 3.0.10-21 → 3.0.10-210

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 (65) hide show
  1. package/.gradle/3.5/file-changes/last-build.bin +0 -0
  2. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  3. package/.gradle/5.2.1/executionHistory/executionHistory.bin +0 -0
  4. package/.gradle/5.2.1/executionHistory/executionHistory.lock +0 -0
  5. package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
  6. package/.gradle/5.2.1/fileHashes/fileHashes.bin +0 -0
  7. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  8. package/.gradle/5.2.1/gc.properties +0 -0
  9. package/.gradle/buildOutputCleanup/built.bin +0 -0
  10. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  11. package/.gradle/buildOutputCleanup/cache.properties.lock +1 -0
  12. package/.gradle/vcs-1/gc.properties +0 -0
  13. package/doc//346/226/260/347/224/250/346/210/267/350/212/261/345/220/215/345/206/214/345/257/274/345/205/245/346/250/241/346/235/277.xls +0 -0
  14. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  15. package/gradle/wrapper/gradle-wrapper.properties +5 -0
  16. package/gradlew +0 -0
  17. package/gradlew.bat +84 -0
  18. package/package.json +5 -4
  19. package/src/apply.js +187 -146
  20. package/src/components/Util.js +26 -22
  21. package/src/components/app_apply/ApplyDownList.vue +21 -8
  22. package/src/components/app_apply/ApplyToDoList.vue +83 -59
  23. package/src/components/app_apply/ApplyUserInfo.vue +3 -3
  24. package/src/components/app_apply/PlaceControler.vue +255 -255
  25. package/src/components/app_apply/ServiceControl.vue +1387 -1387
  26. package/src/components/app_apply/ServiceView.vue +583 -361
  27. package/src/components/image/doc.jpg +0 -0
  28. package/src/components/image/excel.jpg +0 -0
  29. package/src/components/image/pdf.jpg +0 -0
  30. package/src/components/product/BatchFunction/BatchPay.vue +663 -0
  31. package/src/components/product/Function/InstallFunction.vue +9 -9
  32. package/src/components/product/Function/InstallInfoSelect.vue +230 -38
  33. package/src/components/product/Function/Service/FunctionServiceControl.vue +3 -1
  34. package/src/components/product/Function/functions/InstallFee.vue +58 -35
  35. package/src/components/product/Function/functions/StopInstall.vue +13 -1
  36. package/src/components/product/HiddenDangersInProjects/AddHiddenDangers.vue +957 -0
  37. package/src/components/product/HiddenDangersInProjects/HiddenProjectList.vue +425 -0
  38. package/src/components/product/HiddenDangersInProjects/HiddenProjectSchedule.vue +146 -0
  39. package/src/components/product/Process/ExplorationSelect.vue +302 -71
  40. package/src/components/product/Process/ExplorationUser.vue +18 -3
  41. package/src/components/product/Process/Processes/CustomerRecordMessage.vue +736 -201
  42. package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +75 -69
  43. package/src/components/product/Process/Processes/Service/ServiceControl.vue +3172 -3053
  44. package/src/components/product/ProjectManagement/AddProjectSchedule.vue +863 -0
  45. package/src/components/product/ProjectManagement/ProjectList.vue +420 -0
  46. package/src/components/product/ProjectManagement/ProjectSchedule.vue +146 -0
  47. package/src/components/product/ReportForm/PaymentRecord.vue +801 -0
  48. package/src/components/product/ReportForm/PaymentRecordAdd.vue +105 -0
  49. package/src/components/product/ReportForm/PaymentRecordBad.vue +1273 -0
  50. package/src/components/product/ReportForm/PaymentRecordDetailed.vue +472 -0
  51. package/src/components/product/ReportForm/PaymentRecordTooBad.vue +60 -0
  52. package/src/components/product/ReportForm/PaymentReport.vue +532 -0
  53. package/src/components/product/ReportForm/ProjectReport.vue +447 -0
  54. package/src/components/product/ReportForm/SettlementReport.vue +336 -0
  55. package/src/components/product/ReportForm/SummaryReport.vue +451 -0
  56. package/src/components/product/ReportForm/UserReport.vue +402 -0
  57. package/src/components/product/ServiceView.vue +17 -9
  58. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +36 -2
  59. package/src/components/product/Supervisory/SupervisoryControl.vue +30 -6
  60. package/src/components/product/Supervisory/SupervisoryList.vue +249 -34
  61. package/src/components/product/VueUtils/ApplyUpload.vue +310 -0
  62. package/src/components/product/VueUtils/rightview/InstallCardList2.vue +0 -1
  63. package/src/main.js +4 -0
  64. package/success.rar +0 -0
  65. package/doc//350/212/261/345/220/215/345/206/214/345/257/274/345/205/245/346/250/241/346/235/277.xlsx +0 -0
Binary file
Binary file
Binary file
@@ -0,0 +1,663 @@
1
+ <template>
2
+ <div class="d1">
3
+ <div class="left col-sm-12">
4
+ <criteria-paged :model="model" v-ref:cp>
5
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri
6
+ style="padding: 20px;background-color: #f6f6f6;">
7
+ <form novalidate class="" partial>
8
+
9
+ <div class="col-sm-12">
10
+ <div class="col-sm-4">
11
+ <button class="btn btn-primary btn-sm" type="button" @click="$parent.$parent.search()">
12
+ <span class="glyphicon glyphicon-search"></span>查询
13
+ </button>
14
+ </div>
15
+ <div class="col-sm-4" style="float: right">
16
+ <button type="button" class="btn btn-success" style="float: right" @click="$parent.$parent.add()">批量缴费</button>
17
+ </div>
18
+ <div class="col-sm-4"></div>
19
+ </div>
20
+ </form>
21
+ </criteria>
22
+ <data-grid :model="model" partial='list' v-ref:grid class="data-grid" is-fixed='false' style="overflow-x:auto">
23
+ <template partial='head'>
24
+ <tr class="title">
25
+ <th>
26
+ <nobr>序号</nobr>
27
+ </th>
28
+ <th>
29
+ <nobr>所属公司</nobr>
30
+ </th>
31
+ <th>
32
+ <nobr>项目名称</nobr>
33
+ </th>
34
+ <th>
35
+ <nobr>项目编号</nobr>
36
+ </th>
37
+ <th>
38
+ <nobr>用气性质</nobr>
39
+ </th>
40
+ <th>
41
+ <nobr>报建类型</nobr>
42
+ </th>
43
+ <th>
44
+ <nobr>用户名称</nobr>
45
+ </th>
46
+ <th>
47
+ <nobr>用户电话</nobr>
48
+ </th>
49
+ <th>
50
+ <nobr>报建状态</nobr>
51
+ </th>
52
+ <th>
53
+ <nobr>地址</nobr>
54
+ </th>
55
+ <th>
56
+ <nobr>安装费</nobr>
57
+ </th>
58
+ <th>
59
+ <nobr>超长费</nobr>
60
+ </th>
61
+ <th>
62
+ <nobr>应交金额</nobr>
63
+ </th>
64
+ <th>
65
+ <nobr>累计缴费金额</nobr>
66
+ </th>
67
+ <th>
68
+ <nobr>欠费金额</nobr>
69
+ </th>
70
+ <th>
71
+ <nobr>操作</nobr>
72
+ </th>
73
+ </tr>
74
+ </template>
75
+ <template partial='body'>
76
+ <tr>
77
+ <td style="text-align: center;">
78
+ <nobr>{{$index+1}}</nobr>
79
+ </td>
80
+ <td style="text-align: center;">
81
+ <nobr>{{row.f_filiale}}</nobr>
82
+ </td>
83
+ <td style="text-align: center;">
84
+ <nobr>{{row.f_entry_name}}</nobr>
85
+ </td>
86
+ <td style="text-align: center;">
87
+ <nobr>{{row.f_entry_num}}</nobr>
88
+ </td>
89
+ <td style="text-align: center;">
90
+ <nobr>{{row.f_gasproperties}}</nobr>
91
+ </td>
92
+ <td style="text-align: center;">
93
+ <nobr>{{row.f_apply_type}}</nobr>
94
+ </td>
95
+ <td style="text-align: center;">
96
+ <nobr>{{row.f_user_name}}</nobr>
97
+ </td>
98
+ <td style="text-align: center;">
99
+ <nobr>{{row.f_user_phone}}</nobr>
100
+ </td>
101
+ <td style="text-align: center;">
102
+ <nobr>{{row.f_state}}</nobr>
103
+ </td>
104
+ <td style="text-align: center;">
105
+ <nobr>{{row.f_address}}</nobr>
106
+ </td>
107
+ <td style="text-align: center;">
108
+ <nobr>{{row.f_install_money.toFixed(2)}}</nobr>
109
+ </td>
110
+ <td style="text-align: center;">
111
+ <nobr>{{row.f_super_money.toFixed(2)}}</nobr>
112
+ </td>
113
+ <td style="text-align: center;">
114
+ <nobr>{{$parent.$parent.$parent.budget_money(row.f_install_money,row.f_super_money)}}</nobr>
115
+ </td>
116
+ <td style="text-align: center;">
117
+ <nobr>{{row.f_cumulative_money.toFixed(2)}}</nobr>
118
+ </td>
119
+ <td style="text-align: center;">
120
+ <nobr>{{row.f_unaccounts_money.toFixed(2)}}</nobr>
121
+ </td>
122
+ <td style="text-align: center">
123
+ <button type="button" class="btn btn-success" @click="$parent.$parent.$parent.singleCharge(row.f_userinfo_id)">单户缴费</button>
124
+ </td>
125
+ </tr>
126
+ </template>
127
+ <template partial='foot'>
128
+ <td style="text-align: center;background-color: mistyrose"><nobr>
129
+ <span >用户合计</span>
130
+ </nobr> </td>
131
+ <td style="text-align: center;background-color: mistyrose">
132
+ <nobr>{{model.rows.length}} 户</nobr>
133
+ </td>
134
+ <td style="text-align: center;background-color: mistyrose">
135
+ <nobr></nobr>
136
+ </td>
137
+ <td style="text-align: center;background-color: mistyrose">
138
+ <nobr></nobr>
139
+ </td>
140
+ <td style="text-align: center;background-color: mistyrose">
141
+ <nobr></nobr>
142
+ </td>
143
+ <td style="text-align: center;background-color: mistyrose">
144
+ <nobr></nobr>
145
+ </td>
146
+ <td style="text-align: center;background-color: mistyrose">
147
+ <nobr></nobr>
148
+ </td>
149
+ <td style="text-align: center;background-color: mistyrose">
150
+ <nobr></nobr>
151
+ </td>
152
+ <td style="text-align: center;background-color: mistyrose">
153
+ <nobr></nobr>
154
+ </td>
155
+ <td style="text-align: center;background-color: mistyrose">
156
+ <nobr></nobr>
157
+ </td>
158
+ <td style="text-align: center;background-color: mistyrose">
159
+ <nobr>{{$parent.$parent.$parent.f_install_money_sum()}}</nobr>
160
+ </td>
161
+ <td style="text-align: center;background-color: mistyrose">
162
+ <nobr>{{$parent.$parent.$parent.f_super_money_sum()}}</nobr>
163
+ </td>
164
+ <td style="text-align: center;background-color: mistyrose">
165
+ <nobr>{{$parent.$parent.$parent.budget_money_sum()}}</nobr>
166
+ </td>
167
+ <td style="text-align: center;background-color: mistyrose">
168
+ <nobr>{{$parent.$parent.$parent.f_cumulative_money_sum()}}</nobr>
169
+ </td>
170
+ <td style="text-align: center;background-color: mistyrose">
171
+ <nobr>{{$parent.$parent.$parent.f_unaccounts_money_sum()}}</nobr>
172
+ </td>
173
+ <td style="text-align: center;background-color: mistyrose">
174
+ <nobr></nobr>
175
+ </td>
176
+ </template>
177
+ </data-grid>
178
+ </criteria-paged>
179
+ </div>
180
+ <div class="left col-sm-12" v-if="showpay">
181
+ <modal :show.sync="showpay" v-ref:modal backdrop="false">
182
+ <header slot="modal-header" class="modal-header">
183
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
184
+ <h4 class="modal-title">批量收费</h4>
185
+ </header>
186
+ <article slot="modal-body" class="modal-body">
187
+ <div v-if="showpay">
188
+
189
+ <!-- <div class="from-group">-->
190
+ <!-- <label>金额(元)</label>-->
191
+ <!-- <input type="text" class="form-control" v-model="this.model.rows[0].f_unaccounts_money" readonly="readonly">-->
192
+ <!-- </div>-->
193
+ <h5 style="color: red">请注意!批量收费为一次性收费(一次性付清)</h5>
194
+ <h5 style="color: red">请注意!此按钮会生成缴费记录,请在生成记录相对应环节点击!</h5>
195
+ <hr>
196
+ <div class="from-group">
197
+ <label>付款方式</label>
198
+ <input-select v-model="addItem.f_payment_method" :options='paymenttypes' :value.sync="addItem.f_payment_method" :valueSingle="true"></input-select>
199
+ </div>
200
+ <!-- <div class="from-group">-->
201
+ <!-- <label>金额大写</label>-->
202
+ <!-- <input type="text" class="form-control" v-model="getCapital" readonly>-->
203
+ <!-- </div>-->
204
+ <div class="from-group" v-show = "false">
205
+ <label>交费日期</label>
206
+ <div>
207
+ <datepicker width="600.76px;"
208
+ disabled = "disabled"
209
+ :value.sync="addItem.f_charge_date"
210
+ :format="'yyyy-MM-dd'"
211
+ v-model="addItem.f_charge_date" readonly="readonly"
212
+ :show-reset-button="reset">
213
+ </datepicker>
214
+ </div>
215
+ </div>
216
+
217
+ </div>
218
+ </article>
219
+ <footer slot="modal-footer" class="modal-footer">
220
+ <button v-show="showpay" type="button" class="btn btn-default" @click='closecharge'>取消</button>
221
+ <button v-show="showpay" type="button" class="btn btn-success" @click='confirm'>确认</button>
222
+ </footer>
223
+ </modal>
224
+ </div>
225
+ <!-- 单户缴费 -->
226
+ <div class="left col-sm-12" v-if="singleChargePage">
227
+ <modal :show.sync="singleChargePage" v-ref:modal backdrop="false">
228
+ <header slot="modal-header" class="modal-header">
229
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
230
+ <h4 class="modal-title">单户缴费</h4>
231
+ </header>
232
+ <article slot="modal-body" class="modal-body">
233
+ <div v-if="singleChargePage">
234
+ <h5 style="color: red">请注意!此按钮会生成缴费记录,请在生成记录相对应环节点击!</h5>
235
+ <div class="from-group">
236
+ <label>金额</label>
237
+ <input type="text" class="form-control" v-model="singleChargeMoney">
238
+ </div>
239
+ <div class="from-group">
240
+ <label>付款方式</label>
241
+ <input-select v-model="addItem.f_payment_method" :options='paymenttypes' :value.sync="addItem.f_payment_method" :valueSingle="true"></input-select>
242
+ </div>
243
+ <div class="from-group">
244
+ <label>金额大写</label>
245
+ <input type="text" class="form-control" v-model="getCapital1" readonly>
246
+ </div>
247
+ <div class="from-group" v-show = "false">
248
+ <label>交费日期</label>
249
+ <div>
250
+ <datepicker width="600.76px;"
251
+ disabled = "disabled"
252
+ :value.sync="addItem.f_charge_date"
253
+ :format="'yyyy-MM-dd'"
254
+ v-model="addItem.f_charge_date" readonly="readonly"
255
+ :show-reset-button="reset">
256
+ </datepicker>
257
+ </div>
258
+ </div>
259
+
260
+ </div>
261
+ </article>
262
+ <footer slot="modal-footer" class="modal-footer">
263
+ <button v-show="singleChargePage" type="button" class="btn btn-default" @click='closeSingleCharge'>取消</button>
264
+ <button v-show="singleChargePage" type="button" class="btn btn-success" @click='confirmSingle'>确认</button>
265
+ </footer>
266
+ </modal>
267
+ </div>
268
+ </div>
269
+ </template>
270
+ <script>
271
+ import AppData from '../../../stores/AppData.js'
272
+ import PagedListLogic from '../../../stores/PagedListLogic'
273
+ import getNowDate from '../../getNowDate.js'
274
+ import {HttpResetClass} from 'vue-client'
275
+
276
+ export default {
277
+ title: '报建批量缴费',
278
+ props: ['selectdata'],
279
+ data() {
280
+ return {
281
+ applytype: this.$appdata.getParam('报建类型'),
282
+ applystate: this.$appdata.getParam('报建状态'),
283
+ f_process_id: this.selectdata.f_process_id,
284
+ model: new PagedListLogic('rs/sql/batchFunction', 20, {
285
+ data: {
286
+ id: `${this.$login.f.name}`,
287
+ fengongsi: `${this.$login.f.orgs}`,
288
+ f_process_id: `${this.selectdata.f_process_id}`
289
+ }
290
+ },{f_contract_money:0, f_cumulative_money:0, f_arrears_payment:0}),
291
+ users:[],
292
+ defnames:[],
293
+ condition: '',
294
+ select: '',
295
+ sum1: 0, //累计合同价格总金额
296
+ sum2: 0, //累计交费金额
297
+ sum3: 0, //累计欠费总金额
298
+ showpay: false,
299
+ addItem: {},
300
+ paymenttypes: this.$appdata.getParam('付款方式'),
301
+ singleChargePage: false, //单户缴费开关
302
+ singleChargeMoney: null
303
+ // f_install_money_sum: 0.00,
304
+ // f_super_money_sum: 0.00
305
+ }
306
+ },
307
+ async ready() {
308
+ console.log("流程id---------->:" + this.selectdata.f_process_id)
309
+ this.$refs.cp.$refs.cri.search()
310
+ this.addItem.f_unaccounts_money = this.model.rows[0].f_unaccounts_money
311
+ this.addItem.f_charge_date = new Date().Format("yyyy-MM-dd HH:mm:ss")
312
+ //缴费单价金额(一次性付清)
313
+ if (this.addItem.f_unaccounts_money) {
314
+ this.addItem.f_charge_money = this.addItem.f_unaccounts_money
315
+ }
316
+ //金额合计
317
+ // for (let i = 0; i < this.model.rows.length; i++) {
318
+ // this.f_install_money_sum = this.f_install_money_sum + this.model.rows[i].f_install_money
319
+ // this.f_super_money_sum = this.f_super_money_sum + this.model.rows[i].f_super_money
320
+ // }
321
+ // console.log("安装费合计:" + this.f_install_money_sum)
322
+
323
+ },
324
+ events: {
325
+ async dataGrid() {
326
+
327
+
328
+ }
329
+ },
330
+ methods: {
331
+ generateUUID() {
332
+ var d = new Date().getTime()
333
+ var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
334
+ var r = (d + Math.random() * 16) % 16 | 0
335
+ d = Math.floor(d / 16)
336
+ return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
337
+ })
338
+ return uuid
339
+ },
340
+ check(val) {
341
+ this.$dispatch('check', val)
342
+ },
343
+ close(apply) {
344
+ this.$dispatch('close')
345
+ },
346
+ closecharge() {
347
+ this.showpay = false
348
+ },
349
+ closeSingleCharge() {
350
+ this.singleChargePage = false
351
+ },
352
+ compare(val) {
353
+ val === '完工'
354
+ console.log('完工', val)
355
+ return false
356
+ },
357
+ clear() {
358
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
359
+ this.$refs.cp.$refs.cri.model[key] = []
360
+ })
361
+ },
362
+ add() {
363
+ this.showpay = true
364
+ },search() {
365
+ this.$refs.cp.$refs.cri.search()
366
+ },
367
+
368
+ async confirm() {
369
+ let flag = this.checkmoney()
370
+ if (!flag) {
371
+ return
372
+ }
373
+ // this.addItem.f_charge_money = this.model.rows[0].f_unaccounts_money
374
+
375
+ if (Number(this.addItem.f_charge_money) > Number(this.addItem.f_unaccounts_money)) {
376
+ this.$showMessage("缴费金额不能大于剩余金额")
377
+ } else if (this.addItem.f_charge_money == 0) {
378
+ this.$showMessage("不能缴费0元")
379
+ } else {
380
+ //用户id
381
+ let array = []
382
+ let arraydata = {}
383
+ for (let i = 0; i < this.model.rows.length; i++) {
384
+ arraydata = {
385
+ f_charge_money: this.model.rows[i].f_unaccounts_money,
386
+ f_amount_words: this.smalltoBIG(Number(this.model.rows[i].f_unaccounts_money)),
387
+ f_cumulative_money: this.model.rows[i].f_unaccounts_money,
388
+ f_unaccounts_money: 0.00,
389
+ f_userinfo_id: this.model.rows[i].f_userinfo_id,
390
+ f_charge_collectors: this.$login.f.name,
391
+ f_filiale: this.$login.f.orgs,
392
+ f_process_id: this.selectdata.f_process_id,
393
+ f_apply_num: this.selectdata.f_apply_num,
394
+ f_charging_status: '有效',
395
+ f_charge_date: this.addItem.f_charge_date,
396
+ f_payment_method: this.addItem.f_payment_method,
397
+ f_budget_money: this.model.rows[i].f_unaccounts_money
398
+ }
399
+ array.push(arraydata)
400
+ // this.addItem.f_charge_money = this.model.rows[i].f_unaccounts_money
401
+ // this.addItem.f_amount_words = this.smalltoBIG(Number(this.model.rows[i].f_unaccounts_money))
402
+ // this.addItem.f_cumulative_money = this.addItem.f_charge_money
403
+ // this.addItem.f_unaccounts_money = 0.00
404
+ }
405
+ console.log("用户id:" + JSON.stringify(array))
406
+ // console.log("用户id数据:" + arraydata)
407
+ // return
408
+ let http = new HttpResetClass()
409
+ //操作组织数据
410
+ // this.addItem.f_charge_collectors = this.$login.f.name
411
+ // this.addItem.f_filiale = this.$login.f.orgs
412
+ // this.addItem.f_process_id = this.selectdata.f_process_id
413
+ // this.addItem.f_apply_num = this.selectdata.f_apply_num
414
+ // this.addItem.f_charging_status = '有效'
415
+ // this.addItem.f_userinfo_id = ''
416
+ let data = {
417
+ tablename: 't_charge_record',
418
+ parameters: this.addItem,
419
+ array: array
420
+ }
421
+ http.load('POST', 'rs/logic/saveBatch', {data: data}, {resolveMsg: null, rejectMsg: "添加失败"})
422
+ .then(async (res) => {
423
+ if (res.data.id.length != 0) {
424
+ data = {
425
+ array: array,
426
+ f_userinfo_id: '',
427
+ f_state: '已收费',
428
+ f_unaccounts_money: 0.00,
429
+ f_cumulative_money: this.addItem.f_charge_money,
430
+ f_budget_money: this.addItem.f_charge_money
431
+ }
432
+ //更改超长记录表
433
+ res = await http.load('POST', 'rs/logic/updateBatchUnaccounts', {data: data}, {resolveMsg: null, rejectMsg: "更新失败"})
434
+ if (res.data.status == 200) {
435
+ this.$showMessage("缴费成功")
436
+ this.$refs.cp.$refs.cri.search()
437
+ this.closecharge()
438
+ }else {
439
+ this.$showMessage("缴费失败")
440
+ this.closecharge()
441
+ }
442
+ }
443
+ })
444
+ // let http1 = new HttpResetClass()
445
+ // let data1 = {
446
+ // f_apply_num: this.selectdata.f_apply_num,
447
+ // f_cumulative_money: this.model.rows[0].f_unaccounts_money,
448
+ // f_unaccounts_money: 0.00,
449
+ // f_contract_money: this.model.rows[0].f_unaccounts_money
450
+ // }
451
+ // await http1.load('POST', 'rs/logic/updatechargemoney', {data: data1}, {resolveMsg: null, rejectMsg: "添加失败"})
452
+ }
453
+ },
454
+ async confirmSingle() {
455
+ let flag = this.checkmoney()
456
+ if (!flag) {
457
+ return
458
+ }
459
+ if (Number(this.addItem.f_charge_money) > Number(this.addItem.f_unaccounts_money)) {
460
+ this.$showMessage("缴费金额不能大于剩余金额")
461
+ } else if (this.addItem.f_charge_money == 0) {
462
+ this.$showMessage("不能缴费0元")
463
+ } else {
464
+ //用户id
465
+ this.addItem.f_charge_money = this.singleChargeMoney
466
+ this.addItem.f_amount_words = this.smalltoBIG(Number(this.singleChargeMoney))
467
+ if (this.addItem.f_cumulative_money == null || this.addItem.f_cumulative_money == '' || this.addItem.f_cumulative_money == undefined) {
468
+ this.addItem.f_cumulative_money = 0.00
469
+ }
470
+ this.addItem.f_cumulative_money = parseFloat(this.addItem.f_cumulative_money) + parseFloat(this.addItem.f_charge_money)
471
+ this.addItem.f_unaccounts_money = parseFloat(this.addItem.f_unaccounts_money) - parseFloat(this.addItem.f_charge_money)
472
+ let http = new HttpResetClass()
473
+ //操作组织数据
474
+ this.addItem.f_charge_collectors = this.$login.f.name
475
+ this.addItem.f_filiale = this.$login.f.orgs
476
+ this.addItem.f_process_id = this.selectdata.f_process_id
477
+ this.addItem.f_apply_num = this.selectdata.f_apply_num
478
+ this.addItem.f_charging_status = '有效'
479
+ this.addItem.f_userinfo_id = this.addItem.f_userinfo_id
480
+ let data = {
481
+ tablename: 't_charge_record',
482
+ parameters: this.addItem
483
+ }
484
+ http.load('POST', 'rs/logic/saveentity', {data: data}, {resolveMsg: null, rejectMsg: "添加失败"})
485
+ .then(async (res) => {
486
+ if (res.data.id.length != 0) {
487
+ data = {
488
+ f_userinfo_id: this.addItem.f_userinfo_id,
489
+ f_state: '已收费',
490
+ f_unaccounts_money: this.addItem.f_unaccounts_money,
491
+ f_cumulative_money: this.addItem.f_cumulative_money,
492
+ f_budget_money: this.addItem.f_budget_money
493
+ }
494
+ if (this.addItem.f_unaccounts_money == 0.00 || this.addItem.f_unaccounts_money == 0 || this.addItem.f_unaccounts_money == '') {
495
+ data.f_state = '已收费'
496
+ }else {
497
+ data.f_state = '未结清'
498
+ }
499
+ //更改超长记录表
500
+ res = await http.load('POST', 'rs/logic/updateBatchUnaccounts', {data: data}, {resolveMsg: null, rejectMsg: "更新失败"})
501
+ if (res.data.status == 200) {
502
+ this.$showMessage("缴费成功")
503
+ this.$refs.cp.$refs.cri.search()
504
+ this.closeSingleCharge()
505
+ }else {
506
+ this.$showMessage("缴费失败")
507
+ this.closeSingleCharge()
508
+ }
509
+ }
510
+ })
511
+ }
512
+
513
+ },
514
+ // 输入金额校验
515
+ checkmoney() {
516
+ let re = /^[+-]?\d+(\.\d+)?$/ //判断字符串是否为数字
517
+ if (!this.addItem.f_charge_money) {//判断缴费金额是否为空
518
+ this.addItem.f_charge_money = this.addItem.f_unaccounts_money
519
+ } else {
520
+ if (!re.test(this.addItem.f_charge_money)) {
521
+ this.$showMessage("请输入数字")
522
+ this.addItem.f_charge_money = 0.00
523
+ return false
524
+ }
525
+ }
526
+
527
+
528
+ return true
529
+ },
530
+ smalltoBIG(n) {
531
+ let fraction = ['角', '分'];
532
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
533
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
534
+ let head = n < 0 ? '欠' : '';
535
+ n = Math.abs(n);
536
+
537
+ let s = '';
538
+
539
+ for (var i = 0; i < fraction.length; i++) {
540
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
541
+ }
542
+ s = s || '整';
543
+ n = Math.floor(n);
544
+
545
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
546
+ let p = '';
547
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
548
+ p = digit[n % 10] + unit[1][j] + p;
549
+ n = Math.floor(n / 10);
550
+ }
551
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
552
+ }
553
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
554
+ },
555
+ // 单户缴费
556
+ singleCharge(val) {
557
+ console.log("单户缴费测试:" + val)
558
+ this.singleChargePage = true
559
+ this.addItem.f_userinfo_id = val
560
+ for (let i = 0; i < this.model.rows.length; i++) {
561
+ if (this.model.rows[i].f_userinfo_id == val) {
562
+ this.singleChargeMoney = this.model.rows[i].f_unaccounts_money
563
+ this.addItem.f_unaccounts_money = this.model.rows[i].f_unaccounts_money
564
+ this.addItem.f_userinfo_id = this.model.rows[i].f_userinfo_id
565
+ this.addItem.f_budget_money = parseFloat(this.model.rows[i].f_super_money) + parseFloat(this.model.rows[i].f_install_money)
566
+ this.addItem.f_cumulative_money = this.model.rows[i].f_cumulative_money
567
+ }
568
+ }
569
+
570
+ },
571
+ budget_money(val1,val2) {
572
+ console.log("来了没有1-----------------")
573
+ let money = parseFloat(val1) + parseFloat(val2)
574
+ money = money.toFixed(2)
575
+ return money
576
+ },
577
+ f_install_money_sum() {
578
+ //金额合计
579
+ let f_install_money_sum = 0.00
580
+ for (let i = 0; i < this.model.rows.length; i++) {
581
+ f_install_money_sum = f_install_money_sum + this.model.rows[i].f_install_money
582
+ }
583
+ console.log("安装费合计:" + f_install_money_sum)
584
+ return f_install_money_sum.toFixed(2)
585
+ },
586
+ f_super_money_sum() {
587
+ //金额合计
588
+ let f_super_money_sum = 0.00
589
+ for (let i = 0; i < this.model.rows.length; i++) {
590
+ f_super_money_sum = f_super_money_sum + this.model.rows[i].f_super_money
591
+ }
592
+ console.log("超长费合计:" + f_super_money_sum)
593
+ return f_super_money_sum.toFixed(2)
594
+ },
595
+ budget_money_sum() {
596
+ //金额合计
597
+ let budget_money_sum = 0.00
598
+ budget_money_sum = parseFloat(this.f_install_money_sum()) + parseFloat(this.f_super_money_sum())
599
+ console.log("应交金额合计:" + budget_money_sum)
600
+ return budget_money_sum.toFixed(2)
601
+ },
602
+ f_cumulative_money_sum() {
603
+ //金额合计
604
+ let f_cumulative_money_sum = 0.00
605
+ for (let i = 0; i < this.model.rows.length; i++) {
606
+ f_cumulative_money_sum = f_cumulative_money_sum + this.model.rows[i].f_cumulative_money
607
+ }
608
+ console.log("超长费合计:" + f_cumulative_money_sum)
609
+ return f_cumulative_money_sum.toFixed(2)
610
+ },
611
+ f_unaccounts_money_sum() {
612
+ //金额合计
613
+ let f_unaccounts_money_sum = 0.00
614
+ for (let i = 0; i < this.model.rows.length; i++) {
615
+ f_unaccounts_money_sum = f_unaccounts_money_sum + this.model.rows[i].f_unaccounts_money
616
+ }
617
+ console.log("超长费合计:" + f_unaccounts_money_sum)
618
+ return f_unaccounts_money_sum.toFixed(2)
619
+ }
620
+
621
+ },
622
+ computed: {
623
+ date() {
624
+ return getNowDate()
625
+ },
626
+ selected() {
627
+ return this.$refs.cp.$refs.grid.selected
628
+ },
629
+ getCapital() {
630
+ if (this.model.rows[0].f_unaccounts_money) {
631
+ this.addItem.f_amount_words = this.smalltoBIG(Number(this.model.rows[0].f_unaccounts_money))
632
+ }
633
+
634
+ return this.addItem.f_amount_words
635
+ },
636
+ getCapital1() {
637
+ if (this.singleChargeMoney) {
638
+ this.addItem.f_amount_words = this.smalltoBIG(Number(this.singleChargeMoney))
639
+ }
640
+
641
+ return this.addItem.f_amount_words
642
+ },
643
+ usertype() {
644
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
645
+ },
646
+ defnameType() {
647
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('流程状态')]
648
+ },
649
+ applytype() {
650
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('报建类型')]
651
+ },
652
+ applydepartment() {
653
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('项目部')]
654
+ }
655
+ }
656
+ }
657
+ </script>
658
+ <style>
659
+ tr.title {
660
+ background-color: #6666ff;
661
+ }
662
+
663
+ </style>