manage-client 4.0.49 → 4.0.51

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