manage-client 3.2.288 → 3.2.290

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.
@@ -0,0 +1,730 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
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-inline auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label for="startDate" class="font_normal_body">录入日期</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="true"
16
+ >
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-2 form-group">
20
+ <label for="endDate" class="font_normal_body">&emsp;&emsp;&emsp;至</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :format="'yyyy-MM-dd HH:mm:ss'"
25
+ :show-reset-button="true"
26
+ >
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-2 form-group">
30
+ <label for="startHandDate" class="font_normal_body">下发日期</label>
31
+ <datepicker id="startHandDate" placeholder="开始日期" style="width:60%"
32
+ v-model="model.startHandDate"
33
+ :value.sync="model.startHandDate"
34
+ :format="'yyyy-MM-dd HH:mm:ss'"
35
+ :show-reset-button="true"
36
+ >
37
+ </datepicker>
38
+ </div>
39
+ <div class="col-sm-2 form-group">
40
+ <label for="endHandDate" class="font_normal_body">&emsp;&emsp;&emsp;至</label>
41
+ <datepicker id="endHandDate" placeholder="结束日期" style="width:60%"
42
+ v-model="model.endHandDate"
43
+ :value.sync="model.endHandDate"
44
+ :format="'yyyy-MM-dd HH:mm:ss'"
45
+ :show-reset-button="true"
46
+ >
47
+ </datepicker>
48
+ </div>
49
+
50
+
51
+ <div class="span" style="float:right;">
52
+ <button class="button_search button_spacing" @click="search()">查询</button>
53
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
54
+ <export-excel :data="$parent.$parent.getCondition"
55
+ :field="$parent.$parent.getfield"
56
+ :footer="$parent.$parent.footer"
57
+ :header="$parent.$parent.other"
58
+ sqlurl="rs/logic/exportfile"
59
+ sql-name="NewFMYGasQuery"
60
+ template-name='用气查询导出'
61
+ :choose-col="true"></export-excel>
62
+ <print-data :model="$parent.model" :field="$parent.$parent.getfield"
63
+ :defaultfield="$parent.$parent.defaultfield" print-name="用气查询打印"
64
+ ></print-data>
65
+
66
+ <div style="float: right" class="button_spacing"
67
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
68
+ @click="$parent.$parent.hidden()"></div>
69
+ </div>
70
+ </div>
71
+ <div class="row" v-show="$parent.$parent.criteriaShow">
72
+
73
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
74
+
75
+ <div class="col-sm-2 form-group">
76
+
77
+ <label class="font_normal_body">客户编号</label>
78
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
79
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
80
+ </div>
81
+ <div class="col-sm-2 form-group">
82
+ <label class="font_normal_body">客户名称</label>
83
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
84
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
85
+ </div>
86
+ <div class="col-sm-2 form-group">
87
+ <label class="font_normal_body" title="旧客户编号">档案编号</label>
88
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
89
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
90
+ </div>
91
+ <div class="col-sm-2 form-group">
92
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
93
+ <v-select :value.sync="model.f_residential_area"
94
+ class="select_list select"
95
+ v-model="model.f_residential_area"
96
+ style="width: 60%"
97
+ multiple
98
+ condition="f_residential_area in {}"
99
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
100
+ close-on-select>
101
+
102
+ </v-select>
103
+ </div>
104
+ <div class="col-sm-2 form-group">
105
+ <label class="font_normal_body">客户地址</label>
106
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
107
+ condition="f_address like '%{}%'" placeholder='客户地址'>
108
+ </div>
109
+ <div class="col-sm-2 form-group">
110
+ <label class="font_normal_body">客户表号</label>
111
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
112
+ condition="f_meternumber like '%{}%'" placeholder='客户表号'>
113
+ </div>
114
+ <div class="col-sm-2 form-group">
115
+ <label class="font_normal_body" title="参数名称:气表类型">气表类型</label>
116
+ <v-select :value.sync="model.f_meter_classify"
117
+ v-model="model.f_meter_classify"
118
+ :options='$parent.$parent.metertype' placeholder='请选择'
119
+ condition="f_meter_classify like '%{}%'"
120
+ close-on-select></v-select>
121
+ </div>
122
+ <div class="col-sm-2 form-group">
123
+ <label class="font_normal_body" title="参数名称:用户类型">客户类型</label>
124
+ <v-select :value.sync="model.f_user_type"
125
+ @change="$parent.$parent.userTypeChange()"
126
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
127
+ condition="f_user_type = '{}'"
128
+ close-on-select></v-select>
129
+ </div>
130
+ <div class="col-sm-2 form-group" >
131
+ <label class="font_normal_body">客户状态</label>
132
+ <v-select :value.sync="model.f_user_state"
133
+ v-model="model.f_user_state"
134
+ :options='$parent.$parent.userstates' placeholder='请选择'
135
+ condition="f_user_state = '{}'"
136
+ close-on-select></v-select>
137
+ </div>
138
+ <div class="col-sm-2 form-group">
139
+ <label class="font_normal_body">用气性质</label>
140
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
141
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
142
+ condition="f_gasproperties = '{}'"
143
+ close-on-select></v-select>
144
+ </div>
145
+ <!--表册片区-->
146
+ <div class="col-sm-2 form-group">
147
+ <label class="font_normal_body">表册片区</label>
148
+ <v-select :value.sync="model.f_book_slice_area" v-model="model.f_book_slice_area"
149
+ @change="$parent.$parent.inputtorchange"
150
+ :options='$parent.$parent.bookSlice' placeholder='片区/表册'
151
+ style="width:60%"
152
+ close-on-select
153
+ condition="f_book_slice_area = '{}'"></v-select>
154
+ </div>
155
+ <div class="col-sm-2 form-group">
156
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
157
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
158
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
159
+ style="width:60%" :multiple="true"
160
+ condition="f_meter_book_num in {}"></v-select>
161
+ </div>
162
+ <div class="col-sm-2 form-group">
163
+ <label class="font_normal_body">气表品牌</label>
164
+ <v-select :value.sync="model.f_meter_brand" multiple
165
+ v-model="model.f_meter_brand"
166
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
167
+ condition="f_meter_brand in {}"
168
+ close-on-select></v-select>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ </criteria>
173
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
174
+ <template partial='head'>
175
+ <tr>
176
+ <th>
177
+ <nobr>客户编号</nobr>
178
+ </th>
179
+ <th>
180
+ <nobr>客户名称</nobr>
181
+ </th>
182
+ <th>
183
+ <nobr>档案编号</nobr>
184
+ </th>
185
+ <th>
186
+ <nobr>客户电话</nobr>
187
+ </th>
188
+ <th>
189
+ <nobr>证件类型</nobr>
190
+ </th>
191
+ <th>
192
+ <nobr>证件号码</nobr>
193
+ </th>
194
+ <th>
195
+ <nobr>小区</nobr>
196
+ </th>
197
+ <th>
198
+ <nobr>客户地址</nobr>
199
+ </th>
200
+ <th>
201
+ <nobr>客户类型</nobr>
202
+ </th>
203
+ <th>
204
+ <nobr>用气性质</nobr>
205
+ </th>
206
+ <th>
207
+ <nobr>表号</nobr>
208
+ </th>
209
+ <th>
210
+ <nobr>气表品牌</nobr>
211
+ </th>
212
+ <th>
213
+ <nobr>气表类型</nobr>
214
+ </th>
215
+ <th>
216
+ <nobr>气价详情</nobr>
217
+ </th>
218
+ <!--<th><nobr>气表底数</nobr></th>-->
219
+ <!--<th><nobr>表上余额</nobr></th>-->
220
+ <!--<th><nobr>账户余额</nobr></th>-->
221
+ <th>
222
+ <nobr>预购气量</nobr>
223
+ </th>
224
+ <th>
225
+ <nobr>预购金额</nobr>
226
+ </th>
227
+ <th>
228
+ <nobr>实交金额</nobr>
229
+ </th>
230
+ <th>
231
+ <nobr>抄表员</nobr>
232
+ </th>
233
+ <th>
234
+ <nobr>表册片区</nobr>
235
+ </th>
236
+ <th>
237
+ <nobr>抄表次数</nobr>
238
+ </th>
239
+ <th>
240
+ <nobr>抄表区间</nobr>
241
+ </th>
242
+ <th title="抄表区间间隔天数">
243
+ <nobr>天数</nobr>
244
+ </th>
245
+ <th>
246
+ <nobr>用气量</nobr>
247
+ </th>
248
+ <th>
249
+ <nobr>用气金额</nobr>
250
+ </th>
251
+ <th>
252
+ <nobr>建档日期</nobr>
253
+ </th>
254
+ </tr>
255
+ </template>
256
+ <template partial='body'>
257
+ <td style="text-align: center;">
258
+ <nobr>{{row.f_userinfo_code}}</nobr>
259
+ </td>
260
+ <td style="text-align: center;">
261
+ <nobr>{{row.f_user_name}}</nobr>
262
+ </td>
263
+ <td style="text-align: center;">
264
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
265
+ </td>
266
+ <td style="text-align: center;">
267
+ <nobr>{{row.f_user_phone}}</nobr>
268
+ </td>
269
+ <td style="text-align: center;">
270
+ <nobr>{{row.f_credentials}}</nobr>
271
+ </td>
272
+ <td style="text-align: center;">
273
+ <nobr>{{row.f_idnumber}}</nobr>
274
+ </td>
275
+ <td style="text-align: center;">
276
+ <nobr>{{row.f_residential_area}}</nobr>
277
+ </td>
278
+ <td style="text-align: center;">
279
+ <nobr>{{row.f_address}}</nobr>
280
+ </td>
281
+ <td style="text-align: center;">
282
+ <nobr>{{row.f_user_type}}</nobr>
283
+ </td>
284
+ <td style="text-align: center;">
285
+ <nobr>{{row.f_gasproperties}}</nobr>
286
+ </td>
287
+ <td style="text-align: center;">
288
+ <nobr>{{row.f_meternumber}}</nobr>
289
+ </td>
290
+ <td style="text-align: center;">
291
+ <nobr>{{row.f_meter_brand}}</nobr>
292
+ </td>
293
+ <td style="text-align: center;">
294
+ <nobr>{{row.f_meter_classify}}</nobr>
295
+ </td>
296
+ <td style="text-align: center;">
297
+ <nobr>{{row.f_price_value}}</nobr>
298
+ </td>
299
+ <!--<td style="text-align: center;">-->
300
+ <!--<nobr>{{row.f_meter_base}}</nobr>-->
301
+ <!--</td>-->
302
+ <!--<td style="text-align: center;">-->
303
+ <!--<nobr>{{row.f_balance_amount}}</nobr>-->
304
+ <!--</td>-->
305
+ <!--<td style="text-align: center;">-->
306
+ <!--<nobr>{{row.f_balance}}</nobr>-->
307
+ <!--</td>-->
308
+ <td style="text-align: center;">
309
+ <nobr>{{row.f_pregas}}</nobr>
310
+ </td>
311
+ <td style="text-align: center;">
312
+ <nobr>{{row.f_preamount}}</nobr>
313
+ </td>
314
+ <td style="text-align: center;">
315
+ <nobr>{{row.f_collection}}</nobr>
316
+ </td>
317
+ <td style="text-align: center;">
318
+ <nobr>{{row.f_inputtor}}</nobr>
319
+ </td>
320
+ <td style="text-align: center;">
321
+ <nobr>{{row.f_book_slice_area}}</nobr>
322
+ </td>
323
+ <td style="text-align: center;">
324
+ <nobr>{{row.f_hand_number}}</nobr>
325
+ </td>
326
+ <td style="text-align: center;">
327
+ <nobr>{{row.f_date}}</nobr>
328
+ </td>
329
+ <td style="text-align: center;" title="抄表区间间隔天数">
330
+ <nobr>{{row.f_input_day}}</nobr>
331
+ </td>
332
+ <td style="text-align: center;">
333
+ <nobr>{{row.f_oughtamount}}</nobr>
334
+ </td>
335
+ <td style="text-align: center;">
336
+ <nobr>{{row.f_oughtfee}}</nobr>
337
+ </td>
338
+ <td style="text-align: center;">
339
+ <nobr>{{row.f_createfile_date}}</nobr>
340
+ </td>
341
+ </template>
342
+ <template partial='foot'></template>
343
+ </data-grid>
344
+ </criteria-paged>
345
+ <table class="table-hover">
346
+ <tr style="position: relative" class="table-bordered">
347
+ <td
348
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
349
+ 汇总信息
350
+ </td>
351
+ <td
352
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
353
+ 预购气量合计:&emsp;{{sumsmodel.f_pregas}}
354
+ </td>
355
+ <td
356
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
357
+ 预购金额合计:&emsp;{{sumsmodel.f_preamount}}
358
+ </td>
359
+ <td
360
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
361
+ 实交金额合计:&emsp;{{sumsmodel.f_collection}}
362
+ </td>
363
+ <td
364
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
365
+ 用气量合计:&emsp;{{sumsmodel.f_oughtamount}}
366
+ </td>
367
+ <td
368
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
369
+ 用气金额合计:&emsp;{{sumsmodel.f_oughtfee}}
370
+ </td>
371
+ </tr>
372
+ </table>
373
+ </div>
374
+ <div v-if="show">
375
+ <user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>
376
+ </div>
377
+ </div>
378
+ </div>
379
+ </template>
380
+ <script>
381
+ import {HttpResetClass, PagedList} from 'vue-client'
382
+ import defaultPrint from '../config/DefaultPrint'
383
+ import exportConfig from '../config/exportConfig'
384
+
385
+
386
+ let readySomething = async function (self) {
387
+ //加载抄表册
388
+ self.initmeterbook();
389
+ self.initSlice(self.$login.f.orgid)
390
+
391
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
392
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
393
+ await self.$MagLoadParams.loadParam()
394
+ self.initParams()
395
+ self.getaddress()
396
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
397
+ }
398
+ export default {
399
+ title: '用气查询',
400
+ name: 'AddMaterial',
401
+ data () {
402
+ return {
403
+ other: [],
404
+ footer: [],
405
+ model: new PagedList('rs/sql/NewFMYGasQuery', 30, {
406
+ startDate: 'this.model.startDate != null && this.model.startDate != "" ? this.model.startDate : this.model.startHandDate',
407
+ endDate: 'this.model.endDate != null && this.model.endDate != "" ? this.model.endDate : this.model.endHandDate'
408
+ }, {
409
+ f_pregas: 0,
410
+ f_preamount: 0,
411
+ f_collection: 0,
412
+ f_oughtamount: 0,
413
+ f_oughtfee: 0
414
+ }),
415
+ initres: {
416
+ org: [this.$login.f.orgid],
417
+ dep: [],
418
+ user: [],
419
+ },
420
+ gasproperties: [],
421
+ residentialArea: [],
422
+ f_filialeid: this.$login.f.orgid,
423
+ show: false,
424
+ rowdata: {},
425
+ criteriaShow: false,
426
+ orgCondtionStr: '',
427
+ modelval: [],
428
+ meterbrands: [],
429
+ printshow: false,
430
+ all: false,
431
+ fields: {},
432
+ thead: '',
433
+ tfoot: '',
434
+ //表册片区
435
+ bookSlice:[{label: '全部',value: ''}],
436
+ // 下拉框
437
+
438
+ //合计数据
439
+ sumsmodel: {},
440
+ defaultfield: [],
441
+ // 使用类型,壁挂炉
442
+ usetypes: [{label: '全部', value: ''},{label: '是', value: `= '壁挂炉'`},{label: '否', value: `!= '壁挂炉'`}],
443
+ userstates: this.$appdata.getParam('用户状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')] : [],
444
+ meterbooks: [{label: '全部',value: ''}], //抄表册
445
+ tempfalg :false,
446
+ lastorgstr:'',
447
+ allorgid:[],
448
+ }
449
+ },
450
+ ready () {
451
+ readySomething(this)
452
+ },
453
+ methods: {
454
+ initParams(){
455
+ //初始化气表品牌
456
+ let brandArr = []
457
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
458
+ let temp = {}
459
+ temp.label = item.label
460
+ temp.value = item.value.f_meter_brand
461
+ brandArr.push(temp)
462
+ })
463
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
464
+ },
465
+ //初始化片区
466
+ async initSlice (val) {
467
+ if (val) {
468
+ let getAllArea = await this.$resetpost('/rs/search', {
469
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
470
+ userid: this.$login.f.id
471
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
472
+ let arr = getAllArea.data.filter((res) => {
473
+ return res.parentid == val
474
+ })
475
+ this.bookSlice = []
476
+ arr.forEach((res) => {
477
+ this.bookSlice.push({label: res.name, value: res.name})
478
+ })
479
+ }
480
+ },
481
+ //表册片区和抄表册关联
482
+ async inputtorchange(){
483
+ /*let val1=this.$refs.paged.$refs.cri.model.f_meter_book*/
484
+ this.$set('$refs.paged.$refs.cri.model.f_meter_book',[]);
485
+ let val2=this.$refs.paged.$refs.cri.model.f_book_slice_area
486
+ if((val2.length>0)){
487
+ let condition = ` 1=1 and f_orgid ='${this.f_filialeid}' and f_book_state='有效' `
488
+ if(val2[0]) {
489
+ condition = condition + ` and f_book_slice_area = '${val2}' `
490
+ }
491
+ let param={
492
+ items:'*',
493
+ tablename:'t_meter_book',
494
+ condition:condition,
495
+ orderitem:'id'
496
+ }
497
+ let getMeterBooks = await this.$resetpost('rs/sql/singleTable_OrderBy', {data: param}, {resolveMsg: null, rejectMsg: '获取营收参数出错!!!'})
498
+ if (getMeterBooks.data) {
499
+ if(getMeterBooks.data.length >0){
500
+ let rs = [];
501
+ getMeterBooks.data.forEach((item)=>{
502
+ let temp = {
503
+ label:item.f_book_name,
504
+ value:item.id
505
+ };
506
+ rs.push(temp);
507
+
508
+ })
509
+ this.meterbooks = [{label: '全部',value: ''}, ...rs];
510
+ }else{
511
+
512
+ this.meterbooks = [{label: '全部',value: ''}];
513
+ }
514
+ }
515
+ }else{
516
+ this.meterbooks = [{label: '全部',value: ''}];
517
+ this.initmeterbook();
518
+ }
519
+ },
520
+ async getaddress(){
521
+ let HttpReset = new HttpResetClass()
522
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
523
+ data: {
524
+ condition: `1=1 and s.f_orgid = '${this.$login.f.orgid}'`
525
+ }
526
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
527
+ console.log('小区',data)
528
+ let house = [{label: '全部', value: ''}]
529
+ for (let row of data.data){
530
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
531
+ }
532
+ this.residentialArea = house
533
+ },
534
+ async initmeterbook(orgstr){
535
+ if(orgstr == null ){
536
+ orgstr = this.f_filialeid;
537
+ }
538
+ //获取新的抄表册,先去清理所有的抄表册
539
+ this.$GetSaleParam.meterbooks = [];
540
+ //开始加载新的抄表册
541
+ await this.$LoadParams.loadMeterBook(orgstr)
542
+ this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
543
+ },
544
+ getotherfooter () {
545
+ this.other = [];
546
+ this.footer = [];
547
+ // let exportdata = this.getCondition;
548
+ let otherInData = [];
549
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
550
+ let footerData = [], exportfield = this.getfield;
551
+ footerData.push("合计");
552
+ let self = this;
553
+ for (var field in self.sumsmodel) {
554
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
555
+ }
556
+ this.footer.push(footerData);
557
+ this.other.push(otherInData);
558
+ },
559
+ userTypeChange () {
560
+ this.gasproperties = []
561
+ if (this.$refs.paged.$refs.cri.model !== null) {
562
+ this.$refs.paged.$refs.cri.model.f_gasproperties = ''
563
+
564
+ console.log(this.$refs.paged.$refs.cri.model.f_user_type[0])
565
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
566
+ // this.gasproperties.push({label: '全部', value: ''})
567
+ } else {
568
+ this.gasproperties = [{label: '全部', value: ''}]
569
+ }
570
+ },
571
+ search () {
572
+ this.$refs.paged.$refs.cri.search()
573
+ },
574
+ cancel () {
575
+ this.show = false
576
+ },
577
+ selfSearch (args) {
578
+ args.condition = `${args.condition} ` + this.orgCondtionStr
579
+ let con = '1=1'
580
+ let mod =this.$refs.paged.$refs.cri.model
581
+ if(mod.startDate != null && mod.startDate != '') {
582
+ con += ` and f_input_date >= '${mod.startDate}'`
583
+ }
584
+ if(mod.endDate != null && mod.endDate != '') {
585
+ con += ` and f_input_date <= '${mod.endDate}'`
586
+ }
587
+ if(mod.startHandDate != null && mod.startHandDate != '') {
588
+ con += ` and f_hand_date >= '${mod.startHandDate}'`
589
+ }
590
+ if(mod.endHandDate != null && mod.endHandDate != '') {
591
+ con += ` and f_hand_date <= '${mod.endHandDate}'`
592
+ }
593
+ this.model.search(args.condition, args.model,con)
594
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
595
+ },
596
+ clear () {
597
+ //清空部门和人员
598
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
599
+ //部门和人员变为全选
600
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
601
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
602
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
603
+ this.$refs.paged.$refs.cri.model[key] = []
604
+ })
605
+ },
606
+ show () {
607
+ this.criteriaShow = true
608
+ },
609
+ hidden () {
610
+ this.criteriaShow = !this.criteriaShow
611
+ },
612
+ showmsg (obj) {
613
+ this.rowdata = obj
614
+ this.show = true
615
+ },
616
+ async getRes(condition,obj) {
617
+ this.orgCondtionStr = condition
618
+
619
+ },
620
+ stamp () {
621
+ this.all = false
622
+ //默认选择要打印的列
623
+ this.modelval = defaultPrint.config
624
+ this.fields = this.getfield
625
+ console.log('所有打印字段', this.fields)
626
+ this.printshow = true
627
+ this.put()
628
+ },
629
+ put () {
630
+ // 对Modelval进行排序
631
+ this.sortModelval()
632
+ this.thead = `<tr><th colspan=${this.modelval.length}>非民用用气查询</th></tr><tr>`
633
+ for (let key of this.modelval) {
634
+ this.thead += '<th>' + this.fields[key] + '</th>'
635
+ }
636
+ this.thead += '</tr>'
637
+ },
638
+ print () {
639
+ this.$refs.print.PrintAsFile()
640
+ this.printshow = false
641
+ },
642
+ dealmsg (val) {
643
+ this.rowdata = val
644
+ this.show = true
645
+ val.model = this.model.model
646
+ this.$dispatch('deal-msg', val)
647
+ },
648
+ close () {
649
+ this.printshow = false
650
+ this.all = false
651
+ },
652
+ // 对选择的列进行排序
653
+ sortModelval () {
654
+ let sortModel = []
655
+ Object.keys(this.fields).forEach((key) => {
656
+ if (this.modelval.includes(key)) {
657
+ sortModel.push(key)
658
+ }
659
+ })
660
+ this.modelval = sortModel
661
+ console.log('选择的打印的字段', this.modelval)
662
+ }
663
+
664
+ },
665
+ computed: {
666
+ getCondition () {
667
+ return {
668
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
669
+ condValue: this.$refs.paged.model.condValue,
670
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
671
+ endDate: this.$refs.paged.$refs.cri.model.endDate
672
+ }
673
+ },
674
+ getfield () {
675
+ return exportConfig.fmygasConfig
676
+ },
677
+ usertypes () {
678
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
679
+ },
680
+ credentials () {
681
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('证件类型')]
682
+ },
683
+ metertype () {
684
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
685
+ }
686
+ },
687
+ events: {},
688
+ watch: {
689
+ 'all' (val) {
690
+ if (val) {
691
+ this.modelval = this.bodyData
692
+ } else {
693
+ this.modelval = defaultPrint.config
694
+ this.put()
695
+ }
696
+ },
697
+ 'modelval.length' () {
698
+ this.put()
699
+ },
700
+ sumsmodel: {
701
+ handler: function (val) {
702
+ this.getotherfooter();
703
+ },
704
+ deep: true
705
+ },
706
+ async 'orgCondtionStr'(val) {
707
+ this.$refs.paged.$refs.cri.model.f_book_slice_area=[]
708
+ this.$refs.paged.$refs.cri.model.f_meter_book = []
709
+ this.meterbooks = [{label: '全部',value: ''}];
710
+ if(this.lastorgstr != val){
711
+ this.tempfalg = true;
712
+ this.lastorgstr = val;
713
+ }
714
+ if(this.tempfalg && val != null && val!='' && val.indexOf("(")>-1){
715
+ this.tempfalg = false;
716
+ let a = val.substring(val.indexOf("(")+2)
717
+ await this.initmeterbook(a.substring(0,a.indexOf(")")-1));
718
+ }
719
+ },
720
+ }
721
+ }
722
+ </script>
723
+ <style>
724
+ .datapanel {
725
+ color: #333;
726
+ background-color: white;
727
+ padding: 10px 20px;
728
+ border-radius: 15px;
729
+ }
730
+ </style>