manage-client 3.3.94-wn2 → 3.3.95

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,693 +1,639 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main">
4
- <div class="flex" v-if="!show">
5
- <criteria-paged :model="model" v-ref:paged>
6
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- <div class="row">
9
- <div :class="$parent.$parent.style">
10
- <label class="font_normal_body">按单位查询</label>
11
- <v-select :value.sync="$parent.$parent.f_is_company"
12
- :options='$parent.$parent.isCompany'
13
- placeholder='请选择' v-model="$parent.$parent.f_is_company"
14
- @change="$parent.$parent.isCompanyChange()"
15
- value-single="true"
16
- :disabled="$parent.$parent.isCompanyShow"
17
- close-on-select></v-select>
18
- </div>
19
- <div :class="$parent.$parent.style">
20
- <label class="font_normal_body">按小区查询</label>
21
- <v-select :value.sync="$parent.$parent.f_is_area"
22
- :options='$parent.$parent.isArea'
23
- placeholder='请选择' v-model="$parent.$parent.f_is_area"
24
- @change="$parent.$parent.isAreaChange()"
25
- value-single="true"
26
- :disabled="$parent.$parent.isAreaShow"
27
- close-on-select></v-select>
28
- </div>
29
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showDetail">
30
- <label for="startDate" class="font_normal_body">开始日期</label>
31
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
32
- v-model="model.startDate"
33
- :value.sync="model.startDate"
34
- :format="'yyyy-MM-dd'"
35
- :show-reset-button="true">
36
- </datepicker>
37
- </div>
38
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showDetail">
39
- <label for="endDate" class="font_normal_body">结束日期</label>
40
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
41
- v-model="model.endDate"
42
- :value.sync="model.endDate"
43
- :format="'yyyy-MM-dd'"
44
- :show-reset-button="true">
45
- </datepicker>
46
- </div>
47
- <div class="span" style="float:right;">
48
- <button class="button_search button_spacing" @click="search()">查询</button>
49
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
50
- <export-excel :data="$parent.$parent.getCondition"
51
- :field="$parent.$parent.getfield"
52
- :header="$parent.$parent.other"
53
- :footer="$parent.$parent.footer"
54
- sqlurl="rs/logic/exportfile"
55
- sql-name="manage_chargeSummary"
56
- template-name='营收汇总报表'
57
- :choose-col="true"></export-excel>
58
- <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model"
59
- :field="$parent.$parent.getfield"
60
- titletable="营收汇总报表" :starthead="$parent.$parent.startDate"
61
- :defaultfield="$parent.$parent.defaultfield"
62
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
63
- <div
64
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
65
- @click="$parent.$parent.hidden()"
66
- class="button_spacing"
67
- style="float: right"></div>
68
- </div>
69
- </div>
70
- <div class="row" v-if="$parent.$parent.criteriaShow">
71
- <res-select-group
72
- :style="$parent.$parent.style"
73
- :show-component="['company','slicearea']"
74
- :initres="$parent.$parent.initres"
75
- @re-res="$parent.$parent.getRes"
76
- v-ref:sel
77
- ></res-select-group>
78
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.showDetail">
79
- <label for="startDate" class="font_normal_body">开始日期</label>
80
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
81
- v-model="model.startDate"
82
- :value.sync="model.startDate"
83
- :format="'yyyy-MM-dd'"
84
- :show-reset-button="true">
85
- </datepicker>
86
- </div>
87
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.showDetail">
88
- <label for="endDate" class="font_normal_body">结束日期</label>
89
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
90
- v-model="model.endDate"
91
- :value.sync="model.endDate"
92
- :format="'yyyy-MM-dd'"
93
- :show-reset-button="true">
94
- </datepicker>
95
- </div>
96
- <div :class="$parent.$parent.style">
97
- <label class="font_normal_body">用户类型</label>
98
- <v-select :value.sync="model.f_user_type"
99
- :options='$parent.$parent.usertypes'
100
- placeholder='请选择' v-model="model.f_user_type"
101
- :value-single="true"
102
- @change="$parent.$parent.userTypeChange()"
103
- close-on-select></v-select>
104
- </div>
105
- <div :class="$parent.$parent.style">
106
- <label for="f_user_usetype" class="font_normal_body ">用气类型</label>
107
- <v-select :value.sync="model.f_user_usetype" :search="false"
108
- @change="$parent.$parent.userUseTypeChange()"
109
- v-model="model.f_user_usetype"
110
- :multiple="true"
111
- :options='$parent.$parent.userusetypes'
112
- condition="f_user_usetype in {}"
113
- placeholder='用气类型'>
114
- </v-select>
115
- </div>
116
- <div :class="$parent.$parent.style">
117
- <label for="f_use_institution" class="font_normal_body">用气机构</label>
118
- <v-select :value.sync="model.f_use_institution" :search="false"
119
- @change="$parent.$parent.userUseInstitutionChange()"
120
- v-model="model.f_use_institution"
121
- :value-single="true"
122
- :options='$parent.$parent.useinstitutions'
123
- condition="f_use_institution = '{}'"
124
- placeholder='用气机构'
125
- close-on-select>
126
- </v-select>
127
- </div>
128
- <div :class="$parent.$parent.style">
129
- <label for="f_user_usenature" class="font_normal_body ">使用性质</label>
130
- <v-select :value.sync="model.f_user_usenature" :search="false"
131
- v-model="model.f_user_usenature"
132
- :value-single="true"
133
- :options='$parent.$parent.userusenatures'
134
- condition="f_user_usenature = '{}'"
135
- placeholder='使用性质'
136
- close-on-select>
137
- </v-select>
138
- </div>
139
- <div :class="$parent.$parent.style">
140
- <label for="endDate" class="font_normal_body">单位名称</label>
141
- <v-select :value.sync="model.f_company_id"
142
- class="select_list select"
143
- enter-push :disabled="$parent.$parent.isCompanyShow"
144
- v-model="model.f_company_id" multiple="true"
145
- @select-search="$parent.$parent.getCompanyList"
146
- :options='$parent.$parent.corporatename' placeholder='单位名称'
147
- condition="f_company_id in {}">
148
- </v-select>
149
- </div>
150
- <div :class="$parent.$parent.style">
151
- <label for="endDate" class="font_normal_body">小区名称</label>
152
- <v-select :value.sync="model.f_residential_area_id"
153
- class="select_list select"
154
- enter-push :disabled="$parent.$parent.isAreaShow"
155
- v-model="model.f_residential_area_id" multiple="true"
156
- @select-search="$parent.$parent.getAreaList"
157
- :options='$parent.$parent.areaList' placeholder='小区名称'
158
- condition="f_residential_area_id in {}">
159
- </v-select>
160
- </div>
161
- </div>
162
- </div>
163
- </criteria>
164
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
165
- <template partial='head'>
166
- <tr>
167
- <th>
168
- <nobr>序号</nobr>
169
- </th>
170
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
171
- <nobr>用户编号</nobr>
172
- </th>
173
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
174
- <nobr>用户名称</nobr>
175
- </th>
176
- <th v-show="$parent.$parent.$parent.isAreaShow">
177
- <nobr>单位名称</nobr>
178
- </th>
179
- <th v-show="$parent.$parent.$parent.isCompanyShow">
180
- <nobr>小区名称</nobr>
181
- </th>
182
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
183
- <nobr>购气(充值)时间</nobr>
184
- </th>
185
- <th v-show="$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
186
- <nobr>卡表购气量</nobr>
187
- </th>
188
- <th v-show="$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
189
- <nobr>卡表购气金额</nobr>
190
- </th>
191
- <th v-show="$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
192
- <nobr>物联网表购气金额</nobr>
193
- </th>
194
- <th v-show="$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
195
- <nobr>表具数量</nobr>
196
- </th>
197
- <th>
198
- <nobr>购气(充值)数量</nobr>
199
- </th>
200
- <th>
201
- <nobr>一阶气量</nobr>
202
- </th>
203
- <th v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
204
- <nobr>二阶气量</nobr>
205
- </th>
206
- <th v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
207
- <nobr>三阶气量</nobr>
208
- </th>
209
- <th>
210
- <nobr>实收款</nobr>
211
- </th>
212
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
213
- <nobr>购气网点</nobr>
214
- </th>
215
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
216
- <nobr>操作员</nobr>
217
- </th>
218
- </tr>
219
- </template>
220
- <template partial='body'>
221
- <td style="text-align:center">
222
- <nobr>{{ $index + 1 }}</nobr>
223
- </td>
224
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
225
- <nobr>{{ row.f_userinfo_code }}</nobr>
226
- </td>
227
- <td style="text-align: center;" v-show="$parent.$parent.$parent.isAreaShow">
228
- <nobr><span @click="$parent.$parent.$parent.toDetail(row,'1')"><a>{{ row.f_company_name }}</a></span></nobr>
229
- </td>
230
- <td style="text-align: center;" v-show="$parent.$parent.$parent.isCompanyShow">
231
- <nobr><span @click="$parent.$parent.$parent.toDetail(row,'2')"><a>{{ row.f_residential_area }}</a></span></nobr>
232
- </td>
233
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
234
- <nobr>{{ row.f_user_name }}</nobr>
235
- </td>
236
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
237
- <nobr>{{ row.f_operate_date }}</nobr>
238
- </td>
239
- <td style="text-align: center;" v-show="$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
240
- <nobr>{{ row.f_gas }}</nobr>
241
- </td>
242
- <td style="text-align: center;" v-show="$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
243
- <nobr>{{ row.f_card_money }}</nobr>
244
- </td>
245
- <td style="text-align: center;" v-show="$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
246
- <nobr>{{ row.f_money }}</nobr>
247
- </td>
248
- <td style="text-align: center;" v-show="$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
249
- <nobr>{{ row.f_table_num }}</nobr>
250
- </td>
251
- <td style="text-align: center;">
252
- <nobr>{{ row.f_pregas }}</nobr>
253
- </td>
254
- <td style="text-align: center;">
255
- <nobr>{{ row.f_stairamount1 }}</nobr>
256
- </td>
257
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
258
- <nobr>{{ row.f_stairamount2 }}</nobr>
259
- </td>
260
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
261
- <nobr>{{ row.f_stairamount3 }}</nobr>
262
- </td>
263
- <td style="text-align: center;">
264
- <nobr>{{ row.f_collection }}</nobr>
265
- </td>
266
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
267
- <nobr>{{ row.f_depname }}</nobr>
268
- </td>
269
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
270
- <nobr>{{ row.f_operator }}</nobr>
271
- </td>
272
- </template>
273
- <template partial='foot'></template>
274
- </data-grid>
275
- </criteria-paged>
276
- <table class="table-hover">
277
- <tr style="position: relative" class="table-bordered">
278
- <td
279
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
280
- 汇总信息
281
- </td>
282
- <td
283
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
284
- 卡表购气:&emsp;{{ sumsmodel.f_gas.toFixed(2) }}m³
285
- </td>
286
- <td
287
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
288
- 卡表购气金额:&emsp;{{ sumsmodel.f_card_money.toFixed(2) }}元
289
- </td>
290
- <td
291
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
292
- 物联表充值:&emsp;{{ sumsmodel.f_money.toFixed(2) }}元
293
- </td>
294
- <td
295
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
296
- 收款合计:&emsp;{{ sumsmodel.f_collection.toFixed(2) }}元
297
- </td>
298
- </tr>
299
- </table>
300
- </div>
301
- </div>
302
- </div>
303
- </template>
304
- <script>
305
- import {PagedList, HttpResetClass} from 'vue-client'
306
- import defaultPrint from './config/DefaultPrint'
307
- import exportConfig from './config/exportConfig'
308
- import PrintDataSelf from '../../components/sale/common/PrintDataSelf'
309
-
310
- let readySomething = async function (self) {
311
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
312
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
313
- self.getCompanyList()
314
- self.getAreaList()
315
- }
316
- export default {
317
- title: '用户查询',
318
- data () {
319
- return {
320
- depresid: [],
321
- userresid: [],
322
- f_orgid: this.$login.f.orgid,
323
- f_depid: this.$login.f.depids,
324
- f_operatorid: this.$login.f.id,
325
- operatorid: [],
326
- depid: [],
327
- orgname: '',
328
- depname: [],
329
- operatorname: '',
330
- condition: '',
331
- orgConditionStr: '',
332
- data: {},
333
- other: [],
334
- footer: [],
335
- model: new PagedList('rs/sql/manage_chargeSummary', 20, {
336
- startDate: 'this.model.startDate',
337
- endDate: 'this.model.endDate'
338
- }, {
339
- f_collection: 0,
340
- f_gas: 0,
341
- f_card_money:0,
342
- f_money: 0
343
- }),
344
- gasproperties: [],
345
- show: false,
346
- rowdata: {},
347
- areaList: [],
348
- modelval: [],
349
- startDate: '',
350
- endDate: '',
351
- inputtouPerson: [],
352
- printshow: false,
353
- all: false,
354
- fields: {},
355
- thead: '',
356
- tfoot: '',
357
- defaultfield: [],
358
- sumsmodel: {},
359
- initres: {
360
- org: [this.$login.f.orgid],
361
- slice_area: [],
362
- },
363
- criteriaShow: false,
364
- userusetypes: [],
365
- useinstitutions: [],
366
- userusenatures: [],
367
- sumExport: {'f_gas': '卡表购气', 'f_collection': '实收款', 'f_money': '物联表充值'},
368
- isCompany: [{label: '是', value: '是'}, {label: '否', value: '否'}],
369
- isArea: [{label: '是', value: '是'}, {label: '否', value: '否'}],
370
- f_is_company: '否',
371
- f_is_area: '否',
372
- isCompanyShow: false,
373
- isAreaShow: false,
374
- corporatename: []
375
- }
376
- },
377
- props: {
378
- style: {
379
- type: String,
380
- default: 'col-sm-2 form-group'
381
- }
382
- },
383
- ready () {
384
- readySomething(this).then(() => {
385
- this.$emit('ready')
386
- }).catch((error) => {
387
- this.$emit('error', error)
388
- })
389
- },
390
- methods: {
391
- toDetail (row, val) {
392
- row.type = val
393
- this.$dispatch('user-detail', row)
394
- },
395
- async getCompanyList(searchText){
396
- let condition = ' 1 = 1 '
397
- if (searchText) {
398
- condition = ` f_company_name like '%${searchText}%' `
399
- }
400
- let HttpReset = new HttpResetClass()
401
- HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
402
- data: {
403
- items: 'f_company_name, id',
404
- tablename: 't_company',
405
- orderitem: 'id desc',
406
- condition: condition
407
- }
408
- }, {resolveMsg: null, rejectMsg: '获取单位信息失败!'}).then((req) => {
409
- let redata = []
410
- req.data.forEach((row, n) => {
411
- redata[n] = {
412
- label: row.f_company_name,
413
- value: row.id
414
- }
415
- })
416
- this.corporatename = [{label: '全部', value: ''}, ...redata]
417
- })
418
- },
419
- getAreaList (searchText) {
420
- let condition = ' 1 = 1 '
421
- if (searchText) {
422
- condition = ` f_residential_area like '%${searchText}%' `
423
- }
424
- let HttpReset = new HttpResetClass()
425
- HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
426
- data: {
427
- items: 'f_residential_area, id',
428
- tablename: 't_area',
429
- orderitem: 'id desc',
430
- condition: condition
431
- }
432
- }, {resolveMsg: null, rejectMsg: '获取小区信息失败!'}).then((req) => {
433
- let redata = []
434
- req.data.forEach((row, n) => {
435
- redata[n] = {
436
- label: row.f_residential_area,
437
- value: row.id
438
- }
439
- })
440
- this.areaList = [{label: '全部', value: ''}, ...redata]
441
- })
442
- },
443
- clear() {
444
- //清空部门和人员
445
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
446
- //部门和人员变为全选
447
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
448
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
449
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
450
- this.$refs.paged.$refs.cri.model[key] = []
451
- })
452
- this.f_is_company = '否'
453
- this.f_is_area = '否'
454
- },
455
- isAreaChange () {
456
- if(this.f_is_area){
457
- if (this.f_is_area == '是') {
458
- this.isCompanyShow = true
459
- this.model = new PagedList('rs/sql/manage_chargeSummaryByArea', 20, {
460
- startDate: 'this.model.startDate',
461
- endDate: 'this.model.endDate',
462
- condition2: 'this.model.condition2'
463
- }, {f_collection: 0, f_gas: 0, f_money: 0,f_card_money:0})
464
- } else {
465
- this.isCompanyShow = false
466
- this.model = new PagedList('rs/sql/manage_chargeSummary', 20, {
467
- startDate: 'this.model.startDate',
468
- endDate: 'this.model.endDate'
469
- }, {f_collection: 0, f_gas: 0, f_money: 0,f_card_money:0,})
470
- }
471
- }
472
- },
473
- isCompanyChange () {
474
- if (this.f_is_company) {
475
- if (this.f_is_company == '是') {
476
- this.isAreaShow = true
477
- this.model = new PagedList('rs/sql/manage_chargeSummaryByCompany', 20, {
478
- startDate: 'this.model.startDate',
479
- endDate: 'this.model.endDate',
480
- condition2: 'this.model.condition2'
481
- }, {f_collection: 0, f_gas: 0, f_money: 0,f_card_money:0,})
482
- } else {
483
- this.isAreaShow = false
484
- this.model = new PagedList('rs/sql/manage_chargeSummary', 20, {
485
- startDate: 'this.model.startDate',
486
- endDate: 'this.model.endDate'
487
- }, {f_collection: 0, f_gas: 0, f_money: 0,f_card_money:0,})
488
- }
489
- }
490
- },
491
- userTypeChange () {
492
- this.userusetypes = []
493
- this.userusenatures = []
494
- this.useinstitutions = []
495
- this.$refs.paged.$refs.cri.model.f_user_usetype = []
496
- this.$refs.paged.$refs.cri.model.f_use_institution = ''
497
- this.$refs.paged.$refs.cri.model.f_user_usenature = ''
498
- if (this.$refs.paged.$refs.cri.model.f_user_type) {
499
- let str = this.$refs.paged.$refs.cri.model.f_user_type + '用气类型'
500
- this.userusetypes = this.$appdata.getParam(str)
501
- }
502
- },
503
- userUseTypeChange () {
504
- this.useinstitutions = []
505
- this.userusenatures = []
506
- this.$refs.paged.$refs.cri.model.f_use_institution = ''
507
- this.$refs.paged.$refs.cri.model.f_user_usenature = ''
508
- if (this.$refs.paged.$refs.cri.model.f_user_usetype.length > 0) {
509
- for (var i = 0; i < this.$refs.paged.$refs.cri.model.f_user_usetype.length; i++) {
510
- let str = this.$refs.paged.$refs.cri.model.f_user_usetype[i] + '机构'
511
- let getParam = this.$appdata.getParam(str)
512
- Array.prototype.push.apply(this.useinstitutions, getParam);
513
- }
514
- }
515
- let temp = {}
516
- this.useinstitutions = this.useinstitutions.filter(function(item) {
517
- var key = JSON.stringify(item);
518
- return temp.hasOwnProperty(key) ? false : (temp[key] = true);
519
- });
520
- },
521
- userUseInstitutionChange () {
522
- this.userusenatures = []
523
- this.$refs.paged.$refs.cri.model.f_user_usenature = ''
524
- if (this.$refs.paged.$refs.cri.model.f_use_institution) {
525
- let str = this.$refs.paged.$refs.cri.model.f_use_institution + '使用性质'
526
- this.userusenatures = this.$appdata.getParam(str)
527
- }
528
- },
529
- hidden () {
530
- this.criteriaShow = !this.criteriaShow
531
- },
532
- getotherfooter () {
533
- this.other = []
534
- this.footer = []
535
- let exportdata = this.getCondition
536
- let otherInData = []
537
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
538
- let footerData = [], exportfield = this.sumExport
539
- footerData.push('合计')
540
- let self = this
541
- for (var field in self.sumsmodel) {
542
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`)
543
- }
544
- this.footer.push(footerData)
545
- this.other.push(otherInData)
546
- },
547
- search () {
548
- this.$refs.paged.$refs.cri.search()
549
- },
550
- appendCondition (data) {
551
- console.log('data=====>',data)
552
- let stringValue = ''
553
- for (var i = 0; i < data.length; i++) {
554
- if (data[i]) {
555
- if (i === data.length - 1) {
556
- stringValue = stringValue + "'" + data[i] + "'"
557
- } else {
558
- stringValue = stringValue + "'" + data[i] + "',"
559
- }
560
- }
561
- }
562
- return stringValue
563
- },
564
- async selfSearch (args) {
565
- let companyCondition2 = '1=1'
566
- if (!this.orgConditionStr) {
567
- args.condition = `${args.condition}` + ' and f_orgid = ' + this.$login.f.orgid
568
- companyCondition2 = companyCondition2 + ' and f_orgid = ' + this.$login.f.orgid
569
- } else {
570
- args.condition = `${args.condition}` + this.orgConditionStr
571
- companyCondition2 = companyCondition2 + this.orgConditionStr
572
- }
573
- if (this.isAreaShow || this.isCompanyShow) {
574
- if (args.model.f_company_id.length > 0) {
575
- companyCondition2 = companyCondition2 + ' and id in (' + await this.appendCondition(args.model.f_company_id) + ')'
576
- }
577
- if (args.model.f_residential_area_id.length > 0) {
578
- companyCondition2 = companyCondition2 + ' and id in (' + await this.appendCondition(args.model.f_residential_area_id) + ')'
579
- }
580
- }
581
- if (this.$refs.paged.$refs.cri.model.f_user_type == '民用' && !this.$refs.paged.$refs.cri.model.f_user_usetype[0]) {
582
- args.condition = args.condition + " and f_user_usetype in ('居民用气')"
583
- } else if (this.$refs.paged.$refs.cri.model.f_user_type == '非民用' && !this.$refs.paged.$refs.cri.model.f_user_usetype[0]) {
584
- args.condition = args.condition + " and f_user_usetype in ('公福用气','商业用户','工业用户')"
585
- }
586
- args.model.condition2 = companyCondition2
587
- this.condition = args.condition
588
- console.log("查看条件",this.condition)
589
- await this.model.search(args.condition, args.model)
590
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
591
- this.card = ''
592
- this.IdCardInfo = ''
593
- console.log('合计字段', this.sumsmodel)
594
- this.$dispatch('cancel')
595
- },
596
- getRes (obj) {
597
- this.orgConditionStr = obj
598
- },
599
- stamp () {
600
- this.all = false
601
- //默认选择要打印的列
602
- this.modelval = defaultPrint.config
603
- this.fields = this.getfield
604
- console.log('所有打印字段', this.fields)
605
- this.printshow = true
606
- this.put()
607
- },
608
- put () {
609
- // 对Modelval进行排序
610
- this.sortModelval()
611
- this.thead = `<tr><th colspan=${this.modelval.length}>用户查询</th></tr><tr>`
612
- for (let key of this.modelval) {
613
- this.thead += '<th>' + this.fields[key] + '</th>'
614
- }
615
- this.thead += '</tr>'
616
- },
617
- print () {
618
- this.$refs.print.PrintAsFile()
619
- this.printshow = false
620
- },
621
- dealmsg (val) {
622
- console.log('---------------dealmsg')
623
- this.rowdata = val
624
- this.show = true
625
- val.model = this.model.model
626
- this.$dispatch('deal-msg', val)
627
- },
628
- close () {
629
- this.printshow = false
630
- this.all = false
631
- },
632
- // 对选择的列进行排序
633
- sortModelval () {
634
- let sortModel = []
635
- Object.keys(this.fields).forEach((key) => {
636
- if (this.modelval.includes(key)) {
637
- sortModel.push(key)
638
- }
639
- })
640
- this.modelval = sortModel
641
- console.log('选择的打印的字段', this.modelval)
642
- }
643
- },
644
- watch: {
645
- 'all' (val) {
646
- if (val) {
647
- this.modelval = this.bodyData
648
- } else {
649
- this.modelval = defaultPrint.config
650
- this.put()
651
- }
652
- },
653
- sumsmodel: {
654
- handler: function (val) {
655
- this.getotherfooter()
656
- },
657
- deep: true
658
- },
659
- 'modelval.length' () {
660
- this.put()
661
- }
662
- },
663
- computed: {
664
- getCondition () {
665
- return {
666
- condition: this.condition,
667
- startDate: this.$refs.paged.$refs.cri.model.startDate,
668
- endDate: this.$refs.paged.$refs.cri.model.endDate,
669
- condition2: this.$refs.paged.$refs.cri.model.condition2
670
- }
671
- },
672
- getfield () {
673
- let field
674
- if (this.isAreaShow) {
675
- field = exportConfig.manageChargeSummaryByCompanyConfig
676
- } else if (this.isCompanyShow) {
677
- field = exportConfig.manageChargeSummaryByAreaConfig
678
- } else {
679
- field = exportConfig.manageChargeSummaryConfig
680
- }
681
- return field
682
- },
683
- useTypes () {
684
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
685
- },
686
- usertypes () {
687
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
688
- }
689
-
690
- }
691
- }
692
- </script>
693
-
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label class="font_normal_body">按单位查询</label>
11
+ <v-select :value.sync="$parent.$parent.f_is_company"
12
+ :options='$parent.$parent.isCompany'
13
+ placeholder='请选择' v-model="$parent.$parent.f_is_company"
14
+ @change="$parent.$parent.isCompanyChange()"
15
+ value-single="true"
16
+ :disabled="$parent.$parent.isCompanyShow"
17
+ close-on-select></v-select>
18
+ </div>
19
+ <div class="col-sm-2 form-group">
20
+ <label class="font_normal_body">按小区查询</label>
21
+ <v-select :value.sync="$parent.$parent.f_is_area"
22
+ :options='$parent.$parent.isArea'
23
+ placeholder='请选择' v-model="$parent.$parent.f_is_area"
24
+ @change="$parent.$parent.isAreaChange()"
25
+ value-single="true"
26
+ :disabled="$parent.$parent.isAreaShow"
27
+ close-on-select></v-select>
28
+ </div>
29
+ <div class="col-sm-2 form-group">
30
+ <label for="startDate" class="font_normal_body">开始日期</label>
31
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
32
+ v-model="model.startDate"
33
+ :value.sync="model.startDate"
34
+ :format="'yyyy-MM-dd 00:00:00'"
35
+ :show-reset-button="true">
36
+ </datepicker>
37
+ </div>
38
+ <div class="col-sm-2 form-group">
39
+ <label for="endDate" class="font_normal_body">结束日期</label>
40
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
41
+ v-model="model.endDate"
42
+ :value.sync="model.endDate"
43
+ :format="'yyyy-MM-dd 23:59:59'"
44
+ :show-reset-button="true">
45
+ </datepicker>
46
+ </div>
47
+ <div class="span" style="float:right;">
48
+ <button class="button_search button_spacing" @click="search()">查询</button>
49
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
50
+ <export-excel :data="$parent.$parent.getCondition"
51
+ :field="$parent.$parent.getfield"
52
+ :header="$parent.$parent.other"
53
+ :footer="$parent.$parent.footer"
54
+ sqlurl="rs/logic/exportfile"
55
+ sql-name="manage_chargeSummary"
56
+ template-name='营收汇总报表'
57
+ :choose-col="true"></export-excel>
58
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model"
59
+ :field="$parent.$parent.getfield"
60
+ titletable="营收汇总报表" :starthead="$parent.$parent.startDate"
61
+ :defaultfield="$parent.$parent.defaultfield"
62
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
63
+ <div
64
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
65
+ @click="$parent.$parent.hidden()"
66
+ class="button_spacing"
67
+ style="float: right"></div>
68
+ </div>
69
+ </div>
70
+ <div class="row" v-if="$parent.$parent.criteriaShow">
71
+ <res-select-group
72
+ :show-component="['company','slicearea']"
73
+ :initres="$parent.$parent.initres"
74
+ @re-res="$parent.$parent.getRes"
75
+ v-ref:sel
76
+ ></res-select-group>
77
+ <div class="col-sm-2 form-group">
78
+ <label class="font_normal_body">用户类型</label>
79
+ <v-select :value.sync="model.f_user_type"
80
+ :options='$parent.$parent.usertypes'
81
+ placeholder='请选择' v-model="model.f_user_type"
82
+ :value-single="true"
83
+ @change="$parent.$parent.userTypeChange()"
84
+ close-on-select></v-select>
85
+ </div>
86
+ <div class="col-sm-2 form-group">
87
+ <label for="f_user_usetype" class="font_normal_body ">用气类型</label>
88
+ <v-select :value.sync="model.f_user_usetype" :search="false"
89
+ @change="$parent.$parent.userUseTypeChange()"
90
+ v-model="model.f_user_usetype"
91
+ :multiple="true"
92
+ :options='$parent.$parent.userusetypes'
93
+ condition="f_user_usetype in {}"
94
+ placeholder='用气类型'>
95
+ </v-select>
96
+ </div>
97
+ <div class="col-sm-2 form-group">
98
+ <label for="f_use_institution" class="font_normal_body">用气机构</label>
99
+ <v-select :value.sync="model.f_use_institution" :search="false"
100
+ @change="$parent.$parent.userUseInstitutionChange()"
101
+ v-model="model.f_use_institution"
102
+ :value-single="true"
103
+ :options='$parent.$parent.useinstitutions'
104
+ condition="f_use_institution = '{}'"
105
+ placeholder='用气机构'
106
+ close-on-select>
107
+ </v-select>
108
+ </div>
109
+ <div class="col-sm-2 form-group">
110
+ <label for="f_user_usenature" class="font_normal_body ">使用性质</label>
111
+ <v-select :value.sync="model.f_user_usenature" :search="false"
112
+ v-model="model.f_user_usenature"
113
+ :value-single="true"
114
+ :options='$parent.$parent.userusenatures'
115
+ condition="f_user_usenature = '{}'"
116
+ placeholder='使用性质'
117
+ close-on-select>
118
+ </v-select>
119
+ </div>
120
+ <div class="col-sm-2 form-group">
121
+ <label for="endDate" class="font_normal_body">单位名称</label>
122
+ <v-select :value.sync="model.f_company_id"
123
+ class="select_list select"
124
+ enter-push :disabled="$parent.$parent.isCompanyShow"
125
+ v-model="model.f_company_id" multiple="true"
126
+ @select-search="$parent.$parent.getCompanyList"
127
+ :options='$parent.$parent.corporatename' placeholder='单位名称'
128
+ condition="f_company_id in {}">
129
+ </v-select>
130
+ </div>
131
+ <div class="col-sm-2 form-group">
132
+ <label for="endDate" class="font_normal_body">小区名称</label>
133
+ <v-select :value.sync="model.f_residential_area_id"
134
+ class="select_list select"
135
+ enter-push :disabled="$parent.$parent.isAreaShow"
136
+ v-model="model.f_residential_area_id" multiple="true"
137
+ @select-search="$parent.$parent.getAreaList"
138
+ :options='$parent.$parent.areaList' placeholder='小区名称'
139
+ condition="f_residential_area_id in {}">
140
+ </v-select>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </criteria>
145
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
146
+ <template partial='head'>
147
+ <tr>
148
+ <th>
149
+ <nobr>序号</nobr>
150
+ </th>
151
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
152
+ <nobr>用户编号</nobr>
153
+ </th>
154
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
155
+ <nobr>用户名称</nobr>
156
+ </th>
157
+ <th v-show="$parent.$parent.$parent.isAreaShow">
158
+ <nobr>单位名称</nobr>
159
+ </th>
160
+ <th v-show="$parent.$parent.$parent.isCompanyShow">
161
+ <nobr>小区名称</nobr>
162
+ </th>
163
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
164
+ <nobr>购气(充值)时间</nobr>
165
+ </th>
166
+ <th>
167
+ <nobr>购气(充值)数量</nobr>
168
+ </th>
169
+ <th>
170
+ <nobr>一阶气量</nobr>
171
+ </th>
172
+ <th v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
173
+ <nobr>二阶气量</nobr>
174
+ </th>
175
+ <th v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
176
+ <nobr>三阶气量</nobr>
177
+ </th>
178
+ <th>
179
+ <nobr>实收款</nobr>
180
+ </th>
181
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
182
+ <nobr>购气网点</nobr>
183
+ </th>
184
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
185
+ <nobr>操作员</nobr>
186
+ </th>
187
+ </tr>
188
+ </template>
189
+ <template partial='body'>
190
+ <td style="text-align:center">
191
+ <nobr>{{ $index + 1 }}</nobr>
192
+ </td>
193
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
194
+ <nobr>{{ row.f_userinfo_code }}</nobr>
195
+ </td>
196
+ <td style="text-align: center;" v-show="$parent.$parent.$parent.isAreaShow">
197
+ <nobr>{{ row.f_company_name }}</nobr>
198
+ </td>
199
+ <td style="text-align: center;" v-show="$parent.$parent.$parent.isCompanyShow">
200
+ <nobr>{{ row.f_residential_area}}</nobr>
201
+ </td>
202
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
203
+ <nobr>{{ row.f_user_name }}</nobr>
204
+ </td>
205
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
206
+ <nobr>{{ row.f_operate_date }}</nobr>
207
+ </td>
208
+ <td style="text-align: center;">
209
+ <nobr>{{ row.f_pregas }}</nobr>
210
+ </td>
211
+ <td style="text-align: center;">
212
+ <nobr>{{ row.f_stairamount1 }}</nobr>
213
+ </td>
214
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
215
+ <nobr>{{ row.f_stairamount2 }}</nobr>
216
+ </td>
217
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
218
+ <nobr>{{ row.f_stairamount3 }}</nobr>
219
+ </td>
220
+ <td style="text-align: center;">
221
+ <nobr>{{ row.f_collection }}</nobr>
222
+ </td>
223
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
224
+ <nobr>{{ row.f_depname }}</nobr>
225
+ </td>
226
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
227
+ <nobr>{{ row.f_operator }}</nobr>
228
+ </td>
229
+ </template>
230
+ <template partial='foot'></template>
231
+ </data-grid>
232
+ </criteria-paged>
233
+ <table class="table-hover">
234
+ <tr style="position: relative" class="table-bordered">
235
+ <td
236
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
237
+ 汇总信息
238
+ </td>
239
+ <td
240
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
241
+ 卡表购气:&emsp;{{ sumsmodel.f_gas.toFixed(2) }}m³
242
+ </td>
243
+ <td
244
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
245
+ 卡表购气金额:&emsp;{{ sumsmodel.f_card_money.toFixed(2) }}元
246
+ </td>
247
+ <td
248
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
249
+ 物联表充值:&emsp;{{ sumsmodel.f_money.toFixed(2) }}元
250
+ </td>
251
+ <td
252
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
253
+ 收款合计:&emsp;{{ sumsmodel.f_collection.toFixed(2) }}元
254
+ </td>
255
+ </tr>
256
+ </table>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ </template>
261
+ <script>
262
+ import {PagedList, HttpResetClass} from 'vue-client'
263
+ import defaultPrint from './config/DefaultPrint'
264
+ import exportConfig from './config/exportConfig'
265
+ import PrintDataSelf from '../../components/sale/common/PrintDataSelf'
266
+
267
+ let readySomething = async function (self) {
268
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
269
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
270
+ self.getCompanyList()
271
+ self.getAreaList()
272
+ }
273
+ export default {
274
+ title: '用户查询',
275
+ data () {
276
+ return {
277
+ depresid: [],
278
+ userresid: [],
279
+ f_orgid: this.$login.f.orgid,
280
+ f_depid: this.$login.f.depids,
281
+ f_operatorid: this.$login.f.id,
282
+ operatorid: [],
283
+ depid: [],
284
+ orgname: '',
285
+ depname: [],
286
+ operatorname: '',
287
+ condition: '',
288
+ orgConditionStr: '',
289
+ data: {},
290
+ other: [],
291
+ footer: [],
292
+ model: new PagedList('rs/sql/manage_chargeSummary', 20, {
293
+ startDate: 'this.model.startDate',
294
+ endDate: 'this.model.endDate'
295
+ }, {
296
+ f_collection: 0,
297
+ f_gas: 0,
298
+ f_card_money:0,
299
+ f_money: 0
300
+ }),
301
+ gasproperties: [],
302
+ show: false,
303
+ rowdata: {},
304
+ areaList: [],
305
+ modelval: [],
306
+ startDate: '',
307
+ endDate: '',
308
+ inputtouPerson: [],
309
+ printshow: false,
310
+ all: false,
311
+ fields: {},
312
+ thead: '',
313
+ tfoot: '',
314
+ defaultfield: [],
315
+ sumsmodel: {},
316
+ initres: {
317
+ org: [this.$login.f.orgid],
318
+ slice_area: [],
319
+ },
320
+ criteriaShow: false,
321
+ userusetypes: [],
322
+ useinstitutions: [],
323
+ userusenatures: [],
324
+ sumExport: {'f_gas': '卡表购气', 'f_collection': '实收款', 'f_money': '物联表充值'},
325
+ isCompany: [{label: '是', value: '是'}, {label: '否', value: '否'}],
326
+ isArea: [{label: '是', value: '是'}, {label: '否', value: '否'}],
327
+ f_is_company: '否',
328
+ f_is_area: '否',
329
+ isCompanyShow: false,
330
+ isAreaShow: false,
331
+ corporatename: []
332
+ }
333
+ },
334
+ ready () {
335
+ readySomething(this).then(() => {
336
+ this.$emit('ready')
337
+ }).catch((error) => {
338
+ this.$emit('error', error)
339
+ })
340
+ },
341
+ methods: {
342
+ async getCompanyList(searchText){
343
+ let condition = ' 1 = 1 '
344
+ if (searchText) {
345
+ condition = ` f_company_name like '%${searchText}%' `
346
+ }
347
+ let HttpReset = new HttpResetClass()
348
+ HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
349
+ data: {
350
+ items: 'f_company_name, id',
351
+ tablename: 't_company',
352
+ orderitem: 'id desc',
353
+ condition: condition
354
+ }
355
+ }, {resolveMsg: null, rejectMsg: '获取单位信息失败!'}).then((req) => {
356
+ let redata = []
357
+ req.data.forEach((row, n) => {
358
+ redata[n] = {
359
+ label: row.f_company_name,
360
+ value: row.id
361
+ }
362
+ })
363
+ this.corporatename = [{label: '全部', value: ''}, ...redata]
364
+ })
365
+ },
366
+ getAreaList (searchText) {
367
+ let condition = ' 1 = 1 '
368
+ if (searchText) {
369
+ condition = ` f_residential_area like '%${searchText}%' `
370
+ }
371
+ let HttpReset = new HttpResetClass()
372
+ HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
373
+ data: {
374
+ items: 'f_residential_area, id',
375
+ tablename: 't_area',
376
+ orderitem: 'id desc',
377
+ condition: condition
378
+ }
379
+ }, {resolveMsg: null, rejectMsg: '获取小区信息失败!'}).then((req) => {
380
+ let redata = []
381
+ req.data.forEach((row, n) => {
382
+ redata[n] = {
383
+ label: row.f_residential_area,
384
+ value: row.id
385
+ }
386
+ })
387
+ this.areaList = [{label: '全部', value: ''}, ...redata]
388
+ })
389
+ },
390
+ clear() {
391
+ //清空部门和人员
392
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
393
+ //部门和人员变为全选
394
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
395
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
396
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
397
+ this.$refs.paged.$refs.cri.model[key] = []
398
+ })
399
+ this.f_is_company = '否'
400
+ this.f_is_area = '否'
401
+ },
402
+ isAreaChange () {
403
+ if(this.f_is_area){
404
+ if (this.f_is_area == '是') {
405
+ this.isCompanyShow = true
406
+ this.model = new PagedList('rs/sql/manage_chargeSummaryByArea', 20, {
407
+ startDate: 'this.model.startDate',
408
+ endDate: 'this.model.endDate',
409
+ condition2: 'this.model.condition2'
410
+ }, {f_collection: 0, f_gas: 0, f_money: 0,f_card_money:0})
411
+ } else {
412
+ this.isCompanyShow = false
413
+ this.model = new PagedList('rs/sql/manage_chargeSummary', 20, {
414
+ startDate: 'this.model.startDate',
415
+ endDate: 'this.model.endDate'
416
+ }, {f_collection: 0, f_gas: 0, f_money: 0,f_card_money:0,})
417
+ }
418
+ }
419
+ },
420
+ isCompanyChange () {
421
+ if (this.f_is_company) {
422
+ if (this.f_is_company == '是') {
423
+ this.isAreaShow = true
424
+ this.model = new PagedList('rs/sql/manage_chargeSummaryByCompany', 20, {
425
+ startDate: 'this.model.startDate',
426
+ endDate: 'this.model.endDate',
427
+ condition2: 'this.model.condition2'
428
+ }, {f_collection: 0, f_gas: 0, f_money: 0,f_card_money:0,})
429
+ } else {
430
+ this.isAreaShow = false
431
+ this.model = new PagedList('rs/sql/manage_chargeSummary', 20, {
432
+ startDate: 'this.model.startDate',
433
+ endDate: 'this.model.endDate'
434
+ }, {f_collection: 0, f_gas: 0, f_money: 0,f_card_money:0,})
435
+ }
436
+ }
437
+ },
438
+ userTypeChange () {
439
+ this.userusetypes = []
440
+ this.userusenatures = []
441
+ this.useinstitutions = []
442
+ this.$refs.paged.$refs.cri.model.f_user_usetype = []
443
+ this.$refs.paged.$refs.cri.model.f_use_institution = ''
444
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
445
+ if (this.$refs.paged.$refs.cri.model.f_user_type) {
446
+ let str = this.$refs.paged.$refs.cri.model.f_user_type + '用气类型'
447
+ this.userusetypes = this.$appdata.getParam(str)
448
+ }
449
+ },
450
+ userUseTypeChange () {
451
+ this.useinstitutions = []
452
+ this.userusenatures = []
453
+ this.$refs.paged.$refs.cri.model.f_use_institution = ''
454
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
455
+ if (this.$refs.paged.$refs.cri.model.f_user_usetype.length > 0) {
456
+ for (var i = 0; i < this.$refs.paged.$refs.cri.model.f_user_usetype.length; i++) {
457
+ let str = this.$refs.paged.$refs.cri.model.f_user_usetype[i] + '机构'
458
+ let getParam = this.$appdata.getParam(str)
459
+ Array.prototype.push.apply(this.useinstitutions, getParam);
460
+ }
461
+ }
462
+ let temp = {}
463
+ this.useinstitutions = this.useinstitutions.filter(function(item) {
464
+ var key = JSON.stringify(item);
465
+ return temp.hasOwnProperty(key) ? false : (temp[key] = true);
466
+ });
467
+ },
468
+ userUseInstitutionChange () {
469
+ this.userusenatures = []
470
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
471
+ if (this.$refs.paged.$refs.cri.model.f_use_institution) {
472
+ let str = this.$refs.paged.$refs.cri.model.f_use_institution + '使用性质'
473
+ this.userusenatures = this.$appdata.getParam(str)
474
+ }
475
+ },
476
+ hidden () {
477
+ this.criteriaShow = !this.criteriaShow
478
+ },
479
+ getotherfooter () {
480
+ this.other = []
481
+ this.footer = []
482
+ let exportdata = this.getCondition
483
+ let otherInData = []
484
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
485
+ let footerData = [], exportfield = this.sumExport
486
+ footerData.push('合计')
487
+ let self = this
488
+ for (var field in self.sumsmodel) {
489
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`)
490
+ }
491
+ this.footer.push(footerData)
492
+ this.other.push(otherInData)
493
+ },
494
+ search () {
495
+ this.$refs.paged.$refs.cri.search()
496
+ },
497
+ appendCondition (data) {
498
+ console.log('data=====>',data)
499
+ let stringValue = ''
500
+ for (var i = 0; i < data.length; i++) {
501
+ if (data[i]) {
502
+ if (i === data.length - 1) {
503
+ stringValue = stringValue + "'" + data[i] + "'"
504
+ } else {
505
+ stringValue = stringValue + "'" + data[i] + "',"
506
+ }
507
+ }
508
+ }
509
+ return stringValue
510
+ },
511
+ async selfSearch (args) {
512
+ let companyCondition2 = '1=1'
513
+ if (!this.orgConditionStr) {
514
+ args.condition = `${args.condition}` + ' and f_orgid = ' + this.$login.f.orgid
515
+ companyCondition2 = companyCondition2 + ' and f_orgid = ' + this.$login.f.orgid
516
+ } else {
517
+ args.condition = `${args.condition}` + this.orgConditionStr
518
+ companyCondition2 = companyCondition2 + this.orgConditionStr
519
+ }
520
+ if (this.isAreaShow || this.isCompanyShow) {
521
+ if (args.model.f_company_id.length > 0) {
522
+ companyCondition2 = companyCondition2 + ' and id in (' + await this.appendCondition(args.model.f_company_id) + ')'
523
+ }
524
+ if (args.model.f_residential_area_id.length > 0) {
525
+ companyCondition2 = companyCondition2 + ' and id in (' + await this.appendCondition(args.model.f_residential_area_id) + ')'
526
+ }
527
+ }
528
+ if (this.$refs.paged.$refs.cri.model.f_user_type == '民用' && !this.$refs.paged.$refs.cri.model.f_user_usetype[0]) {
529
+ args.condition = args.condition + " and f_user_usetype in ('居民用气')"
530
+ } else if (this.$refs.paged.$refs.cri.model.f_user_type == '非民用' && !this.$refs.paged.$refs.cri.model.f_user_usetype[0]) {
531
+ args.condition = args.condition + " and f_user_usetype in ('公福用气','商业用户','工业用户')"
532
+ }
533
+ args.model.condition2 = companyCondition2
534
+ this.condition = args.condition
535
+ console.log("查看条件",this.condition)
536
+ await this.model.search(args.condition, args.model)
537
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
538
+ this.card = ''
539
+ this.IdCardInfo = ''
540
+ console.log('合计字段', this.sumsmodel)
541
+ },
542
+ getRes (obj) {
543
+ this.orgConditionStr = obj
544
+ },
545
+ stamp () {
546
+ this.all = false
547
+ //默认选择要打印的列
548
+ this.modelval = defaultPrint.config
549
+ this.fields = this.getfield
550
+ console.log('所有打印字段', this.fields)
551
+ this.printshow = true
552
+ this.put()
553
+ },
554
+ put () {
555
+ // 对Modelval进行排序
556
+ this.sortModelval()
557
+ this.thead = `<tr><th colspan=${this.modelval.length}>用户查询</th></tr><tr>`
558
+ for (let key of this.modelval) {
559
+ this.thead += '<th>' + this.fields[key] + '</th>'
560
+ }
561
+ this.thead += '</tr>'
562
+ },
563
+ print () {
564
+ this.$refs.print.PrintAsFile()
565
+ this.printshow = false
566
+ },
567
+ dealmsg (val) {
568
+ console.log('---------------dealmsg')
569
+ this.rowdata = val
570
+ this.show = true
571
+ val.model = this.model.model
572
+ this.$dispatch('deal-msg', val)
573
+ },
574
+ close () {
575
+ this.printshow = false
576
+ this.all = false
577
+ },
578
+ // 对选择的列进行排序
579
+ sortModelval () {
580
+ let sortModel = []
581
+ Object.keys(this.fields).forEach((key) => {
582
+ if (this.modelval.includes(key)) {
583
+ sortModel.push(key)
584
+ }
585
+ })
586
+ this.modelval = sortModel
587
+ console.log('选择的打印的字段', this.modelval)
588
+ }
589
+ },
590
+ watch: {
591
+ 'all' (val) {
592
+ if (val) {
593
+ this.modelval = this.bodyData
594
+ } else {
595
+ this.modelval = defaultPrint.config
596
+ this.put()
597
+ }
598
+ },
599
+ sumsmodel: {
600
+ handler: function (val) {
601
+ this.getotherfooter()
602
+ },
603
+ deep: true
604
+ },
605
+ 'modelval.length' () {
606
+ this.put()
607
+ }
608
+ },
609
+ computed: {
610
+ getCondition () {
611
+ return {
612
+ condition: this.condition,
613
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
614
+ endDate: this.$refs.paged.$refs.cri.model.endDate,
615
+ condition2: this.$refs.paged.$refs.cri.model.condition2
616
+ }
617
+ },
618
+ getfield () {
619
+ let field
620
+ if (this.isAreaShow) {
621
+ field = exportConfig.manageChargeSummaryByCompanyConfig
622
+ } else if (this.isCompanyShow) {
623
+ field = exportConfig.manageChargeSummaryByAreaConfig
624
+ } else {
625
+ field = exportConfig.manageChargeSummaryConfig
626
+ }
627
+ return field
628
+ },
629
+ useTypes () {
630
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
631
+ },
632
+ usertypes () {
633
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
634
+ }
635
+
636
+ }
637
+ }
638
+ </script>
639
+