manage-client 3.2.209 → 3.2.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.
@@ -0,0 +1,1051 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search" v-if="!show">
4
+ <div class="flex">
5
+
6
+ <criteria-paged :model="model" v-ref:paged>
7
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
+ <div class="row">
10
+ <div class="col-sm-2 form-group">
11
+ <label class="font_normal_body">客户编号</label>
12
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
13
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
14
+ </div>
15
+ <div class="col-sm-2 form-group">
16
+ <label class="font_normal_body">客户名称</label>
17
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
18
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
19
+ </div>
20
+ <div class="span" style="float:right;">
21
+ <button class="button_search button_spacing" @click="search()">查询</button>
22
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
23
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
24
+ :field="$parent.$parent.getfield" :header="$parent.$parent.other"
25
+ sqlurl="rs/easyExcel/exportExcel" sql-name="webhandplanQuery" template-name='物联网表抄表查询导出'
26
+ :choose-col="true"></export-excel>
27
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
28
+ :defaultfield="$parent.$parent.defaultfield" print-name="抄表查询打印"
29
+ titletable="抄表查询"
30
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
31
+
32
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
33
+ </div>
34
+ </div>
35
+ <div class="row" v-show="$parent.$parent.criteriaShow">
36
+
37
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
38
+
39
+ <div class="col-sm-2 form-group">
40
+ <label for="startDate" class="font_normal_body">下发日期</label>
41
+ <datepicker id="handStartDate" placeholder="开始日期" style="width:60%"
42
+ v-model="model.handStartDate"
43
+ :value.sync="model.handStartDate"
44
+ :format="'yyyy-MM-dd 00:00:00'"
45
+ :show-reset-button="true"
46
+ condition="f_hand_date >= '{}'">
47
+ </datepicker>
48
+ </div>
49
+ <div class="col-sm-2 form-group">
50
+ <label for="endDate" class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
51
+ <datepicker id="handEndDate" placeholder="结束日期" style="width:60%"
52
+ v-model="model.handEndDate"
53
+ :value.sync="model.handEndDate"
54
+ :format="'yyyy-MM-dd 23:59:59'"
55
+ :show-reset-button="true"
56
+ condition="f_hand_date <= '{}'">
57
+ </datepicker>
58
+ </div>
59
+ <div class="col-sm-2 form-group">
60
+ <label class="font_normal_body">抄表状态</label>
61
+ <v-select :value.sync="model.f_meter_state"
62
+ v-model="model.f_meter_state"
63
+ :options='$parent.$parent.meterstate' placeholder='请选择'
64
+ condition="f_meter_state = '{}'"
65
+ close-on-select></v-select>
66
+ </div>
67
+ <div class="col-sm-2 form-group">
68
+ <label class="font_normal_body">表单状态</label>
69
+ <v-select :value.sync="model.f_hand_state"
70
+ v-model="model.f_hand_state"
71
+ :options='$parent.$parent.handstate' placeholder='请选择'
72
+ condition="f_hand_state = '{}'"
73
+ close-on-select></v-select>
74
+ </div>
75
+ <div class="col-sm-2 form-group">
76
+ <label for="startDate" class="font_normal_body">录入日期</label>
77
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
78
+ v-model="model.startDate"
79
+ :value.sync="model.startDate"
80
+ :format="'yyyy-MM-dd HH:mm:ss'"
81
+ :show-reset-button="true"
82
+ condition="f_input_date >= '{}'">
83
+ </datepicker>
84
+ </div>
85
+ <div class="col-sm-2 form-group">
86
+ <label for="endDate" class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&ensp;</label>
87
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
88
+ v-model="model.endDate"
89
+ :value.sync="model.endDate"
90
+ :format="'yyyy-MM-dd HH:mm:ss'"
91
+ :show-reset-button="true"
92
+ condition="f_input_date <= '{}'">
93
+ </datepicker>
94
+ </div>
95
+
96
+
97
+ <div class="col-sm-2 form-group">
98
+ <label class="font_normal_body">小区名称</label>
99
+ <v-select :value.sync="model.f_residential_area"
100
+ class="select_list select"
101
+ enter-push
102
+ multiple = "true"
103
+ v-model="model.f_residential_area"
104
+ style="width: 60%"
105
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
106
+ close-on-select>
107
+
108
+ </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_address"
113
+ condition="f_address like '%{}%'" placeholder='客户地址'>
114
+ </div>
115
+ <div class="col-sm-2 form-group">
116
+ <label class="font_normal_body">录入人员</label>
117
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_input_person"
118
+ condition="f_input_person like '%{}%'" placeholder='录入人员'>
119
+ </div>
120
+ <div class="col-sm-2 form-group">
121
+ <label for="startDate" class="font_normal_body">收费日期</label>
122
+ <datepicker id="handStartDate" placeholder="开始日期" style="width:60%"
123
+ v-model="model.sellStartDate"
124
+ :value.sync="model.sellStartDate"
125
+ :format="'yyyy-MM-dd 00:00:00'"
126
+ :show-reset-button="true"
127
+ condition="f_sellinggas_operate_date >= '{}'">
128
+ </datepicker>
129
+ </div>
130
+ <div class="col-sm-2 form-group">
131
+ <label for="endDate" class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;</label>
132
+ <datepicker id="handEndDate" placeholder="结束日期" style="width:60%"
133
+ v-model="model.sellEndDate"
134
+ :value.sync="model.sellEndDate"
135
+ :format="'yyyy-MM-dd 23:59:59'"
136
+ :show-reset-button="true"
137
+ condition="f_sellinggas_operate_date <= '{}'">
138
+ </datepicker>
139
+ </div>
140
+
141
+ <div class="col-sm-2 form-group">
142
+ <label class="font_normal_body">客户类型</label>
143
+ <v-select :value.sync="model.f_user_type"
144
+ @change="$parent.$parent.userTypeChange()"
145
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
146
+ condition="f_user_type = '{}'"
147
+ close-on-select></v-select>
148
+ </div>
149
+ <div class="col-sm-2 form-group">
150
+ <label class="font_normal_body">用气性质</label>
151
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
152
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
153
+ condition="f_gasproperties = '{}'"
154
+ close-on-select></v-select>
155
+ </div>
156
+ <div class="col-sm-2 form-group">
157
+ <label class="font_normal_body">气价类型</label>
158
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
159
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
160
+ close-on-select v-ref:type>
161
+ </v-select>
162
+ </div>
163
+ <div class="col-sm-2 form-group">
164
+ <label class="font_normal_body">气价名称</label>
165
+ <v-select :value.sync="model.f_price_name"
166
+ v-model="model.f_price_name"
167
+ :options="$parent.$parent.getPricenames"
168
+ condition="f_price_name = '{}'"
169
+ close-on-select></v-select>
170
+ </div>
171
+ <div class="col-sm-2 form-group">
172
+ <label class="font_normal_body">用&ensp;气&ensp;量</label>
173
+ <input type="text" style="width:30%" class="input_search" title="大于等于"
174
+ v-model="model.f_oughtamount_big" condition="f_oughtamount >= {}" placeholder='大于等于'>
175
+ <input type="text" style="width:30%" class="input_search" title="小于等于"
176
+ v-model="model.f_oughtamount_small" condition="f_oughtamount <= {}" placeholder='小于等于'>
177
+ </div>
178
+ <div class="col-sm-2 form-group">
179
+ <label class="font_normal_body">&ensp;表&ensp;号&ensp;&ensp;</label>
180
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
181
+ condition="f_meternumber = '{}' " placeholder="表号">
182
+ </div>
183
+ <div class="col-sm-2 form-group">
184
+ <label class="font_normal_body">气表品牌</label>
185
+ <v-select :value.sync="model.f_meter_brand" multiple
186
+ v-model="model.f_meter_brand"
187
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
188
+ condition="f_meter_brand in {}"
189
+ close-on-select></v-select>
190
+ </div>
191
+
192
+
193
+
194
+ <div class="col-sm-2 form-group">
195
+ <label class="font_normal_body" >抄&nbsp;&nbsp;表&nbsp;员</label>
196
+ <v-select :value.sync="model.f_inputtor"
197
+ v-model="model.f_inputtor"
198
+ :options='$parent.$parent.inputtores' placeholder='请选择'
199
+ condition="f_inputtor = '{}'"
200
+ close-on-select :search="false">
201
+ </v-select>
202
+ </div>
203
+ <!--表册片区-->
204
+ <div class="col-sm-2 form-group">
205
+ <label class="font_normal_body">表册片区</label>
206
+ <v-select :value.sync="model.f_book_slice_area" v-model="model.f_book_slice_area"
207
+ @change="$parent.$parent.inputtorchange"
208
+ multiple
209
+ :options='$parent.$parent.bookSlice' placeholder='片区/表册'
210
+ style="width:60%"
211
+ close-on-select
212
+ condition="f_book_slice_area in {}"></v-select>
213
+ </div>
214
+ <div class="col-sm-2 form-group">
215
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
216
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
217
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
218
+ style="width:60%"
219
+ multiple
220
+ close-on-select
221
+ condition="f_meter_book_num in {}"></v-select>
222
+ </div>
223
+
224
+
225
+ </div>
226
+ </div>
227
+ </criteria>
228
+
229
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
230
+ <template partial='head'>
231
+ <tr>
232
+ <th>
233
+ <nobr>客户编号</nobr>
234
+ </th>
235
+ <th>
236
+ <nobr>客户名称</nobr>
237
+ </th>
238
+ <th>
239
+ <nobr>档案编号</nobr>
240
+ </th>
241
+ <th>
242
+ <nobr>片区</nobr>
243
+ </th>
244
+ <th>
245
+ <nobr>表册片区</nobr>
246
+ </th>
247
+ <th>
248
+ <nobr>客户地址</nobr>
249
+ </th>
250
+ <th>
251
+ <nobr>客户手机</nobr>
252
+ </th>
253
+ <th>
254
+ <nobr>表号</nobr>
255
+ </th>
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
+ <th>
320
+ <nobr>一阶单价</nobr>
321
+ </th>
322
+ <th>
323
+ <nobr>一阶气费</nobr>
324
+ </th>
325
+ <th>
326
+ <nobr>二阶气量</nobr>
327
+ </th>
328
+ <th>
329
+ <nobr>二阶单价</nobr>
330
+ </th>
331
+ <th>
332
+ <nobr>二阶气费</nobr>
333
+ </th>
334
+ <th>
335
+ <nobr>三阶气量</nobr>
336
+ </th>
337
+ <th>
338
+ <nobr>三阶单价</nobr>
339
+ </th>
340
+ <th>
341
+ <nobr>三阶气费</nobr>
342
+ </th>
343
+ <th>
344
+ <nobr>天数</nobr>
345
+ </th>
346
+ <th>
347
+ <nobr>抄表员</nobr>
348
+ </th>
349
+ <th>
350
+ <nobr>录入人员</nobr>
351
+ </th>
352
+ <th>
353
+ <nobr>抄表状态</nobr>
354
+ </th>
355
+ <th>
356
+ <nobr>状态</nobr>
357
+ </th>
358
+ <th>
359
+ <nobr>下发人员</nobr>
360
+ </th>
361
+ <th>
362
+ <nobr>部门</nobr>
363
+ </th>
364
+ <th>
365
+ <nobr>公司</nobr>
366
+ </th>
367
+ </tr>
368
+ </template>
369
+ <template partial='body'>
370
+ <td style="text-align: center;">
371
+ <nobr>
372
+ <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
373
+ </td>
374
+ <td style="text-align: center;">
375
+ <nobr>{{row.f_user_name}}</nobr>
376
+ </td>
377
+ <td style="text-align: center;">
378
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
379
+ </td>
380
+ <td style="text-align: center;">
381
+ <nobr>{{row.f_zones}}</nobr>
382
+ </td>
383
+ <td style="text-align: center;">
384
+ <nobr>{{row.f_book_slice_area}}</nobr>
385
+ </td>
386
+ <td style="text-align: center;">
387
+ <nobr>{{row.f_address}}</nobr>
388
+ </td>
389
+
390
+ <td style="text-align: center;">
391
+ <nobr>{{row.phone}}</nobr>
392
+ </td>
393
+ <td style="text-align: center;">
394
+ <nobr>{{row.f_meternumber}}</nobr>
395
+ </td>
396
+ <td style="text-align: center;">
397
+ <nobr>{{row.ym_data}}</nobr>
398
+ </td>
399
+ <td style="text-align: center;">
400
+ <nobr>{{row.f_last_tablebase}}</nobr>
401
+ </td>
402
+ <td style="text-align: center;">
403
+ <nobr>{{row.f_tablebase}}</nobr>
404
+ </td>
405
+ <td style="text-align: center;">
406
+ <nobr>{{row.f_oughtamount}}</nobr>
407
+ </td>
408
+ <td style="text-align: center;">
409
+ <nobr>{{row.f_oughtfee}}</nobr>
410
+ </td>
411
+ <td style="text-align: center;">
412
+ <nobr>{{row.f_privilege_money}}</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_newbalance}}</nobr>
419
+ </td>
420
+ <td style="text-align: center;">
421
+ <nobr>{{row.f_newcurbalance}}</nobr>
422
+ </td>
423
+ <td style="text-align: center;">
424
+ <nobr>{{row.f_curbalance}}</nobr>
425
+ </td>
426
+ <td style="text-align: center;">
427
+ <nobr>{{row.f_sellinggas_operate_date}}</nobr>
428
+ </td>
429
+ <td style="text-align: center;">
430
+ <nobr>{{row.f_sell_operator}}</nobr>
431
+ </td>
432
+ <td style="text-align: center;">
433
+ <nobr>{{row.f_corrhand_date}}</nobr>
434
+ </td>
435
+ <td style="text-align: center;">
436
+ <nobr>{{row.f_corrhand_operator}}</nobr>
437
+ </td>
438
+ <td style="text-align: center;">
439
+ <nobr>{{row.f_hand_date}}</nobr>
440
+ </td>
441
+ <td>
442
+ <nobr>{{row.belongmonth}}</nobr>
443
+ </td>
444
+ <td style="text-align: center;">
445
+ <nobr>{{row.f_input_date}}</nobr>
446
+ </td>
447
+ <td style="text-align: center;">
448
+ <nobr>{{row.f_user_type}}</nobr>
449
+ </td>
450
+ <td style="text-align: center;">
451
+ <nobr>{{row.f_gasproperties}}</nobr>
452
+ </td>
453
+ <td style="text-align: center;">
454
+ <nobr>{{row.f_price_name}}</nobr>
455
+ </td>
456
+ <td style="text-align: center;">
457
+ <nobr>{{row.f_stair1amount}}</nobr>
458
+ </td>
459
+ <td style="text-align: center;">
460
+ <nobr>{{row.f_stair1price}}</nobr>
461
+ </td>
462
+ <td style="text-align: center;">
463
+ <nobr>{{row.f_stair1fee}}</nobr>
464
+ </td>
465
+ <td style="text-align: center;">
466
+ <nobr>{{row.f_stair2amount}}</nobr>
467
+ </td>
468
+ <td style="text-align: center;">
469
+ <nobr>{{row.f_stair2price}}</nobr>
470
+ </td>
471
+ <td style="text-align: center;">
472
+ <nobr>{{row.f_stair2fee}}</nobr>
473
+ </td>
474
+ <td style="text-align: center;">
475
+ <nobr>{{row.f_stair3amount}}</nobr>
476
+ </td>
477
+ <td style="text-align: center;">
478
+ <nobr>{{row.f_stair3price}}</nobr>
479
+ </td>
480
+ <td style="text-align: center;">
481
+ <nobr>{{row.f_stair3fee}}</nobr>
482
+ </td>
483
+ <td style="text-align: center;">
484
+ <nobr>{{row.dd}}</nobr>
485
+ </td>
486
+ <td style="text-align: center;">
487
+ <nobr>{{row.f_inputtor}}</nobr>
488
+ </td>
489
+ <td style="text-align: center;">
490
+ <nobr>{{row.f_input_person}}</nobr>
491
+ </td>
492
+
493
+ <td style="text-align: center;">
494
+ <nobr>{{row.f_meter_state}}</nobr>
495
+ </td>
496
+ <td style="text-align: center;">
497
+ <nobr>{{row.f_hand_state}}</nobr>
498
+ </td>
499
+ <td style="text-align: center;">
500
+ <nobr>{{row.f_operator}}</nobr>
501
+ </td>
502
+ <td style="text-align: center;">
503
+ <nobr>{{row.f_depname}}</nobr>
504
+ </td>
505
+ <td style="text-align: center;">
506
+ <nobr>{{row.f_orgname}}</nobr>
507
+ </td>
508
+ </template>
509
+ <template partial='foot'></template>
510
+ </data-grid>
511
+ </criteria-paged>
512
+
513
+ <table class="table-hover">
514
+ <tr style="position: relative;margin-top: -16px;" class="table-bordered">
515
+ <td
516
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
517
+ 汇总信息
518
+ </td>
519
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
520
+ 用气量合计:&emsp;{{sumsmodel.f_oughtamount}}
521
+ </td>
522
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
523
+ 气费合计:&emsp;{{sumsmodel.f_oughtfee}}
524
+ </td>
525
+ </tr>
526
+ </table>
527
+ </div>
528
+ </div>
529
+ <div class="flex" v-if="show">
530
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
531
+ </div>
532
+
533
+ <work-busy :is-busy="iswork" v-show="iswork"></work-busy>
534
+ </div>
535
+ </template>
536
+
537
+ <script>
538
+ import {PagedList, HttpResetClass} from 'vue-client'
539
+ import defaultPrint from '../../components/sale/config/DefaultPrint'
540
+ import exportConfig from './exportConfig'
541
+ import axios from 'axios'
542
+
543
+ let readySomething = async function (self) {
544
+ //加载抄表册
545
+ self.$MagGetSaleParam.initinputtor();
546
+ self.getinputtores();
547
+ self.initmeterbook();
548
+ self.$refs.paged.$refs.cri.model.handStartDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
549
+ self.$refs.paged.$refs.cri.model.handEndDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
550
+
551
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
552
+ await self.$MagLoadParams.loadParam()
553
+ await self.initParams()
554
+ await self.$getConfig(self, 'HandplanQuery')
555
+ console.log('开始查询')
556
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
557
+ }
558
+ export default {
559
+ props:['data'],
560
+ title: '物联网表抄表查询',
561
+ data() {
562
+ return {
563
+ iswork:false,
564
+ other:[],
565
+ footer:[],
566
+ data: {},
567
+ model: new PagedList('rs/sql/webhandplanQuery', 20, {startDate: 'this.model.handStartDate', endDate: 'this.model.handEndDate'}, {
568
+ f_oughtamount: 0,
569
+ f_oughtfee: 0
570
+ }),
571
+ initres: {
572
+ org:[this.$login.f.orgid],
573
+ dep:[],
574
+ user:[],
575
+ },
576
+ show:false,
577
+ rowdata:{},
578
+ criteriaShow: false,
579
+ residentialArea: [],
580
+ orgCondtionStr: '',
581
+ modelval: [],
582
+ gasproperties:[],
583
+ inputtouPerson: [],
584
+ meterbrands: [],
585
+ printshow: false,
586
+ f_filialeid: this.$login.f.f_orgid,
587
+ all: false,
588
+ fields: {},
589
+ thead: '',
590
+ tfoot: '',
591
+ selected:{},
592
+
593
+ // 下拉框
594
+
595
+ //合计数据
596
+ sumsmodel: {},
597
+ defaultfield: [],
598
+ config: {
599
+ defaultPrint: ['f_userinfo_code', 'f_address', 'f_user_name', 'f_meternumber']
600
+ },
601
+ prices: [],
602
+ bgl:[{label: '全部', value: ''},{label: '有', value: '1'},{label: '无', value: '0'}],
603
+ meterbooks:[{label: '全部',value: ''}], //抄表册
604
+ tempfalg :false,
605
+ lastorgstr:'',
606
+ allorgid:[],
607
+ inputtores:[{label: '全部',value: ''}], //抄表员
608
+ //表册片区
609
+ bookSlice:[{label: '全部',value: ''}],
610
+ imgfilename:'',
611
+ percent:0,
612
+ uuida:'',
613
+ timer:'',
614
+ }
615
+ },
616
+ ready() {
617
+ this.$refs.paged.$refs.cri.model.f_meter_state=['已抄表']
618
+ this.getaddress()
619
+ readySomething(this).then(() => {
620
+ this.$emit('ready')
621
+ }).catch((error) => {
622
+ this.$emit('error', error)
623
+ })
624
+ },
625
+ methods: {
626
+ getuuid(){
627
+ let uuidA = '';
628
+ var s = [];
629
+ var hexDigits = '0123456789abcdef';
630
+ for (var i = 0; i < 36; i++) {
631
+ s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
632
+ }
633
+ s[14] = '4';
634
+ s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
635
+ s[8] = s[13] = s[18] = s[23] = '-';
636
+ uuidA = s.join('');
637
+ this.uuida = uuidA;
638
+ },
639
+
640
+ //初始化片区
641
+ async initSlice (val) {
642
+ if (val) {
643
+ let getAllArea = await this.$resetpost('/rs/search', {
644
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
645
+ userid: this.$login.f.id
646
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
647
+ let arr = getAllArea.data.filter((res) => {
648
+ return res.parentid == val
649
+ })
650
+ this.bookSlice = []
651
+ arr.forEach((res) => {
652
+ this.bookSlice.push({label: res.name, value: res.name})
653
+ })
654
+ }
655
+ },
656
+ //表册片区和抄表册关联
657
+ async inputtorchange(){
658
+ this.$set('$refs.paged.$refs.cri.model.f_meter_book',[]);
659
+ /*let val1=this.$refs.paged.$refs.cri.model.f_meter_book*/
660
+ let val2=this.$refs.paged.$refs.cri.model.f_book_slice_area
661
+ if((val2.length>0)){
662
+ let condition = ` 1=1 and f_orgid ='${this.f_filialeid}' and f_book_state='有效' `
663
+ let aaa = '('
664
+ val2.forEach((item) => {
665
+ aaa = aaa + `'${item}',`
666
+ })
667
+ aaa = aaa + `'')`
668
+ condition = condition + ` and f_book_slice_area in ${aaa} `
669
+ let param={
670
+ items:'*',
671
+ tablename:'t_meter_book',
672
+ condition:condition,
673
+ orderitem:'id'
674
+ }
675
+ let getMeterBooks = await this.$resetpost('rs/sql/singleTable_OrderBy', {data: param}, {resolveMsg: null, rejectMsg: '获取营收参数出错!!!'})
676
+ if (getMeterBooks.data) {
677
+ if(getMeterBooks.data.length >0){
678
+ let rs = [];
679
+ getMeterBooks.data.forEach((item)=>{
680
+ let temp = {
681
+ label:item.f_book_name,
682
+ value:item.id
683
+ };
684
+ rs.push(temp);
685
+
686
+ })
687
+ this.meterbooks = [{label: '全部',value: ''}, ...rs];
688
+ }else{
689
+ this.meterbooks = [{label: '全部',value: ''}];
690
+ }
691
+ }
692
+ }else{
693
+ this.meterbooks = [{label: '全部',value: ''}];
694
+ this.initmeterbook();
695
+ }
696
+ },
697
+ async initmeterbook(orgstr){
698
+ if(orgstr == null ){
699
+ orgstr = this.f_filialeid;
700
+ }
701
+ //获取新的抄表册,先去清理所有的抄表册
702
+ this.$GetSaleParam.meterbooks = [];
703
+ //开始加载新的抄表册
704
+ await this.$LoadParams.loadMeterBook(orgstr)
705
+ this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
706
+ },
707
+
708
+ async getinputtores () {
709
+ // 获取抄表员
710
+ let rs = []
711
+ if (this.$login.f.f_gasman.length > 0) {
712
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
713
+ let temp = {
714
+ label: this.$login.f.f_gasman[i].name,
715
+ value: this.$login.f.f_gasman[i].name
716
+ }
717
+ rs.push(temp)
718
+ }
719
+ }
720
+ this.inputtores = [{label: '全部', value: ''}, ...rs]
721
+ this.inputtores.push({label: "微信公众号", value: "微信公众号"})
722
+ },
723
+ async updateParams() {
724
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
725
+ this.inputtores = [];
726
+ this.inputtores.push({label: "全部", value: ""})
727
+ this.initSlice(this.f_filialeid)
728
+ if(this.allorgid!=null){
729
+ this.allorgid.forEach((res)=>{
730
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
731
+ })
732
+ }
733
+ this.initParams()
734
+ },
735
+
736
+ async initParams() {
737
+ // 初始化气表品牌
738
+ let brandArr = []
739
+ await this.$MagGetSaleParam.getGasbrand().forEach((item) => {
740
+ if (item.value.f_meter_type === '物联网表'){
741
+ let temp = {}
742
+ temp.label = item.label
743
+ temp.value = item.value.f_meter_brand
744
+ brandArr.push(temp)
745
+ }
746
+ })
747
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
748
+ //初始化气价
749
+ let result = []
750
+ await this.$MagGetSaleParam.prices.forEach((item) => {
751
+ if (item.f_state === '有效' && this.$login.f.orgid == item.f_filialeid) {
752
+ let value = {
753
+ label: item.f_price_name,
754
+ value: item.f_price_name
755
+ }
756
+ result.push(value)
757
+ }
758
+ })
759
+ let hash = {}
760
+ result = result.reduce((item, next) => {
761
+ hash[next.label] ? '' : hash[next.label] = true && item.push(next)
762
+ return item
763
+ }, [])
764
+ this.prices = Array.from(new Set(result))
765
+ },
766
+ getotherfooter(){
767
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
768
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
769
+ this.other=[];
770
+ this.footer=[];
771
+ let exportdata = this.getCondition;
772
+ let otherInData=[];
773
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
774
+ let footerData=[],exportfield=this.getfield;
775
+ footerData.push("合计");
776
+ let self = this;
777
+ for(var field in self.sumsmodel){
778
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
779
+ }
780
+ this.footer.push(footerData);
781
+ this.other.push(otherInData);
782
+ },
783
+ async getaddress(){
784
+ let HttpReset = new HttpResetClass()
785
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
786
+ data: {
787
+ condition: `1=1 and s.f_orgid = '${this.$login.f.orgid}'`
788
+ }
789
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
790
+ console.log('小区',data)
791
+ let house = [{label: '全部', value: ''}]
792
+ for (let row of data.data){
793
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
794
+ }
795
+ this.residentialArea = house
796
+ },
797
+ search(){
798
+ this.$refs.paged.$refs.cri.search()
799
+ },
800
+ cancel() {
801
+ this.show = false
802
+ },
803
+ selfSearch(args) {
804
+ if (this.data) {
805
+ this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
806
+ this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
807
+ }
808
+
809
+ if (!((this.$refs.paged.$refs.cri.model.startDate != ''&& this.$refs.paged.$refs.cri.model.endDate != '')
810
+ ||(this.$refs.paged.$refs.cri.model.handStartDate != ''&& this.$refs.paged.$refs.cri.model.handEndDate != '')
811
+ )) {
812
+ this.$showMessage('请选择【下发、抄表或审核】其中之一开始时间和结束时间!')
813
+ return
814
+ }
815
+ this.area = this.$refs.paged.$refs.cri.model.f_residential_area
816
+ if(this.area.length !== 0){
817
+ let str = JSON.stringify(this.area)
818
+ str = str.replace(/"/g,`'`)
819
+ str = str.replace(/\[/g,``)
820
+ str = str.replace(/\]/g,``)
821
+ //查询多个小区时条件
822
+ args.condition += ` and f_residential_area in ( ${str} )`
823
+ }
824
+ //抄表员查询条件
825
+ this.inputtouPerson = this.$refs.paged.$refs.cri.model.f_inputtor
826
+ if(this.inputtouPerson.length !== 0){
827
+ let str = JSON.stringify(this.inputtouPerson)
828
+ str = str.replace(/"/g,`'`)
829
+ str = str.replace(/\[/g,``)
830
+ str = str.replace(/\]/g,``)
831
+ //查询多个抄表员时条件
832
+ args.condition += ` and f_inputtor in ( ${str} )`
833
+ }
834
+
835
+ args.condition = `${args.condition} ` + this.orgCondtionStr
836
+ this.model.search(args.condition, args.model)
837
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
838
+ },
839
+ clear() {
840
+ //清空部门和人员
841
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
842
+ //部门和人员变为全选
843
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
844
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
845
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
846
+ this.$refs.paged.$refs.cri.model[key] = []
847
+ })
848
+ },
849
+ show() {
850
+ this.criteriaShow = true
851
+ },
852
+ hidden() {
853
+ this.criteriaShow = !this.criteriaShow
854
+ },
855
+ async getRes(condition,obj) {
856
+ this.orgCondtionStr = condition
857
+
858
+ },
859
+ stamp() {
860
+ this.all = false
861
+ //默认选择要打印的列
862
+ this.modelval = defaultPrint.config
863
+ this.fields = this.getfield
864
+ this.printshow = true
865
+ this.put()
866
+ },
867
+ put() {
868
+ // 对Modelval进行排序
869
+ this.sortModelval()
870
+ this.thead = `<tr><th colspan=${this.modelval.length}>抄表查询统计报表</th></tr><tr>`
871
+ for (let key of this.modelval) {
872
+ this.thead += '<th>' + this.fields[key] + '</th>'
873
+ }
874
+ this.thead += '</tr>'
875
+ },
876
+ print() {
877
+ this.$refs.print.PrintAsFile()
878
+ this.printshow = false
879
+ },
880
+ dealmsg(val) {
881
+ this.rowdata=val
882
+ this.show=true
883
+ val.model = this.model.model
884
+ this.$dispatch('deal-msg', val)
885
+ },
886
+ close() {
887
+ this.printshow = false
888
+ this.all = false
889
+ },
890
+
891
+ userTypeChange () {
892
+ this.gasproperties=[]
893
+ if(this.$refs.paged.$refs.cri.model !==null) {
894
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
895
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
896
+ }
897
+ else{
898
+ this.gasproperties =[{label: '全部', value: ''}]
899
+ }
900
+ },
901
+ // 对选择的列进行排序
902
+ sortModelval() {
903
+ let sortModel = []
904
+ Object.keys(this.fields).forEach((key) => {
905
+ if (this.modelval.includes(key)) {
906
+ sortModel.push(key)
907
+ }
908
+ })
909
+ this.modelval = sortModel
910
+ }
911
+ },
912
+ watch: {
913
+ 'model.rows'(val) {
914
+ if(val.length === 0){
915
+ this.sumsmodel = {}
916
+ }
917
+ },
918
+ async 'orgCondtionStr'(val) {
919
+ this.$refs.paged.$refs.cri.model.f_inputtor=[]
920
+ this.$refs.paged.$refs.cri.model.f_book_slice_area=[]
921
+ this.$refs.paged.$refs.cri.model.f_meter_book = []
922
+ this.meterbooks = [{label: '全部',value: ''}];
923
+ if(this.lastorgstr != val){
924
+ this.tempfalg = true;
925
+ this.lastorgstr = val;
926
+ }
927
+ if(this.tempfalg && val != null && val!='' && val.indexOf("(")>-1){
928
+ this.tempfalg = false;
929
+ let a = val.substring(val.indexOf("(")+2)
930
+ await this.initmeterbook(a.substring(0,a.indexOf(")")-1));
931
+ }
932
+ let res = val.match(/'(.*?)'/)
933
+ console.log('正则提取:',res && res[1])
934
+ if (res) {
935
+ this.f_filialeid = res[1]
936
+ if(res.input !=null){
937
+ let resorgid = res.input.substring(res.input.indexOf("'"));
938
+ if(resorgid!= null && resorgid!=''){
939
+ resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
940
+ // resorgid = resorgid.replaceAll("'","");
941
+ resorgid = resorgid.replace(/'/g,"");
942
+ this.allorgid = resorgid.split(",")
943
+ }
944
+ }
945
+ this.updateParams()
946
+ }
947
+ },
948
+ 'all'(val) {
949
+ if (val) {
950
+ this.modelval = this.bodyData
951
+ } else {
952
+ this.modelval = defaultPrint.config
953
+ this.put()
954
+ }
955
+ },
956
+ 'modelval.length'() {
957
+ this.put()
958
+ },
959
+ sumsmodel:{
960
+ handler: function(val) {
961
+ this.getotherfooter();
962
+ },
963
+ deep: true
964
+ }
965
+ },
966
+ computed: {
967
+
968
+ banklist() {
969
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('银行名称')]
970
+ },
971
+ getCondition() {
972
+ return {
973
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
974
+ endDate: this.$refs.paged.$refs.cri.model.endDate,
975
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr }
976
+ },
977
+ getfield() {
978
+ return exportConfig.webhandplanConfig
979
+ },
980
+ getBankfield(){
981
+ return exportConfig.batchBankConfig2
982
+ },
983
+ usertypes() {
984
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
985
+ },
986
+ accountsState() {
987
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('下账状态')]
988
+ },
989
+ meterstate() {
990
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('抄表状态')]
991
+ },
992
+ handstate() {
993
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('表单状态')]
994
+ },
995
+ // inputtor() {
996
+ // return [{label: '全部', value: ''}, ...this.$appdata.getParam('抄表员')]
997
+ // },
998
+ pricetypes() {
999
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
1000
+ },
1001
+ getPricenames() {
1002
+ let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
1003
+ let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
1004
+ let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
1005
+ console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
1006
+ if(this.$refs.paged.$refs.cri.model !==null) {
1007
+ let rs = []
1008
+ let priceArr = []
1009
+ if ( pricetype.length >0) {
1010
+ let params = {
1011
+ f_price_type: pricetype[0],
1012
+ filter: this.f_filialeid,
1013
+ prices: this.prices
1014
+ }
1015
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
1016
+ let temp = {}
1017
+ temp.label = item.label
1018
+ temp.value = item.value.f_price_name
1019
+ priceArr.push(temp)
1020
+ })
1021
+ rs = [{label: '全部', value: ''}, ...priceArr]
1022
+ }
1023
+ if (rs.length === 0) {
1024
+ console.log('rs读出来是空')
1025
+ this.$refs.paged.$refs.cri.model.f_price_name = ''
1026
+ }
1027
+ return rs
1028
+ }
1029
+ },
1030
+ inputtor () {
1031
+ // 获取抄表员
1032
+ console.log('获取抄表员', this.$login.f)
1033
+ let rs = []
1034
+ if (this.$login.f.f_gasman.length > 0) {
1035
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
1036
+ let temp = {
1037
+ label: this.$login.f.f_gasman[i].name,
1038
+ value: this.$login.f.f_gasman[i].name
1039
+ }
1040
+ rs.push(temp)
1041
+ }
1042
+ }
1043
+
1044
+ return [{label: '全部', value: ''}, ...rs]
1045
+ },
1046
+
1047
+ },
1048
+ events:{
1049
+ }
1050
+ }
1051
+ </script>