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