manage-client 3.3.82 → 3.3.83-wn

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,609 +1,627 @@
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
- condition="f_user_type = '{}'"
83
- close-on-select></v-select>
84
- </div>
85
- <div class="col-sm-2 form-group">
86
- <label for="f_user_usetype" class="font_normal_body ">用气类型</label>
87
- <v-select :value.sync="model.f_user_usetype" :search="false"
88
- @change="$parent.$parent.userUseTypeChange()"
89
- v-model="model.f_user_usetype"
90
- :options='$parent.$parent.userusetypes'
91
- condition="f_user_usetype = '{}'"
92
- placeholder='用气类型'
93
- close-on-select>
94
- </v-select>
95
- </div>
96
- <div class="col-sm-2 form-group">
97
- <label for="f_use_institution" class="font_normal_body">用气机构</label>
98
- <v-select :value.sync="model.f_use_institution" :search="false"
99
- @change="$parent.$parent.userUseInstitutionChange()"
100
- v-model="model.f_use_institution"
101
- :options='$parent.$parent.useinstitutions'
102
- condition="f_use_institution = '{}'"
103
- placeholder='用气机构'
104
- close-on-select>
105
- </v-select>
106
- </div>
107
- <div class="col-sm-2 form-group">
108
- <label for="f_user_usenature" class="font_normal_body ">使用性质</label>
109
- <v-select :value.sync="model.f_user_usenature" :search="false"
110
- v-model="model.f_user_usenature"
111
- :options='$parent.$parent.userusenatures'
112
- condition="f_user_usenature = '{}'"
113
- placeholder='使用性质'
114
- close-on-select>
115
- </v-select>
116
- </div>
117
- <div class="col-sm-2 form-group">
118
- <label for="endDate" class="font_normal_body">单位名称</label>
119
- <v-select :value.sync="model.f_company_id"
120
- class="select_list select"
121
- enter-push :disabled="$parent.$parent.isCompanyShow"
122
- v-model="model.f_company_id" multiple="true"
123
- @select-search="$parent.$parent.getCompanyList"
124
- :options='$parent.$parent.corporatename' placeholder='单位名称'
125
- condition="f_company_id in {}">
126
- </v-select>
127
- </div>
128
- <div class="col-sm-2 form-group">
129
- <label for="endDate" class="font_normal_body">小区名称</label>
130
- <v-select :value.sync="model.f_residential_area_id"
131
- class="select_list select"
132
- enter-push :disabled="$parent.$parent.isAreaShow"
133
- v-model="model.f_residential_area_id" multiple="true"
134
- @select-search="$parent.$parent.getAreaList"
135
- :options='$parent.$parent.areaList' placeholder='小区名称'
136
- condition="f_residential_area_id in {}">
137
- </v-select>
138
- </div>
139
- </div>
140
- </div>
141
- </criteria>
142
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
143
- <template partial='head'>
144
- <tr>
145
- <th>
146
- <nobr>序号</nobr>
147
- </th>
148
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
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">
155
- <nobr>单位名称</nobr>
156
- </th>
157
- <th v-show="$parent.$parent.$parent.isCompanyShow">
158
- <nobr>小区名称</nobr>
159
- </th>
160
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
161
- <nobr>购气(充值)时间</nobr>
162
- </th>
163
- <th>
164
- <nobr>购气(充值)数量</nobr>
165
- </th>
166
- <th>
167
- <nobr>一阶气量</nobr>
168
- </th>
169
- <th v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
170
- <nobr>二阶气量</nobr>
171
- </th>
172
- <th v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
173
- <nobr>三阶气量</nobr>
174
- </th>
175
- <th>
176
- <nobr>实收款</nobr>
177
- </th>
178
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
179
- <nobr>购气网点</nobr>
180
- </th>
181
- <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
182
- <nobr>操作员</nobr>
183
- </th>
184
- </tr>
185
- </template>
186
- <template partial='body'>
187
- <td style="text-align:center">
188
- <nobr>{{ $index + 1 }}</nobr>
189
- </td>
190
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
191
- <nobr>{{ row.f_userinfo_code }}</nobr>
192
- </td>
193
- <td style="text-align: center;" v-show="$parent.$parent.$parent.isAreaShow">
194
- <nobr>{{ row.f_company_name }}</nobr>
195
- </td>
196
- <td style="text-align: center;" v-show="$parent.$parent.$parent.isCompanyShow">
197
- <nobr>{{ row.f_residential_area}}</nobr>
198
- </td>
199
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
200
- <nobr>{{ row.f_user_name }}</nobr>
201
- </td>
202
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
203
- <nobr>{{ row.f_operate_date }}</nobr>
204
- </td>
205
- <td style="text-align: center;">
206
- <nobr>{{ row.f_pregas }}</nobr>
207
- </td>
208
- <td style="text-align: center;">
209
- <nobr>{{ row.f_stairamount1 }}</nobr>
210
- </td>
211
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
212
- <nobr>{{ row.f_stairamount2 }}</nobr>
213
- </td>
214
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
215
- <nobr>{{ row.f_stairamount3 }}</nobr>
216
- </td>
217
- <td style="text-align: center;">
218
- <nobr>{{ row.f_collection }}</nobr>
219
- </td>
220
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
221
- <nobr>{{ row.f_depname }}</nobr>
222
- </td>
223
- <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
224
- <nobr>{{ row.f_operator }}</nobr>
225
- </td>
226
- </template>
227
- <template partial='foot'></template>
228
- </data-grid>
229
- </criteria-paged>
230
- <table class="table-hover">
231
- <tr style="position: relative" class="table-bordered">
232
- <td
233
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
234
- 汇总信息
235
- </td>
236
- <td
237
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
238
- 卡表购气:&emsp;{{ sumsmodel.f_gas.toFixed(2) }}m³
239
- </td>
240
- <td
241
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
242
- 实收款:&emsp;{{ sumsmodel.f_collection.toFixed(2) }}元
243
- </td>
244
- <td
245
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
246
- 物联表充值:&emsp;{{ sumsmodel.f_money.toFixed(2) }}元
247
- </td>
248
- <td
249
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
250
- 收款合计:&emsp;{{ sumsmodel.f_collection.toFixed(2) }}元
251
- </td>
252
- </tr>
253
- </table>
254
- </div>
255
- </div>
256
- </div>
257
- </template>
258
- <script>
259
- import {PagedList, HttpResetClass} from 'vue-client'
260
- import defaultPrint from './config/DefaultPrint'
261
- import exportConfig from './config/exportConfig'
262
- import PrintDataSelf from '../../components/sale/common/PrintDataSelf'
263
-
264
- let readySomething = async function (self) {
265
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
266
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
267
- self.getCompanyList()
268
- self.getAreaList()
269
- }
270
- export default {
271
- title: '用户查询',
272
- data () {
273
- return {
274
- depresid: [],
275
- userresid: [],
276
- f_orgid: this.$login.f.orgid,
277
- f_depid: this.$login.f.depids,
278
- f_operatorid: this.$login.f.id,
279
- operatorid: [],
280
- depid: [],
281
- orgname: '',
282
- depname: [],
283
- operatorname: '',
284
- condition: '',
285
- orgConditionStr: '',
286
- data: {},
287
- other: [],
288
- footer: [],
289
- model: new PagedList('rs/sql/manage_chargeSummary', 20, {
290
- startDate: 'this.model.startDate',
291
- endDate: 'this.model.endDate'
292
- }, {
293
- f_collection: 0,
294
- f_gas: 0,
295
- f_money: 0
296
- }),
297
- gasproperties: [],
298
- show: false,
299
- rowdata: {},
300
- areaList: [],
301
- modelval: [],
302
- startDate: '',
303
- endDate: '',
304
- inputtouPerson: [],
305
- printshow: false,
306
- all: false,
307
- fields: {},
308
- thead: '',
309
- tfoot: '',
310
- defaultfield: [],
311
- sumsmodel: {},
312
- initres: {
313
- org: [this.$login.f.orgid],
314
- slice_area: [],
315
- },
316
- criteriaShow: false,
317
- userusetypes: [],
318
- useinstitutions: [],
319
- userusenatures: [],
320
- sumExport: {'f_gas': '卡表购气', 'f_collection': '实收款', 'f_money': '物联表充值'},
321
- isCompany: [{label: '是', value: '是'}, {label: '否', value: '否'}],
322
- isArea: [{label: '是', value: '是'}, {label: '否', value: '否'}],
323
- f_is_company: '否',
324
- f_is_area: '否',
325
- isCompanyShow: false,
326
- isAreaShow: false,
327
- corporatename: []
328
- }
329
- },
330
- ready () {
331
- readySomething(this).then(() => {
332
- this.$emit('ready')
333
- }).catch((error) => {
334
- this.$emit('error', error)
335
- })
336
- },
337
- methods: {
338
- async getCompanyList(searchText){
339
- let condition = ' 1 = 1 '
340
- if (searchText) {
341
- condition = ` f_company_name like '%${searchText}%' `
342
- }
343
- let HttpReset = new HttpResetClass()
344
- HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
345
- data: {
346
- items: 'f_company_name, id',
347
- tablename: 't_company',
348
- orderitem: 'id desc',
349
- condition: condition
350
- }
351
- }, {resolveMsg: null, rejectMsg: '获取单位信息失败!'}).then((req) => {
352
- let redata = []
353
- req.data.forEach((row, n) => {
354
- redata[n] = {
355
- label: row.f_company_name,
356
- value: row.id
357
- }
358
- })
359
- this.corporatename = [{label: '全部', value: ''}, ...redata]
360
- })
361
- },
362
- getAreaList (searchText) {
363
- let condition = ' 1 = 1 '
364
- if (searchText) {
365
- condition = ` f_residential_area like '%${searchText}%' `
366
- }
367
- let HttpReset = new HttpResetClass()
368
- HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
369
- data: {
370
- items: 'f_residential_area, id',
371
- tablename: 't_area',
372
- orderitem: 'id desc',
373
- condition: condition
374
- }
375
- }, {resolveMsg: null, rejectMsg: '获取小区信息失败!'}).then((req) => {
376
- let redata = []
377
- req.data.forEach((row, n) => {
378
- redata[n] = {
379
- label: row.f_residential_area,
380
- value: row.id
381
- }
382
- })
383
- this.areaList = [{label: '全部', value: ''}, ...redata]
384
- })
385
- },
386
- clear() {
387
- //清空部门和人员
388
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
389
- //部门和人员变为全选
390
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
391
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
392
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
393
- this.$refs.paged.$refs.cri.model[key] = []
394
- })
395
- this.f_is_company = '否'
396
- this.f_is_area = '否'
397
- },
398
- isAreaChange () {
399
- if(this.f_is_area){
400
- if (this.f_is_area == '是') {
401
- this.isCompanyShow = true
402
- this.model = new PagedList('rs/sql/manage_chargeSummaryByArea', 20, {
403
- startDate: 'this.model.startDate',
404
- endDate: 'this.model.endDate',
405
- condition2: 'this.model.condition2'
406
- }, {f_collection: 0, f_gas: 0, f_money: 0})
407
- } else {
408
- this.isCompanyShow = false
409
- this.model = new PagedList('rs/sql/manage_chargeSummary', 20, {
410
- startDate: 'this.model.startDate',
411
- endDate: 'this.model.endDate'
412
- }, {f_collection: 0, f_gas: 0, f_money: 0})
413
- }
414
- }
415
- },
416
- isCompanyChange () {
417
- if (this.f_is_company) {
418
- if (this.f_is_company == '是') {
419
- this.isAreaShow = true
420
- this.model = new PagedList('rs/sql/manage_chargeSummaryByCompany', 20, {
421
- startDate: 'this.model.startDate',
422
- endDate: 'this.model.endDate',
423
- condition2: 'this.model.condition2'
424
- }, {f_collection: 0, f_gas: 0, f_money: 0})
425
- } else {
426
- this.isAreaShow = false
427
- this.model = new PagedList('rs/sql/manage_chargeSummary', 20, {
428
- startDate: 'this.model.startDate',
429
- endDate: 'this.model.endDate'
430
- }, {f_collection: 0, f_gas: 0, f_money: 0})
431
- }
432
- }
433
- },
434
- userUseInstitutionChange () {
435
- this.userusenatures = []
436
- if (this.$refs.paged.$refs.cri.model.f_use_institution.length === 1) {
437
- let str = this.$refs.paged.$refs.cri.model.f_use_institution[0] + '使用性质'
438
- this.userusenatures = this.$appdata.getParam(str)
439
- }
440
- },
441
- userUseTypeChange () {
442
- this.useinstitutions = []
443
- if (this.$refs.paged.$refs.cri.model.f_user_usetype.length === 1) {
444
- let str = this.$refs.paged.$refs.cri.model.f_user_usetype[0] + '机构'
445
- this.useinstitutions = this.$appdata.getParam(str)
446
- }
447
- },
448
- hidden () {
449
- this.criteriaShow = !this.criteriaShow
450
- },
451
- getotherfooter () {
452
- this.other = []
453
- this.footer = []
454
- let exportdata = this.getCondition
455
- let otherInData = []
456
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
457
- let footerData = [], exportfield = this.sumExport
458
- footerData.push('合计')
459
- let self = this
460
- for (var field in self.sumsmodel) {
461
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`)
462
- }
463
- this.footer.push(footerData)
464
- this.other.push(otherInData)
465
- },
466
- search () {
467
- this.$refs.paged.$refs.cri.search()
468
- },
469
- appendCondition (data) {
470
- console.log('data=====>',data)
471
- let stringValue = ''
472
- for (var i = 0; i < data.length; i++) {
473
- if (data[i]) {
474
- if (i === data.length - 1) {
475
- stringValue = stringValue + "'" + data[i] + "'"
476
- } else {
477
- stringValue = stringValue + "'" + data[i] + "',"
478
- }
479
- }
480
- }
481
- return stringValue
482
- },
483
- async selfSearch (args) {
484
- let companyCondition2 = '1=1'
485
- if (!this.orgConditionStr) {
486
- args.condition = `${args.condition}` + ' and f_orgid = ' + this.$login.f.orgid
487
- companyCondition2 = companyCondition2 + ' and f_orgid = ' + this.$login.f.orgid
488
- } else {
489
- args.condition = `${args.condition}` + this.orgConditionStr
490
- companyCondition2 = companyCondition2 + this.orgConditionStr
491
- }
492
- if (this.isAreaShow || this.isCompanyShow) {
493
- if (args.model.f_company_id.length > 0) {
494
- companyCondition2 = companyCondition2 + ' and id in (' + await this.appendCondition(args.model.f_company_id) + ')'
495
- }
496
- if (args.model.f_residential_area_id.length > 0) {
497
- companyCondition2 = companyCondition2 + ' and id in (' + await this.appendCondition(args.model.f_residential_area_id) + ')'
498
- }
499
- }
500
- args.model.condition2 = companyCondition2
501
- this.condition = args.condition
502
- console.log("查看条件",this.condition)
503
- await this.model.search(args.condition, args.model)
504
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
505
- this.card = ''
506
- this.IdCardInfo = ''
507
- console.log('合计字段', this.sumsmodel)
508
- },
509
- getRes (obj) {
510
- this.orgConditionStr = obj
511
- },
512
- stamp () {
513
- this.all = false
514
- //默认选择要打印的列
515
- this.modelval = defaultPrint.config
516
- this.fields = this.getfield
517
- console.log('所有打印字段', this.fields)
518
- this.printshow = true
519
- this.put()
520
- },
521
- put () {
522
- // 对Modelval进行排序
523
- this.sortModelval()
524
- this.thead = `<tr><th colspan=${this.modelval.length}>用户查询</th></tr><tr>`
525
- for (let key of this.modelval) {
526
- this.thead += '<th>' + this.fields[key] + '</th>'
527
- }
528
- this.thead += '</tr>'
529
- },
530
- print () {
531
- this.$refs.print.PrintAsFile()
532
- this.printshow = false
533
- },
534
- dealmsg (val) {
535
- console.log('---------------dealmsg')
536
- this.rowdata = val
537
- this.show = true
538
- val.model = this.model.model
539
- this.$dispatch('deal-msg', val)
540
- },
541
- close () {
542
- this.printshow = false
543
- this.all = false
544
- },
545
- // 对选择的列进行排序
546
- sortModelval () {
547
- let sortModel = []
548
- Object.keys(this.fields).forEach((key) => {
549
- if (this.modelval.includes(key)) {
550
- sortModel.push(key)
551
- }
552
- })
553
- this.modelval = sortModel
554
- console.log('选择的打印的字段', this.modelval)
555
- }
556
- },
557
- watch: {
558
- 'all' (val) {
559
- if (val) {
560
- this.modelval = this.bodyData
561
- } else {
562
- this.modelval = defaultPrint.config
563
- this.put()
564
- }
565
- },
566
- sumsmodel: {
567
- handler: function (val) {
568
- this.getotherfooter()
569
- },
570
- deep: true
571
- },
572
- 'modelval.length' () {
573
- this.put()
574
- }
575
- },
576
- computed: {
577
- getCondition () {
578
- return {
579
- condition: this.condition,
580
- startDate: this.$refs.paged.$refs.cri.model.startDate,
581
- endDate: this.$refs.paged.$refs.cri.model.endDate,
582
- condition2: this.$refs.paged.$refs.cri.model.condition2
583
- }
584
- },
585
- getfield () {
586
- let field
587
- if (this.isAreaShow) {
588
- field = exportConfig.manageChargeSummaryByCompanyConfig
589
- } else if (this.isCompanyShow) {
590
- field = exportConfig.manageChargeSummaryByAreaConfig
591
- } else {
592
- field = exportConfig.manageChargeSummaryConfig
593
- }
594
- return field
595
- },
596
- userusetypes () {
597
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
598
- },
599
- useTypes () {
600
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
601
- },
602
- usertypes () {
603
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
604
- }
605
-
606
- }
607
- }
608
- </script>
609
-
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
+ condition="f_user_type = '{}'"
83
+ :value-single="true"
84
+ @change="$parent.$parent.userTypeChange()"
85
+ close-on-select></v-select>
86
+ </div>
87
+ <div class="col-sm-2 form-group">
88
+ <label for="f_user_usetype" class="font_normal_body ">用气类型</label>
89
+ <v-select :value.sync="model.f_user_usetype" :search="false"
90
+ @change="$parent.$parent.userUseTypeChange()"
91
+ v-model="model.f_user_usetype"
92
+ :value-single="true"
93
+ :options='$parent.$parent.userusetypes'
94
+ condition="f_user_usetype = '{}'"
95
+ placeholder='用气类型'
96
+ close-on-select>
97
+ </v-select>
98
+ </div>
99
+ <div class="col-sm-2 form-group">
100
+ <label for="f_use_institution" class="font_normal_body">用气机构</label>
101
+ <v-select :value.sync="model.f_use_institution" :search="false"
102
+ @change="$parent.$parent.userUseInstitutionChange()"
103
+ v-model="model.f_use_institution"
104
+ :value-single="true"
105
+ :options='$parent.$parent.useinstitutions'
106
+ condition="f_use_institution = '{}'"
107
+ placeholder='用气机构'
108
+ close-on-select>
109
+ </v-select>
110
+ </div>
111
+ <div class="col-sm-2 form-group">
112
+ <label for="f_user_usenature" class="font_normal_body ">使用性质</label>
113
+ <v-select :value.sync="model.f_user_usenature" :search="false"
114
+ v-model="model.f_user_usenature"
115
+ :value-single="true"
116
+ :options='$parent.$parent.userusenatures'
117
+ condition="f_user_usenature = '{}'"
118
+ placeholder='使用性质'
119
+ close-on-select>
120
+ </v-select>
121
+ </div>
122
+ <div class="col-sm-2 form-group">
123
+ <label for="endDate" class="font_normal_body">单位名称</label>
124
+ <v-select :value.sync="model.f_company_id"
125
+ class="select_list select"
126
+ enter-push :disabled="$parent.$parent.isCompanyShow"
127
+ v-model="model.f_company_id" multiple="true"
128
+ @select-search="$parent.$parent.getCompanyList"
129
+ :options='$parent.$parent.corporatename' placeholder='单位名称'
130
+ condition="f_company_id in {}">
131
+ </v-select>
132
+ </div>
133
+ <div class="col-sm-2 form-group">
134
+ <label for="endDate" class="font_normal_body">小区名称</label>
135
+ <v-select :value.sync="model.f_residential_area_id"
136
+ class="select_list select"
137
+ enter-push :disabled="$parent.$parent.isAreaShow"
138
+ v-model="model.f_residential_area_id" multiple="true"
139
+ @select-search="$parent.$parent.getAreaList"
140
+ :options='$parent.$parent.areaList' placeholder='小区名称'
141
+ condition="f_residential_area_id in {}">
142
+ </v-select>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </criteria>
147
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
148
+ <template partial='head'>
149
+ <tr>
150
+ <th>
151
+ <nobr>序号</nobr>
152
+ </th>
153
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
154
+ <nobr>用户编号</nobr>
155
+ </th>
156
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
157
+ <nobr>用户名称</nobr>
158
+ </th>
159
+ <th v-show="$parent.$parent.$parent.isAreaShow">
160
+ <nobr>单位名称</nobr>
161
+ </th>
162
+ <th v-show="$parent.$parent.$parent.isCompanyShow">
163
+ <nobr>小区名称</nobr>
164
+ </th>
165
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
166
+ <nobr>购气(充值)时间</nobr>
167
+ </th>
168
+ <th>
169
+ <nobr>购气(充值)数量</nobr>
170
+ </th>
171
+ <th>
172
+ <nobr>一阶气量</nobr>
173
+ </th>
174
+ <th v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
175
+ <nobr>二阶气量</nobr>
176
+ </th>
177
+ <th v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
178
+ <nobr>三阶气量</nobr>
179
+ </th>
180
+ <th>
181
+ <nobr>实收款</nobr>
182
+ </th>
183
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
184
+ <nobr>购气网点</nobr>
185
+ </th>
186
+ <th v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
187
+ <nobr>操作员</nobr>
188
+ </th>
189
+ </tr>
190
+ </template>
191
+ <template partial='body'>
192
+ <td style="text-align:center">
193
+ <nobr>{{ $index + 1 }}</nobr>
194
+ </td>
195
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
196
+ <nobr>{{ row.f_userinfo_code }}</nobr>
197
+ </td>
198
+ <td style="text-align: center;" v-show="$parent.$parent.$parent.isAreaShow">
199
+ <nobr>{{ row.f_company_name }}</nobr>
200
+ </td>
201
+ <td style="text-align: center;" v-show="$parent.$parent.$parent.isCompanyShow">
202
+ <nobr>{{ row.f_residential_area}}</nobr>
203
+ </td>
204
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
205
+ <nobr>{{ row.f_user_name }}</nobr>
206
+ </td>
207
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
208
+ <nobr>{{ row.f_operate_date }}</nobr>
209
+ </td>
210
+ <td style="text-align: center;">
211
+ <nobr>{{ row.f_pregas }}</nobr>
212
+ </td>
213
+ <td style="text-align: center;">
214
+ <nobr>{{ row.f_stairamount1 }}</nobr>
215
+ </td>
216
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
217
+ <nobr>{{ row.f_stairamount2 }}</nobr>
218
+ </td>
219
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow || $parent.$parent.$parent.isCompanyShow">
220
+ <nobr>{{ row.f_stairamount3 }}</nobr>
221
+ </td>
222
+ <td style="text-align: center;">
223
+ <nobr>{{ row.f_collection }}</nobr>
224
+ </td>
225
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
226
+ <nobr>{{ row.f_depname }}</nobr>
227
+ </td>
228
+ <td style="text-align: center;" v-show="!$parent.$parent.$parent.isAreaShow && !$parent.$parent.$parent.isCompanyShow">
229
+ <nobr>{{ row.f_operator }}</nobr>
230
+ </td>
231
+ </template>
232
+ <template partial='foot'></template>
233
+ </data-grid>
234
+ </criteria-paged>
235
+ <table class="table-hover">
236
+ <tr style="position: relative" class="table-bordered">
237
+ <td
238
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
239
+ 汇总信息
240
+ </td>
241
+ <td
242
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
243
+ 卡表购气:&emsp;{{ sumsmodel.f_gas.toFixed(2) }}m³
244
+ </td>
245
+ <td
246
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
247
+ 实收款:&emsp;{{ sumsmodel.f_collection.toFixed(2) }}元
248
+ </td>
249
+ <td
250
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
251
+ 物联表充值:&emsp;{{ sumsmodel.f_money.toFixed(2) }}元
252
+ </td>
253
+ <td
254
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
255
+ 收款合计:&emsp;{{ sumsmodel.f_collection.toFixed(2) }}元
256
+ </td>
257
+ </tr>
258
+ </table>
259
+ </div>
260
+ </div>
261
+ </div>
262
+ </template>
263
+ <script>
264
+ import {PagedList, HttpResetClass} from 'vue-client'
265
+ import defaultPrint from './config/DefaultPrint'
266
+ import exportConfig from './config/exportConfig'
267
+ import PrintDataSelf from '../../components/sale/common/PrintDataSelf'
268
+
269
+ let readySomething = async function (self) {
270
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
271
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
272
+ self.getCompanyList()
273
+ self.getAreaList()
274
+ }
275
+ export default {
276
+ title: '用户查询',
277
+ data () {
278
+ return {
279
+ depresid: [],
280
+ userresid: [],
281
+ f_orgid: this.$login.f.orgid,
282
+ f_depid: this.$login.f.depids,
283
+ f_operatorid: this.$login.f.id,
284
+ operatorid: [],
285
+ depid: [],
286
+ orgname: '',
287
+ depname: [],
288
+ operatorname: '',
289
+ condition: '',
290
+ orgConditionStr: '',
291
+ data: {},
292
+ other: [],
293
+ footer: [],
294
+ model: new PagedList('rs/sql/manage_chargeSummary', 20, {
295
+ startDate: 'this.model.startDate',
296
+ endDate: 'this.model.endDate'
297
+ }, {
298
+ f_collection: 0,
299
+ f_gas: 0,
300
+ f_money: 0
301
+ }),
302
+ gasproperties: [],
303
+ show: false,
304
+ rowdata: {},
305
+ areaList: [],
306
+ modelval: [],
307
+ startDate: '',
308
+ endDate: '',
309
+ inputtouPerson: [],
310
+ printshow: false,
311
+ all: false,
312
+ fields: {},
313
+ thead: '',
314
+ tfoot: '',
315
+ defaultfield: [],
316
+ sumsmodel: {},
317
+ initres: {
318
+ org: [this.$login.f.orgid],
319
+ slice_area: [],
320
+ },
321
+ criteriaShow: false,
322
+ userusetypes: [],
323
+ useinstitutions: [],
324
+ userusenatures: [],
325
+ sumExport: {'f_gas': '卡表购气', 'f_collection': '实收款', 'f_money': '物联表充值'},
326
+ isCompany: [{label: '是', value: '是'}, {label: '否', value: '否'}],
327
+ isArea: [{label: '是', value: '是'}, {label: '否', value: '否'}],
328
+ f_is_company: '否',
329
+ f_is_area: '否',
330
+ isCompanyShow: false,
331
+ isAreaShow: false,
332
+ corporatename: []
333
+ }
334
+ },
335
+ ready () {
336
+ readySomething(this).then(() => {
337
+ this.$emit('ready')
338
+ }).catch((error) => {
339
+ this.$emit('error', error)
340
+ })
341
+ },
342
+ methods: {
343
+ async getCompanyList(searchText){
344
+ let condition = ' 1 = 1 '
345
+ if (searchText) {
346
+ condition = ` f_company_name like '%${searchText}%' `
347
+ }
348
+ let HttpReset = new HttpResetClass()
349
+ HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
350
+ data: {
351
+ items: 'f_company_name, id',
352
+ tablename: 't_company',
353
+ orderitem: 'id desc',
354
+ condition: condition
355
+ }
356
+ }, {resolveMsg: null, rejectMsg: '获取单位信息失败!'}).then((req) => {
357
+ let redata = []
358
+ req.data.forEach((row, n) => {
359
+ redata[n] = {
360
+ label: row.f_company_name,
361
+ value: row.id
362
+ }
363
+ })
364
+ this.corporatename = [{label: '全部', value: ''}, ...redata]
365
+ })
366
+ },
367
+ getAreaList (searchText) {
368
+ let condition = ' 1 = 1 '
369
+ if (searchText) {
370
+ condition = ` f_residential_area like '%${searchText}%' `
371
+ }
372
+ let HttpReset = new HttpResetClass()
373
+ HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
374
+ data: {
375
+ items: 'f_residential_area, id',
376
+ tablename: 't_area',
377
+ orderitem: 'id desc',
378
+ condition: condition
379
+ }
380
+ }, {resolveMsg: null, rejectMsg: '获取小区信息失败!'}).then((req) => {
381
+ let redata = []
382
+ req.data.forEach((row, n) => {
383
+ redata[n] = {
384
+ label: row.f_residential_area,
385
+ value: row.id
386
+ }
387
+ })
388
+ this.areaList = [{label: '全部', value: ''}, ...redata]
389
+ })
390
+ },
391
+ clear() {
392
+ //清空部门和人员
393
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
394
+ //部门和人员变为全选
395
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
396
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
397
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
398
+ this.$refs.paged.$refs.cri.model[key] = []
399
+ })
400
+ this.f_is_company = '否'
401
+ this.f_is_area = '否'
402
+ },
403
+ isAreaChange () {
404
+ if(this.f_is_area){
405
+ if (this.f_is_area == '是') {
406
+ this.isCompanyShow = true
407
+ this.model = new PagedList('rs/sql/manage_chargeSummaryByArea', 20, {
408
+ startDate: 'this.model.startDate',
409
+ endDate: 'this.model.endDate',
410
+ condition2: 'this.model.condition2'
411
+ }, {f_collection: 0, f_gas: 0, f_money: 0})
412
+ } else {
413
+ this.isCompanyShow = false
414
+ this.model = new PagedList('rs/sql/manage_chargeSummary', 20, {
415
+ startDate: 'this.model.startDate',
416
+ endDate: 'this.model.endDate'
417
+ }, {f_collection: 0, f_gas: 0, f_money: 0})
418
+ }
419
+ }
420
+ },
421
+ isCompanyChange () {
422
+ if (this.f_is_company) {
423
+ if (this.f_is_company == '是') {
424
+ this.isAreaShow = true
425
+ this.model = new PagedList('rs/sql/manage_chargeSummaryByCompany', 20, {
426
+ startDate: 'this.model.startDate',
427
+ endDate: 'this.model.endDate',
428
+ condition2: 'this.model.condition2'
429
+ }, {f_collection: 0, f_gas: 0, f_money: 0})
430
+ } else {
431
+ this.isAreaShow = false
432
+ this.model = new PagedList('rs/sql/manage_chargeSummary', 20, {
433
+ startDate: 'this.model.startDate',
434
+ endDate: 'this.model.endDate'
435
+ }, {f_collection: 0, f_gas: 0, f_money: 0})
436
+ }
437
+ }
438
+ },
439
+ userTypeChange () {
440
+ this.userusetypes = []
441
+ this.userusenatures = []
442
+ this.useinstitutions = []
443
+ this.$refs.paged.$refs.cri.model.f_user_usetype = ''
444
+ this.$refs.paged.$refs.cri.model.f_use_institution = ''
445
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
446
+ if (this.$refs.paged.$refs.cri.model.f_user_type) {
447
+ let str = this.$refs.paged.$refs.cri.model.f_user_type + '用气类型'
448
+ this.userusetypes = this.$appdata.getParam(str)
449
+ }
450
+ },
451
+ userUseTypeChange () {
452
+ this.useinstitutions = []
453
+ this.userusenatures = []
454
+ this.$refs.paged.$refs.cri.model.f_use_institution = ''
455
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
456
+ if (this.$refs.paged.$refs.cri.model.f_user_usetype) {
457
+ let str = this.$refs.paged.$refs.cri.model.f_user_usetype + '机构'
458
+ this.useinstitutions = this.$appdata.getParam(str)
459
+ }
460
+ },
461
+ userUseInstitutionChange () {
462
+ this.userusenatures = []
463
+ this.$refs.paged.$refs.cri.model.f_user_usenature = ''
464
+ if (this.$refs.paged.$refs.cri.model.f_use_institution) {
465
+ let str = this.$refs.paged.$refs.cri.model.f_use_institution + '使用性质'
466
+ this.userusenatures = this.$appdata.getParam(str)
467
+ }
468
+ },
469
+ hidden () {
470
+ this.criteriaShow = !this.criteriaShow
471
+ },
472
+ getotherfooter () {
473
+ this.other = []
474
+ this.footer = []
475
+ let exportdata = this.getCondition
476
+ let otherInData = []
477
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
478
+ let footerData = [], exportfield = this.sumExport
479
+ footerData.push('合计')
480
+ let self = this
481
+ for (var field in self.sumsmodel) {
482
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`)
483
+ }
484
+ this.footer.push(footerData)
485
+ this.other.push(otherInData)
486
+ },
487
+ search () {
488
+ this.$refs.paged.$refs.cri.search()
489
+ },
490
+ appendCondition (data) {
491
+ console.log('data=====>',data)
492
+ let stringValue = ''
493
+ for (var i = 0; i < data.length; i++) {
494
+ if (data[i]) {
495
+ if (i === data.length - 1) {
496
+ stringValue = stringValue + "'" + data[i] + "'"
497
+ } else {
498
+ stringValue = stringValue + "'" + data[i] + "',"
499
+ }
500
+ }
501
+ }
502
+ return stringValue
503
+ },
504
+ async selfSearch (args) {
505
+ let companyCondition2 = '1=1'
506
+ if (!this.orgConditionStr) {
507
+ args.condition = `${args.condition}` + ' and f_orgid = ' + this.$login.f.orgid
508
+ companyCondition2 = companyCondition2 + ' and f_orgid = ' + this.$login.f.orgid
509
+ } else {
510
+ args.condition = `${args.condition}` + this.orgConditionStr
511
+ companyCondition2 = companyCondition2 + this.orgConditionStr
512
+ }
513
+ if (this.isAreaShow || this.isCompanyShow) {
514
+ if (args.model.f_company_id.length > 0) {
515
+ companyCondition2 = companyCondition2 + ' and id in (' + await this.appendCondition(args.model.f_company_id) + ')'
516
+ }
517
+ if (args.model.f_residential_area_id.length > 0) {
518
+ companyCondition2 = companyCondition2 + ' and id in (' + await this.appendCondition(args.model.f_residential_area_id) + ')'
519
+ }
520
+ }
521
+ args.model.condition2 = companyCondition2
522
+ this.condition = args.condition
523
+ console.log("查看条件",this.condition)
524
+ await this.model.search(args.condition, args.model)
525
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
526
+ this.card = ''
527
+ this.IdCardInfo = ''
528
+ console.log('合计字段', this.sumsmodel)
529
+ },
530
+ getRes (obj) {
531
+ this.orgConditionStr = obj
532
+ },
533
+ stamp () {
534
+ this.all = false
535
+ //默认选择要打印的列
536
+ this.modelval = defaultPrint.config
537
+ this.fields = this.getfield
538
+ console.log('所有打印字段', this.fields)
539
+ this.printshow = true
540
+ this.put()
541
+ },
542
+ put () {
543
+ // 对Modelval进行排序
544
+ this.sortModelval()
545
+ this.thead = `<tr><th colspan=${this.modelval.length}>用户查询</th></tr><tr>`
546
+ for (let key of this.modelval) {
547
+ this.thead += '<th>' + this.fields[key] + '</th>'
548
+ }
549
+ this.thead += '</tr>'
550
+ },
551
+ print () {
552
+ this.$refs.print.PrintAsFile()
553
+ this.printshow = false
554
+ },
555
+ dealmsg (val) {
556
+ console.log('---------------dealmsg')
557
+ this.rowdata = val
558
+ this.show = true
559
+ val.model = this.model.model
560
+ this.$dispatch('deal-msg', val)
561
+ },
562
+ close () {
563
+ this.printshow = false
564
+ this.all = false
565
+ },
566
+ // 对选择的列进行排序
567
+ sortModelval () {
568
+ let sortModel = []
569
+ Object.keys(this.fields).forEach((key) => {
570
+ if (this.modelval.includes(key)) {
571
+ sortModel.push(key)
572
+ }
573
+ })
574
+ this.modelval = sortModel
575
+ console.log('选择的打印的字段', this.modelval)
576
+ }
577
+ },
578
+ watch: {
579
+ 'all' (val) {
580
+ if (val) {
581
+ this.modelval = this.bodyData
582
+ } else {
583
+ this.modelval = defaultPrint.config
584
+ this.put()
585
+ }
586
+ },
587
+ sumsmodel: {
588
+ handler: function (val) {
589
+ this.getotherfooter()
590
+ },
591
+ deep: true
592
+ },
593
+ 'modelval.length' () {
594
+ this.put()
595
+ }
596
+ },
597
+ computed: {
598
+ getCondition () {
599
+ return {
600
+ condition: this.condition,
601
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
602
+ endDate: this.$refs.paged.$refs.cri.model.endDate,
603
+ condition2: this.$refs.paged.$refs.cri.model.condition2
604
+ }
605
+ },
606
+ getfield () {
607
+ let field
608
+ if (this.isAreaShow) {
609
+ field = exportConfig.manageChargeSummaryByCompanyConfig
610
+ } else if (this.isCompanyShow) {
611
+ field = exportConfig.manageChargeSummaryByAreaConfig
612
+ } else {
613
+ field = exportConfig.manageChargeSummaryConfig
614
+ }
615
+ return field
616
+ },
617
+ useTypes () {
618
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
619
+ },
620
+ usertypes () {
621
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
622
+ }
623
+
624
+ }
625
+ }
626
+ </script>
627
+