manage-client 3.2.124 → 3.2.127

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,700 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri >
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label for="startDate" class="font_normal_body">开始日期</label>
11
+ <datepicker id="startDate" placeholder="抄表开始日期" style="width:60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="true"
16
+ >
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-2 form-group">
20
+ <label for="endDate" class="font_normal_body">结束日期</label>
21
+ <datepicker id="endDate" placeholder="抄表结束日期" style="width:60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :format="'yyyy-MM-dd HH:mm:ss'"
25
+ :show-reset-button="true"
26
+ >
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-2 form-group">
30
+ <label class="font_normal_body">小区名称</label>
31
+ <v-select :value.sync="model.f_residential_area"
32
+ class="select_list select"
33
+ enter-push
34
+ multiple = "true"
35
+ v-model="model.f_residential_area"
36
+ style="width: 60%"
37
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
38
+ close-on-select>
39
+
40
+ </v-select>
41
+ </div>
42
+ <div class="col-sm-2 form-group">
43
+ <label class="font_normal_body">客户类型</label>
44
+ <v-select :value.sync="model.f_user_type"
45
+ @change="$parent.$parent.userTypeChange()"
46
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
47
+ condition="f_user_type = '{}'"
48
+ close-on-select></v-select>
49
+ </div>
50
+ <div class="span" style="float:right;">
51
+ <!--<read-idcard></read-idcard>-->
52
+ <button class="button_search button_spacing" @click="search()">查询</button>
53
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
54
+
55
+ <export-excel :data="$parent.$parent.getCondition"
56
+ :field="$parent.$parent.getfield"
57
+ :footer="$parent.$parent.footer"
58
+ :header="$parent.$parent.other"
59
+ sqlurl="rs/logic/exportfile"
60
+ sql-name="handBookTwoQuery"
61
+ template-name='抄表册统计查询导出'
62
+ :choose-col="true"></export-excel>
63
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
64
+ :defaultfield="$parent.$parent.defaultfield"
65
+ titletable="抄表册统计查询导出"
66
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
67
+ <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>
68
+
69
+ </div>
70
+ </div>
71
+ <div class="row" v-show="$parent.$parent.criteriaShow">
72
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
73
+
74
+ <div class="col-sm-2 form-group">
75
+ <label class="font_normal_body">用气性质</label>
76
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
77
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
78
+ condition="f_gasproperties = '{}'"
79
+ close-on-select></v-select>
80
+ </div>
81
+ <!--<div class="col-sm-2 form-group">-->
82
+ <!--<label class="font_normal_body">抄&ensp;表&ensp;员</label>-->
83
+ <!--<v-select :value.sync="model.f_inputtor" v-model='model.f_inputtor'-->
84
+ <!--style="width:60%"-->
85
+ <!--multiple="true"-->
86
+ <!--:options='$parent.$parent.inputtores' placeholder='抄表员'-->
87
+ <!--close-on-select-->
88
+ <!--v-el:cc></v-select>-->
89
+ <!--</div>-->
90
+ <div class="col-sm-2 form-group">
91
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;抄表员</label>
92
+ <v-select :value.sync="model.f_inputtor"
93
+ v-model="model.f_inputtor" condition="f_inputtor = '{}'"
94
+ :options='$parent.$parent.inputtores' placeholder='请选择'
95
+ multiple = "true"
96
+ close-on-select></v-select>
97
+ </div>
98
+ <!--表册片区-->
99
+ <div class="col-sm-2 form-group">
100
+ <label class="font_normal_body">表册片区</label>
101
+ <v-select :value.sync="model.f_book_slice_area" v-model="model.f_book_slice_area"
102
+ @change="$parent.$parent.inputtchange"
103
+ :options='$parent.$parent.bookSlice' placeholder='片区/表册'
104
+ multiple
105
+ style="width:60%"
106
+ close-on-select
107
+ condition="f_book_slice_area in {}"></v-select>
108
+ </div>
109
+ <div class="col-sm-2 form-group">
110
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
111
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
112
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
113
+ style="width:60%"
114
+ multiple
115
+ close-on-select
116
+ condition="f_meter_book_num in {}"></v-select>
117
+ </div>
118
+
119
+ <!--<div class="col-sm-2 form-group">-->
120
+ <!--<label class="font_normal_body">抄&ensp;表&ensp;册</label>-->
121
+ <!--<v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"-->
122
+ <!--:options='$parent.$parent.meterbooks' placeholder='抄表册'-->
123
+ <!--style="width:60%"-->
124
+ <!--close-on-select-->
125
+ <!--condition="uf.f_meter_book_num = '{}'"></v-select>-->
126
+ <!--</div>-->
127
+ <!--<div class="col-sm-2 form-group">-->
128
+ <!--<label class="font_normal_body">气价类型</label>-->
129
+ <!--<v-select :value.sync="model.pricetype" v-model="model.pricetype"-->
130
+ <!--placeholder='气价类型' :options="$parent.$parent.pricetypes"-->
131
+ <!--close-on-select v-ref:type>-->
132
+ <!--</v-select>-->
133
+ <!--</div>-->
134
+ <!--<div class="col-sm-2 form-group">-->
135
+ <!--<label class="font_normal_body">气价名称</label>-->
136
+ <!--<v-select :value.sync="model.f_price_name"-->
137
+ <!--v-model="model.f_price_name"-->
138
+ <!--:options="$parent.$parent.getPricenames"-->
139
+ <!--condition="f_price_name = '{}'"-->
140
+ <!--close-on-select></v-select>-->
141
+ <!--</div>-->
142
+
143
+ <!--<div class="col-sm-2 form-group">-->
144
+ <!--<label class="font_normal_body">气表类型</label>-->
145
+ <!--<v-select :value.sync="model.f_meter_type" multiple-->
146
+ <!--:options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_type"-->
147
+ <!--condition="f_meter_type in {}"-->
148
+ <!--close-on-select></v-select>-->
149
+ <!--</div>-->
150
+ <!--<div class="col-sm-2 form-group">-->
151
+ <!--<label class="font_normal_body">气表品牌</label>-->
152
+ <!--<v-select :value.sync="model.f_meter_brand" multiple-->
153
+ <!--v-model="model.f_meter_brand"-->
154
+ <!--:options='$parent.$parent.meterbrands' placeholder='请选择'-->
155
+ <!--condition="f_meter_brand in {}"-->
156
+ <!--close-on-select></v-select>-->
157
+ <!--</div>-->
158
+ <div class="col-sm-2 form-group">
159
+ <label class="font_normal_body">录入人员</label>
160
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_input_person"
161
+ condition="f_input_person like '%{}%'" placeholder='录入人员'>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ </criteria>
166
+
167
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
168
+ <template partial='head'>
169
+ <tr>
170
+ <th>
171
+ <nobr>抄表员</nobr>
172
+ </th>
173
+ <th>
174
+ <nobr>抄表册</nobr>
175
+ </th>
176
+ <th>
177
+ <nobr>录入人员</nobr>
178
+ </th>
179
+ <th>
180
+ <nobr>应抄户数</nobr>
181
+ </th>
182
+ <th>
183
+ <nobr>未抄户数</nobr>
184
+ </th>
185
+ <th>
186
+ <nobr>已抄无用量</nobr>
187
+ </th>
188
+ <th>
189
+ <nobr>实抄户数</nobr>
190
+ </th>
191
+ <th>
192
+ <nobr>抄表率</nobr>
193
+ </th>
194
+ <th>
195
+ <nobr>期间抄表气量</nobr>
196
+ </th>
197
+ <th>
198
+ <nobr>期间抄表金额</nobr>
199
+ </th>
200
+ <th>
201
+ <nobr>期间实收气费金额</nobr>
202
+ </th>
203
+ <th>
204
+ <nobr>已收户数</nobr>
205
+ </th>
206
+ <th>
207
+ <nobr>收费率</nobr>
208
+ </th>
209
+ </tr>
210
+ </template>
211
+ <template partial='body'>
212
+ <td style="text-align: center;">
213
+ <nobr>{{row.f_inputtor}}</nobr>
214
+ </td>
215
+ <td style="text-align: center;">
216
+ <nobr>{{row.f_book_name}}</nobr>
217
+ </td>
218
+ <td style="text-align: center;">
219
+ <nobr>{{row.f_input_person}}</nobr>
220
+ </td>
221
+ <td style="text-align: center;">
222
+ <nobr>{{row.f_user_number}}</nobr>
223
+ </td>
224
+ <td style="text-align: center;">
225
+ <nobr>{{row.f_no_hand}}</nobr>
226
+ </td>
227
+ <td style="text-align: center;">
228
+ <nobr>{{row.f_out_hand}}</nobr>
229
+ </td>
230
+ <td style="text-align: center;">
231
+ <nobr>{{row.f_hand_num}}</nobr>
232
+ </td>
233
+ <td style="text-align: center;">
234
+ <nobr>{{row.f_hand_lv}}</nobr>
235
+ </td>
236
+ <td style="text-align: center;">
237
+ <nobr>{{row.f_oughtamount}}</nobr>
238
+ </td>
239
+ <td style="text-align: center;">
240
+ <nobr>{{row.f_oughtfee}}</nobr>
241
+ </td>
242
+ <td style="text-align: center;">
243
+ <nobr>{{row.f_debt_money}}</nobr>
244
+ </td>
245
+ <td style="text-align: center;">
246
+ <nobr>{{row.f_sell_hand}}</nobr>
247
+ </td>
248
+ <td style="text-align: center;">
249
+ <nobr>{{row.f_sell_lv}}</nobr>
250
+ </td>
251
+ </template>
252
+ <template partial='foot'></template>
253
+ </data-grid>
254
+ </criteria-paged>
255
+ <table class="table-hover">
256
+ <tr style="position: relative" class="table-bordered">
257
+ <td
258
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
259
+ 汇总信息
260
+ </td>
261
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
262
+ 应抄户数合计:&emsp;{{sumsmodel.f_user_number}}
263
+ </td>
264
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
265
+ 未抄户数合计:&emsp;{{sumsmodel.f_no_hand}}
266
+ </td>
267
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
268
+ 已抄无用量合计:&emsp;{{sumsmodel.f_out_hand}}
269
+ </td>
270
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
271
+ 实抄户数合计:&emsp;{{sumsmodel.f_hand_num}}
272
+ </td>
273
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
274
+ 期间抄表气量合计:&emsp;{{sumsmodel.f_oughtamount}}
275
+ </td>
276
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
277
+ 期间抄表金额合计:&emsp;{{sumsmodel.f_oughtfee}}
278
+ </td>
279
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
280
+ 期间实收气费金额合计:&emsp;{{sumsmodel.f_debt_money}}
281
+ </td>
282
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
283
+ 已收户数合计:&emsp;{{sumsmodel.f_sell_hand}}
284
+ </td>
285
+ </tr>
286
+ </table>
287
+ </div>
288
+ <!--<div v-if="show">-->
289
+ <!--<user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>-->
290
+ <!--</div>-->
291
+ </div>
292
+ </div>
293
+ </template>
294
+
295
+ <script>
296
+ import {HttpResetClass, PagedList} from 'vue-client'
297
+ import exportConfig from '../config/exportConfig'
298
+
299
+ let readySomething = async function (self) {
300
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
301
+ self.$MagGetSaleParam.initinputtor();
302
+ self.getinputtores();
303
+ self.initmeterbook();
304
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
305
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
306
+ // self.$refs.paged.$refs.cri.search()
307
+
308
+ await self.$MagLoadParams.loadParam()
309
+ self.initParams()
310
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
311
+ }
312
+ export default {
313
+ title: '抄表册统计',
314
+ data() {
315
+ return {
316
+ other: [],
317
+ footer: [],
318
+ config: {
319
+ defaultPrint: ['f_no_hand', 'f_inputtor' ,'f_input_person']
320
+ },
321
+ //f_price_name:[],
322
+ gasproperties:[],
323
+ showinfo: false,
324
+ data: {},
325
+ show:false,
326
+ rowdata:{},
327
+ initres: {
328
+ org:[this.$login.f.orgid],
329
+ dep:[],
330
+ user:[]
331
+ },
332
+ model: new PagedList('rs/sql/handBookTwoQuery', 20, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'}, {
333
+ f_user_number: 0,
334
+ f_no_hand: 0,
335
+ f_out_hand: 0,
336
+ f_hand_num :0,
337
+ f_oughtamount: 0,
338
+ f_oughtfee: 0,
339
+ f_debt_money:0,
340
+ f_sell_hand:0
341
+ }),
342
+ criteriaShow: false,
343
+ orgCondtionStr: '',
344
+ // 下拉框
345
+ meterbrands: [],
346
+ pricenames: [],
347
+ prices: [],
348
+ area: [],
349
+ //合计数据
350
+ defaultfield: [],
351
+ //小区
352
+ residentialArea: [],
353
+ sumsmodel: {},
354
+ inputtouPerson: [],
355
+ inputtores2: [], // 下发时使用自定义抄表员,
356
+ f_filialeid: this.$login.f.f_orgid,
357
+ f_orgid: this.$login.f.orgid,
358
+ f_depid: this.$login.f.depids,
359
+ f_operatorid: this.$login.f.id,
360
+ bookSlice:[{label: '全部',value: ''}], //表册片区
361
+ meterbooks:[{label: '全部',value: ''}], //抄表册
362
+ tempfalg :false,
363
+ lastorgstr:'',
364
+ allorgid:[],
365
+ inputtores:[{label: '全部',value: ''}], //抄表员
366
+ }
367
+ },
368
+ ready() {
369
+ this.getaddress()
370
+ readySomething(this).then(() => {
371
+ this.$emit('ready')
372
+ }).catch((error) => {
373
+ this.$emit('error', error)
374
+ })
375
+ },
376
+ methods: {
377
+ // 初始化抄表册片区
378
+ async initSlice (val) {
379
+ if (val) {
380
+ let getAllArea = await this.$resetpost('/rs/search', {
381
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
382
+ userid: this.$login.f.id
383
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
384
+ let arr = getAllArea.data.filter((res) => {
385
+ return res.parentid == val
386
+ })
387
+ this.bookSlice = []
388
+ arr.forEach((res) => {
389
+ this.bookSlice.push({label: res.name, value: res.name})
390
+ })
391
+ }
392
+ },
393
+ //表册片区和抄表册关联
394
+ async inputtchange(){
395
+ /*let val1=this.$refs.paged.$refs.cri.model.f_meter_book*/
396
+ let val2=this.$refs.paged.$refs.cri.model.f_book_slice_area
397
+ if((val2.length>0)){
398
+ let condition = ` 1=1 and f_orgid ='${this.f_filialeid}' and f_book_state='有效' `
399
+ let aaa = '('
400
+ val2.forEach((item) => {
401
+ aaa = aaa + `'${item}',`
402
+ })
403
+ aaa = aaa + `'')`
404
+ condition = condition + ` and f_book_slice_area in ${aaa} `
405
+ let param={
406
+ items:'*',
407
+ tablename:'t_meter_book',
408
+ condition:condition,
409
+ orderitem:'id'
410
+ }
411
+ let getMeterBooks = await this.$resetpost('rs/sql/singleTable_OrderBy', {data: param}, {resolveMsg: null, rejectMsg: '获取营收参数出错!!!'})
412
+ if (getMeterBooks.data) {
413
+ if(getMeterBooks.data.length >0){
414
+ let rs = [];
415
+ getMeterBooks.data.forEach((item)=>{
416
+ let temp = {
417
+ label:item.f_book_name,
418
+ value:item.id
419
+ };
420
+ rs.push(temp);
421
+
422
+ })
423
+ this.meterbooks = [{label: '全部',value: ''}, ...rs];
424
+ }else{
425
+ this.$set('$refs.paged.$refs.cri.model.f_meter_book',[]);
426
+ this.meterbooks = [{label: '全部',value: ''}];
427
+ }
428
+ }else{
429
+ this.$set('$refs.paged.$refs.cri.model.f_meter_book',[]);
430
+ }
431
+ }else{
432
+ this.$set('$refs.paged.$refs.cri.model.f_meter_book',[]);
433
+ this.meterbooks = [{label: '全部',value: ''}];
434
+ this.initmeterbook();
435
+ }
436
+ },
437
+ async initmeterbook(orgstr){
438
+ if(orgstr == null ){
439
+ orgstr = this.f_filialeid;
440
+ }
441
+ //获取新的抄表册,先去清理所有的抄表册
442
+ this.$GetSaleParam.meterbooks = [];
443
+ //开始加载新的抄表册
444
+ await this.$LoadParams.loadMeterBook(orgstr)
445
+ this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
446
+ },
447
+ async getinputtores () {
448
+ // 获取抄表员
449
+ let rs = []
450
+ if (this.$login.f.f_gasman.length > 0) {
451
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
452
+ let temp = {
453
+ label: this.$login.f.f_gasman[i].name,
454
+ value: this.$login.f.f_gasman[i].name
455
+ }
456
+ rs.push(temp)
457
+ }
458
+ }
459
+ this.inputtores = [{label: '全部', value: ''}, ...rs]
460
+ },
461
+ async updateParams() {
462
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
463
+ this.inputtores = [];
464
+ this.inputtores.push({label: "全部", value: ""})
465
+ this.initSlice(this.f_filialeid)
466
+ if(this.allorgid!=null){
467
+ this.allorgid.forEach((res)=>{
468
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
469
+ })
470
+ }
471
+ this.initParams()
472
+ },
473
+ getotherfooter() {
474
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
475
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
476
+ this.other = [];
477
+ this.footer = [];
478
+ // let exportdata = this.getCondition;
479
+ let otherInData = [];
480
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
481
+ let footerData = [], exportfield = this.getfield;
482
+ footerData.push("合计");
483
+ let self = this;
484
+ for (var field in self.sumsmodel) {
485
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
486
+ }
487
+ this.footer.push(footerData);
488
+ this.other.push(otherInData);
489
+ },
490
+ async getaddress(){
491
+ // await self.$LoadParams.loadMeterBook(self.f_filialeid)
492
+ // self.loadMeterBooks()
493
+ let HttpReset = new HttpResetClass()
494
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
495
+ data: {
496
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
497
+ }
498
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
499
+ let house = [{label: '全部', value: ''}]
500
+ for (let row of data.data){
501
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
502
+ }
503
+ this.residentialArea = house
504
+ },
505
+
506
+
507
+
508
+
509
+ //把数据库查询数据转换为下拉数据
510
+ calculate(rows){
511
+ let data = []
512
+ rows.forEach((row, n) => {
513
+ data[n] = {label: row.f_residential_area, value: row.id}
514
+ })
515
+ return data
516
+ },
517
+
518
+ search(){
519
+ this.$refs.paged.$refs.cri.search()
520
+ },
521
+ cancel() {
522
+ this.show = false
523
+ },
524
+ showmsg(obj){
525
+ this.rowdata=obj
526
+ this.show=true
527
+ },
528
+ userTypeChange () {
529
+ this.gasproperties=[]
530
+ if(this.$refs.paged.$refs.cri.model !==null) {
531
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
532
+
533
+ console.log(this.$refs.paged.$refs.cri.model.f_user_type[0])
534
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
535
+ // this.gasproperties.push({label: '全部', value: ''})
536
+ }
537
+ else{
538
+ this.gasproperties =[{label: '全部', value: ''}]
539
+ }
540
+ },
541
+ initParams() {
542
+ // 初始化气表品牌
543
+ let brandArr = []
544
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
545
+ let temp = {}
546
+ temp.label = item.label
547
+ temp.value = item.value.f_meter_brand
548
+ brandArr.push(temp)
549
+ })
550
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
551
+ //初始化气表价格
552
+ this.prices = this.$MagGetSaleParam.getPrices();
553
+ },
554
+ selfSearch(args) {
555
+ if(this.$refs.paged.$refs.cri.model.startDate == '' || this.$refs.paged.$refs.cri.model.endDate == ''){
556
+ this.$showAlert('请先选择开始时间、结束时间,再进行查询操作!', 'warning', 3000)
557
+ return
558
+ }
559
+ //小区查询条件
560
+ this.area = this.$refs.paged.$refs.cri.model.f_residential_area
561
+ if(this.area.length !== 0){
562
+ let str = JSON.stringify(this.area)
563
+ str = str.replace(/"/g,`'`)
564
+ str = str.replace(/\[/g,``)
565
+ str = str.replace(/\]/g,``)
566
+ //查询多个小区时条件
567
+ args.condition += ` and f_residential_area in ( ${str} )`
568
+ }
569
+ console.log("33333333333333333333")
570
+ let f_orgstr = this.orgCondtionStr
571
+ args.condition = `${args.condition} ` + f_orgstr
572
+ this.model.search(args.condition, args.model)
573
+ console.log("3333333333333")
574
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
575
+ },
576
+ clear() {
577
+ //清空部门和人员
578
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
579
+ //部门和人员变为全选
580
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
581
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
582
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
583
+ this.$refs.paged.$refs.cri.model[key] = []
584
+ })
585
+
586
+ },
587
+ // loadMeterBooks(){
588
+ // this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
589
+ // },
590
+ dealmsg(val) {
591
+ val.model = this.model.model
592
+ this.$dispatch('deal-msg', val)
593
+ },
594
+ show() {
595
+ this.criteriaShow = true
596
+ },
597
+ hidden() {
598
+ this.criteriaShow = !this.criteriaShow
599
+ },
600
+ async getRes(condition,obj) {
601
+ this.orgCondtionStr = condition
602
+
603
+ },
604
+
605
+ },
606
+ events:{
607
+ 'getidcard'(IdCard){
608
+ // console.log(param)
609
+ this.$refs.paged.$refs.cri.model.f_info_idnumber=IdCard.strID
610
+ }
611
+ },
612
+ watch: {
613
+ 'model'(val) {
614
+ },
615
+ async 'orgCondtionStr'(val) {
616
+ this.$refs.paged.$refs.cri.model.f_book_slice_area=[]
617
+ this.$refs.paged.$refs.cri.model.f_inputtor = []
618
+ this.$refs.paged.$refs.cri.model.f_meter_book = []
619
+ this.meterbooks = [{label: '全部',value: ''}];
620
+ if(this.lastorgstr != val){
621
+ this.tempfalg = true;
622
+ this.lastorgstr = val;
623
+ }
624
+ if(this.tempfalg && val != null && val!='' && val.indexOf("(")>-1){
625
+ this.tempfalg = false;
626
+ let a = val.substring(val.indexOf("(")+2)
627
+ await this.initmeterbook(a.substring(0,a.indexOf(")")-1));
628
+ }
629
+ let res = val.match(/'(.*?)'/)
630
+ console.log('正则提取:',res && res[1])
631
+ if (res) {
632
+ this.f_filialeid = res[1]
633
+ if(res.input !=null){
634
+ let resorgid = res.input.substring(res.input.indexOf("'"));
635
+ if(resorgid!= null && resorgid!=''){
636
+ resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
637
+ // resorgid = resorgid.replaceAll("'","");
638
+ resorgid = resorgid.replace(/'/g,"");
639
+ this.allorgid = resorgid.split(",")
640
+ }
641
+ }
642
+ this.updateParams()
643
+ }
644
+ },
645
+ sumsmodel: {
646
+ handler: function (val) {
647
+ this.getotherfooter();
648
+ },
649
+ deep: true
650
+ }
651
+ },
652
+ computed: {
653
+ getPricenames() {
654
+ let f_user_type = this.$refs.paged.model.model.f_user_type;
655
+ let f_gasproperties = this.$refs.paged.model.model.f_gasproperties;
656
+ let pricetype = this.$refs.paged.model.model.pricetype;
657
+ if(this.$refs.paged.model.model !==null) {
658
+ let rs = []
659
+ let priceArr = []
660
+ if (f_user_type.length > 0 && f_gasproperties.length > 0 && pricetype.length >0) {
661
+ let params = {
662
+ f_user_type: f_user_type[0],
663
+ f_gasproperties: f_gasproperties[0],
664
+ f_price_type: pricetype[0],
665
+ filter: this.f_filialeid,
666
+ prices: this.prices
667
+ }
668
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
669
+ let temp = {}
670
+ temp.label = item.label
671
+ temp.value = item.value.f_price_name
672
+ priceArr.push(temp)
673
+ })
674
+ rs = [{label: '全部', value: ''}, ...priceArr]
675
+ }
676
+ if (rs.length === 0) {
677
+ this.$refs.paged.model.model.f_price_name = ''
678
+ }
679
+ return rs
680
+ }
681
+ },
682
+ getCondition() {
683
+ return {
684
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
685
+ endDate: this.$refs.paged.$refs.cri.model.endDate,
686
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr
687
+ }
688
+ },
689
+ getfield() {
690
+ return exportConfig.handBookTwoConfig
691
+ },
692
+ pricetypes() {
693
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
694
+ },
695
+ usertypes() {
696
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
697
+ }
698
+ }
699
+ }
700
+ </script>