manage-client 3.2.10-aode → 3.2.11-aode

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,496 +1,496 @@
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
- <res-select :initresid="$parent.$parent.orgid"
13
- style="width:60%"
14
- @res-select="$parent.$parent.getRes"
15
- restype='organization'>
16
- </res-select>
17
- </div>
18
- <div class="col-sm-2 form-group">
19
- <label class="font_normal_body">客户编号</label>
20
- <input style="width:60%" class="input_search" condition="f_userinfo_code like '%{}%'" placeholder='客户编号' type="text"
21
- v-el:meternumber v-model="model.f_userinfo_code" v-next-el='f_userinfo_code'
22
- >
23
- </div>
24
- <div class="col-sm-2 form-group">
25
- <label class="font_normal_body">客户名称</label>
26
- <input style="width:60%" class="input_search" condition="f_user_name like '%{}%'" placeholder='客户名称' type="text"
27
- v-el:username v-model="model.f_username" v-next-el='userid'>
28
- </div>
29
- <div class="col-sm-2 form-group">
30
- <label class="font_normal_body">表&emsp;&emsp;号</label>
31
- <input style="width:60%" class="input_search" condition="f_meternumber = '{}'" placeholder='表号' type="text"
32
- v-el:meternumber v-model="model.f_meternumber" v-next-el='meternumber'
33
- >
34
- </div>
35
-
36
- <div class="col-sm-4 form-group button-range">
37
- <button @click="search()" class="button_search button_spacing">查询</button>
38
- <button @click="$parent.$parent.clearmsg" class="button_clear button_spacing">清空</button>
39
- <button class="button_export button_spacing" style="width: max-content" @click="$parent.$parent.showTotalForm()" >显示汇总</button>
40
- <!-- <button class="btn btn-success" @click="$parent.$parent.showEcharts()">显示图表</button>-->
41
- <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>
42
- <export-excel-plus :data="$parent.$parent.getCondition"
43
- :defaultselect="$parent.$parent.selectfields"
44
- :field="$parent.$parent.getfield"
45
- :exportprogress="true" v-ref:exports
46
- sqlurl="rs/logic/exportfileplus" sql-name="webmeter_getUserGasList" template-name='物联网用气分析查询导出'
47
- :choose-col="true"></export-excel-plus>
48
- </div>
49
- </div>
50
- <div class="row" v-show="$parent.$parent.criteriaShow">
51
-
52
- <!--<div class="col-sm-2 form-group" >
53
- <label class="font_normal_body">用气属性</label>
54
- <v-select
55
- placeholder='用气属性'
56
- value-single="true"
57
- :value.sync="model.f_gasproperties2"
58
- v-model="model.f_gasproperties2"
59
- :options='$parent.$parent.Gasproperties2'
60
- close-on-select condition="uf.f_gasproperties2 {}">
61
- </v-select>
62
- </div>-->
63
- <div class="col-sm-2 form-group">
64
- <label class="font_normal_body">用气地址</label>
65
- <input style="width:60%" class="input_search" condition="f_address like '%{}%'" placeholder='用气地址' type="text"
66
- v-el:area v-el:xq v-model="model.f_address" v-next-el='address'
67
- >
68
- </div>
69
- <div class="col-sm-2 form-group">
70
- <label class="font_normal_body">小区名称</label>
71
- <input style="width:60%" class="input_search" placeholder='小区名称' type="text"
72
- v-el:area v-el:xq v-model="model.f_residential_area" v-next-el='f_residential_area'
73
- >
74
- </div>
75
- <div class="col-sm-2 form-group">
76
- <label class="font_normal_body">客户类型</label>
77
- <v-select :options='$parent.$parent.Gasusertype'
78
- :value.sync="model.f_user_type"
79
- close-on-select
80
- style="width:60%"
81
- condition="f_user_type = '{}'"
82
- id="f_user_type"
83
- placeholder='客户类型'
84
- v-model="model.f_user_type"
85
- value-single="true">
86
- </v-select>
87
- </div>
88
- <div class="col-sm-2 form-group">
89
- <label class="font_normal_body">用气性质</label>
90
- <v-select :options='$parent.$parent.Gasproperties'
91
- :value.sync="model.f_gasproperties"
92
- close-on-select
93
- condition="f_gasproperties = '{}'"
94
- id="f_gasproperties"
95
- placeholder='用气性质'
96
- style="width:60%"
97
- v-model="model.f_gasproperties"
98
- value-single="true">
99
- </v-select>
100
- </div>
101
- <div class="col-sm-2 form-group">
102
- <label class="font_normal_body">气表品牌</label>
103
- <v-select :value.sync="model.f_meter_brand"
104
- v-model="model.f_meter_brand"
105
- :options='$parent.$parent.meterbrands' placeholder='请选择'
106
- condition="f_meter_brand = '{}'"
107
- close-on-select></v-select>
108
- </div>
109
- <div class="col-sm-2 form-group">
110
- <label class="font_normal_body">时间区间</label>
111
- <datepicker :disabled-days-of-Week="[]" :format="'yyyy-MM-dd HH:mm:ss'"
112
- :show-reset-button="reset"
113
- :value.sync="model.startDate"
114
-
115
- id="startDate"
116
- style="width:60%"
117
- placeholder="开始时间"
118
- v-model="model.startDate">
119
- </datepicker>
120
- </div>
121
- <div class="col-sm-2 form-group">
122
- <label class="font_normal_body" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
123
- <datepicker :disabled-days-of-Week="[]" :format="'yyyy-MM-dd HH:mm:ss'"
124
- :show-reset-button="reset"
125
- :value.sync="model.endDate"
126
- style="width:60%"
127
-
128
- id="endDate"
129
- style="width:60%"
130
- placeholder="结束日期"
131
- v-model="model.endDate">
132
- </datepicker>
133
- </div>
134
- <div class="col-sm-2 form-group">
135
- <label for="inputStartDate" class="font_normal_body">结算日期</label>
136
- <datepicker id="inputStartDate" placeholder="结算日期" style="width:60%"
137
- v-model="model.inputStartDate"
138
- :value.sync="model.inputStartDate"
139
- :format="'yyyy-MM-dd HH:mm:ss'"
140
- condition="f_input_date >= '{}'"
141
- :show-reset-button="true"
142
- >
143
- </datepicker>
144
- </div>
145
- <div class="col-sm-2 form-group">
146
- <label for="inputEndDate" class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&ensp;</label>
147
- <datepicker id="inputEndDate" placeholder="结算日期" style="width:60%"
148
- v-model="model.inputEndDate"
149
- :value.sync="model.inputEndDate"
150
- condition="f_input_date <= '{}'"
151
- :format="'yyyy-MM-dd HH:mm:ss'"
152
- :show-reset-button="true"
153
- >
154
- </datepicker>
155
- </div>
156
-
157
- <!--<div class="col-sm-2 form-group">
158
- <label class="font_normal_body">用&nbsp;气&nbsp;量&nbsp;</label>
159
- <input type="text" style="width:60%" class="input_search"
160
- v-model="model.f_start_oughtamount" placeholder='起始气量'
161
- >
162
- </div>
163
- <div class="col-sm-2 form-group">
164
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
165
- <input type="text" style="width:60%" class="input_search"
166
- v-model="model.f_end_oughtamount" placeholder='结束气量'
167
- >
168
- </div>-->
169
- </div>
170
- </div>
171
- </criteria>
172
- <data-grid :model="model" id="usergasall" partial='list' class="list_area table_sy" v-ref:grid>
173
- <template partial='head'>
174
- <tr>
175
- <th style="text-align:center">
176
- <nobr>客户编号</nobr>
177
- </th>
178
- <th style="text-align:center">
179
- <nobr>客户类型</nobr>
180
- </th>
181
- <th style="text-align:center">
182
- <nobr>用气性质</nobr>
183
- </th>
184
- <!--<th style="text-align:center"><nobr>用气属性</nobr></th>-->
185
- <th style="text-align:center">
186
- <nobr>客户名称</nobr>
187
- </th>
188
- <th style="text-align:center">
189
- <nobr>用气地址</nobr>
190
- </th>
191
- <th style="text-align:center">
192
- <nobr>气表品牌</nobr>
193
- </th>
194
- <th style="text-align:center">
195
- <nobr>起始时间~终止时间</nobr>
196
- </th>
197
- <!-- <th style="text-align:center">-->
198
- <!-- <nobr>终止时间</nobr>-->
199
- <!-- </th>-->
200
- <th style="text-align:center">
201
- <nobr>表号</nobr>
202
- </th>
203
- <th style="text-align:center">
204
- <nobr>期初余额(元)</nobr>
205
- </th>
206
- <th style="text-align:center">
207
- <nobr>上期底数</nobr>
208
- </th>
209
- <th style="text-align:center">
210
- <nobr>本期底数</nobr>
211
- </th>
212
- <!-- <th style="text-align:center"><nobr>气价(元/m³)</nobr></th>-->
213
- <th style="text-align:center">
214
- <nobr>用气量(m³)</nobr>
215
- </th>
216
- <th style="text-align:center">
217
- <nobr>用气金额(元)</nobr>
218
- </th>
219
- <!-- <th style="text-align:center">-->
220
- <!-- <nobr>充值金额(元)</nobr>-->
221
- <!-- </th>-->
222
- <th style="text-align:center">
223
- <nobr>期末结余(元)</nobr>
224
- </th>
225
- <th style="text-align:center">
226
- <nobr>组织</nobr>
227
- </th>
228
- </tr>
229
-
230
-
231
- </template>
232
- <template partial='body'>
233
- <td>{{row.f_userinfo_code}}</td>
234
- <td style="text-align:center">{{row.f_user_type}}</td>
235
- <td style="text-align:center">{{row.f_gasproperties}}</td>
236
- <!--<td style="text-align:center">{{row.f_gasproperties2}}</td>-->
237
- <td style="text-align:center">
238
- <nobr>{{row.f_user_name}}</nobr>
239
- </td>
240
- <td>
241
- <nobr>{{row.f_address}}</nobr>
242
- </td>
243
- <td>
244
- <nobr>{{row.f_meter_brand}}</nobr>
245
- </td>
246
- <td>
247
- <nobr>{{row.f_hand_date}}</nobr>
248
- </td>
249
- <!-- <td>-->
250
- <!-- <nobr>{{row.f_end_hand_date}}</nobr>-->
251
- <!-- </td>-->
252
- <td>{{row.f_meternumber}}</td>
253
- <td style="text-align:center">{{row.f_balance}}</td>
254
- <td style="text-align:center">{{row.f_last_tablebase}}</td>
255
- <td style="text-align:center">{{row.f_tablebase}}</td>
256
- <!--<td style="text-align:center">{{row.f_avg_price}}</td>-->
257
- <td style="text-align:center">{{row.f_oughtamount}}</td>
258
- <td style="text-align:center">{{row.f_oughtfee}}</td>
259
- <!-- <td style="text-align:center">{{row.f_collection}}</td>-->
260
- <td style="text-align:center">{{row.f_curbalance}}</td>
261
- <td style="text-align:center">{{row.f_organization_name}}</td>
262
- </template>
263
- </data-grid>
264
- </criteria-paged>
265
- </div>
266
- </div>
267
- </div>
268
- </div>
269
- <div v-show="echarts">
270
- <user-gas-echarts :condition="condition" :echarts="echarts" :enddate="endDate"
271
- :groupname="groupname[0]" :startdate="startDate"></user-gas-echarts>
272
- </div>
273
- <!--汇总表显示模板-->
274
- <div v-show="isActiveTotalForm" style="height:100%">
275
- <user-gas-eform :condition="condition"></user-gas-eform>
276
- </div>
277
- </template>
278
-
279
- <script>
280
- import {PagedList} from 'vue-client'
281
- import UserGasEcharts from './UserGasEcharts'
282
- import * as Util from '../../../Util'
283
- import getLodop from '../../../plugins/LodopFuncs'
284
- import plugins from '../../../plugins/GetLoginInfoService'
285
- import exportConfig from "../../sale/config/exportConfig";
286
- let readySomething = async function (self) {
287
- await self.$MagLoadParams.loadParam()
288
- self.initParams()
289
- }
290
- export default {
291
- title: '用气分析',
292
- props: ['data'],
293
- components: {UserGasEcharts},
294
- data() {
295
- return {
296
- other:[],
297
- footer:[],
298
- sumName: [],
299
- model: new PagedList('rs/sql/webmeter_getUserGasList', 20,{startDate: 'this.model.startDate', endDate: 'this.model.endDate'}),
300
- getGroupNameByDate: [
301
- {label: '年份', value: 'year'},
302
- {label: '月份', value: 'month'},
303
- {label: '周', value: 'week'}
304
- ],
305
- meterbrands: [],
306
- criteriaShow: false,
307
- reportStr: null,
308
- show: false,
309
- outlets: [],
310
- operator: [],
311
- filename: '',
312
- searchshow: true,
313
- startDate: '',
314
- endDate: '',
315
- echarts: false,
316
- isActiveTotalForm: false,
317
- condition: '1=1',
318
- groupname: ['year'],
319
- getgroupname: [
320
- {label: '年份', value: 'year'},
321
- {label: '月份', value: 'month'},
322
- {label: '周', value: 'week'},
323
- {label: '日', value: 'day'}
324
- ],
325
- orgCondtionStr: '(' + this.$login.f.orgid + ')',
326
- orgid:[this.$login.f.orgid],
327
- selectfields:[],
328
- }
329
- },
330
- ready() {
331
- this.$refs.paged.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
332
- this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
333
- //this.$refs.paged.$refs.cri.search();
334
- for(var item in exportConfig.webmeterusergasConfig){
335
- this.selectfields.push(item)
336
- }
337
- readySomething(this);
338
- },
339
- methods: {
340
- getotherfooter(){
341
- this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
342
- this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
343
- this.other=[];
344
- this.footer=[];
345
- let exportdata = this.getCondition;
346
- let otherInData=[];
347
- otherInData.push(`导出时间: ${this.$login.toStandardDateString()}`);
348
- otherInData.push(`导出人:${this.$login.f.name}`)
349
- let footerData=[],exportfield=this.getfield;
350
- footerData.push("合计");
351
- let self = this;
352
- for(var field in self.sumsmodel){
353
- footerData.push(`${self.sumsmodel[field]}`);
354
- }
355
- this.footer.push(footerData);
356
- this.other.push(otherInData);
357
- },
358
- // 查询开关
359
- hidden() {
360
- this.criteriaShow = !this.criteriaShow
361
- },
362
- SaveAsFile(str) {
363
- this.$showMessage('您是否需要导出本页数据?', ['confirm', 'cancel']).then((res) => {
364
- if (res === 'confirm') {
365
- let style = '<style>' +
366
- 'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;} .tdcenter{text-align: center;}</style>';
367
- let strHtml = style + document.getElementById(str).innerHTML;
368
- console.log(strHtml);
369
- let LODOP = getLodop();
370
- LODOP.PRINT_INIT('');
371
- LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
372
- LODOP.SAVE_TO_FILE('用气分析.xls')
373
- }
374
- })
375
- },
376
- clearmsg() {
377
- this.$refs.paged.$refs.cri.model = {}
378
- },
379
- initParams() {
380
- // 初始化气表品牌
381
- let brandArr = []
382
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
383
- let temp = {}
384
- temp.label = item.label
385
- temp.value = item.value.f_meter_brand
386
- brandArr.push(temp)
387
- })
388
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
389
-
390
- },
391
- search(args) {
392
- this.startDate = this.$refs.paged.$refs.cri.model.startDate
393
- this.endDate = this.$refs.paged.$refs.cri.model.endDate
394
- if (this.endDate == '' || this.startDate == '') {
395
- return this.$showMessage("时间区间的开始和结束时间不能为空!")
396
- }
397
- if (!this.orgCondtionStr){
398
- return this.$showMessage("请选择分公司!")
399
- }
400
- if (this.orgCondtionStr)
401
- this.condition = this.$refs.paged.$refs.cri.condition + `and h.f_orgid in ${this.orgCondtionStr}`
402
- else
403
- this.condition = this.$refs.paged.$refs.cri.condition
404
- this.model.params.f_orgid = this.orgCondtionStr
405
- this.model.params.f_residential_area = this.$refs.paged.$refs.cri.model.f_residential_area ==null|| this.$refs.paged.$refs.cri.model.f_residential_area==''?'':` and a.f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}'`
406
- args.condition = this.condition
407
- this.model.search(args.condition, args.model)
408
- },
409
- // 显示柱状图
410
- showEcharts() {
411
- this.echarts = true
412
- this.isActiveTotalForm = false
413
- },
414
- notShowTotalForm() {
415
- this.echarts = false
416
- this.isActiveTotalForm = false
417
- },
418
- // 不显示柱状图
419
- notShowEcharts() {
420
- this.echarts = false
421
- this.isActiveTotalForm = false
422
- },
423
- // 显示汇总数据表格
424
- showTotalForm() {
425
- this.echarts = false
426
- this.isActiveTotalForm = true
427
- },
428
- close() {
429
- this.show = false
430
- },
431
- getRes(obj) {
432
- this.orgCondtionStr = plugins.convertToIn(obj)
433
- },
434
- },
435
- watch: {
436
- 'data'(val) {
437
- if (val.f_files_path) {
438
- this.getFileContent(val.f_files_path)
439
- } else {
440
- this.reportStr = null
441
- }
442
- },
443
- sumsmodel: {
444
- handler: function(val) {
445
- this.getotherfooter();
446
- },
447
- deep: true
448
- }
449
- },
450
- computed: {
451
- getCondition() {
452
- let f_residential_area = this.$refs.paged.$refs.cri.model.f_residential_area ==null|| this.$refs.paged.$refs.cri.model.f_residential_area==''?'':` and a.f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}'`
453
- return {condition: `${this.$refs.paged.$refs.cri.condition} and h.f_orgid in ` + this.orgCondtionStr, f_residential_area:f_residential_area,startDate: this.$refs.paged.$refs.cri.model.startDate,endDate:this.$refs.paged.$refs.cri.model.endDate,f_orgid:this.orgCondtionStr}
454
- },
455
- getfield() {
456
- return exportConfig.webmeterusergasConfig
457
- },
458
- Gasusertype() {
459
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
460
- },
461
- valveStatus() {
462
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
463
- },
464
- Gasproperties() {
465
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
466
- }
467
- }
468
- }
469
- </script>
470
- <style>
471
- .mystyle {
472
- float: right;
473
- padding-right: 10%;
474
- }
475
-
476
- .mystyle1 {
477
- padding-top: 10px;
478
-
479
- }
480
-
481
- .mystyle2 {
482
- width: 100%;
483
- height: 35px;
484
- /*background: #00A3F0;*/
485
- padding-left: 15px;
486
- float: left;
487
- }
488
-
489
- .datapanel {
490
- color: #333;
491
- background-color: white;
492
- box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
493
- padding: 10px 10px 10px 10px;
494
- border-radius: 15px;
495
- }
496
- </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
+ <res-select :initresid="$parent.$parent.orgid"
13
+ style="width:60%"
14
+ @res-select="$parent.$parent.getRes"
15
+ restype='organization'>
16
+ </res-select>
17
+ </div>
18
+ <div class="col-sm-2 form-group">
19
+ <label class="font_normal_body">客户编号</label>
20
+ <input style="width:60%" class="input_search" condition="f_userinfo_code like '%{}%'" placeholder='客户编号' type="text"
21
+ v-el:meternumber v-model="model.f_userinfo_code" v-next-el='f_userinfo_code'
22
+ >
23
+ </div>
24
+ <div class="col-sm-2 form-group">
25
+ <label class="font_normal_body">客户名称</label>
26
+ <input style="width:60%" class="input_search" condition="f_user_name like '%{}%'" placeholder='客户名称' type="text"
27
+ v-el:username v-model="model.f_username" v-next-el='userid'>
28
+ </div>
29
+ <div class="col-sm-2 form-group">
30
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
31
+ <input style="width:60%" class="input_search" condition="f_meternumber = '{}'" placeholder='表号' type="text"
32
+ v-el:meternumber v-model="model.f_meternumber" v-next-el='meternumber'
33
+ >
34
+ </div>
35
+
36
+ <div class="col-sm-4 form-group button-range">
37
+ <button @click="search()" class="button_search button_spacing">查询</button>
38
+ <button @click="$parent.$parent.clearmsg" class="button_clear button_spacing">清空</button>
39
+ <button class="button_export button_spacing" style="width: max-content" @click="$parent.$parent.showTotalForm()" >显示汇总</button>
40
+ <!-- <button class="btn btn-success" @click="$parent.$parent.showEcharts()">显示图表</button>-->
41
+ <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>
42
+ <export-excel-plus :data="$parent.$parent.getCondition"
43
+ :defaultselect="$parent.$parent.selectfields"
44
+ :field="$parent.$parent.getfield"
45
+ :exportprogress="true" v-ref:exports
46
+ sqlurl="rs/logic/exportfileplus" sql-name="webmeter_getUserGasList" template-name='物联网用气分析查询导出'
47
+ :choose-col="true"></export-excel-plus>
48
+ </div>
49
+ </div>
50
+ <div class="row" v-show="$parent.$parent.criteriaShow">
51
+
52
+ <!--<div class="col-sm-2 form-group" >
53
+ <label class="font_normal_body">用气属性</label>
54
+ <v-select
55
+ placeholder='用气属性'
56
+ value-single="true"
57
+ :value.sync="model.f_gasproperties2"
58
+ v-model="model.f_gasproperties2"
59
+ :options='$parent.$parent.Gasproperties2'
60
+ close-on-select condition="uf.f_gasproperties2 {}">
61
+ </v-select>
62
+ </div>-->
63
+ <div class="col-sm-2 form-group">
64
+ <label class="font_normal_body">用气地址</label>
65
+ <input style="width:60%" class="input_search" condition="f_address like '%{}%'" placeholder='用气地址' type="text"
66
+ v-el:area v-el:xq v-model="model.f_address" v-next-el='address'
67
+ >
68
+ </div>
69
+ <div class="col-sm-2 form-group">
70
+ <label class="font_normal_body">小区名称</label>
71
+ <input style="width:60%" class="input_search" placeholder='小区名称' type="text"
72
+ v-el:area v-el:xq v-model="model.f_residential_area" v-next-el='f_residential_area'
73
+ >
74
+ </div>
75
+ <div class="col-sm-2 form-group">
76
+ <label class="font_normal_body">客户类型</label>
77
+ <v-select :options='$parent.$parent.Gasusertype'
78
+ :value.sync="model.f_user_type"
79
+ close-on-select
80
+ style="width:60%"
81
+ condition="f_user_type = '{}'"
82
+ id="f_user_type"
83
+ placeholder='客户类型'
84
+ v-model="model.f_user_type"
85
+ value-single="true">
86
+ </v-select>
87
+ </div>
88
+ <div class="col-sm-2 form-group">
89
+ <label class="font_normal_body">用气性质</label>
90
+ <v-select :options='$parent.$parent.Gasproperties'
91
+ :value.sync="model.f_gasproperties"
92
+ close-on-select
93
+ condition="f_gasproperties = '{}'"
94
+ id="f_gasproperties"
95
+ placeholder='用气性质'
96
+ style="width:60%"
97
+ v-model="model.f_gasproperties"
98
+ value-single="true">
99
+ </v-select>
100
+ </div>
101
+ <div class="col-sm-2 form-group">
102
+ <label class="font_normal_body">气表品牌</label>
103
+ <v-select :value.sync="model.f_meter_brand"
104
+ v-model="model.f_meter_brand"
105
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
106
+ condition="f_meter_brand = '{}'"
107
+ close-on-select></v-select>
108
+ </div>
109
+ <div class="col-sm-2 form-group">
110
+ <label class="font_normal_body">时间区间</label>
111
+ <datepicker :disabled-days-of-Week="[]" :format="'yyyy-MM-dd HH:mm:ss'"
112
+ :show-reset-button="reset"
113
+ :value.sync="model.startDate"
114
+
115
+ id="startDate"
116
+ style="width:60%"
117
+ placeholder="开始时间"
118
+ v-model="model.startDate">
119
+ </datepicker>
120
+ </div>
121
+ <div class="col-sm-2 form-group">
122
+ <label class="font_normal_body" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
123
+ <datepicker :disabled-days-of-Week="[]" :format="'yyyy-MM-dd HH:mm:ss'"
124
+ :show-reset-button="reset"
125
+ :value.sync="model.endDate"
126
+ style="width:60%"
127
+
128
+ id="endDate"
129
+ style="width:60%"
130
+ placeholder="结束日期"
131
+ v-model="model.endDate">
132
+ </datepicker>
133
+ </div>
134
+ <div class="col-sm-2 form-group">
135
+ <label for="inputStartDate" class="font_normal_body">结算日期</label>
136
+ <datepicker id="inputStartDate" placeholder="结算日期" style="width:60%"
137
+ v-model="model.inputStartDate"
138
+ :value.sync="model.inputStartDate"
139
+ :format="'yyyy-MM-dd HH:mm:ss'"
140
+ condition="f_input_date >= '{}'"
141
+ :show-reset-button="true"
142
+ >
143
+ </datepicker>
144
+ </div>
145
+ <div class="col-sm-2 form-group">
146
+ <label for="inputEndDate" class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&ensp;</label>
147
+ <datepicker id="inputEndDate" placeholder="结算日期" style="width:60%"
148
+ v-model="model.inputEndDate"
149
+ :value.sync="model.inputEndDate"
150
+ condition="f_input_date <= '{}'"
151
+ :format="'yyyy-MM-dd HH:mm:ss'"
152
+ :show-reset-button="true"
153
+ >
154
+ </datepicker>
155
+ </div>
156
+
157
+ <!--<div class="col-sm-2 form-group">
158
+ <label class="font_normal_body">用&nbsp;气&nbsp;量&nbsp;</label>
159
+ <input type="text" style="width:60%" class="input_search"
160
+ v-model="model.f_start_oughtamount" placeholder='起始气量'
161
+ >
162
+ </div>
163
+ <div class="col-sm-2 form-group">
164
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
165
+ <input type="text" style="width:60%" class="input_search"
166
+ v-model="model.f_end_oughtamount" placeholder='结束气量'
167
+ >
168
+ </div>-->
169
+ </div>
170
+ </div>
171
+ </criteria>
172
+ <data-grid :model="model" id="usergasall" partial='list' class="list_area table_sy" v-ref:grid>
173
+ <template partial='head'>
174
+ <tr>
175
+ <th style="text-align:center">
176
+ <nobr>客户编号</nobr>
177
+ </th>
178
+ <th style="text-align:center">
179
+ <nobr>客户类型</nobr>
180
+ </th>
181
+ <th style="text-align:center">
182
+ <nobr>用气性质</nobr>
183
+ </th>
184
+ <!--<th style="text-align:center"><nobr>用气属性</nobr></th>-->
185
+ <th style="text-align:center">
186
+ <nobr>客户名称</nobr>
187
+ </th>
188
+ <th style="text-align:center">
189
+ <nobr>用气地址</nobr>
190
+ </th>
191
+ <th style="text-align:center">
192
+ <nobr>气表品牌</nobr>
193
+ </th>
194
+ <th style="text-align:center">
195
+ <nobr>起始时间~终止时间</nobr>
196
+ </th>
197
+ <!-- <th style="text-align:center">-->
198
+ <!-- <nobr>终止时间</nobr>-->
199
+ <!-- </th>-->
200
+ <th style="text-align:center">
201
+ <nobr>表号</nobr>
202
+ </th>
203
+ <th style="text-align:center">
204
+ <nobr>期初余额(元)</nobr>
205
+ </th>
206
+ <th style="text-align:center">
207
+ <nobr>上期底数</nobr>
208
+ </th>
209
+ <th style="text-align:center">
210
+ <nobr>本期底数</nobr>
211
+ </th>
212
+ <!-- <th style="text-align:center"><nobr>气价(元/m³)</nobr></th>-->
213
+ <th style="text-align:center">
214
+ <nobr>用气量(m³)</nobr>
215
+ </th>
216
+ <th style="text-align:center">
217
+ <nobr>用气金额(元)</nobr>
218
+ </th>
219
+ <!-- <th style="text-align:center">-->
220
+ <!-- <nobr>充值金额(元)</nobr>-->
221
+ <!-- </th>-->
222
+ <th style="text-align:center">
223
+ <nobr>期末结余(元)</nobr>
224
+ </th>
225
+ <th style="text-align:center">
226
+ <nobr>组织</nobr>
227
+ </th>
228
+ </tr>
229
+
230
+
231
+ </template>
232
+ <template partial='body'>
233
+ <td>{{row.f_userinfo_code}}</td>
234
+ <td style="text-align:center">{{row.f_user_type}}</td>
235
+ <td style="text-align:center">{{row.f_gasproperties}}</td>
236
+ <!--<td style="text-align:center">{{row.f_gasproperties2}}</td>-->
237
+ <td style="text-align:center">
238
+ <nobr>{{row.f_user_name}}</nobr>
239
+ </td>
240
+ <td>
241
+ <nobr>{{row.f_address}}</nobr>
242
+ </td>
243
+ <td>
244
+ <nobr>{{row.f_meter_brand}}</nobr>
245
+ </td>
246
+ <td>
247
+ <nobr>{{row.f_hand_date}}</nobr>
248
+ </td>
249
+ <!-- <td>-->
250
+ <!-- <nobr>{{row.f_end_hand_date}}</nobr>-->
251
+ <!-- </td>-->
252
+ <td>{{row.f_meternumber}}</td>
253
+ <td style="text-align:center">{{row.f_balance}}</td>
254
+ <td style="text-align:center">{{row.f_last_tablebase}}</td>
255
+ <td style="text-align:center">{{row.f_tablebase}}</td>
256
+ <!--<td style="text-align:center">{{row.f_avg_price}}</td>-->
257
+ <td style="text-align:center">{{row.f_oughtamount}}</td>
258
+ <td style="text-align:center">{{row.f_oughtfee}}</td>
259
+ <!-- <td style="text-align:center">{{row.f_collection}}</td>-->
260
+ <td style="text-align:center">{{row.f_curbalance}}</td>
261
+ <td style="text-align:center">{{row.f_organization_name}}</td>
262
+ </template>
263
+ </data-grid>
264
+ </criteria-paged>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ </div>
269
+ <div v-show="echarts">
270
+ <user-gas-echarts :condition="condition" :echarts="echarts" :enddate="endDate"
271
+ :groupname="groupname[0]" :startdate="startDate"></user-gas-echarts>
272
+ </div>
273
+ <!--汇总表显示模板-->
274
+ <div v-show="isActiveTotalForm" style="height:100%">
275
+ <user-gas-eform :condition="condition"></user-gas-eform>
276
+ </div>
277
+ </template>
278
+
279
+ <script>
280
+ import {PagedList} from 'vue-client'
281
+ import UserGasEcharts from './UserGasEcharts'
282
+ import * as Util from '../../../Util'
283
+ import getLodop from '../../../plugins/LodopFuncs'
284
+ import plugins from '../../../plugins/GetLoginInfoService'
285
+ import exportConfig from "../../sale/config/exportConfig";
286
+ let readySomething = async function (self) {
287
+ await self.$MagLoadParams.loadParam()
288
+ self.initParams()
289
+ }
290
+ export default {
291
+ title: '用气分析',
292
+ props: ['data'],
293
+ components: {UserGasEcharts},
294
+ data() {
295
+ return {
296
+ other:[],
297
+ footer:[],
298
+ sumName: [],
299
+ model: new PagedList('rs/sql/webmeter_getUserGasList', 20,{startDate: 'this.model.startDate', endDate: 'this.model.endDate'}),
300
+ getGroupNameByDate: [
301
+ {label: '年份', value: 'year'},
302
+ {label: '月份', value: 'month'},
303
+ {label: '周', value: 'week'}
304
+ ],
305
+ meterbrands: [],
306
+ criteriaShow: false,
307
+ reportStr: null,
308
+ show: false,
309
+ outlets: [],
310
+ operator: [],
311
+ filename: '',
312
+ searchshow: true,
313
+ startDate: '',
314
+ endDate: '',
315
+ echarts: false,
316
+ isActiveTotalForm: false,
317
+ condition: '1=1',
318
+ groupname: ['year'],
319
+ getgroupname: [
320
+ {label: '年份', value: 'year'},
321
+ {label: '月份', value: 'month'},
322
+ {label: '周', value: 'week'},
323
+ {label: '日', value: 'day'}
324
+ ],
325
+ orgCondtionStr: '(' + this.$login.f.orgid + ')',
326
+ orgid:[this.$login.f.orgid],
327
+ selectfields:[],
328
+ }
329
+ },
330
+ ready() {
331
+ this.$refs.paged.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
332
+ this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
333
+ //this.$refs.paged.$refs.cri.search();
334
+ for(var item in exportConfig.webmeterusergasConfig){
335
+ this.selectfields.push(item)
336
+ }
337
+ readySomething(this);
338
+ },
339
+ methods: {
340
+ getotherfooter(){
341
+ this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
342
+ this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
343
+ this.other=[];
344
+ this.footer=[];
345
+ let exportdata = this.getCondition;
346
+ let otherInData=[];
347
+ otherInData.push(`导出时间: ${this.$login.toStandardDateString()}`);
348
+ otherInData.push(`导出人:${this.$login.f.name}`)
349
+ let footerData=[],exportfield=this.getfield;
350
+ footerData.push("合计");
351
+ let self = this;
352
+ for(var field in self.sumsmodel){
353
+ footerData.push(`${self.sumsmodel[field]}`);
354
+ }
355
+ this.footer.push(footerData);
356
+ this.other.push(otherInData);
357
+ },
358
+ // 查询开关
359
+ hidden() {
360
+ this.criteriaShow = !this.criteriaShow
361
+ },
362
+ SaveAsFile(str) {
363
+ this.$showMessage('您是否需要导出本页数据?', ['confirm', 'cancel']).then((res) => {
364
+ if (res === 'confirm') {
365
+ let style = '<style>' +
366
+ 'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;} .tdcenter{text-align: center;}</style>';
367
+ let strHtml = style + document.getElementById(str).innerHTML;
368
+ console.log(strHtml);
369
+ let LODOP = getLodop();
370
+ LODOP.PRINT_INIT('');
371
+ LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
372
+ LODOP.SAVE_TO_FILE('用气分析.xls')
373
+ }
374
+ })
375
+ },
376
+ clearmsg() {
377
+ this.$refs.paged.$refs.cri.model = {}
378
+ },
379
+ initParams() {
380
+ // 初始化气表品牌
381
+ let brandArr = []
382
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
383
+ let temp = {}
384
+ temp.label = item.label
385
+ temp.value = item.value.f_meter_brand
386
+ brandArr.push(temp)
387
+ })
388
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
389
+
390
+ },
391
+ search(args) {
392
+ this.startDate = this.$refs.paged.$refs.cri.model.startDate
393
+ this.endDate = this.$refs.paged.$refs.cri.model.endDate
394
+ if (this.endDate == '' || this.startDate == '') {
395
+ return this.$showMessage("时间区间的开始和结束时间不能为空!")
396
+ }
397
+ if (!this.orgCondtionStr){
398
+ return this.$showMessage("请选择分公司!")
399
+ }
400
+ if (this.orgCondtionStr)
401
+ this.condition = this.$refs.paged.$refs.cri.condition + `and h.f_orgid in ${this.orgCondtionStr}`
402
+ else
403
+ this.condition = this.$refs.paged.$refs.cri.condition
404
+ this.model.params.f_orgid = this.orgCondtionStr
405
+ this.model.params.f_residential_area = this.$refs.paged.$refs.cri.model.f_residential_area ==null|| this.$refs.paged.$refs.cri.model.f_residential_area==''?'':` and a.f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}'`
406
+ args.condition = this.condition
407
+ this.model.search(args.condition, args.model)
408
+ },
409
+ // 显示柱状图
410
+ showEcharts() {
411
+ this.echarts = true
412
+ this.isActiveTotalForm = false
413
+ },
414
+ notShowTotalForm() {
415
+ this.echarts = false
416
+ this.isActiveTotalForm = false
417
+ },
418
+ // 不显示柱状图
419
+ notShowEcharts() {
420
+ this.echarts = false
421
+ this.isActiveTotalForm = false
422
+ },
423
+ // 显示汇总数据表格
424
+ showTotalForm() {
425
+ this.echarts = false
426
+ this.isActiveTotalForm = true
427
+ },
428
+ close() {
429
+ this.show = false
430
+ },
431
+ getRes(obj) {
432
+ this.orgCondtionStr = plugins.convertToIn(obj)
433
+ },
434
+ },
435
+ watch: {
436
+ 'data'(val) {
437
+ if (val.f_files_path) {
438
+ this.getFileContent(val.f_files_path)
439
+ } else {
440
+ this.reportStr = null
441
+ }
442
+ },
443
+ sumsmodel: {
444
+ handler: function(val) {
445
+ this.getotherfooter();
446
+ },
447
+ deep: true
448
+ }
449
+ },
450
+ computed: {
451
+ getCondition() {
452
+ let f_residential_area = this.$refs.paged.$refs.cri.model.f_residential_area ==null|| this.$refs.paged.$refs.cri.model.f_residential_area==''?'':` and a.f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}'`
453
+ return {condition: `${this.$refs.paged.$refs.cri.condition} and h.f_orgid in ` + this.orgCondtionStr, f_residential_area:f_residential_area,startDate: this.$refs.paged.$refs.cri.model.startDate,endDate:this.$refs.paged.$refs.cri.model.endDate,f_orgid:this.orgCondtionStr}
454
+ },
455
+ getfield() {
456
+ return exportConfig.webmeterusergasConfig
457
+ },
458
+ Gasusertype() {
459
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
460
+ },
461
+ valveStatus() {
462
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
463
+ },
464
+ Gasproperties() {
465
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
466
+ }
467
+ }
468
+ }
469
+ </script>
470
+ <style>
471
+ .mystyle {
472
+ float: right;
473
+ padding-right: 10%;
474
+ }
475
+
476
+ .mystyle1 {
477
+ padding-top: 10px;
478
+
479
+ }
480
+
481
+ .mystyle2 {
482
+ width: 100%;
483
+ height: 35px;
484
+ /*background: #00A3F0;*/
485
+ padding-left: 15px;
486
+ float: left;
487
+ }
488
+
489
+ .datapanel {
490
+ color: #333;
491
+ background-color: white;
492
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
493
+ padding: 10px 10px 10px 10px;
494
+ border-radius: 15px;
495
+ }
496
+ </style>