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