manage-client 3.2.294 → 3.2.296

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