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