manage-client 3.3.268 → 3.3.269

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