manage-client 3.3.82 → 3.3.83-wn

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.
@@ -1,623 +1,641 @@
1
- <template>
2
- <div class="flex-row" id="unit" v-show="(!echarts)&&(!isActiveTotalForm)">
3
- <div class="basic-main" @keyup.enter="search">
4
- <div class="flex">
5
- <div class="flex" style="flex:1;">
6
- <criteria-paged :model="model" :pager='true' v-ref:paged>
7
- <criteria @condition-changed='$parent.search' partial='criteria' v-ref:cri>
8
- <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
9
- <div class="row" width="100%">
10
- <div class="col-sm-2 form-group">
11
- <label class="font_normal_body">客户编号</label>
12
- <input style="width:60%" class="input_search" condition="f_userinfo_code like '%{}%'" placeholder='客户编号' type="text"
13
- v-el:meternumber v-model="model.f_userinfo_code" v-next-el='f_userinfo_code'
14
- >
15
- </div>
16
- <div class="col-sm-2 form-group">
17
- <label class="font_normal_body">客户名称</label>
18
- <input style="width:60%" class="input_search" condition="f_user_name = '{}'" placeholder='客户名称' type="text"
19
- v-el:username v-model="model.f_username" v-next-el='userid'>
20
- </div>
21
- <div class="col-sm-2 form-group">
22
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
23
- <v-select :value.sync="model.f_residential_area"
24
- class="select_list select"
25
- v-model="model.f_residential_area"
26
- style="width: 60%"
27
- multiple
28
- condition="f_residential_area in {}"
29
- :options='$parent.$parent.residentialArea' placeholder='选择小区'
30
- close-on-select>
31
-
32
- </v-select>
33
- </div>
34
- <div class="col-sm-2 form-group">
35
- <label class="font_normal_body">用气地址</label>
36
- <input style="width:60%" class="input_search" condition="f_address like '%{}%'" placeholder='用气地址' type="text"
37
- v-el:area v-el:xq v-model="model.f_address" v-next-el='address'
38
- >
39
- </div>
40
- <div class="col-sm-4 form-group button-range">
41
- <button @click="search()" class="button_search button_spacing">查询</button>
42
- <button @click="$parent.$parent.clearmsg" class="button_clear button_spacing">清空</button>
43
- <export-excel :data="$parent.$parent.getCondition()"
44
- :field="$parent.$parent.getfield"
45
- sqlurl="rs/logic/exportfile" sql-name="webmeter_getUserGasList" template-name='用气分析'
46
- v-ref:exports
47
- :choose-col="true"></export-excel>
48
- <button class="button_export button_spacing" style="width: max-content" @click="$parent.$parent.showTotalForm()" >显示汇总</button>
49
- <button class="button_export button_spacing" @click="$parent.$parent.showEcharts()">显示图表</button>
50
- <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>
51
- </div>
52
- </div>
53
- <div class="row" v-show="$parent.$parent.criteriaShow">
54
-
55
- <!--<div class="col-sm-2 form-group" >
56
- <label class="font_normal_body">用气属性</label>
57
- <v-select
58
- placeholder='用气属性'
59
- value-single="true"
60
- :value.sync="model.f_gasproperties2"
61
- v-model="model.f_gasproperties2"
62
- :options='$parent.$parent.Gasproperties2'
63
- close-on-select condition="uf.f_gasproperties2 {}">
64
- </v-select>
65
- </div>-->
66
- <!-- <res-select-group :show-component="['company']" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>-->
67
- <div class="col-sm-2 form-group">
68
- <label class="font_normal_body">表&emsp;&emsp;号</label>
69
- <input style="width:60%" class="input_search" condition="f_meternumber = '{}'" placeholder='表号' type="text"
70
- v-el:meternumber v-model="model.f_meternumber" v-next-el='meternumber'
71
- >
72
- </div>
73
- <div class="col-sm-2">
74
- <label class="font_normal_body">公&emsp;&emsp;司</label>
75
- <right-tree @re-res="$parent.$parent.getorg"
76
- :initresid='$parent.$parent.orgid'></right-tree>
77
- </div>
78
- <!-- <div class="col-sm-2 form-group">-->
79
- <!-- <label class="font_normal_body">组织机构</label>-->
80
- <!-- <res-select :initresid="$parent.$parent.orgid"-->
81
- <!-- style="width:60%"-->
82
- <!-- @res-select="$parent.$parent.getRes"-->
83
- <!-- restype='organization'>-->
84
- <!-- </res-select>-->
85
- <!-- </div>-->
86
-
87
- <div class="col-sm-2 form-group">
88
- <label class="font_normal_body">客户类型</label>
89
- <v-select :options='$parent.$parent.Gasusertype'
90
- :value.sync="model.f_user_type"
91
- close-on-select
92
- style="width:60%"
93
- condition="f_user_type = '{}'"
94
- id="f_user_type"
95
- placeholder='客户类型'
96
- v-model="model.f_user_type"
97
- value-single="true">
98
- </v-select>
99
- </div>
100
- <div class="col-sm-2 form-group">
101
- <label class="font_normal_body">用气性质</label>
102
- <v-select :options='$parent.$parent.Gasproperties'
103
- :value.sync="model.f_gasproperties"
104
- close-on-select
105
- condition="f_gasproperties = '{}'"
106
- id="f_gasproperties"
107
- placeholder='用气性质'
108
- style="width:60%"
109
- v-model="model.f_gasproperties"
110
- value-single="true">
111
- </v-select>
112
- </div>
113
- <div class="col-sm-2 form-group">
114
- <label class="font_normal_body">气表品牌</label>
115
- <v-select :value.sync="model.f_meter_brand"
116
- v-model="model.f_meter_brand"
117
- :options='$parent.$parent.meterbrands' placeholder='请选择'
118
- condition="f_meter_brand = '{}'"
119
- close-on-select></v-select>
120
- </div>
121
- <div class="col-sm-2 form-group">
122
- <label class="font_normal_body">时间区间</label>
123
- <datepicker :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'"
124
- :show-reset-button="reset"
125
- :value.sync="$parent.$parent.startDate1"
126
- id="startDate"
127
- style="width:60%"
128
- placeholder="开始时间"
129
- v-model="$parent.$parent.startDate1">
130
- </datepicker>
131
- </div>
132
- <div class="col-sm-2 form-group">
133
- <label class="font_normal_body" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
134
- <datepicker :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'"
135
- :show-reset-button="reset"
136
- :value.sync="$parent.$parent.endDate1"
137
- style="width:60%"
138
- id="endDate"
139
- placeholder="结束日期"
140
- v-model="$parent.$parent.endDate1">
141
- </datepicker>
142
- </div>
143
- <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
144
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;用气量&nbsp;</label>
145
- <div class="row">
146
- <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount1"
147
- condition="f_oughtamount >= {} " placeholder="">
148
- <label class="font_normal_body"> ≤ x ≤ </label>
149
- <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount2"
150
- condition="f_oughtamount <= {} " placeholder="">
151
- </div>
152
- </div>
153
- <!--<div class="col-sm-2 form-group">
154
- <label class="font_normal_body">用&nbsp;气&nbsp;量&nbsp;</label>
155
- <input type="text" style="width:60%" class="input_search"
156
- v-model="model.f_start_oughtamount" placeholder='起始气量'
157
- >
158
- </div>
159
- <div class="col-sm-2 form-group">
160
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
161
- <input type="text" style="width:60%" class="input_search"
162
- v-model="model.f_end_oughtamount" placeholder='结束气量'
163
- >
164
- </div>-->
165
- <div class="col-sm-2 form-group">
166
- <label class="font_normal_body">壁&ensp;挂&ensp;炉</label>
167
- <v-select id="f_meter_brand"
168
- v-model="model.f_usetype"
169
- placeholder=''
170
- :value.sync="model.f_usetype"
171
- :options='$parent.$parent.usetypes'
172
- condition="f_usetype {}" :search="false"
173
- close-on-select style="width: 60%">
174
- </v-select>
175
- </div>
176
- <div class="col-sm-2 form-group">
177
- <label class="font_normal_body">房屋类型</label>
178
- <v-select :value.sync="model.f_house_type" v-model="model.f_house_type"
179
- :options='$parent.$parent.houseTypes' placeholder='请选择'
180
- close-on-select
181
- condition="f_house_type = '{}'"></v-select>
182
- </div>
183
- <div class="col-sm-2 form-group">
184
- <label class="font_normal_body">安装位置</label>
185
- <v-select :value.sync="model.f_position" v-model="model.f_position"
186
- :options='$parent.$parent.positions' placeholder='请选择'
187
- condition="f_position = '{}'"
188
- close-on-select></v-select>
189
- </div>
190
- <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
191
- <label class="font_normal_body">期末结余</label>
192
- <div class="row">
193
- <input type="text" style="width:27%" class="input_search" v-model="model.f_curbalance1"
194
- condition="f_curbalance >= {} " placeholder="">
195
- <label class="font_normal_body"> ≤ x ≤ </label>
196
- <input type="text" style="width:27%" class="input_search" v-model="model.f_curbalance2"
197
- condition="f_curbalance <= {} " placeholder="">
198
- </div>
199
- </div>
200
- <div class="col-sm-2 form-group">
201
- <label for="f_user_usetype" class="font_normal_body ">用气类型</label>
202
- <v-select :value.sync="model.f_user_usetype" :search="false"
203
- @change="$parent.$parent.userUseTypeChange()"
204
- v-model="model.f_user_usetype"
205
- :options='$parent.$parent.userusetypes'
206
- condition="f_user_usetype = '{}'"
207
- placeholder='用气类型'
208
- value-single="true"
209
- close-on-select>
210
- </v-select>
211
- </div>
212
- <div class="col-sm-2 form-group">
213
- <label for="f_use_institution" class="font_normal_body">用气机构</label>
214
- <v-select :value.sync="model.f_use_institution" :search="false"
215
- @change="$parent.$parent.userUseInstitutionChange()"
216
- v-model="model.f_use_institution"
217
- :options='$parent.$parent.useinstitutions'
218
- condition="f_use_institution = '{}'"
219
- placeholder='用气机构'
220
- value-single="true"
221
- close-on-select>
222
- </v-select>
223
- </div>
224
- <div class="col-sm-2 form-group">
225
- <label for="f_user_usenature" class="font_normal_body ">使用性质</label>
226
- <v-select :value.sync="model.f_user_usenature" :search="false"
227
- v-model="model.f_user_usenature"
228
- :options='$parent.$parent.userusenatures'
229
- condition="f_user_usenature = '{}'"
230
- placeholder='使用性质'
231
- value-single="true"
232
- close-on-select>
233
- </v-select>
234
- </div>
235
- </div>
236
- </div>
237
- </criteria>
238
- <data-grid :model="model" id="usergasall" partial='list' class="list_area table_sy" v-ref:grid>
239
- <template partial='head'>
240
- <tr>
241
- <th style="text-align:center">
242
- <nobr>客户编号</nobr>
243
- </th>
244
- <th style="text-align:center">
245
- <nobr>表号</nobr>
246
- </th>
247
- <th style="text-align:center">
248
- <nobr>用气性质</nobr>
249
- </th>
250
- <th style="text-align:center">
251
- <nobr>用户电话</nobr>
252
- </th>
253
- <!--<th style="text-align:center"><nobr>用气属性</nobr></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
- <th style="text-align:center">
276
- <nobr>上期底数</nobr>
277
- </th>
278
- <th style="text-align:center">
279
- <nobr>本期底数</nobr>
280
- </th>
281
- <!-- <th style="text-align:center"><nobr>气价(元/m³)</nobr></th>-->
282
- <th style="text-align:center">
283
- <nobr>用气量(m³)</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
- </tr>
295
-
296
-
297
- </template>
298
- <template partial='body'>
299
- <td>{{row.f_userinfo_code}}</td>
300
- <td style="text-align:center">{{row.f_meternumber}}</td>
301
- <td style="text-align:center">{{row.f_gasproperties}}</td>
302
- <td style="text-align:center">{{row.f_user_phone}}</td>
303
- <!--<td style="text-align:center">{{row.f_gasproperties2}}</td>-->
304
- <td>
305
- <nobr>{{row.f_user_name}}</nobr>
306
- </td>
307
- <td style="text-align:center">
308
- <nobr>{{row.f_price}}</nobr>
309
- </td>
310
- <td style="text-align:center">{{row.f_total_gas}}</td>
311
- <td style="text-align:center">{{row.f_total_fee}}</td>
312
- <td style="text-align:center">{{row.f_balance_amount}}</td>
313
- <td style="text-align:center">{{row.f_meter_brand}}</td>
314
- <td style="text-align:center">{{row.f_balance}}</td>
315
- <td style="text-align:center">{{row.f_last_tablebase}}</td>
316
- <td style="text-align:center">{{row.f_tablebase}}</td>
317
- <!--<td style="text-align:center">{{row.f_avg_price}}</td>-->
318
- <td style="text-align:center">{{row.f_oughtamount}}</td>
319
- <td style="text-align:center">{{row.f_oughtfee}}</td>
320
- <!-- <td style="text-align:center">{{row.f_collection}}</td>-->
321
- <td style="text-align:center">{{row.f_curbalance}}</td>
322
- </template>
323
- </data-grid>
324
- </criteria-paged>
325
- <table class="table-hover">
326
- <tr style="position: relative" class="table-bordered">
327
- <td
328
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
329
- 汇总信息
330
- </td>
331
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
332
- 总累购气量:&emsp;{{model.sums.f_total_gas}}
333
- </td>
334
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
335
- 总累购金额:&emsp;{{model.sums.f_total_fee}}
336
- </td>
337
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
338
- 总账户结余:&emsp;{{model.sums.f_balance_amount}}
339
- </td>
340
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
341
- 本期用气量合计:&emsp;{{model.sums.f_oughtamount}}
342
- </td>
343
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
344
- 本期用气金额合计:&emsp;{{model.sums.f_oughtfee}}
345
- </td>
346
- </tr>
347
- </table>
348
- </div>
349
- </div>
350
- </div>
351
- </div>
352
- <div class="flex-row" v-if="echarts">
353
- <user-gas-echarts :condition="condition" :echarts="echarts" :enddate="endDate"
354
- :groupname="groupname[0]" :startdate="startDate"></user-gas-echarts>
355
- </div>
356
- <!--汇总表显示模板-->
357
- <div class="flex-row" v-if="isActiveTotalForm">
358
- <user-gas-eform :condition="condition" :enddate="endDate" :startdate="startDate"></user-gas-eform>
359
- </div>
360
- </template>
361
-
362
- <script>
363
- import {HttpResetClass, PagedList} from 'vue-client'
364
- //import UserGasEcharts from './UserGasEcharts'
365
- import * as Util from '../../Util'
366
- import getLodop from '../../plugins/LodopFuncs'
367
- import plugins from '../../plugins/GetLoginInfoService'
368
- import plugin from 'system-clients/src/plugins/GetLoginInfoService'
369
- let readyGen = async function (self) {
370
- await self.$MagLoadParams.loadParam()
371
- self.initParams()
372
- self.getaddress()
373
- }
374
-
375
- export default {
376
- title: '用气分析',
377
- props: ['data'],
378
- data() {
379
- return {
380
- model: new PagedList('rs/sql/webmeter_getUserGasList', 20, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'}, {
381
- f_oughtamount: 0,
382
- f_oughtfee: 0,
383
- f_total_gas: 0,
384
- f_total_fee: 0,
385
- f_balance_amount: 0
386
- }),
387
- getGroupNameByDate: [
388
- {label: '年份', value: 'year'},
389
- {label: '月份', value: 'month'},
390
- {label: '周', value: 'week'}
391
- ],
392
- meterbrands: [],
393
- residentialArea: [],
394
- criteriaShow: false,
395
- reportStr: null,
396
- show: false,
397
- initres: {
398
- org:[this.$login.f.orgid],
399
- dep:[],
400
- user:[]
401
- },
402
- outlets: [],
403
- operator: [],
404
- filename: '',
405
- searchshow: true,
406
- startDate1:'',
407
- endDate1:'',
408
- useinstitutions: [],
409
- userusenatures: [],
410
- // startDate: '',
411
- // endDate: '',
412
- echarts: false,
413
- isActiveTotalForm: false,
414
- condition: '1=1',
415
- getfield: {},
416
- config: {
417
- excelHeaders: {
418
- 'f_userinfo_code':'客户编号',
419
- 'f_user_type':'客户类型',
420
- 'f_gasproperties': '用气性质',
421
- 'f_user_name': '客户名称',
422
- 'f_user_phone':'客户电话',
423
- 'f_residential_area': '小区',
424
- 'f_price':'用气单价',
425
- 'f_address':'用气地址',
426
- 'f_meternumber': '表号',
427
- 'f_meter_brand':'气表品牌',
428
- 'f_balance':'期初余额(元)',
429
- 'f_last_tablebase': '上期底数',
430
- 'f_tablebase':'本期底数',
431
- 'f_oughtamount':'用气量(m³)',
432
- 'f_oughtfee':'用气金额(元)',
433
- 'f_curbalance':'期末结余(元)'
434
-
435
- }
436
- },
437
- groupname: ['day'],
438
- getgroupname: [
439
- {label: '年份', value: 'year'},
440
- {label: '月份', value: 'month'},
441
- {label: '周', value: 'week'},
442
- {label: '日', value: 'day'}
443
- ],
444
- // orgCondtionStr: ' and h.f_orgid in (' + this.$login.f.orgid + ')',
445
- orgCondtionStr: '(' + this.$login.f.orgid + ')',
446
- orgid:[this.$login.f.orgid],
447
- usetypes: [{label: '全部', value: ''},{label: '是', value: `= '壁挂炉'`},{label: '否', value: `!= '壁挂炉'`}]
448
- }
449
- },
450
- ready() {
451
- readyGen(this)
452
- console.log('444444444', Util.addDate(new Date(),-6).substring(0,10))
453
- this.$refs.paged.$refs.cri.model.startDate = Util.addDate(new Date(),-4).substring(0,10) + ' 00:00:00'
454
- this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
455
- this.startDate1 = Util.addDate(new Date(),-4).substring(0,10)
456
- this.endDate1 = Util.toStandardDateString()
457
- this.$refs.paged.$refs.cri.search()
458
- this.getfield = this.config.excelHeaders
459
- },
460
- methods: {
461
- userUseInstitutionChange () {
462
- this.userusenatures = []
463
- this.$refs.paged.$refs.cri.model.f_user_usenature = ''
464
- if (this.$refs.paged.$refs.cri.model.f_use_institution) {
465
- let str = this.$refs.paged.$refs.cri.model.f_use_institution + '使用性质'
466
- this.userusenatures = this.$appdata.getParam(str)
467
- }
468
- },
469
- userUseTypeChange () {
470
- this.useinstitutions = []
471
- this.$refs.paged.$refs.cri.model.f_use_institution = ''
472
- if (this.$refs.paged.$refs.cri.model.f_user_usetype) {
473
- let str = this.$refs.paged.$refs.cri.model.f_user_usetype + '机构'
474
- this.useinstitutions = this.$appdata.getParam(str)
475
- }
476
- },
477
- // 查询开关
478
- hidden() {
479
- this.criteriaShow = !this.criteriaShow
480
- },
481
- async getaddress(){
482
- let HttpReset = new HttpResetClass()
483
- var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
484
- data: {
485
- condition: `1=1 and s.f_orgid = '${this.$login.f.orgid}'`
486
- }
487
- }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
488
- console.log('小区',data)
489
- let house = [{label: '全部', value: ''}]
490
- for (let row of data.data){
491
- house.push({label: row.f_residential_area, value: row.f_residential_area})
492
- }
493
- this.residentialArea = house
494
- },
495
- SaveAsFile(str) {
496
- this.$showMessage('您是否需要导出本页数据?', ['confirm', 'cancel']).then((res) => {
497
- if (res === 'confirm') {
498
- let style = '<style>' +
499
- 'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;} .tdcenter{text-align: center;}</style>';
500
- let strHtml = style + document.getElementById(str).innerHTML;
501
- console.log(strHtml);
502
- let LODOP = getLodop();
503
- LODOP.PRINT_INIT('');
504
- LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
505
- LODOP.SAVE_TO_FILE('用气分析.xls')
506
- }
507
- })
508
- },
509
- clearmsg() {
510
- this.$refs.paged.$refs.cri.model = {}
511
- this.startDate1 = ''
512
- this.endDate1 = ''
513
- },
514
- initParams() {
515
- // 初始化气表品牌
516
- let brandArr = []
517
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
518
- let temp = {}
519
- temp.label = item.label
520
- temp.value = item.value.f_meter_brand
521
- brandArr.push(temp)
522
- })
523
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
524
-
525
- },
526
- search(args) {
527
- // this.startDate = this.$refs.paged.$refs.cri.model.startDate
528
- // this.endDate = this.$refs.paged.$refs.cri.model.endDate
529
- this.$refs.paged.$refs.cri.model.startDate = this.startDate1 + ' 00:00:00'
530
- this.$refs.paged.$refs.cri.model.endDate = this.endDate1 + ' 23:59:59'
531
- console.log('--------------------', args)
532
- console.log('--------------------', this)
533
- if (this.endDate1 == '' || this.startDate1 == '') {
534
- return this.$showMessage("时间区间的开始和结束时间不能为空!")
535
- }
536
- // this.condition = this.$refs.paged.$refs.cri.condition + ` ${this.orgCondtionStr}`
537
- if (this.orgCondtionStr)
538
- this.condition = this.$refs.paged.$refs.cri.condition + ` and f_orgid in ${this.orgCondtionStr}`
539
- else
540
- this.condition = this.$refs.paged.$refs.cri.condition + ` and f_orgid = ${this.$login.f.orgid}`
541
- args.condition = this.condition
542
- this.model.search(args.condition, args.model)
543
- },
544
- // 显示柱状图
545
- showEcharts() {
546
- this.echarts = true
547
- this.isActiveTotalForm = false
548
- },
549
- notShowTotalForm() {
550
- this.echarts = false
551
- this.isActiveTotalForm = false
552
- },
553
- // 不显示柱状图
554
- notShowEcharts() {
555
- this.echarts = false
556
- this.isActiveTotalForm = false
557
- },
558
- // 显示汇总数据表格
559
- showTotalForm() {
560
- this.echarts = false
561
- this.isActiveTotalForm = true
562
- },
563
- close() {
564
- this.show = false
565
- },
566
- getRes(obj) {
567
- this.orgCondtionStr = plugins.convertToIn(obj)
568
- },
569
- getorg(obj) {
570
- this.orgCondtionStr = plugin.convertToIn(obj.resids)?plugin.convertToIn(obj.resids):'(' + this.$login.f.orgid + ')'
571
- },
572
- getCondition () {
573
- return {
574
- condition: this.condition,
575
- startDate: this.startDate,
576
- endDate: this.endDate
577
- }
578
- }
579
- // getRes(condition,obj) {
580
- // this.orgCondtionStr = condition
581
- // this.orgname = obj.orgnames[0]
582
- // this.depname = obj.depnames[0]
583
- // }
584
- },
585
- watch: {
586
- 'data'(val) {
587
- if (val.f_files_path) {
588
- this.getFileContent(val.f_files_path)
589
- } else {
590
- this.reportStr = null
591
- }
592
- }
593
- },
594
- computed: {
595
- userusetypes () {
596
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
597
- },
598
- startDate(){
599
- return this.startDate1 + ' 00:00:00'
600
- },
601
- endDate(){
602
- return this.endDate1 + ' 23:59:59'
603
- },
604
- houseTypes() {
605
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('房屋类型')]
606
- },
607
- positions() {
608
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('安装位置')]
609
- },
610
- Gasusertype() {
611
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
612
- },
613
- valveStatus() {
614
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
615
- },
616
- Gasproperties() {
617
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
618
- }
619
- }
620
- }
621
- </script>
622
- <style>
623
- </style>
1
+ <template>
2
+ <div class="flex-row" id="unit" v-show="(!echarts)&&(!isActiveTotalForm)">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex">
5
+ <div class="flex" style="flex:1;">
6
+ <criteria-paged :model="model" :pager='true' v-ref:paged>
7
+ <criteria @condition-changed='$parent.search' partial='criteria' v-ref:cri>
8
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
9
+ <div class="row" width="100%">
10
+ <div class="col-sm-2 form-group">
11
+ <label class="font_normal_body">客户编号</label>
12
+ <input style="width:60%" class="input_search" condition="f_userinfo_code like '%{}%'" placeholder='客户编号' type="text"
13
+ v-el:meternumber v-model="model.f_userinfo_code" v-next-el='f_userinfo_code'
14
+ >
15
+ </div>
16
+ <div class="col-sm-2 form-group">
17
+ <label class="font_normal_body">客户名称</label>
18
+ <input style="width:60%" class="input_search" condition="f_user_name = '{}'" placeholder='客户名称' type="text"
19
+ v-el:username v-model="model.f_username" v-next-el='userid'>
20
+ </div>
21
+ <div class="col-sm-2 form-group">
22
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
23
+ <v-select :value.sync="model.f_residential_area"
24
+ class="select_list select"
25
+ v-model="model.f_residential_area"
26
+ style="width: 60%"
27
+ multiple
28
+ condition="f_residential_area in {}"
29
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
30
+ close-on-select>
31
+
32
+ </v-select>
33
+ </div>
34
+ <div class="col-sm-2 form-group">
35
+ <label class="font_normal_body">用气地址</label>
36
+ <input style="width:60%" class="input_search" condition="f_address like '%{}%'" placeholder='用气地址' type="text"
37
+ v-el:area v-el:xq v-model="model.f_address" v-next-el='address'
38
+ >
39
+ </div>
40
+ <div class="col-sm-4 form-group button-range">
41
+ <button @click="search()" class="button_search button_spacing">查询</button>
42
+ <button @click="$parent.$parent.clearmsg" class="button_clear button_spacing">清空</button>
43
+ <export-excel :data="$parent.$parent.getCondition()"
44
+ :field="$parent.$parent.getfield"
45
+ sqlurl="rs/logic/exportfile" sql-name="webmeter_getUserGasList" template-name='用气分析'
46
+ v-ref:exports
47
+ :choose-col="true"></export-excel>
48
+ <button class="button_export button_spacing" style="width: max-content" @click="$parent.$parent.showTotalForm()" >显示汇总</button>
49
+ <button class="button_export button_spacing" @click="$parent.$parent.showEcharts()">显示图表</button>
50
+ <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>
51
+ </div>
52
+ </div>
53
+ <div class="row" v-show="$parent.$parent.criteriaShow">
54
+
55
+ <!--<div class="col-sm-2 form-group" >
56
+ <label class="font_normal_body">用气属性</label>
57
+ <v-select
58
+ placeholder='用气属性'
59
+ value-single="true"
60
+ :value.sync="model.f_gasproperties2"
61
+ v-model="model.f_gasproperties2"
62
+ :options='$parent.$parent.Gasproperties2'
63
+ close-on-select condition="uf.f_gasproperties2 {}">
64
+ </v-select>
65
+ </div>-->
66
+ <!-- <res-select-group :show-component="['company']" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>-->
67
+ <div class="col-sm-2 form-group">
68
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
69
+ <input style="width:60%" class="input_search" condition="f_meternumber = '{}'" placeholder='表号' type="text"
70
+ v-el:meternumber v-model="model.f_meternumber" v-next-el='meternumber'
71
+ >
72
+ </div>
73
+ <div class="col-sm-2">
74
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
75
+ <right-tree @re-res="$parent.$parent.getorg"
76
+ :initresid='$parent.$parent.orgid'></right-tree>
77
+ </div>
78
+ <!-- <div class="col-sm-2 form-group">-->
79
+ <!-- <label class="font_normal_body">组织机构</label>-->
80
+ <!-- <res-select :initresid="$parent.$parent.orgid"-->
81
+ <!-- style="width:60%"-->
82
+ <!-- @res-select="$parent.$parent.getRes"-->
83
+ <!-- restype='organization'>-->
84
+ <!-- </res-select>-->
85
+ <!-- </div>-->
86
+ <div class="col-sm-2 form-group">
87
+ <label class="font_normal_body">用气性质</label>
88
+ <v-select :options='$parent.$parent.Gasproperties'
89
+ :value.sync="model.f_gasproperties"
90
+ close-on-select
91
+ condition="f_gasproperties = '{}'"
92
+ id="f_gasproperties"
93
+ placeholder='用气性质'
94
+ style="width:60%"
95
+ v-model="model.f_gasproperties"
96
+ value-single="true">
97
+ </v-select>
98
+ </div>
99
+ <div class="col-sm-2 form-group">
100
+ <label class="font_normal_body">气表品牌</label>
101
+ <v-select :value.sync="model.f_meter_brand"
102
+ v-model="model.f_meter_brand"
103
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
104
+ condition="f_meter_brand = '{}'"
105
+ close-on-select></v-select>
106
+ </div>
107
+ <div class="col-sm-2 form-group">
108
+ <label class="font_normal_body">时间区间</label>
109
+ <datepicker :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'"
110
+ :show-reset-button="reset"
111
+ :value.sync="$parent.$parent.startDate1"
112
+ id="startDate"
113
+ style="width:60%"
114
+ placeholder="开始时间"
115
+ v-model="$parent.$parent.startDate1">
116
+ </datepicker>
117
+ </div>
118
+ <div class="col-sm-2 form-group">
119
+ <label class="font_normal_body" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
120
+ <datepicker :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'"
121
+ :show-reset-button="reset"
122
+ :value.sync="$parent.$parent.endDate1"
123
+ style="width:60%"
124
+ id="endDate"
125
+ placeholder="结束日期"
126
+ v-model="$parent.$parent.endDate1">
127
+ </datepicker>
128
+ </div>
129
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
130
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;用气量&nbsp;</label>
131
+ <div class="row">
132
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount1"
133
+ condition="f_oughtamount >= {} " placeholder="">
134
+ <label class="font_normal_body"> ≤ x ≤ </label>
135
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount2"
136
+ condition="f_oughtamount <= {} " placeholder="">
137
+ </div>
138
+ </div>
139
+ <!--<div class="col-sm-2 form-group">
140
+ <label class="font_normal_body">用&nbsp;气&nbsp;量&nbsp;</label>
141
+ <input type="text" style="width:60%" class="input_search"
142
+ v-model="model.f_start_oughtamount" placeholder='起始气量'
143
+ >
144
+ </div>
145
+ <div class="col-sm-2 form-group">
146
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
147
+ <input type="text" style="width:60%" class="input_search"
148
+ v-model="model.f_end_oughtamount" placeholder='结束气量'
149
+ >
150
+ </div>-->
151
+ <div class="col-sm-2 form-group">
152
+ <label class="font_normal_body">壁&ensp;挂&ensp;炉</label>
153
+ <v-select id="f_meter_brand"
154
+ v-model="model.f_usetype"
155
+ placeholder=''
156
+ :value.sync="model.f_usetype"
157
+ :options='$parent.$parent.usetypes'
158
+ condition="f_usetype {}" :search="false"
159
+ close-on-select style="width: 60%">
160
+ </v-select>
161
+ </div>
162
+ <div class="col-sm-2 form-group">
163
+ <label class="font_normal_body">房屋类型</label>
164
+ <v-select :value.sync="model.f_house_type" v-model="model.f_house_type"
165
+ :options='$parent.$parent.houseTypes' placeholder='请选择'
166
+ close-on-select
167
+ condition="f_house_type = '{}'"></v-select>
168
+ </div>
169
+ <div class="col-sm-2 form-group">
170
+ <label class="font_normal_body">安装位置</label>
171
+ <v-select :value.sync="model.f_position" v-model="model.f_position"
172
+ :options='$parent.$parent.positions' placeholder='请选择'
173
+ condition="f_position = '{}'"
174
+ close-on-select></v-select>
175
+ </div>
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.f_curbalance1"
180
+ condition="f_curbalance >= {} " placeholder="">
181
+ <label class="font_normal_body"> ≤ x ≤ </label>
182
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_curbalance2"
183
+ condition="f_curbalance <= {} " placeholder="">
184
+ </div>
185
+ </div>
186
+ <div class="col-sm-2 form-group">
187
+ <label class="font_normal_body">用户类型</label>
188
+ <v-select :options='$parent.$parent.Gasusertype'
189
+ :value.sync="model.f_user_type"
190
+ close-on-select
191
+ style="width:60%"
192
+ condition="f_user_type = '{}'"
193
+ id="f_user_type"
194
+ placeholder='用户类型'
195
+ @change="$parent.$parent.userTypeChange()"
196
+ v-model="model.f_user_type"
197
+ :value-single="true">
198
+ </v-select>
199
+ </div>
200
+ <div class="col-sm-2 form-group">
201
+ <label for="f_user_usetype" class="font_normal_body ">用气类型</label>
202
+ <v-select :value.sync="model.f_user_usetype" :search="false"
203
+ @change="$parent.$parent.userUseTypeChange()"
204
+ v-model="model.f_user_usetype"
205
+ :options='$parent.$parent.userusetypes'
206
+ condition="f_user_usetype = '{}'"
207
+ placeholder='用气类型'
208
+ :value-single="true"
209
+ close-on-select>
210
+ </v-select>
211
+ </div>
212
+ <div class="col-sm-2 form-group">
213
+ <label for="f_use_institution" class="font_normal_body">用气机构</label>
214
+ <v-select :value.sync="model.f_use_institution" :search="false"
215
+ @change="$parent.$parent.userUseInstitutionChange()"
216
+ v-model="model.f_use_institution"
217
+ :options='$parent.$parent.useinstitutions'
218
+ condition="f_use_institution = '{}'"
219
+ placeholder='用气机构'
220
+ :value-single="true"
221
+ close-on-select>
222
+ </v-select>
223
+ </div>
224
+ <div class="col-sm-2 form-group">
225
+ <label for="f_user_usenature" class="font_normal_body ">使用性质</label>
226
+ <v-select :value.sync="model.f_user_usenature" :search="false"
227
+ v-model="model.f_user_usenature"
228
+ :options='$parent.$parent.userusenatures'
229
+ condition="f_user_usenature = '{}'"
230
+ placeholder='使用性质'
231
+ :value-single="true"
232
+ close-on-select>
233
+ </v-select>
234
+ </div>
235
+ <div class="col-sm-2 form-group">
236
+ <label class="font_normal_body">单位名称</label>
237
+ <input style="width:60%" class="input_search" condition="f_corporate_name like '%{}%'" placeholder='单位名称' type="text"
238
+ v-el:corporatename v-model="model.f_corporate_name" v-next-el='corporatename'>
239
+ </div>
240
+ </div>
241
+ </div>
242
+ </criteria>
243
+ <data-grid :model="model" id="usergasall" partial='list' class="list_area table_sy" v-ref:grid>
244
+ <template partial='head'>
245
+ <tr>
246
+ <th style="text-align:center">
247
+ <nobr>客户编号</nobr>
248
+ </th>
249
+ <th style="text-align:center">
250
+ <nobr>表号</nobr>
251
+ </th>
252
+ <th style="text-align:center">
253
+ <nobr>用气性质</nobr>
254
+ </th>
255
+ <th style="text-align:center">
256
+ <nobr>用户电话</nobr>
257
+ </th>
258
+ <!--<th style="text-align:center"><nobr>用气属性</nobr></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
+ <th style="text-align:center">
269
+ <nobr>累购金额</nobr>
270
+ </th>
271
+ <th style="text-align:center">
272
+ <nobr>账号结余</nobr>
273
+ </th>
274
+ <th style="text-align:center">
275
+ <nobr>气表名称</nobr>
276
+ </th>
277
+ <th style="text-align:center">
278
+ <nobr>期初余额(元)</nobr>
279
+ </th>
280
+ <th style="text-align:center">
281
+ <nobr>上期底数</nobr>
282
+ </th>
283
+ <th style="text-align:center">
284
+ <nobr>本期底数</nobr>
285
+ </th>
286
+ <!-- <th style="text-align:center"><nobr>气价(元/m³)</nobr></th>-->
287
+ <th style="text-align:center">
288
+ <nobr>用气量(m³)</nobr>
289
+ </th>
290
+ <th style="text-align:center">
291
+ <nobr>用气金额(元)</nobr>
292
+ </th>
293
+ <!-- <th style="text-align:center">-->
294
+ <!-- <nobr>充值金额(元)</nobr>-->
295
+ <!-- </th>-->
296
+ <th style="text-align:center">
297
+ <nobr>期末结余(元)</nobr>
298
+ </th>
299
+ </tr>
300
+
301
+
302
+ </template>
303
+ <template partial='body'>
304
+ <td>{{row.f_userinfo_code}}</td>
305
+ <td style="text-align:center">{{row.f_meternumber}}</td>
306
+ <td style="text-align:center">{{row.f_gasproperties}}</td>
307
+ <td style="text-align:center">{{row.f_user_phone}}</td>
308
+ <!--<td style="text-align:center">{{row.f_gasproperties2}}</td>-->
309
+ <td>
310
+ <nobr>{{row.f_user_name}}</nobr>
311
+ </td>
312
+ <td style="text-align:center">
313
+ <nobr>{{row.f_price}}</nobr>
314
+ </td>
315
+ <td style="text-align:center">{{row.f_total_gas}}</td>
316
+ <td style="text-align:center">{{row.f_total_fee}}</td>
317
+ <td style="text-align:center">{{row.f_balance_amount}}</td>
318
+ <td style="text-align:center">{{row.f_meter_brand}}</td>
319
+ <td style="text-align:center">{{row.f_balance}}</td>
320
+ <td style="text-align:center">{{row.f_last_tablebase}}</td>
321
+ <td style="text-align:center">{{row.f_tablebase}}</td>
322
+ <!--<td style="text-align:center">{{row.f_avg_price}}</td>-->
323
+ <td style="text-align:center">{{row.f_oughtamount}}</td>
324
+ <td style="text-align:center">{{row.f_oughtfee}}</td>
325
+ <!-- <td style="text-align:center">{{row.f_collection}}</td>-->
326
+ <td style="text-align:center">{{row.f_curbalance}}</td>
327
+ </template>
328
+ </data-grid>
329
+ </criteria-paged>
330
+ <table class="table-hover">
331
+ <tr style="position: relative" class="table-bordered">
332
+ <td
333
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
334
+ 汇总信息
335
+ </td>
336
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
337
+ 总累购气量:&emsp;{{model.sums.f_total_gas}}
338
+ </td>
339
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
340
+ 总累购金额:&emsp;{{model.sums.f_total_fee}}
341
+ </td>
342
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
343
+ 总账户结余:&emsp;{{model.sums.f_balance_amount}}
344
+ </td>
345
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
346
+ 本期用气量合计:&emsp;{{model.sums.f_oughtamount}}
347
+ </td>
348
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
349
+ 本期用气金额合计:&emsp;{{model.sums.f_oughtfee}}
350
+ </td>
351
+ </tr>
352
+ </table>
353
+ </div>
354
+ </div>
355
+ </div>
356
+ </div>
357
+ <div class="flex-row" v-if="echarts">
358
+ <user-gas-echarts :condition="condition" :echarts="echarts" :enddate="endDate"
359
+ :groupname="groupname[0]" :startdate="startDate"></user-gas-echarts>
360
+ </div>
361
+ <!--汇总表显示模板-->
362
+ <div class="flex-row" v-if="isActiveTotalForm">
363
+ <user-gas-eform :condition="condition" :enddate="endDate" :startdate="startDate"></user-gas-eform>
364
+ </div>
365
+ </template>
366
+
367
+ <script>
368
+ import {HttpResetClass, PagedList} from 'vue-client'
369
+ //import UserGasEcharts from './UserGasEcharts'
370
+ import * as Util from '../../Util'
371
+ import getLodop from '../../plugins/LodopFuncs'
372
+ import plugins from '../../plugins/GetLoginInfoService'
373
+ import plugin from 'system-clients/src/plugins/GetLoginInfoService'
374
+ let readyGen = async function (self) {
375
+ await self.$MagLoadParams.loadParam()
376
+ self.initParams()
377
+ self.getaddress()
378
+ }
379
+
380
+ export default {
381
+ title: '用气分析',
382
+ props: ['data'],
383
+ data() {
384
+ return {
385
+ model: new PagedList('rs/sql/webmeter_getUserGasList', 20, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'}, {
386
+ f_oughtamount: 0,
387
+ f_oughtfee: 0,
388
+ f_total_gas: 0,
389
+ f_total_fee: 0,
390
+ f_balance_amount: 0
391
+ }),
392
+ getGroupNameByDate: [
393
+ {label: '年份', value: 'year'},
394
+ {label: '月份', value: 'month'},
395
+ {label: '周', value: 'week'}
396
+ ],
397
+ meterbrands: [],
398
+ residentialArea: [],
399
+ criteriaShow: false,
400
+ reportStr: null,
401
+ show: false,
402
+ initres: {
403
+ org:[this.$login.f.orgid],
404
+ dep:[],
405
+ user:[]
406
+ },
407
+ outlets: [],
408
+ operator: [],
409
+ filename: '',
410
+ searchshow: true,
411
+ startDate1:'',
412
+ endDate1:'',
413
+ userusetypes: [],
414
+ useinstitutions: [],
415
+ userusenatures: [],
416
+ // startDate: '',
417
+ // endDate: '',
418
+ echarts: false,
419
+ isActiveTotalForm: false,
420
+ condition: '1=1',
421
+ getfield: {},
422
+ config: {
423
+ excelHeaders: {
424
+ 'f_userinfo_code':'客户编号',
425
+ 'f_user_type':'客户类型',
426
+ 'f_gasproperties': '用气性质',
427
+ 'f_user_name': '客户名称',
428
+ 'f_user_phone':'客户电话',
429
+ 'f_residential_area': '小区',
430
+ 'f_price':'用气单价',
431
+ 'f_address':'用气地址',
432
+ 'f_meternumber': '表号',
433
+ 'f_meter_brand':'气表品牌',
434
+ 'f_balance':'期初余额(元)',
435
+ 'f_last_tablebase': '上期底数',
436
+ 'f_tablebase':'本期底数',
437
+ 'f_oughtamount':'用气量(m³)',
438
+ 'f_oughtfee':'用气金额(元)',
439
+ 'f_curbalance':'期末结余(元)'
440
+
441
+ }
442
+ },
443
+ groupname: ['day'],
444
+ getgroupname: [
445
+ {label: '年份', value: 'year'},
446
+ {label: '月份', value: 'month'},
447
+ {label: '周', value: 'week'},
448
+ {label: '日', value: 'day'}
449
+ ],
450
+ // orgCondtionStr: ' and h.f_orgid in (' + this.$login.f.orgid + ')',
451
+ orgCondtionStr: '(' + this.$login.f.orgid + ')',
452
+ orgid:[this.$login.f.orgid],
453
+ usetypes: [{label: '全部', value: ''},{label: '是', value: `= '壁挂炉'`},{label: '否', value: `!= '壁挂炉'`}]
454
+ }
455
+ },
456
+ ready() {
457
+ readyGen(this)
458
+ console.log('444444444', Util.addDate(new Date(),-6).substring(0,10))
459
+ this.$refs.paged.$refs.cri.model.startDate = Util.addDate(new Date(),-4).substring(0,10) + ' 00:00:00'
460
+ this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
461
+ this.startDate1 = Util.addDate(new Date(),-4).substring(0,10)
462
+ this.endDate1 = Util.toStandardDateString()
463
+ // this.$refs.paged.$refs.cri.search()
464
+ this.getfield = this.config.excelHeaders
465
+ },
466
+ methods: {
467
+ userTypeChange () {
468
+ this.userusetypes = []
469
+ this.userusenatures = []
470
+ this.useinstitutions = []
471
+ this.$refs.paged.$refs.cri.model.f_user_usetype = ''
472
+ this.$refs.paged.$refs.cri.model.f_use_institution = ''
473
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
474
+ if (this.$refs.paged.$refs.cri.model.f_user_type) {
475
+ console.log('this.$refs.paged.$refs.cri.model.f_user_type', this.$refs.paged.$refs.cri.model.f_user_type)
476
+ let str = this.$refs.paged.$refs.cri.model.f_user_type + '用气类型'
477
+ this.userusetypes = this.$appdata.getParam(str)
478
+ }
479
+ },
480
+ userUseTypeChange () {
481
+ this.useinstitutions = []
482
+ this.userusenatures = []
483
+ this.$refs.paged.$refs.cri.model.f_use_institution = ''
484
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
485
+ if (this.$refs.paged.$refs.cri.model.f_user_usetype) {
486
+ let str = this.$refs.paged.$refs.cri.model.f_user_usetype + '机构'
487
+ this.useinstitutions = this.$appdata.getParam(str)
488
+ }
489
+ },
490
+ userUseInstitutionChange () {
491
+ this.userusenatures = []
492
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
493
+ if (this.$refs.paged.$refs.cri.model.f_use_institution) {
494
+ let str = this.$refs.paged.$refs.cri.model.f_use_institution + '使用性质'
495
+ this.userusenatures = this.$appdata.getParam(str)
496
+ }
497
+ },
498
+ // 查询开关
499
+ hidden() {
500
+ this.criteriaShow = !this.criteriaShow
501
+ },
502
+ async getaddress(){
503
+ let HttpReset = new HttpResetClass()
504
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
505
+ data: {
506
+ condition: `1=1 and s.f_orgid = '${this.$login.f.orgid}'`
507
+ }
508
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
509
+ console.log('小区',data)
510
+ let house = [{label: '全部', value: ''}]
511
+ for (let row of data.data){
512
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
513
+ }
514
+ this.residentialArea = house
515
+ },
516
+ SaveAsFile(str) {
517
+ this.$showMessage('您是否需要导出本页数据?', ['confirm', 'cancel']).then((res) => {
518
+ if (res === 'confirm') {
519
+ let style = '<style>' +
520
+ 'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;} .tdcenter{text-align: center;}</style>';
521
+ let strHtml = style + document.getElementById(str).innerHTML;
522
+ console.log(strHtml);
523
+ let LODOP = getLodop();
524
+ LODOP.PRINT_INIT('');
525
+ LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
526
+ LODOP.SAVE_TO_FILE('用气分析.xls')
527
+ }
528
+ })
529
+ },
530
+ clearmsg() {
531
+ this.$refs.paged.$refs.cri.model = {}
532
+ this.startDate1 = ''
533
+ this.endDate1 = ''
534
+ },
535
+ initParams() {
536
+ // 初始化气表品牌
537
+ let brandArr = []
538
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
539
+ let temp = {}
540
+ temp.label = item.label
541
+ temp.value = item.value.f_meter_brand
542
+ brandArr.push(temp)
543
+ })
544
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
545
+
546
+ },
547
+ search(args) {
548
+ // this.startDate = this.$refs.paged.$refs.cri.model.startDate
549
+ // this.endDate = this.$refs.paged.$refs.cri.model.endDate
550
+ this.$refs.paged.$refs.cri.model.startDate = this.startDate1 + ' 00:00:00'
551
+ this.$refs.paged.$refs.cri.model.endDate = this.endDate1 + ' 23:59:59'
552
+ console.log('--------------------', args)
553
+ console.log('--------------------', this)
554
+ if (this.endDate1 == '' || this.startDate1 == '') {
555
+ return this.$showMessage("时间区间的开始和结束时间不能为空!")
556
+ }
557
+ // this.condition = this.$refs.paged.$refs.cri.condition + ` ${this.orgCondtionStr}`
558
+ if (this.orgCondtionStr)
559
+ this.condition = this.$refs.paged.$refs.cri.condition + ` and f_orgid in ${this.orgCondtionStr}`
560
+ else
561
+ this.condition = this.$refs.paged.$refs.cri.condition + ` and f_orgid = ${this.$login.f.orgid}`
562
+ args.condition = this.condition
563
+ this.model.search(args.condition, args.model)
564
+ },
565
+ // 显示柱状图
566
+ showEcharts() {
567
+ this.echarts = true
568
+ this.isActiveTotalForm = false
569
+ },
570
+ notShowTotalForm() {
571
+ this.echarts = false
572
+ this.isActiveTotalForm = false
573
+ },
574
+ // 不显示柱状图
575
+ notShowEcharts() {
576
+ this.echarts = false
577
+ this.isActiveTotalForm = false
578
+ },
579
+ // 显示汇总数据表格
580
+ showTotalForm() {
581
+ this.echarts = false
582
+ this.isActiveTotalForm = true
583
+ },
584
+ close() {
585
+ this.show = false
586
+ },
587
+ getRes(obj) {
588
+ this.orgCondtionStr = plugins.convertToIn(obj)
589
+ },
590
+ getorg(obj) {
591
+ this.orgCondtionStr = plugin.convertToIn(obj.resids)?plugin.convertToIn(obj.resids):'(' + this.$login.f.orgid + ')'
592
+ },
593
+ getCondition () {
594
+ return {
595
+ condition: this.condition,
596
+ startDate: this.startDate,
597
+ endDate: this.endDate
598
+ }
599
+ }
600
+ // getRes(condition,obj) {
601
+ // this.orgCondtionStr = condition
602
+ // this.orgname = obj.orgnames[0]
603
+ // this.depname = obj.depnames[0]
604
+ // }
605
+ },
606
+ watch: {
607
+ 'data'(val) {
608
+ if (val.f_files_path) {
609
+ this.getFileContent(val.f_files_path)
610
+ } else {
611
+ this.reportStr = null
612
+ }
613
+ }
614
+ },
615
+ computed: {
616
+ startDate(){
617
+ return this.startDate1 + ' 00:00:00'
618
+ },
619
+ endDate(){
620
+ return this.endDate1 + ' 23:59:59'
621
+ },
622
+ houseTypes() {
623
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('房屋类型')]
624
+ },
625
+ positions() {
626
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('安装位置')]
627
+ },
628
+ Gasusertype() {
629
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
630
+ },
631
+ valveStatus() {
632
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
633
+ },
634
+ Gasproperties() {
635
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
636
+ }
637
+ }
638
+ }
639
+ </script>
640
+ <style>
641
+ </style>