manage-client 3.2.63 → 3.2.67

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.
@@ -0,0 +1,853 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri >
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
10
+
11
+ <div class="span" style="float:right;">
12
+ <button class="button_search button_spacing" @click="search()">查询</button>
13
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
14
+
15
+ <export-excel :data="$parent.$parent.getCondition"
16
+ :field="$parent.$parent.getfield"
17
+ :footer="$parent.$parent.footer"
18
+ :header="$parent.$parent.other"
19
+ sqlurl="rs/logic/exportfile"
20
+ sql-name="arrearsQuery"
21
+ template-name='用户欠费查询导出'
22
+ :choose-col="true"></export-excel>
23
+
24
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
25
+ :defaultfield="$parent.$parent.defaultfield"
26
+ titletable="用户欠费查询导出"
27
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
28
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,
29
+ 'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
30
+
31
+ </div>
32
+ </div>
33
+
34
+ <div class="row" v-show="$parent.$parent.criteriaShow">
35
+ <div class="col-sm-2 form-group">
36
+ <label for="startDate" class="font_normal_body" title="归属日期">开始日期</label>
37
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
38
+ v-model="model.startDate"
39
+ :value.sync="model.startDate"
40
+ :format="'yyyy-MM-dd HH:mm:ss'"
41
+ :show-reset-button="true"
42
+ >
43
+ </datepicker>
44
+ </div>
45
+ <div class="col-sm-2 form-group">
46
+ <label for="endDate" class="font_normal_body" title="归属日期">结束日期</label>
47
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
48
+ v-model="model.endDate"
49
+ :value.sync="model.endDate"
50
+ :format="'yyyy-MM-dd HH:mm:ss'"
51
+ :show-reset-button="true" >
52
+ </datepicker>
53
+ </div>
54
+ <div class="col-sm-2 form-group">
55
+ <label class="font_normal_body">客户编号</label>
56
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
57
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
58
+ </div>
59
+ <div class="col-sm-2 form-group">
60
+ <label class="font_normal_body">客户名称</label>
61
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
62
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
63
+ </div>
64
+ <div class="col-sm-2 form-group">
65
+ <label class="font_normal_body">客户电话</label>
66
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
67
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
68
+ </div>
69
+ <div class="col-sm-2 form-group">
70
+ <label class="font_normal_body">客户地址</label>
71
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
72
+ condition="f_address like '%{}%'" placeholder='客户地址'>
73
+ </div>
74
+ <div class="col-sm-2 form-group">
75
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
76
+ <v-select :value.sync="model.f_residential_area"
77
+ class="select_list select"
78
+ enter-push
79
+ multiple
80
+ condition="f_residential_area in {}"
81
+ v-model="model.f_residential_area"
82
+ style="width: 60%"
83
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
84
+ close-on-select>
85
+
86
+ </v-select>
87
+ </div>
88
+ <div class="col-sm-2 form-group">
89
+ <label class="font_normal_body">客户类型</label>
90
+ <v-select :value.sync="model.f_user_type"
91
+ @change="$parent.$parent.userTypeChange()"
92
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
93
+ condition="f_user_type = '{}'"
94
+ close-on-select></v-select>
95
+ </div>
96
+ <div class="col-sm-2 form-group">
97
+ <label class="font_normal_body">用气性质</label>
98
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
99
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
100
+ condition="f_gasproperties = '{}'"
101
+ close-on-select></v-select>
102
+ </div>
103
+ <div class="col-sm-2 form-group">
104
+ <label class="font_normal_body">气表类型</label>
105
+ <v-select :value.sync="model.f_meter_type" multiple
106
+ :options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_type"
107
+ condition="f_meter_type in {}"
108
+ close-on-select></v-select>
109
+ </div>
110
+ <div class="col-sm-2 form-group">
111
+ <label class="font_normal_body">用户证号</label>
112
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_book_no"
113
+ condition="f_book_no = '{}'" placeholder="用户证号">
114
+ </div>
115
+ <div class="col-sm-2 form-group">
116
+ <label class="font_normal_body" title="旧客户编号">档案编号</label>
117
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
118
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
119
+ </div>
120
+ <div class="col-sm-2 form-group">
121
+ <label class="font_normal_body">册内序号</label>
122
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meter_book_sort"
123
+ condition="f_meter_book_sort = '{}'" placeholder="册内序号">
124
+ </div>
125
+ <div class="col-sm-2 form-group">
126
+ <label class="font_normal_body" >抄&nbsp;&nbsp;表&nbsp;员</label>
127
+ <v-select :value.sync="model.f_inputtor"
128
+ v-model="model.f_inputtor"
129
+ :options='$parent.$parent.inputtores' placeholder='请选择'
130
+ condition="f_inputtor = '{}'"
131
+ @change="$parent.$parent.inputtorchange"
132
+ close-on-select :search="false">
133
+ </v-select>
134
+ </div>
135
+ <div class="col-sm-2 form-group">
136
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
137
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
138
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
139
+ style="width:60%"
140
+ close-on-select
141
+ condition="f_meter_book_num = '{}'"></v-select>
142
+ </div>
143
+ <div class="col-sm-2 form-group">
144
+ <label class="font_normal_body" >档案抄表员</label>
145
+ <v-select :value.sync="model.f_dainputtores"
146
+ v-model="model.f_dainputtores"
147
+ :options='$parent.$parent.dainputtores' placeholder='请选择'
148
+ condition="f_dainputtores = '{}'"
149
+ close-on-select>
150
+ </v-select>
151
+ </div>
152
+ <div class="col-sm-2 form-group">
153
+
154
+ <label for="inputstartDate" class="font_normal_body">抄表日期</label>
155
+ <datepicker id="inputstartDate" placeholder="开始日期" style="width:60%"
156
+ v-model="model.inputstartDate"
157
+ :value.sync="model.inputstartDate"
158
+ :format="'yyyy-MM-dd 00:00:00'"
159
+ :show-reset-button="true"
160
+ >
161
+ </datepicker>
162
+ </div>
163
+ <div class="col-sm-2 form-group">
164
+ <label for="inputendDate" class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
165
+ <datepicker id="inputendDate" placeholder="结束日期" style="width:60%"
166
+ v-model="model.inputendDate"
167
+ :value.sync="model.inputendDate"
168
+ :format="'yyyy-MM-dd 23:59:59'"
169
+ :show-reset-button="true"
170
+ >
171
+ </datepicker>
172
+ </div>
173
+
174
+ <div class="col-sm-2 form-group">
175
+ <label class="font_normal_body" >缴费类型</label>
176
+ <v-select :value.sync="model.f_payment" multiple
177
+ v-model="model.f_payment"
178
+ :options='$parent.$parent.dypayment' placeholder='请选择'
179
+ condition="f_cost_type in {}"
180
+ close-on-select></v-select>
181
+ </div>
182
+ <div class="col-sm-2 form-group">
183
+ <label class="font_normal_body">气价类型</label>
184
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
185
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
186
+ close-on-select v-ref:type>
187
+ </v-select>
188
+ </div>
189
+ <div class="col-sm-2 form-group">
190
+ <label class="font_normal_body">气价名称</label>
191
+ <v-select :value.sync="model.f_price_name"
192
+ v-model="model.f_price_name"
193
+ :options="$parent.$parent.getPricenames"
194
+ condition="f_price_name = '{}'"
195
+ close-on-select></v-select>
196
+ </div>
197
+ <div class="col-sm-2 form-group">
198
+ <label class="font_normal_body" title="欠费气量大于">欠费气量</label>
199
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_oughtamount"
200
+ condition="f_oughtamount > '{}'" placeholder="欠费气量大于">
201
+ </div>
202
+ <div class="col-sm-2 form-group">
203
+ <label class="font_normal_body" title="气费金额大于">气费金额</label>
204
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_oughtfee_new"
205
+ condition="f_oughtfee_new > '{}'" placeholder="气费金额大于">
206
+ </div>
207
+ <div class="col-sm-2 form-group">
208
+ <label class="font_normal_body" title="欠费金额大于">欠费金额</label>
209
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_oughtfee_all"
210
+ condition="f_oughtfee_all > '{}'" placeholder="欠费金额大于">
211
+ </div>
212
+ <div class="col-sm-2 form-group">
213
+ <label class="font_normal_body">欠费期数</label>
214
+ <input type="text" style="width:60%" class="input_search" v-model="model.c"
215
+ condition="c > '{}'" placeholder='欠费期数大于'>
216
+ </div>
217
+
218
+ </div>
219
+ </div>
220
+ </criteria>
221
+
222
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
223
+ <template partial='head'>
224
+ <tr>
225
+ <th>
226
+ <nobr>序号</nobr>
227
+ </th>
228
+ <th>
229
+ <nobr>客户编号</nobr>
230
+ </th>
231
+ <th>
232
+ <nobr>客户姓名</nobr>
233
+ </th>
234
+ <th>
235
+ <nobr>地址</nobr>
236
+ </th>
237
+ <th>
238
+ <nobr>客户电话</nobr>
239
+ </th>
240
+ <th>
241
+ <nobr>备用电话</nobr>
242
+ </th>
243
+ <th>
244
+ <nobr>小区名称</nobr>
245
+ </th>
246
+ <th>
247
+ <nobr>档案编号</nobr>
248
+ </th>
249
+ <th>
250
+ <nobr>用户证号</nobr>
251
+ </th>
252
+ <th>
253
+ <nobr>册内序号</nobr>
254
+ </th>
255
+
256
+ <th>
257
+ <nobr>抄表员</nobr>
258
+ </th>
259
+ <th>
260
+ <nobr>抄表册</nobr>
261
+ </th>
262
+ <th>
263
+ <nobr>档案抄表员</nobr>
264
+ </th>
265
+ <th>
266
+ <nobr>客户类型</nobr>
267
+ </th>
268
+ <th>
269
+ <nobr>用气性质</nobr>
270
+ </th>
271
+ <th>
272
+ <nobr>气表类型</nobr>
273
+ </th>
274
+ <th>
275
+ <nobr>缴费类型</nobr>
276
+ </th>
277
+ <th>
278
+ <nobr>欠费期数</nobr>
279
+ </th>
280
+ <th>
281
+ <nobr>欠费区间</nobr>
282
+ </th>
283
+ <th>
284
+ <nobr>上期抄表底数</nobr>
285
+ </th>
286
+ <th>
287
+ <nobr>本期抄表底数</nobr>
288
+ </th>
289
+ <th>
290
+ <nobr>用气量</nobr>
291
+ </th>
292
+ <th>
293
+ <nobr>用气金额</nobr>
294
+ </th>
295
+ <th>
296
+ <nobr>缴费时间</nobr>
297
+ </th>
298
+ <th>
299
+ <nobr>已交金额</nobr>
300
+ </th>
301
+ <!--<th>-->
302
+ <!--<nobr>回收率</nobr>-->
303
+ <!--</th>-->
304
+ <th>
305
+ <nobr>应交气费</nobr>
306
+ </th>
307
+ <th>
308
+ <nobr>滞纳金</nobr>
309
+ </th>
310
+ <th>
311
+ <nobr>附加费</nobr>
312
+ </th>
313
+ <th>
314
+ <nobr>上期余额</nobr>
315
+ </th>
316
+ <th>
317
+ <nobr>合计欠费</nobr>
318
+ </th>
319
+
320
+
321
+ <th>
322
+ <nobr>备&nbsp;&nbsp;&nbsp;&nbsp;注</nobr>
323
+ </th>
324
+ </tr>
325
+ </template>
326
+ <template partial='body'>
327
+ <td style="text-align:center">
328
+ <nobr>{{$index+1}}</nobr>
329
+ </td>
330
+ <td style="text-align: center;">
331
+ <nobr>{{row.f_userinfo_code}}</nobr>
332
+ </td>
333
+ <td style="text-align: center;">
334
+ <nobr>{{row.f_user_name}}</nobr>
335
+ </td>
336
+ <td style="text-align: center;">
337
+ <nobr>{{row.f_address}}</nobr>
338
+ </td>
339
+ <td style="text-align: center;">
340
+ <nobr>{{row.f_user_phone}}</nobr>
341
+ </td>
342
+ <td style="text-align: center;">
343
+ <nobr>{{row.f_rent_phone}}</nobr>
344
+ </td>
345
+ <td style="text-align: center;">
346
+ <nobr>{{row.f_residential_area}}</nobr>
347
+ </td>
348
+ <td style="text-align: center;">
349
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
350
+ </td>
351
+ <td style="text-align: center;">
352
+ <nobr>{{row.f_book_no}}</nobr>
353
+ </td>
354
+ <td style="text-align: center;">
355
+ <nobr>{{row.f_meter_book_sort}}</nobr>
356
+ </td>
357
+ <td style="text-align: center;">
358
+ <nobr>{{row.f_inputtor}}</nobr>
359
+ </td>
360
+ <td style="text-align: center;">
361
+ <nobr>{{row.f_book_name}}</nobr>
362
+ </td>
363
+ <td style="text-align: center;">
364
+ <nobr>{{row.f_dainputtores}}</nobr>
365
+ </td>
366
+ <td style="text-align: center;">
367
+ <nobr>{{row.f_user_type}}</nobr>
368
+ </td>
369
+ <td style="text-align: center;">
370
+ <nobr>{{row.f_gasproperties}}</nobr>
371
+ </td>
372
+ <td style="text-align: center;">
373
+ <nobr>{{row.f_meter_classify}}</nobr>
374
+ </td>
375
+ <td style="text-align: center;">
376
+ <nobr>{{row.f_cost_type}}</nobr>
377
+ </td>
378
+ <td style="text-align: center;">
379
+ <nobr>{{row.c}}</nobr>
380
+ </td>
381
+ <td style="text-align: center;">
382
+ <nobr>{{row.f_hand_date}}</nobr>
383
+ </td>
384
+ <td style="text-align: center;">
385
+ <nobr>{{row.f_last_tablebase}}</nobr>
386
+ </td>
387
+ <td style="text-align: center;">
388
+ <nobr>{{row.f_tablebase}}</nobr>
389
+ </td>
390
+ <td style="text-align: center;">
391
+ <nobr>{{row.f_oughtamount}}</nobr>
392
+ </td>
393
+ <td style="text-align: center;">
394
+ <nobr>{{row.f_oughtfee}}</nobr>
395
+ </td>
396
+ <td style="text-align: center;">
397
+ <nobr>{{row.f_operate_date}}</nobr>
398
+ </td>
399
+ <td style="text-align: center;">
400
+ <nobr>{{row.f_debt_money}}</nobr>
401
+ </td>
402
+ <!--<td style="text-align: center;">-->
403
+ <!--<nobr>{{row.f_hand_bv}}</nobr>-->
404
+ <!--</td>-->
405
+ <td style="text-align: center;">
406
+ <nobr>{{row.f_oughtfee_new}}</nobr>
407
+ </td>
408
+ <td style="text-align: center;">
409
+ <nobr>{{row.overdue}}</nobr>
410
+ </td>
411
+ <td style="text-align: center;">
412
+ <nobr>{{row.f_garbage_fee}}</nobr>
413
+ </td>
414
+ <td style="text-align: center;">
415
+ <nobr>{{row.f_balance}}</nobr>
416
+ </td>
417
+ <td style="text-align: center;">
418
+ <nobr>{{row.f_oughtfee_all}}</nobr>
419
+ </td>
420
+
421
+
422
+ <td style="text-align: center;">
423
+ <nobr>{{row.f_comments}}</nobr>
424
+ </td>
425
+ </template>
426
+ <template partial='foot'></template>
427
+ </data-grid>
428
+ </criteria-paged>
429
+ <table class="table-hover">
430
+ <tr style="position: relative" class="table-bordered">
431
+ <td
432
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
433
+ 汇总信息
434
+ </td>
435
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
436
+ 用气量合计:&emsp;{{sumsmodel.f_oughtamount}}
437
+ </td>
438
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
439
+ 用气金额合计:&emsp;{{sumsmodel.f_oughtfee}}
440
+ </td>
441
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
442
+ 已交金额合计:&emsp;{{sumsmodel.f_debt_money}}
443
+ </td>
444
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
445
+ 气费金额合计:&emsp;{{sumsmodel.f_oughtfee_new}}
446
+ </td>
447
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
448
+ 滞纳金合计:&emsp;{{sumsmodel.overdue}}
449
+ </td>
450
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
451
+ 附加费合计:&emsp;{{sumsmodel.f_garbage_fee}}
452
+ </td>
453
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
454
+ 上期余额合计:&emsp;{{sumsmodel.f_balance}}
455
+ </td>
456
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
457
+ 合计欠费:&emsp;{{sumsmodel.f_oughtfee_all}}
458
+ </td>
459
+ </tr>
460
+ </table>
461
+ </div>
462
+ <div v-if="show">
463
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
464
+ </div>
465
+ </div>
466
+ </div>
467
+ </template>
468
+
469
+ <script>
470
+ import {HttpResetClass, PagedList} from 'vue-client'
471
+ import exportConfig from './exportConfig'
472
+
473
+ let readySomething = async function (self) {
474
+ await self.$MagGetSaleParam.initinputtor()
475
+ self.getinputtores()
476
+ await self.bookAll()
477
+ //加载抄表册
478
+ await self.initmeterbook()
479
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
480
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
481
+ // self.$refs.paged.$refs.cri.search()
482
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
483
+ await self.$MagLoadParams.loadParam()
484
+ self.initParams()
485
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
486
+ }
487
+ export default {
488
+ title: '欠费查询',
489
+ data() {
490
+ return {
491
+ config: {
492
+ defaultPrint: ['f_userinfo_code', 'f_address']
493
+ },
494
+ other:[],
495
+ footer:[],
496
+ //f_price_name:[],
497
+ gasproperties:[],
498
+ showinfo: false,
499
+ data: {},
500
+ show:false,
501
+ rowdata:{},
502
+ initres: {
503
+ org:[this.$login.f.orgid],
504
+ dep:[],
505
+ user:[]
506
+ },
507
+ model: new PagedList('rs/sql/arrearsQuery', 20, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'}, {
508
+ f_oughtamount: 0,
509
+ f_oughtfee: 0,
510
+ f_debt_money: 0,
511
+ f_oughtfee_new: 0,
512
+ overdue: 0,
513
+ f_garbage_fee: 0,
514
+ f_balance:0,
515
+ f_oughtfee_all: 0
516
+ }),
517
+ criteriaShow: false,
518
+ orgCondtionStr: '',
519
+ // 下拉框
520
+ meterbrands: [],
521
+ pricenames: [],
522
+ booksAll: [],
523
+ booksAllData: [],
524
+ prices: [],
525
+ area: [],
526
+ //合计数据
527
+ defaultfield: [],
528
+ //小区
529
+ residentialArea: [],
530
+ sumsmodel: {},
531
+ f_filialeid: this.$login.f.orgid,
532
+ meterbooks:[{label: '全部',value: ''}], //抄表册
533
+ inputtores:[{label: '全部',value: ''}],
534
+ dainputtores:[{label: '全部',value: ''}],
535
+ allorgid:[],
536
+ tempfalg :false,
537
+ lastorgstr:'',
538
+ dypayment:[{label:"全部",value:""},{label:"银行代扣",value:"银行代扣",},{label:"现金缴费",value:"现金缴费",}],
539
+ }
540
+ },
541
+ ready() {
542
+ this.hqdainputtores()
543
+ this.getaddress()
544
+ readySomething(this).then(() => {
545
+ this.$emit('ready')
546
+ }).catch((error) => {
547
+ this.$emit('error', error)
548
+ })
549
+ },
550
+ methods: {
551
+ async bookAll () {
552
+ let param={
553
+ items:'*',
554
+ tablename:'t_meter_book',
555
+ condition:` 1=1 and f_book_state='有效'`,
556
+ orderitem:'id'
557
+ }
558
+ await this.$resetpost('rs/sql/manage_singleTable', {data: param}, {resolveMsg: null, rejectMsg: '获取营收参数出错!!!'})
559
+ .then(item => {
560
+ this.booksAllData = item.data
561
+ this.booksAll = item.data.map(x => {
562
+ return {id: x.id,f_book_code: x.f_book_code}
563
+ })
564
+ })
565
+ },
566
+ async hqdainputtores() {
567
+ let param = {
568
+ items: 'DISTINCT f_inputtor',
569
+ tablename: 't_userfiles',
570
+ condition: ` f_inputtor is NOT null`,
571
+ }
572
+ let getDainputtores = await new HttpResetClass().load("POST",'rs/sql/singleTableParam', {data: param}, {
573
+ resolveMsg: null,
574
+ rejectMsg: null
575
+ });
576
+ if (getDainputtores.data.length > 0) {
577
+ let rs = [];
578
+ getDainputtores.data.forEach((item) => {
579
+ if (item.f_inputtor.length > 0) {
580
+ let temp = {
581
+ label: item.f_inputtor,
582
+ value: item.f_inputtor
583
+ };
584
+ rs.push(temp);
585
+ }
586
+ })
587
+ this.dainputtores = [{label: '全部', value: ''}, ...rs];
588
+ } else {
589
+ this.dainputtores = [{label: '全部', value: ''}];
590
+ }
591
+ },
592
+ async inputtorchange(){
593
+ let val = this.$refs.paged.$refs.cri.model.f_inputtor;
594
+ if(val != null && val != ""){
595
+ let bookData = this.booksAllData.filter(item => val.includes(item.f_inputtor) && this.allorgid.includes(item.f_orgid))
596
+ let rs = bookData.map(x => {
597
+ return {
598
+ label: `[${x.f_book_code}]-${x.f_book_name}`,
599
+ value: x.id
600
+ }
601
+ })
602
+ this.meterbooks = [{label: '全部',value: ''}, ...rs];
603
+ this.$set('$refs.paged.$refs.cri.model.f_meter_book',[bookData[0] ? bookData[0].id : '']);
604
+
605
+ }else{
606
+ this.$set('$refs.paged.$refs.cri.model.f_meter_book','');
607
+ this.initmeterbook();
608
+ }
609
+ },
610
+ async initmeterbook(){
611
+ console.log('allorgid-allorgid', this.allorgid)
612
+ let bs = this.booksAllData.filter(item => this.allorgid.includes(item.f_orgid)).map(x => {
613
+ return {
614
+ label: `[${x.f_book_code}]-${x.f_book_name}`,
615
+ value: x.id
616
+ }
617
+ })
618
+ this.meterbooks = [{label: '全部', value: ''}, ...bs]
619
+ },
620
+ getinputtores () {
621
+ // 获取抄表员
622
+ let rs = []
623
+ if (this.$login.f.f_gasman.length > 0) {
624
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
625
+ let temp = {
626
+ label: this.$login.f.f_gasman[i].name,
627
+ value: this.$login.f.f_gasman[i].name
628
+ }
629
+ rs.push(temp)
630
+ }
631
+ }
632
+ return [{label: '全部', value: ''}, ...rs]
633
+ },
634
+ getotherfooter(){
635
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
636
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
637
+ this.other=[];
638
+ this.footer=[];
639
+ let exportdata = this.getCondition;
640
+ let otherInData=[];
641
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
642
+ let footerData=[],exportfield=this.getfield;
643
+ footerData.push("合计");
644
+ let self =this;
645
+ for(var field in self.sumsmodel){
646
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
647
+ }
648
+ this.footer.push(footerData);
649
+ this.other.push(otherInData);
650
+ },
651
+ async getaddress(){
652
+ console.log('开始获取小区')
653
+ let HttpReset = new HttpResetClass()
654
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
655
+ data: {
656
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
657
+ }
658
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
659
+ console.log('小区',data)
660
+ let house = [{label: '全部', value: ''}]
661
+ for (let row of data.data){
662
+ console.log('开始保存小区')
663
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
664
+ }
665
+ this.residentialArea = house
666
+ },
667
+ //把数据库查询数据转换为下拉数据
668
+ calculate(rows){
669
+ let data = []
670
+ rows.forEach((row, n) => {
671
+ data[n] = {label: row.f_residential_area, value: row.id}
672
+ })
673
+ return data
674
+ },
675
+
676
+ search(){
677
+ this.$refs.paged.$refs.cri.search()
678
+ },
679
+ cancel() {
680
+ this.show = false
681
+ },
682
+ showmsg(obj){
683
+ this.rowdata=obj
684
+ this.show=true
685
+ },
686
+ userTypeChange () {
687
+ this.gasproperties=[]
688
+ if(this.$refs.paged.$refs.cri.model !==null) {
689
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
690
+
691
+ console.log("查看客户类型是什么",this.$refs.paged.$refs.cri.model.f_user_type[0])
692
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
693
+ // this.gasproperties.push({label: '全部', value: ''})
694
+ }
695
+ else{
696
+ this.gasproperties =[{label: '全部', value: ''}]
697
+ }
698
+ },
699
+ initParams() {
700
+ // 初始化气表品牌
701
+ let brandArr = []
702
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
703
+ let temp = {}
704
+ temp.label = item.label
705
+ temp.value = item.value.f_meter_brand
706
+ brandArr.push(temp)
707
+ })
708
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
709
+ //初始化气表价格
710
+ this.prices = this.$MagGetSaleParam.getPrices();
711
+ },
712
+ selfSearch(args) {
713
+ console.log('开始时间',this.$refs.paged.$refs.cri.model.startDate)
714
+ if (this.$refs.paged.$refs.cri.model.startDate === '' || this.$refs.paged.$refs.cri.model.endDate === ''){
715
+ this.$showAlert('请先选择开始时间、结束时间,再进行查询操作!', 'warning', 3000)
716
+ } else {
717
+ //小区查询条件
718
+ let f_orgstr = this.orgCondtionStr
719
+ let str='1=1 '
720
+ if(this.$refs.paged.$refs.cri.model.inputstartDate !== ''){
721
+ str += `and f_input_date>='${this.$refs.paged.$refs.cri.model.inputstartDate}'`
722
+ }
723
+ if(this.$refs.paged.$refs.cri.model.inputendDate !== ''){
724
+ str += `and f_input_date<='${this.$refs.paged.$refs.cri.model.inputendDate}'`
725
+ }
726
+ args.condition = `${args.condition} ` + f_orgstr
727
+ this.model.search(args.condition, args.model,str)
728
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
729
+ }
730
+ },
731
+ clear() {
732
+ //清空部门和人员
733
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
734
+ //部门和人员变为全选
735
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
736
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
737
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
738
+ this.$refs.paged.$refs.cri.model[key] = []
739
+ })
740
+
741
+ },
742
+ dealmsg(val) {
743
+ val.model = this.model.model
744
+ this.$dispatch('deal-msg', val)
745
+ },
746
+ show() {
747
+ this.criteriaShow = true
748
+ },
749
+ hidden() {
750
+ this.criteriaShow = !this.criteriaShow
751
+ },
752
+ async getRes(condition,obj) {
753
+ this.orgCondtionStr = condition
754
+ await this.updateParams(condition)
755
+ this.orgname = obj.orgnames[0]
756
+ this.depname = obj.depnames[0]
757
+
758
+ },
759
+ async updateParams(val) {
760
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
761
+ this.inputtores = [];
762
+ this.inputtores.push({label: "全部", value: ""})
763
+
764
+ let orgs = val.match(/'(.+?)'/g)
765
+ let allorgid = this.allorgid = orgs != null && orgs.length > 0 ? orgs.toString().replace(/(|)/g,'').split(',').map(item => item.replace(/'/g,'')) : []
766
+ if(allorgid != null && allorgid.length > 0){
767
+ allorgid.forEach((res)=>{
768
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
769
+ })
770
+ } else {
771
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(this.f_filialeid));
772
+ }
773
+ this.initParams()
774
+ },
775
+ },
776
+ events:{
777
+ 'getidcard'(IdCard){
778
+ this.$refs.paged.$refs.cri.model.f_info_idnumber=IdCard.strID
779
+ }
780
+ },
781
+ watch: {
782
+ 'model'(val) {
783
+ },
784
+ async 'orgCondtionStr'(val) {
785
+ this.$refs.paged.$refs.cri.model.f_book_slice_area=[]
786
+ this.$refs.paged.$refs.cri.model.f_meter_book = []
787
+ this.meterbooks = [{label: '全部',value: ''}]
788
+ this.initmeterbook()
789
+ },
790
+ sumsmodel:{
791
+ handler: function(val) {
792
+ this.getotherfooter();
793
+ },
794
+ deep: true
795
+ }
796
+ },
797
+ computed: {
798
+ pricetypes() {
799
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
800
+ },
801
+
802
+ getPricenames() {
803
+ let f_user_type = this.$refs.paged.model.model.f_user_type;
804
+ let f_gasproperties = this.$refs.paged.model.model.f_gasproperties;
805
+ let pricetype = this.$refs.paged.model.model.pricetype;
806
+ if(this.$refs.paged.model.model !==null) {
807
+ let rs = []
808
+ let priceArr = []
809
+ if (f_user_type.length > 0 && f_gasproperties.length > 0 && pricetype.length >0) {
810
+ let params = {
811
+ f_user_type: f_user_type[0],
812
+ f_gasproperties: f_gasproperties[0],
813
+ f_price_type: pricetype[0],
814
+ filter: this.f_filialeid,
815
+ prices: this.prices
816
+ }
817
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
818
+ let temp = {}
819
+ temp.label = item.label
820
+ temp.value = item.value.f_price_name
821
+ priceArr.push(temp)
822
+ })
823
+ rs = [{label: '全部', value: ''}, ...priceArr]
824
+ }
825
+ if (rs.length === 0) {
826
+ this.$refs.paged.model.model.f_price_name = ''
827
+ }
828
+ return rs
829
+ }
830
+ },
831
+ getCondition() {
832
+ return {
833
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
834
+ endDate: this.$refs.paged.$refs.cri.model.endDate,
835
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
836
+ condValue: `${this.model.condValue}`
837
+ }
838
+ },
839
+ getfield() {
840
+ return exportConfig.arrearsConfig
841
+ },
842
+ usertypes() {
843
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
844
+ },
845
+ metertypes() {
846
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
847
+ },
848
+ chargetype() {
849
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('收费类型')]
850
+ }
851
+ }
852
+ }
853
+ </script>