manage-client 3.3.83 → 3.3.84

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