manage-client 3.3.244 → 3.3.246

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,764 @@
1
+ <template>
2
+ <div class="flex-row" v-show="!showdetail">
3
+ <div id='app1' class="basic-main" v-show="(!echarts)&&(!isActiveTotalForm)">
4
+ <criteria-paged :model="model" :pager='true' v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" novalidate partial>
7
+ <div class="row">
8
+ <!--<div class="form-group">-->
9
+ <!--<input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_username" placeholder='客户名称'-->
10
+ <!--condition="f_user_name = '{}'" v-next-el='userid' v-el:username-->
11
+ <!--:size="model.f_user_name ? model.f_user_name.length * 2 : 8">-->
12
+ <!--</div>-->
13
+
14
+ <div class="col-sm-2 form-group">
15
+ <label class="font_normal_body">客户编号</label>
16
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
17
+ v-model="model.f_userinfo_code" placeholder='客户编号'
18
+ condition="f_userinfo_code like '%{}%'" v-el:xq v-next-el='userinfocode' v-el:username
19
+ >
20
+ </div>
21
+ <div class="col-sm-2 form-group">
22
+ <label class="font_normal_body">客户名称</label>
23
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
24
+ v-model="model.f_user_name" placeholder='客户名称'
25
+ condition="f_user_name like '%{}%'" v-el:xq v-next-el='username' v-el:username
26
+ >
27
+ </div>
28
+ <div class="col-sm-2 form-group">
29
+ <label class="font_normal_body">客户地址</label>
30
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_area"
31
+ placeholder='地址'
32
+ condition="f_address like '%{}%'" v-el:xq v-next-el='address' v-el:area
33
+ >
34
+ </div>
35
+ <div class="col-sm-2 form-group">
36
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;表号&nbsp;&nbsp;&nbsp;</label>
37
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
38
+ v-model="model.f_meternumber" placeholder='表号'
39
+ condition="f_meternumber like '%{}%'" v-next-el='meternumber' v-el:meternumber
40
+ >
41
+ </div>
42
+ <div style="float:right">
43
+ <button class="button_search button_spacing" @click="search()">查询</button>
44
+ <button class="button_clear button_spacing" @click="clear">清空</button>
45
+ <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
46
+ :field="$parent.$parent.getfield" :sumname="$parent.$parent.sumName"
47
+ :header="$parent.$parent.other"
48
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="webmeter_getAllLoseQuery" template-name='失联分析'
49
+ :choose-col="true"></export-excel>
50
+ <!-- <button class="button_export button_spacing" @click="$parent.$parent.SaveAsFile('lostuserlist')">导出</button>-->
51
+ <!-- <button class="button_export button_spacing" style="width: max-content" @click="$parent.$parent.showTotalForm()">显示汇总</button>-->
52
+ <button class="button_search button_spacing" @click="$parent.$parent.showEcharts()">显示图表</button>
53
+ <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>
54
+ </div>
55
+ </div>
56
+ <div class="row" v-show="$parent.$parent.criteriaShow">
57
+ <div class="col-sm-2 form-group">
58
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp;</label>
59
+ <right-tree @re-res="$parent.$parent.getorg" width="60%"
60
+ :initresid='$parent.$parent.org'></right-tree>
61
+ </div>
62
+ <div class="col-sm-2 form-group">
63
+ <label class="font_normal_body" for="dep" >部&emsp;&emsp;门</label>
64
+ <res-select id="dep" restype='department' style="width: 60%"
65
+ is-mul="false"
66
+ @res-select="$parent.$parent.getdep"
67
+ :parentresid="$parent.$parent.depresid"
68
+ :initresid='$parent.$parent.depid' >
69
+ </res-select>
70
+
71
+ </div>
72
+ <div class="col-sm-2 form-group">
73
+ <label class="font_normal_body">客户类型</label>
74
+ <v-select style="width:60%" id="f_user_type"
75
+ v-model="model.f_user_type"
76
+ placeholder='客户类型'
77
+ :value.sync="model.f_user_type"
78
+ @change="$parent.$parent.userTypeChange()"
79
+ :options='$parent.$parent.usertypes'
80
+ condition="f_user_type = '{}'"
81
+ close-on-select>
82
+ </v-select>
83
+ </div>
84
+ <div class="col-sm-2 form-group">
85
+ <label class="font_normal_body">用气性质</label>
86
+ <v-select style="width:60%" id="f_gasproperties"
87
+ v-model="model.f_gasproperties"
88
+ placeholder='用气性质'
89
+ :value.sync="model.f_gasproperties"
90
+ :options='$parent.$parent.gasproperties'
91
+ condition="f_gasproperties = '{}'"
92
+ close-on-select>
93
+ </v-select>
94
+ </div>
95
+ <div class="col-sm-2 form-group">
96
+ <label class="font_normal_body">气表品牌</label>
97
+ <v-select
98
+ placeholder='气表品牌'
99
+ :value.sync="model.f_meter_brand"
100
+ v-model="model.f_meter_brand"
101
+ :options='$parent.$parent.meterbrands'
102
+ close-on-select
103
+ condition="f_meter_brand='{}'">
104
+ </v-select>
105
+ </div>
106
+ <div class="col-sm-2 form-group" >
107
+ <label class="font_normal_body">气表型号</label>
108
+ <v-select
109
+ placeholder='气表型号'
110
+ :value.sync="model.f_meter_style"
111
+ v-model="model.f_meter_style"
112
+ :options='$parent.$parent.meterstyle[model.f_meter_brand]'
113
+ close-on-select
114
+ condition="f_meter_style='{}'">
115
+ </v-select>
116
+ </div>
117
+ <div class="col-sm-2 form-group">
118
+ <label class="font_normal_body">用户状态</label>
119
+ <v-select
120
+ placeholder='用户状态'
121
+ value-single
122
+ style="width:60%"
123
+ :value.sync="model.f_user_state"
124
+ v-model="model.f_user_state"
125
+ :options='$parent.$parent.userstate'
126
+ close-on-select condition="f_user_state ='{}'">
127
+ </v-select>
128
+ </div>
129
+ <!--<div class="col-sm-2 form-group">-->
130
+ <!--<label class="font_normal_body">最新状态</label>-->
131
+ <!-- <v-select style="width:60%" id="f_state"-->
132
+ <!--v-model="model.f_state"-->
133
+ <!--placeholder='最新状态'-->
134
+ <!--:value.sync="model.f_state"-->
135
+ <!--:options='$parent.$parent.getstate'-->
136
+ <!--condition="f_state = '{}'"-->
137
+ <!--close-on-select>-->
138
+ <!--</v-select>-->
139
+ <!--</div>-->
140
+ <div class="col-sm-2 form-group">
141
+ <label class="font_normal_body">开始时间</label>
142
+ <datepicker style="width:60%" id="startdate" placeholder="开始时间"
143
+ v-model="model.startDate"
144
+ :value.sync="model.startDate"
145
+ :disabled-days-of-Week="[]"
146
+ :format="'yyyy-MM-dd HH:mm:ss'"
147
+
148
+ :show-reset-button="reset">
149
+ </datepicker>
150
+ </div>
151
+ <div class="col-sm-2 form-group">
152
+ <label class="font_normal_body">结束时间</label>
153
+ <datepicker style="width:60%" id="enddate" placeholder="结束日期"
154
+ v-model="model.endDate"
155
+ :value.sync="model.endDate"
156
+ :disabled-days-of-Week="[]"
157
+ :format="'yyyy-MM-dd HH:mm:ss'"
158
+
159
+ :show-reset-button="reset">
160
+ </datepicker>
161
+ </div>
162
+
163
+
164
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
165
+ <label class="font_normal_body">最长失联</label>
166
+ <div class="row">
167
+ <input type="text" style="width:27%" class="input_search" v-model="model.max_interval_day1"
168
+ condition="max_interval_day >= {} " placeholder="">
169
+ <label class="font_normal_body"> &nbsp;≤ x ≤ </label>
170
+ <input type="text" style="width:27%" class="input_search" v-model="model.max_interval_day2"
171
+ condition="max_interval_day <= {} " placeholder="">
172
+ </div>
173
+ </div>
174
+
175
+
176
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
177
+ <label class="font_normal_body">合计失联</label>
178
+ <div class="row">
179
+ <input type="text" style="width:27%" class="input_search" v-model="model.SLdays1"
180
+ condition="SLdays >= {} " placeholder="">
181
+ <label class="font_normal_body">&nbsp; ≤ x ≤ </label>
182
+ <input type="text" style="width:27%" class="input_search" v-model="model.SLdays2"
183
+ condition="SLdays <= {} " placeholder="">
184
+ </div>
185
+ </div>
186
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
187
+ <label class="font_normal_body">最新失联</label>
188
+ <div class="row">
189
+ <input type="text" style="width:27%" class="input_search" v-model="model.new_days1"
190
+ condition="new_days >= {} " placeholder="">
191
+ <label class="font_normal_body">&nbsp; ≤ x ≤ </label>
192
+ <input type="text" style="width:27%" class="input_search" v-model="model.new_days2"
193
+ condition="new_days <= {} " placeholder="">
194
+ </div>
195
+ </div>
196
+ <div class="col-sm-2 form-group">
197
+ <label class="font_normal_body">是否通气</label>
198
+ <v-select
199
+ placeholder='是否通气'
200
+ style="width:60%"
201
+ :value.sync="model.f_address_state"
202
+ v-model="model.f_address_state"
203
+ :options='$parent.$parent.addressState'
204
+ close-on-select condition="f_address_state = '{}'">
205
+ </v-select>
206
+ </div>
207
+
208
+ <!--<div class="col-sm-2 form-group">-->
209
+ <!--<label class="font_normal_body">最新失联</label>-->
210
+ <!--<input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.new_days1" placeholder='天数大于等于'-->
211
+ <!--condition="new_days >= {}" v-next-el='new_days' v-el:new_days-->
212
+ <!--&gt;-->
213
+ <!--</div>-->
214
+ <!--<div class="col-sm-2 form-group">-->
215
+ <!--<label class="font_normal_body" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>-->
216
+ <!--<input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.new_days2" placeholder='天数小于等于'-->
217
+ <!--condition="new_days <= {}" v-next-el='new_days' v-el:new_days-->
218
+ <!--&gt;-->
219
+ <!--</div>-->
220
+ </div>
221
+
222
+
223
+
224
+ <!--:top='40' :left='60' :right='40' :bottom='60'-->
225
+ <!--:thead='"<th>序号</th>\n"+-->
226
+ <!--"<th>档案编号</th>" +-->
227
+ <!--" <th>档案标识</th>"+-->
228
+ <!--"<th>客户名称</th>"+-->
229
+ <!--"<th>表号</th"+-->
230
+ <!--"<th>表具类型</th>"+-->
231
+ <!--"<th>客户类型</th>"+-->
232
+ <!--"<th>区域</th>"+-->
233
+ <!--"<th>小区</th>"+-->
234
+ <!--"<th>地址</th>"+-->
235
+ <!--"<th>用气气量</th>"+-->
236
+ <!--"<th>用气金额</th>"-->
237
+ <!--+"<th>用气价格</th>"-->
238
+ <!--+"<th>时间</th>"-->
239
+ <!--+"<th>所属机构</th>"'-->
240
+ <!--:fields='["$index+1","f_username","f_meternumber","f_usertype","f_save_money","f_operate_status","f_close_reason","f_area","f_districtname","f_address","id","yytdepa"]'>-->
241
+ <!--</print-table>-->
242
+ <!--<export-excel :data="{orderitem: 'lastinputdate desc', condition: '1=1'}"-->
243
+ <!--:field="{f_username: '客户名称', f_meternumber: '表号',f_usertype:'客户类型',f_save_money:'剩余金额',-->
244
+ <!--f_operate_status:'状态',f_close_reason:'关阀原因',f_area:'区域',f_districtname:'小区', f_address: '地址',id:'档案编号',yytdepa:'所属机构'}"-->
245
+ <!--sqlurl="api/af-revenue/sql/getUserGas"></export-excel>-->
246
+ </div>
247
+ </criteria>
248
+ <data-grid id="lostuserlist" :model="model" partial='list' v-ref:grid class="list_area table_sy">
249
+ <template partial='head'>
250
+ <tr>
251
+ <th style="text-align:center">
252
+ <nobr>序号</nobr>
253
+ </th>
254
+ <th style="text-align:center">
255
+ <nobr>客户编号</nobr>
256
+ </th>
257
+ <th style="text-align:center">
258
+ <nobr>客户名称</nobr>
259
+ </th>
260
+ <th style="text-align:center">
261
+ <nobr>客户地址</nobr>
262
+ </th>
263
+ <th style="text-align:center">
264
+ <nobr>客户类型</nobr>
265
+ </th>
266
+ <th style="text-align:center">
267
+ <nobr>用气性质</nobr>
268
+ </th>
269
+ <th style="text-align:center">
270
+ <nobr>表号</nobr>
271
+ </th>
272
+ <th style="text-align:center">
273
+ <nobr>启用日期</nobr>
274
+ </th>
275
+
276
+ <th style="text-align:center">
277
+ <nobr>应报天数</nobr>
278
+ </th>
279
+ <th style="text-align:center">
280
+ <nobr>实报天数</nobr>
281
+ </th>
282
+ <th style="text-align:center">
283
+ <nobr>最长失联天数</nobr>
284
+ </th>
285
+ <th style="text-align:center">
286
+ <nobr>累计失联天数</nobr>
287
+ </th>
288
+ <th style="text-align:center">
289
+ <nobr>最新失联天数</nobr>
290
+ </th>
291
+ <th style="text-align:center">
292
+ <nobr>气表厂家</nobr>
293
+ </th>
294
+ <th style="text-align:center" >
295
+ <nobr>气表型号</nobr>
296
+ </th>
297
+ <th style="text-align:center" >
298
+ <nobr>用户状态</nobr>
299
+ </th>
300
+ <th style="text-align:center" >
301
+ <nobr>组织机构</nobr>
302
+ </th>
303
+ <th style="text-align:center" >
304
+ <nobr>部门</nobr>
305
+ </th>
306
+
307
+ </tr>
308
+
309
+ </template>
310
+ <template partial='body'>
311
+ <td style="text-align:center">{{$index+1}}</td>
312
+ <!--<td style="text-align:center">{{row.f_userfiles_id}}</td>-->
313
+ <td style="text-align: center;"><nobr>
314
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
315
+ </nobr> </td>
316
+ <td style="text-align:center"><nobr>{{row.f_user_name}}</nobr></td>
317
+ <td><nobr>{{row.f_address}}</nobr></td>
318
+ <td style="text-align:center">{{row.f_user_type}}</td>
319
+ <td style="text-align:center">{{row.f_gasproperties}}</td>
320
+ <td style="text-align:center"><nobr>{{row.f_meternumber}}</nobr></td>
321
+ <td style="text-align:center"><nobr>{{row.f_startuse_date}}</nobr></td>
322
+
323
+ <td style="text-align:center">{{row.ybdays}}</td>
324
+ <td style="text-align:center">{{row.sbdays}}</td>
325
+ <td style="text-align:center">
326
+ <nobr>{{row.max_interval_day}}</nobr>
327
+ </td>
328
+ <td style="text-align:center">
329
+ <nobr>{{row.sldays}}</nobr>
330
+ </td>
331
+ <td style="text-align:center">
332
+ <nobr>{{row.new_days}}</nobr>
333
+ </td>
334
+ <td style="text-align:center">
335
+ <nobr>{{row.f_meter_brand}}</nobr>
336
+ </td>
337
+ <td style="text-align:center">
338
+ <nobr>{{row.f_meter_style}}</nobr>
339
+ </td>
340
+ <td style="text-align:center">
341
+ <nobr>{{row.f_user_state}}</nobr>
342
+ </td>
343
+ <td style="text-align:center">
344
+ <nobr>{{row.f_orgname}}</nobr>
345
+ </td>
346
+ <td style="text-align:center">
347
+ <nobr>{{row.f_depname}}</nobr>
348
+ </td>
349
+
350
+ </template>
351
+ </data-grid>
352
+ </criteria-paged>
353
+ </div>
354
+ <div class="flex-row" v-show="echarts" style="width: 100%;height: 90%;">
355
+ <lost-contact-echarts :groupname="groupname[0]" :condition = "condition" :startdate="startDate"
356
+ :enddate="endDate" :echarts="echarts"></lost-contact-echarts>
357
+ </div>
358
+ <div class="span" v-show="isActiveTotalForm" style="width: 100%;height: 90%;">
359
+ <lost-contact-eform :condition="condition"
360
+ ></lost-contact-eform>
361
+ </div>
362
+ </div>
363
+
364
+ <!-- <div v-show="isActiveTotalForm" style="height: 40px;width: 100%;">-->
365
+ <!-- <button class="button_search button_spacing" @click="notShowTotalForm()">隐藏汇总</button>-->
366
+ <!-- </div>-->
367
+ <!-- <div class="flex-row" v-show="isActiveTotalForm" style="width: 100%;height: 90%;">-->
368
+ <!-- <lost-contact-eform :condition="model.condition" :startdate="startDate"-->
369
+ <!-- :enddate="endDate"></lost-contact-eform>-->
370
+ <!-- </div>-->
371
+ <div class="flex-row" style="width:99%;height:98%;margin-bottom:0px" v-if="showdetail">
372
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
373
+ </div>
374
+ </template>
375
+
376
+ <script>
377
+ import {PagedList} from 'vue-client'
378
+ import UserGasEcharts from '../../components/webmeter/DrillData/UserGasEcharts'
379
+ import * as Util from '../../Util'
380
+ import plugin from 'system-clients/src/plugins/GetLoginInfoService'
381
+ import {HttpResetClass} from 'vue-client'
382
+ import GetSaleParam from "../../stores/MagGetSaleParams";
383
+ import MagLoadParams from "../../stores/MagLoadParams";
384
+ let readySomething = async function (self) {
385
+
386
+ await self.$MagLoadParams.loadParam()
387
+ self.initParams()
388
+ let year = new Date().getFullYear()
389
+ self.$refs.paged.$refs.cri.model.startDate = year+'-01-01 00:00:00'
390
+ // self.$refs.paged.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
391
+ self.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
392
+ self.$refs.paged.$refs.cri.model.f_user_state='正常'
393
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums;
394
+ }
395
+ export default {
396
+ title: '失联分析',
397
+ props: ['data'],
398
+ components: {UserGasEcharts},
399
+ data() {
400
+ return {
401
+ model: new PagedList('api/af-revenue/sql/webmeter_getAllLoseQuery', 20, {
402
+ startDate: 'this.model.startDate',
403
+ endDate: 'this.model.endDate'
404
+ }),
405
+ getfield:{
406
+ "f_userinfo_code":"客户编号",
407
+ "f_user_name":"客户名称",
408
+ "f_residential_area":"小区",
409
+ "f_address":"客户地址",
410
+ "f_user_type":"客户类型",
411
+ "f_gasproperties":"用气性质",
412
+ "f_meternumber":"表号",
413
+ "f_startuse_date":"启用日期",
414
+ "ybdays":"应报天数",
415
+ "sbdays":"实报天数",
416
+ "max_interval_day":"最长失联天数",
417
+ "sldays":"累计失联天数",
418
+ "new_days":"最新失联天数",
419
+ "f_meter_brand":"气表厂家",
420
+ "f_orgname":"组织机构",
421
+ "f_depname":"部门"},
422
+ reportStr: null,
423
+ show: false,
424
+ showdetail:false,
425
+ rowdata:{},
426
+ other: [],
427
+ sumsmodel: {},
428
+ startDate: '',
429
+ endDate: '',
430
+ criteriaShow:false,
431
+ outlets: [],
432
+ depresid: [],
433
+ queryData: {
434
+ f_orgid: [],
435
+ f_depid: [],
436
+ f_operatorid: [],
437
+ f_payment: []
438
+ },
439
+ gasproperties:[{label: '全部', value: ''}],
440
+ operator: [],
441
+ WarningType: [
442
+ {label: '全部', value: ''}
443
+ ],
444
+ Warningstyles: [
445
+ {label: '全部', value: ''}
446
+ ],
447
+ styles:false,
448
+ filename: '',
449
+ orgCondtionStr: ` and f_orgid = ${this.$login.f.orgid}`,
450
+ echarts: false,
451
+ orgid:[this.$login.f.orgid],
452
+ searchshow: false,
453
+ isActiveTotalForm: false,
454
+ condition: '1=1',
455
+ groupname: ['max_days_type'],
456
+ meterbrands: [],
457
+ meterstyle:{},
458
+ getgroupname: [
459
+ {label: '客户类型', value: 'f_user_type'},
460
+ {label: '用气性质', value: 'f_gasproperties'},
461
+ {label: '分公司', value: 'f_orgname'},
462
+ {label: '最长失联天数', value: 'max_days_type'},
463
+ {label: '合计失联天数', value: 'all_days_type'}
464
+ ],
465
+ org:[this.$login.f.orgid]
466
+
467
+ }
468
+ },
469
+ ready() {
470
+ readySomething(this)
471
+ this.getMeterTypeAndBrand('f_meter_brand', '1=1')
472
+ },
473
+ methods: {
474
+ getotherfooter() {
475
+ this.other = [];
476
+
477
+ let firstLine = [`导出时间: ${this.$login.toStandardTimeString()}`];
478
+
479
+
480
+ let secondLine = [
481
+ `开始时间: ${this.$refs.paged.$refs.cri.model.startDate}`,
482
+ `结束时间: ${this.$refs.paged.$refs.cri.model.endDate}`
483
+ ];
484
+
485
+ this.other.push(firstLine);
486
+ this.other.push(secondLine);
487
+
488
+ console.log('Header Data:', this.other);
489
+ },
490
+ getMeterType() {
491
+ this.Warningstyle = [{label: '全部', value: ''}]
492
+ this.styles = false
493
+ let f_meter_brand = this.$refs.paged.$refs.cri.model.f_meter_brand
494
+ this.getMeterTypeAndBrand('f_meter_style', `f_meter_brand='${f_meter_brand}'`)
495
+ },
496
+ getMeterTypeAndBrand(groupname, condition) {
497
+ condition = `${condition} and ui.f_orgid like '${this.$login.f.orgid}%'`
498
+ let self = this
499
+ let load = new HttpResetClass()
500
+ load.load('POST', 'api/af-revenue/sql/getMeterStyleAndBrand1', {
501
+ data: {
502
+ condition: condition,
503
+ groupname: groupname
504
+ }
505
+ }, {warnMsg: null, resolveMsg: null}).then((res) => {
506
+ for (let i = 0; i < res.data.length; i++) {
507
+ if (groupname == 'f_meter_brand') {
508
+ let dr = {}
509
+ dr.label = res.data[i].f_meter_brand
510
+ dr.value = res.data[i].f_meter_brand
511
+ //气表品牌
512
+ // self.WarningType.push(dr)
513
+ } else if (groupname == 'f_meter_style') {
514
+ self.Warningstyle= [
515
+ {label: '全部', value: ''}
516
+ ],
517
+ self.$refs.paged.$refs.cri.model.f_meter_style=''
518
+ let dr = {}
519
+ dr.label = res.data[i].f_meter_style
520
+ dr.value = res.data[i].f_meter_style
521
+ //气表类型
522
+ self.Warningstyle.push(dr)
523
+ }
524
+ }
525
+ if (self.Warningstyle.length > 1) {
526
+ self.showMeterStyle()
527
+ }
528
+ })
529
+
530
+ },
531
+ showMeterStyle() {
532
+ this.styles = true
533
+ },
534
+ userTypeChange () {
535
+ this.gasproperties=[{label: '全部', value: ''}]
536
+ if(this.$refs.paged.$refs.cri.model && this.$refs.paged.$refs.cri.model.f_user_type) {
537
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
538
+
539
+ console.log(this.$refs.paged.$refs.cri.model.f_user_type[0])
540
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
541
+ // this.gasproperties.push({label: '全部', value: ''})
542
+ }
543
+ else{
544
+ this.gasproperties =[{label: '全部', value: ''}]
545
+ }
546
+ },
547
+ hidden(){
548
+ this.criteriaShow = !this.criteriaShow
549
+ },
550
+ clickshow() {
551
+ this.searchshow = !this.searchshow
552
+ },
553
+ showmsg(obj){
554
+ this.rowdata=obj
555
+ this.showdetail = true
556
+ },
557
+ cancel() {
558
+ this.showdetail = false
559
+ },
560
+ initParams () {
561
+ // 初始化气表品牌
562
+ let brandArr = []
563
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
564
+ if(item.value.f_meter_type==='物联网表'){
565
+ let temp = {}
566
+ temp.label = item.label
567
+ temp.value = item.value.f_meter_brand
568
+ brandArr.push(temp)
569
+
570
+ let styleArr = [{label: '全部', value: ''}]
571
+ for (let row of item.value.gasmodel) {
572
+ styleArr.push({label: row.label,value: row.value.f_meter_style})
573
+ }
574
+ this.meterstyle[temp.value] = styleArr
575
+ }
576
+
577
+ })
578
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
579
+ },
580
+ search(args) {
581
+ this.startDate = this.$refs.paged.$refs.cri.model.startDate
582
+ this.endDate = this.$refs.paged.$refs.cri.model.endDate
583
+ if (this.endDate == '' || this.startDate == '') {
584
+ return this.$showMessage("时间区间的开始和结束时间不能为空!")
585
+ }
586
+ this.condition = args.condition = this.$refs.paged.$refs.cri.condition + `${this.orgCondtionStr}`
587
+ console.log( args.model);
588
+ this.model.search(args.condition, args.model)
589
+ },
590
+ getorg(obj) {
591
+ if (obj.resids.length>0) {
592
+ this.updateParams(obj.resids[0])
593
+ this.depresid = obj.resids
594
+ this.orgCondtionStr = " and f_orgid in " + plugin.convertToIn(obj.resids)
595
+ }else
596
+ {
597
+ this.depresid = obj.resids
598
+ this.orgCondtionStr = " and f_orgid = " + this.$login.f.orgid
599
+ }
600
+ },
601
+ async updateParams (f_filialeid) {
602
+ let http = new HttpResetClass()
603
+
604
+ if (GetSaleParam.gasbrands.length === 0 && GetSaleParam.prices.length === 0 && GetSaleParam.adjustables.length === 0 ) {
605
+ let getParams = await http.load('POST','api/af-revenue/logic/getSaleInitData', {data: {f_orgid: f_filialeid?f_filialeid: Vue.$login.f.orgid}}, {resolveMsg: null, rejectMsg: '获取营收参数出错!!!'})
606
+ if (getParams.data && getParams.data.data) {
607
+ MagLoadParams.organizeData(getParams.data.data)
608
+ }else if (getParams.data) {
609
+ MagLoadParams.organizeData(getParams.data)
610
+ }
611
+ } else {
612
+ GetSaleParam.gasbrands = []
613
+ GetSaleParam.prices = []
614
+ GetSaleParam.adjustables = []
615
+ let getParams = await http.load('POST','api/af-revenue/logic/getSaleInitData', {data: {f_orgid: f_filialeid ? f_filialeid: Vue.$login.f.orgid}}, {resolveMsg: null, rejectMsg: '获取营收参数出错!!!'})
616
+ if (getParams.data && getParams.data.data) {
617
+ MagLoadParams.organizeData(getParams.data.data)
618
+ }else if (getParams.data) {
619
+ MagLoadParams.organizeData(getParams.data)
620
+ }
621
+ }
622
+ this.initParams()
623
+ },
624
+ getdep(obj, val) {
625
+ this.orgCondtionStr = ""
626
+
627
+ this.depname = val[0]
628
+ this.userresid = obj
629
+ this.queryData.f_depid = obj
630
+ console.log(this.queryData.f_depid)
631
+ if (obj.length > 0) {
632
+ this.orgCondtionStr += " and f_depid in " + plugin.convertToIn(obj)
633
+ }
634
+ if (this.depresid && this.depresid.length > 0) {
635
+ this.orgCondtionStr = " and f_orgid in " + plugin.convertToIn(this.depresid) + this.orgCondtionStr
636
+ } else {
637
+ this.orgCondtionStr = " and f_orgid = " + this.$login.f.orgid + this.orgCondtionStr
638
+ }
639
+
640
+ console.log(this.orgCondtionStr);
641
+ },
642
+ // SaveAsFile(str) {
643
+ // this.$showMessage('您是否需要导出本页数据?', ['confirm', 'cancel']).then((res) => {
644
+ // if (res === 'confirm') {
645
+ // let style = '<style>' +
646
+ // 'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;} .tdcenter{text-align: center;}</style>';
647
+ // let strHtml = style + document.getElementById(str).innerHTML;
648
+ // console.log(strHtml);
649
+ // let LODOP = getLodop();
650
+ // LODOP.PRINT_INIT('');
651
+ // LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
652
+ // LODOP.SAVE_TO_FILE('失联分析.xls')
653
+ // }
654
+ // })
655
+ // },
656
+ clearmsg() {
657
+ this.$refs.paged.$refs.cri.model = {}
658
+ },
659
+
660
+
661
+ close() {
662
+ this.show = false
663
+ },
664
+ // 显示柱状图
665
+ showEcharts() {
666
+ this.echarts = true
667
+ this.isActiveTotalForm = false
668
+ },
669
+ notShowTotalForm() {
670
+ this.echarts = false
671
+ this.isActiveTotalForm = false
672
+ },
673
+ // 不显示柱状图
674
+ notShowEcharts() {
675
+ this.echarts = false
676
+ this.isActiveTotalForm = false
677
+ },
678
+ // 显示汇总数据表格
679
+ showTotalForm() {
680
+ this.echarts = false
681
+ this.isActiveTotalForm = true
682
+ }
683
+ },
684
+ watch: {
685
+ 'data'(val) {
686
+ if (val.f_files_path) {
687
+ this.getFileContent(val.f_files_path)
688
+ } else {
689
+ this.reportStr = null
690
+ }
691
+ },
692
+ sumsmodel:{
693
+ handler: function(val) {
694
+ this.getotherfooter();
695
+ },
696
+ deep: true
697
+ },
698
+ },
699
+ computed: {
700
+ // usertypes () {
701
+ // return this.$appdate.getParams("客户类型")
702
+ // },
703
+ getCondition() {
704
+ let condition=this.$refs.paged.$refs.cri.condition + this.orgCondtionStr
705
+ return {
706
+ condition: condition ,
707
+ startDate:`${this.$refs.paged.$refs.cri.model.startDate}`,
708
+ endDate:`${this.$refs.paged.$refs.cri.model.endDate}`
709
+ }
710
+
711
+ },
712
+ usertypes() {
713
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
714
+ },
715
+ f_outlets() {
716
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('网点查询用')]
717
+ },
718
+ valveStatus() {
719
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
720
+ },
721
+ getstate() {
722
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('最新状态')]
723
+ },
724
+ userstate() {
725
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')]
726
+ },
727
+ addressState() {
728
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('是否通气')]
729
+ }
730
+ }
731
+ }
732
+ </script>
733
+ <style>
734
+ .form-input-group label {
735
+ text-align: right;
736
+ width: auto;
737
+ }
738
+
739
+ .mystyle {
740
+ float: right;
741
+ padding-right: 10%;
742
+ }
743
+
744
+ .mystyle1 {
745
+ padding-top: 10px;
746
+
747
+ }
748
+
749
+ .mystyle2 {
750
+ width: 100%;
751
+ height: 35px;
752
+ /*background: #00A3F0;*/
753
+ padding-left: 15px;
754
+ float: left;
755
+ }
756
+
757
+ .datapanel {
758
+ color: #333;
759
+ background-color: white;
760
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
761
+ padding: 10px 30px 10px 30px;
762
+ border-radius: 15px;
763
+ }
764
+ </style>