manage-client 4.0.75 → 4.0.76

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,844 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search" v-if="!show">
4
+ <div class="flex">
5
+ <div style="flex:1;" class="flex" >
6
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
7
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
+ <div class="row">
10
+ <div class="col-sm-2 form-group">
11
+ <label class="font_normal_body">客户编号</label>
12
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
13
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
14
+ </div>
15
+ <div class="col-sm-2 form-group">
16
+ <label class="font_normal_body">项目名称</label>
17
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
18
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
19
+ </div>
20
+ <div class="col-sm-2 form-group">
21
+ <label class="font_normal_body">联系电话</label>
22
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
23
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
24
+ </div>
25
+ <div class="col-sm-2 form-group">
26
+ <label for="startGasDate" class="font_normal_body">通气时间</label>
27
+ <datepicker id="startGasDate" placeholder="开始日期" style="width:60%"
28
+ v-model="model.startGasDate"
29
+ :value.sync="model.startGasDate"
30
+ :format="'yyyy-MM-dd 00:00:00'"
31
+ :show-reset-button="true"
32
+ condition="f_gas_date >= '{}'">
33
+ </datepicker>
34
+ </div>
35
+ <div class="col-sm-2 form-group">
36
+ <label for="endGasDate" class="font_normal_body">至</label>
37
+ <datepicker id="endGasDate" placeholder="结束日期" style="width:60%"
38
+ v-model="model.endGasDate"
39
+ :value.sync="model.endGasDate"
40
+ :format="'yyyy-MM-dd 23:59:59'"
41
+ :show-reset-button="true"
42
+ condition="f_gas_date <= '{}'">
43
+ </datepicker>
44
+ </div>
45
+ <div class="span" style="float:right;">
46
+ <button class="button_search button_spacing" @click="search()">查询</button>
47
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
48
+ <export-excel :data="$parent.$parent.getCondition"
49
+ :field="$parent.$parent.getExportField"
50
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="fmyGasDeviceQuery" template-name='非民用用气设备查询'
51
+ :choose-col="true"></export-excel>
52
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
53
+ </div>
54
+ </div>
55
+ <div class="row" v-show="$parent.$parent.criteriaShow">
56
+
57
+ <div class="col-sm-2 form-group">
58
+ <label class="font_normal_body">身份证号</label>
59
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_idnumber"
60
+ condition="f_idnumber like '%{}%'" placeholder="身份证号">
61
+ </div>
62
+ <div class="col-sm-2 form-group">
63
+ <label class="font_normal_body">项目地址</label>
64
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
65
+ condition="f_address like '%{}%'" placeholder='项目地址'>
66
+ </div>
67
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"></res-select-group>
68
+ <div class="col-sm-2 form-group">
69
+ <label for="startDate" class="font_normal_body">建档日期</label>
70
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
71
+ v-model="model.startDate"
72
+ :value.sync="model.startDate"
73
+ :format="'yyyy-MM-dd 00:00:00'"
74
+ :show-reset-button="true"
75
+ condition="f_createfile_date >= '{}'">
76
+ </datepicker>
77
+ </div>
78
+ <div class="col-sm-2 form-group">
79
+ <label for="endDate" class="font_normal_body">结束日期</label>
80
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
81
+ v-model="model.endDate"
82
+ :value.sync="model.endDate"
83
+ :format="'yyyy-MM-dd 23:59:59'"
84
+ :show-reset-button="true"
85
+ condition="f_createfile_date <= '{}'">
86
+ </datepicker>
87
+ </div>
88
+ <div class="col-sm-2 form-group">
89
+ <label class="font_normal_body">通气年限</label>
90
+ <input type="number" style="width:60%" class="input_search" v-model="model.diffAllyear1"
91
+ condition="diffAllyear >= {}" placeholder="最小值">
92
+ </div>
93
+ <div class="col-sm-2 form-group">
94
+ <label class="font_normal_body">&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
95
+ <input type="number" style="width:60%" class="input_search" v-model="model.diffAllyear2"
96
+ condition="diffAllyear <= {}" placeholder="最大值">
97
+ </div>
98
+ <div class="col-sm-2 form-group">
99
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
100
+ <v-select :value.sync="model.f_residential_area"
101
+ class="select_list select"
102
+ enter-push
103
+ multiple = "true"
104
+ v-model="model.f_residential_area"
105
+ style="width: 60%"
106
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
107
+ close-on-select>
108
+
109
+ </v-select>
110
+ </div>
111
+ <div class="col-sm-2 form-group" >
112
+ <label class="font_normal_body">设备类型</label>
113
+ <v-select :value.sync="model.f_devices_type"
114
+ v-model="model.f_devices_type"
115
+ :options='$parent.$parent.deviceTypes' placeholder='请选择'
116
+ condition="f_devices_type = '{}'"
117
+ close-on-select></v-select>
118
+ </div>
119
+ <div class="col-sm-2 form-group" >
120
+ <label class="font_normal_body">设备品牌</label>
121
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_brand"
122
+ condition="f_brand like '%{}%'" placeholder='设备品牌'>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </criteria>
127
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
128
+ <template partial='head'>
129
+ <tr>
130
+ <th rowspan="2"><nobr>序号</nobr></th>
131
+ <th colspan="10"><nobr>用户信息</nobr></th>
132
+ <th colspan="8"><nobr>燃气计量装置</nobr></th>
133
+ <th colspan="6"><nobr>控制器设备</nobr></th>
134
+ <th colspan="6"><nobr>燃气连接管</nobr></th>
135
+ <th colspan="7"><nobr>调压设备</nobr></th>
136
+ <th colspan="11"><nobr>燃气报警器装置</nobr></th>
137
+ <th colspan="6"><nobr>建档信息</nobr></th>
138
+ <th colspan="6"><nobr>安检信息</nobr></th>
139
+ <th rowspan="2"><nobr>备注</nobr></th>
140
+ </tr>
141
+
142
+ <tr>
143
+ <th><nobr>营业执照名称</nobr></th>
144
+ <th><nobr>统一社会信用代码</nobr></th>
145
+ <th><nobr>法定代表人/经营者</nobr></th>
146
+ <th><nobr>身份证号</nobr></th>
147
+ <th><nobr>联系人</nobr></th>
148
+ <th><nobr>联系电话</nobr></th>
149
+ <th><nobr>项目名称</nobr></th>
150
+ <th><nobr>项目地址</nobr></th>
151
+ <th><nobr>用气设备</nobr></th>
152
+ <th><nobr>变更记录</nobr></th>
153
+
154
+ <th><nobr>品牌</nobr></th>
155
+ <th><nobr>编号</nobr></th>
156
+ <th><nobr>类型</nobr></th>
157
+ <th><nobr>型号</nobr></th>
158
+ <th><nobr>铅封号</nobr></th>
159
+ <th><nobr>生产日期</nobr></th>
160
+ <th><nobr>超期提醒</nobr></th>
161
+ <th><nobr>变更记录</nobr></th>
162
+
163
+ <th><nobr>品牌</nobr></th>
164
+ <th><nobr>编号</nobr></th>
165
+ <th><nobr>型号</nobr></th>
166
+ <th><nobr>生产日期</nobr></th>
167
+ <th><nobr>超期提醒</nobr></th>
168
+ <th><nobr>变更记录</nobr></th>
169
+
170
+ <th><nobr>连接方式</nobr></th>
171
+ <th><nobr>材质</nobr></th>
172
+ <th><nobr>长度</nobr></th>
173
+ <th><nobr>生产日期</nobr></th>
174
+ <th><nobr>超期提醒</nobr></th>
175
+ <th><nobr>变更记录</nobr></th>
176
+
177
+ <th><nobr>品牌</nobr></th>
178
+ <th><nobr>类型</nobr></th>
179
+ <th><nobr>型号</nobr></th>
180
+ <th><nobr>位置</nobr></th>
181
+ <th><nobr>生产日期</nobr></th>
182
+ <th><nobr>超期提醒</nobr></th>
183
+ <th><nobr>变更记录</nobr></th>
184
+
185
+ <th><nobr>探头品牌</nobr></th>
186
+ <th><nobr>数量</nobr></th>
187
+ <th><nobr>生产日期</nobr></th>
188
+ <th><nobr>主机品牌</nobr></th>
189
+ <th><nobr>数量</nobr></th>
190
+ <th><nobr>生产日期</nobr></th>
191
+ <th><nobr>切断阀品牌</nobr></th>
192
+ <th><nobr>数量</nobr></th>
193
+ <th><nobr>生产日期</nobr></th>
194
+ <th><nobr>超期提醒</nobr></th>
195
+ <th><nobr>变更记录</nobr></th>
196
+
197
+ <th><nobr>建档日期</nobr></th>
198
+ <th><nobr>供用气合同编号</nobr></th>
199
+ <th><nobr>通气日期</nobr></th>
200
+ <th><nobr>通气人员</nobr></th>
201
+ <th><nobr>通气年限</nobr></th>
202
+ <th><nobr>变更记录</nobr></th>
203
+
204
+ <th><nobr>安检日期</nobr></th>
205
+ <th><nobr>安检人员</nobr></th>
206
+ <th><nobr>用气总量</nobr></th>
207
+ <th><nobr>剩余气量</nobr></th>
208
+ <th><nobr>发现问题</nobr></th>
209
+ <th><nobr>整改日期</nobr></th>
210
+ </tr>
211
+ </template>
212
+ <template partial='body'>
213
+ <!--序号-->
214
+ <td style="text-align: center;" ><nobr>
215
+ {{$index + 1}}
216
+ </nobr></td>
217
+ <!--用户信息-->
218
+ <td style="text-align: center;">
219
+ <nobr>
220
+ {{row.f_paper_name}}
221
+ </nobr>
222
+ </td>
223
+ <td style="text-align: center;">
224
+ <nobr>{{row.f_taxpayer_id}}</nobr>
225
+ </td>
226
+ <td style="text-align: center;">
227
+ <nobr>{{row.f_legal_name}}</nobr>
228
+ </td>
229
+ <td style="text-align: center;">
230
+ <nobr>{{row.f_idnumber}}</nobr>
231
+ </td>
232
+ <td style="text-align: center;">
233
+ <nobr>{{row.f_legal_name}}</nobr>
234
+ </td>
235
+ <td style="text-align: center;">
236
+ <nobr>{{row.f_user_phone}}</nobr>
237
+ </td>
238
+ <td style="text-align: center;">
239
+ <nobr>{{row.f_user_name}}</nobr>
240
+ </td>
241
+ <td style="text-align: center;">
242
+ <nobr>{{row.f_address}}</nobr>
243
+ </td>
244
+ <td style="text-align: center;">
245
+ <nobr>{{row.f_meter_brand}}</nobr>
246
+ </td>
247
+ <td style="text-align: center;">
248
+ <nobr>
249
+ <span @click="$parent.$parent.$parent.dealmsg(row,'','用户信息')"><a><b>变更记录</b></a></span>
250
+ </nobr>
251
+ </td>
252
+
253
+ <!--燃气计量装置-->
254
+ <td style="text-align: center;">
255
+ <nobr>{{row.ranqi_brand}}</nobr>
256
+ </td>
257
+ <td style="text-align: center;">
258
+ <nobr>{{row.ranqi_devices_no}}</nobr>
259
+ </td>
260
+ <td style="text-align: center;">
261
+ <nobr>{{row.ranqi_equipment_type}}</nobr>
262
+ </td>
263
+ <td style="text-align: center;">
264
+ <nobr>{{row.ranqi_devices_model}}</nobr>
265
+ </td>
266
+ <td style="text-align: center;">
267
+ <nobr>{{row.f_gmd_lsnumber}}</nobr>
268
+ </td>
269
+ <td style="text-align: center;">
270
+ <nobr>{{row.ranqi_make_date}}</nobr>
271
+ </td>
272
+ <td style="text-align: center;" :class="$parent.$parent.$parent.formatTime(row.ranqi_exp_date).indexOf('已过期')!==-1? 'back-red' : 'back-blue'">
273
+ <nobr>{{$parent.$parent.$parent.formatTime(row.ranqi_exp_date)}}</nobr>
274
+ </td>
275
+ <td style="text-align: center;">
276
+ <nobr>
277
+ <span @click="$parent.$parent.$parent.dealmsg(row,row.ranqi_id,'燃气计量装置')"><a><b>变更记录</b></a></span>
278
+ </nobr>
279
+ </td>
280
+
281
+ <!--控制器设备-->
282
+ <td style="text-align: center;">
283
+ <nobr>{{row.control_brand}}</nobr>
284
+ </td>
285
+ <td style="text-align: center;">
286
+ <nobr>{{row.control_devices_no}}</nobr>
287
+ </td>
288
+ <td style="text-align: center;">
289
+ <nobr>{{row.control_devices_model}}</nobr>
290
+ </td>
291
+ <td style="text-align: center;">
292
+ <nobr>{{row.control_make_date}}</nobr>
293
+ </td>
294
+ <td style="text-align: center;" :class="$parent.$parent.$parent.formatTime(row.control_exp_date).indexOf('已过期')!==-1? 'back-red' : 'back-blue'">
295
+ <nobr>{{$parent.$parent.$parent.formatTime(row.control_exp_date)}}</nobr>
296
+ </td>
297
+ <td style="text-align: center;">
298
+ <nobr>
299
+ <span @click="$parent.$parent.$parent.dealmsg(row,row.control_id,'控制器设备')"><a><b>变更记录</b></a></span>
300
+ </nobr>
301
+ </td>
302
+
303
+
304
+ <!--燃气连接管-->
305
+ <td style="text-align: center;">
306
+ <nobr>{{row.f_conn_style}}</nobr>
307
+ </td>
308
+ <td style="text-align: center;">
309
+ <nobr>{{row.ranqi_pipe_material}}</nobr>
310
+ </td>
311
+ <td style="text-align: center;">
312
+ <nobr>{{row.ranqi_pipe_length}}</nobr>
313
+ </td>
314
+ <td style="text-align: center;">
315
+ <nobr>{{row.ranqi_pipe_prdate}}</nobr>
316
+ </td>
317
+ <td style="text-align: center;" :class="$parent.$parent.$parent.formatTime(row.ranqi_pipe_expdate).indexOf('已过期')!==-1? 'back-red' : 'back-blue'">
318
+ <nobr>{{$parent.$parent.$parent.formatTime(row.ranqi_pipe_expdate)}}</nobr>
319
+ </td>
320
+ <td style="text-align: center;">
321
+ <nobr>
322
+ <span @click="$parent.$parent.$parent.dealmsg(row,row.ranqi_id,'燃气连接管')"><a><b>变更记录</b></a></span>
323
+ </nobr>
324
+ </td>
325
+
326
+
327
+ <!--调压设备-->
328
+ <td style="text-align: center;">
329
+ <nobr>{{row.tiaoya_brand}}</nobr>
330
+ </td>
331
+ <td style="text-align: center;">
332
+ <nobr>{{row.tiaoya_equipment_type}}</nobr>
333
+ </td>
334
+ <td style="text-align: center;">
335
+ <nobr>{{row.tiaoya_devices_model}}</nobr>
336
+ </td>
337
+ <td style="text-align: center;">
338
+ <nobr>{{row.tiaoya_install_position}}</nobr>
339
+ </td>
340
+ <td style="text-align: center;">
341
+ <nobr>{{row.tiaoya_make_date}}</nobr>
342
+ </td>
343
+ <td style="text-align: center;" :class="$parent.$parent.$parent.formatTime(row.tiaoya_exp_date).indexOf('已过期')!==-1? 'back-red' : 'back-blue'">
344
+ <nobr>{{$parent.$parent.$parent.formatTime(row.tiaoya_exp_date)}}</nobr>
345
+ </td>
346
+ <td style="text-align: center;">
347
+ <nobr>
348
+ <span @click="$parent.$parent.$parent.dealmsg(row,row.tiaoya_id,'调压设备')"><a><b>变更记录</b></a></span>
349
+ </nobr>
350
+ </td>
351
+
352
+ <!--燃气报警装置-->
353
+ <td style="text-align: center;">
354
+ <nobr>{{row.f_icgd_brand}}</nobr>
355
+ </td>
356
+ <td style="text-align: center;">
357
+ <nobr>{{row.f_icgd_num}}</nobr>
358
+ </td>
359
+ <td style="text-align: center;">
360
+ <nobr>{{row.f_icgd_prdate}}</nobr>
361
+ </td>
362
+ <td style="text-align: center;">
363
+ <nobr>{{row.f_host_brand}}</nobr>
364
+ </td>
365
+ <td style="text-align: center;">
366
+ <nobr>{{row.f_host_num}}</nobr>
367
+ </td>
368
+ <td style="text-align: center;">
369
+ <nobr>{{row.f_host_prdate}}</nobr>
370
+ </td>
371
+ <td style="text-align: center;">
372
+ <nobr>{{row.f_gssv_brand}}</nobr>
373
+ </td>
374
+ <td style="text-align: center;">
375
+ <nobr>{{row.f_gssv_num}}</nobr>
376
+ </td>
377
+ <td style="text-align: center;">
378
+ <nobr>{{row.f_gssv_prdate}}</nobr>
379
+ </td>
380
+ <td style="text-align: center;" :class="$parent.$parent.$parent.formatTime(row.alarm_exp_date).indexOf('已过期')!==-1? 'back-red' : 'back-blue'">
381
+ <nobr>{{$parent.$parent.$parent.formatTime(row.alarm_exp_date)}}</nobr>
382
+ </td>
383
+ <td style="text-align: center;">
384
+ <nobr>
385
+ <span @click="$parent.$parent.$parent.dealmsg(row,row.alarm_id,'燃气报警装置')"><a><b>变更记录</b></a></span>
386
+ </nobr>
387
+ </td>
388
+
389
+ <!--建档信息-->
390
+ <td style="text-align: center;">
391
+ <nobr>{{row.f_createfile_date}}</nobr>
392
+ </td>
393
+ <td style="text-align: center;">
394
+ <nobr>{{row.f_contract_id}}</nobr>
395
+ </td>
396
+ <td style="text-align: center;">
397
+ <nobr>{{row.f_gas_date}}</nobr>
398
+ </td>
399
+ <td style="text-align: center;">
400
+ <nobr>{{row.f_gas_person}}</nobr>
401
+ </td>
402
+ <td style="text-align: center;" :style="$parent.$parent.$parent.ventilationYear(row.diffallyear)">
403
+ <nobr>{{row.ventilation_years}}</nobr>
404
+ </td>
405
+ <td style="text-align: center;">
406
+ <nobr>
407
+ <span @click="$parent.$parent.$parent.dealmsg(row,'','建档信息')"><a><b>变更记录</b></a></span>
408
+ </nobr>
409
+ </td>
410
+
411
+ <!--安检信息-->
412
+ <td style="text-align: center;">
413
+ <nobr>{{row.f_upload_date}}</nobr>
414
+ </td>
415
+ <td style="text-align: center;">
416
+ <nobr>{{row.f_checker_name}}</nobr>
417
+ </td>
418
+ <td style="text-align: center;">
419
+ <nobr>{{row.f_total_gas}}</nobr>
420
+ </td>
421
+ <td style="text-align: center;">
422
+ <nobr>{{row.f_balance_gas}}</nobr>
423
+ </td>
424
+ <td style="text-align: center;">
425
+ <nobr>{{row.f_defect_content}}</nobr>
426
+ </td>
427
+ <td style="text-align: center;">
428
+ <nobr>{{row.f_repair_date}}</nobr>
429
+ </td>
430
+
431
+ <!--备注-->
432
+ <td style="text-align: center;">
433
+ <nobr>{{row.f_comments}}</nobr>
434
+ </td>
435
+
436
+ </template>
437
+ <template partial='foot'>
438
+ </template>
439
+ </data-grid>
440
+ </criteria-paged>
441
+
442
+ </div>
443
+ </div>
444
+ </div>
445
+ <modal :show.sync="filechangeHistoryShow" v-ref:filechangeHistoryShow backdrop="false" class="filechangeHistoryShow">
446
+ <header slot="modal-header" class="modal-header" style="text-align: center">
447
+ <h4 class="modal-title">{{titles}}</h4>
448
+ </header>
449
+ <article slot="modal-body" class="modal-body">
450
+ <data-grid class="list_area table_sy" :model="filechangeHistorys" partial='list'>
451
+ <template partial='head'>
452
+ <th><nobr>序号</nobr></th>
453
+ <th><nobr>更改内容</nobr></th>
454
+ <th><nobr>更改前</nobr></th>
455
+ <th><nobr>更改后</nobr></th>
456
+ <th><nobr>变更时间</nobr></th>
457
+ </template>
458
+ <template partial='body'>
459
+ <td >{{$index+1}}</td>
460
+ <td><nobr>{{row.f_field_name}}</nobr></td>
461
+ <td><nobr>{{row.f_used_content}}</nobr></td>
462
+ <td><nobr>{{row.f_new_content}}</nobr></td>
463
+ <td><nobr>{{row.f_submit_date}}</nobr></td>
464
+ </template>
465
+ </data-grid>
466
+ </article>
467
+ <footer slot="modal-footer" class="modal-footer">
468
+ <button type="button" class="btn btn-default" @click='filechangeHistoryShow = false'>关闭</button>
469
+ </footer>
470
+ </modal>
471
+ </div>
472
+ </template>
473
+
474
+ <script>
475
+ import {HttpResetClass, PagedList} from 'vue-client'
476
+ import defaultPrint from './config/DefaultPrint'
477
+ import exportConfig from './config/exportConfig'
478
+
479
+ let readySomething = async function (self) {
480
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
481
+ }
482
+
483
+ export default {
484
+ title: '非民用用气设备查询',
485
+ data() {
486
+ return {
487
+ titles:'',
488
+ other:[],
489
+ footer:[],
490
+ deviceTypes: this.$appdata.getParam('设备类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('设备类型')] : [],
491
+ model: new PagedList('api/af-revenue/sql/fmyGasDeviceQuery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_userinfo_code desc'`}),
492
+ criteriaShow: false,
493
+ orgCondtionStr: '',
494
+ modelval: [],
495
+ printshow: false,
496
+ all: false,
497
+ fields: {},
498
+ //排序
499
+ orderitem:'f_userinfo_code desc',
500
+ orderFields: {
501
+ f_operate_date: 'no'
502
+ },
503
+ //默认打印列
504
+ defaultfield: [],
505
+ config: {
506
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone', 'f_user_state']
507
+ },
508
+ balance2:'',
509
+ thead: '',
510
+ tfoot: '',
511
+ area: [],
512
+ //合计数据
513
+ sumsmodel: {},
514
+ initres: {
515
+ org:[this.$login.f.orgid],
516
+ dep:[],
517
+ user:[],
518
+ },
519
+ userdetail: {
520
+ show: false,
521
+ f_userinfo_code: '',
522
+ f_filialeids: ''
523
+ },
524
+ filechangeHistorys: {rows:[]},
525
+ filechangeHistoryShow: false,
526
+ show:false,
527
+ rowdata:{},
528
+ meterInfo:{},
529
+ deviceInfo:{},
530
+ condition2:'',
531
+
532
+
533
+ //小区
534
+ residentialArea: [],
535
+ allorgid:[],
536
+ f_filialeid: this.$login.f.f_orgid,
537
+ }
538
+ },
539
+ ready() {
540
+ this.getaddress()
541
+ readySomething(this).then(() => {
542
+ this.$emit('ready')
543
+ }).catch((error) => {
544
+ this.$emit('error', error)
545
+ })
546
+ },
547
+ methods: {
548
+ async dealmsg(row,id,type){
549
+ this.titles = type+'变更记录'
550
+ if (type==='燃气连接管'){
551
+ type = '燃气计量装置连接管'
552
+ }
553
+ this.filechangeHistorys.rows = []
554
+ let data = {
555
+ tablename: `t_infochange`,
556
+ items: '*',
557
+ condition: `1=1`,
558
+ orderitem: 'f_change_id desc'
559
+ }
560
+ let urlParam = 'api/af-revenue/sql/singleTable_OrderBy'
561
+ if (id){
562
+ data.condition = `1=1 and f_table_id = ${id} and f_field_name like '%${type}%'`
563
+ let res = await this.$resetpost(urlParam, {data: data}, {rejectMsg: '获取变更记录出错', resolveMsg: null})
564
+ if (res){
565
+ this.filechangeHistorys.rows = res.data
566
+ }
567
+ }else{
568
+ if (type === '建档信息'||type === '用户信息'){
569
+ urlParam = 'api/af-revenue/sql/changeuserquery'
570
+ data = {
571
+ condition: ` 1=1 and f_orgid in ('${this.$login.f.orgid}') and f_userinfo_code = '${row.f_userinfo_code}' and f_table_ename != 't_devices'`,
572
+ orderitem: "f_operate_date desc"
573
+ }
574
+ let res = await this.$resetpost(urlParam, {data: data}, {rejectMsg: '获取变更记录出错', resolveMsg: null})
575
+ if (res){
576
+ this.filechangeHistorys.rows = res.data
577
+ }
578
+ }
579
+ }
580
+ this.filechangeHistoryShow =true
581
+ },
582
+ ventilationYear(diffAllyear){
583
+ console.log("diffAllyear?",diffAllyear)
584
+ if ( 1<= diffAllyear && diffAllyear <= 2 ){
585
+ return {
586
+ color: 'green !important'
587
+ }
588
+ }else if (3<= diffAllyear && diffAllyear <=4){
589
+ return {
590
+ color: 'orange !important'
591
+ }
592
+ }else if (5<= diffAllyear && diffAllyear <=8){
593
+ return {
594
+ color: 'red !important'
595
+ }
596
+ }else if (diffAllyear>8){
597
+ return {
598
+ color: 'crimson !important'
599
+ }
600
+ }else {
601
+ return {
602
+
603
+ }
604
+ }
605
+ },
606
+ formatTime(expireTime){
607
+ if (expireTime){
608
+ let formats = {
609
+ 'year': '%n%年',
610
+ 'month': '%n%月',
611
+ 'day': '%n%天',
612
+ };
613
+ let now = new Date().getTime()
614
+ let expireTimes = new Date(expireTime).getTime()
615
+ if (now < expireTimes){
616
+ return expireTime
617
+ }else {
618
+ let seconds = Math.floor((now - expireTimes) / 1000)
619
+ let minutes = Math.floor(seconds / 60)
620
+ let hours = Math.floor(minutes / 60)
621
+ let days = Math.floor(hours / 24)
622
+ let months = Math.floor(days / 30)
623
+ let years = Math.floor(months / 12)
624
+
625
+ let diffType = ''
626
+ let diffValue = 0
627
+ if (years > 0) {
628
+ diffType = 'year'
629
+ diffValue = years
630
+ } else {
631
+ if (months > 0) {
632
+ diffType = 'month'
633
+ diffValue = months
634
+ } else {
635
+ if (days > 0) {
636
+ diffType = 'day'
637
+ diffValue = days
638
+ }
639
+ }
640
+ }
641
+ return '已过期'+formats[diffType].replace('%n%', diffValue);
642
+ }
643
+ }else {
644
+ return ''
645
+ }
646
+ },
647
+ async getaddress(){
648
+ console.log('开始获取小区')
649
+ let HttpReset = new HttpResetClass()
650
+ var data = await HttpReset.load('POST', 'api/af-revenue/sql/manage_getarealist', {
651
+ data: {
652
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
653
+ }
654
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
655
+ console.log('小区',data)
656
+ let house = []
657
+ for (let row of data.data){
658
+ console.log('开始保存小区')
659
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
660
+ }
661
+ this.residentialArea = house
662
+ },
663
+ //把数据库查询数据转换为下拉数据
664
+ calculate(rows){
665
+ let data = []
666
+ rows.forEach((row, n) => {
667
+ data[n] = {label: row.f_residential_area, value: row.id}
668
+ })
669
+ return data
670
+ },
671
+ search(){
672
+ this.$refs.paged.$refs.cri.search()
673
+ },
674
+ cancel(obj) {
675
+ this.show = false
676
+ },
677
+ showmsg(obj){
678
+
679
+ this.rowdata=obj
680
+ this.show=true
681
+ },
682
+ selfSearch(args) {
683
+ this.area = this.$refs.paged.$refs.cri.model.f_residential_area
684
+ console.log("=====小区model绑定====",this.area)
685
+ if(this.area.length !== 0){
686
+ let str = JSON.stringify(this.area)
687
+ str = str.replace(/"/g,`'`)
688
+ str = str.replace(/\[/g,``)
689
+ str = str.replace(/\]/g,``)
690
+ console.log("=====小区model22222222222绑定====",str)
691
+ //查询多个小区时条件
692
+ args.condition += ` and f_residential_area in ( ${str} )`
693
+ }
694
+ if (!this.orgCondtionStr) {
695
+ args.condition = `${args.condition}` + " and f_orgid = " + this.$login.f.orgid
696
+ } else {
697
+ args.condition = `${args.condition}` + this.orgCondtionStr
698
+ }
699
+ this.condition2 = args.condition
700
+ this.model.search(args.condition, args.model)
701
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
702
+ console.log('合计字段', this.sumsmodel)
703
+ },
704
+ clear() {
705
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
706
+ this.$refs.paged.$refs.cri.model[key] = []
707
+ })
708
+ },
709
+ hidden() {
710
+ this.criteriaShow = !this.criteriaShow
711
+ },
712
+ getRes(obj) {
713
+ this.orgCondtionStr = obj
714
+ },
715
+ stamp() {
716
+ this.all = false
717
+ //默认选择要打印的列
718
+ this.modelval = defaultPrint.config
719
+ this.fields = this.getfield
720
+ console.log('所有打印字段', this.fields)
721
+ this.printshow = true
722
+ this.put()
723
+ },
724
+ print() {
725
+ this.$refs.print.PrintAsFile()
726
+ this.printshow = false
727
+ },
728
+ close() {
729
+ this.printshow = false
730
+ },
731
+ // 对选择的列进行排序
732
+ sortModelval() {
733
+ let sortModel = []
734
+ Object.keys(this.fields).forEach((key) => {
735
+ if (this.modelval.includes(key)) {
736
+ sortModel.push(key)
737
+ }
738
+ })
739
+ this.modelval = sortModel
740
+ console.log('选择的打印的字段', this.modelval)
741
+ },
742
+ dblclick(row, index) {
743
+ console.log('双击之后数据', row, index)
744
+ this.userdetail.show = true
745
+ this.userdetail.f_userinfo_code = row.f_userinfo_code
746
+ this.userdetail.f_filialeids = row.f_filialeids
747
+ },
748
+ sort (field, rule) {
749
+ // 将所有排序方式设为不排序,实现相互排斥
750
+ for (let key in this.orderFields) {
751
+ if (key === field) {
752
+ this.orderFields[key] = rule
753
+ } else {
754
+ this.orderFields[key] = 'no'
755
+ }
756
+ }
757
+ // 如果新规则不排序,还原为默认排序
758
+ if (rule === 'no') {
759
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
760
+ } else {
761
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
762
+ }
763
+
764
+ this.search()
765
+ }
766
+ },
767
+
768
+ watch: {
769
+ 'all'(val) {
770
+ if (val) {
771
+ this.modelval = this.bodyData
772
+ } else {
773
+ this.modelval = defaultPrint.config
774
+ this.put()
775
+ }
776
+ },
777
+ 'modelval.length'() {
778
+ this.put()
779
+ },
780
+ 'orgCondtionStr'(val) {
781
+ let res = val.match(/'(.*?)'/)
782
+ console.log('正则提取:',res && res[1])
783
+ if (res) {
784
+ this.f_filialeid = res[1]
785
+ if(res.input !=null){
786
+ let resorgid = res.input.substring(res.input.indexOf("'"));
787
+ if(resorgid!= null && resorgid!=''){
788
+ resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
789
+ // resorgid = resorgid.replaceAll("'","");
790
+ resorgid = resorgid.replace(/'/g,"");
791
+ this.allorgid = resorgid.split(",")
792
+ }
793
+ }
794
+ }
795
+ },
796
+ },
797
+ computed: {
798
+ authArr () {
799
+ return this.$login.r ? this.$login.r : []
800
+ },
801
+
802
+ getCondition() {
803
+ return {condition: this.condition2,orderitem:this.orderitem}
804
+ },
805
+ getfield() {
806
+ let data = {}
807
+ this.bodyData.forEach((value, index) => {
808
+ data[this.bodyData[index]] = this.headData[index]
809
+ })
810
+ //合计字段打印
811
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
812
+ if (this.sumsmodel) {
813
+ Object.keys(this.sumsmodel).forEach((key) => {
814
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
815
+ })
816
+ } else {
817
+ this.tfoot += '暂无'
818
+ }
819
+ this.tfoot += '</th></tr>'
820
+ return data
821
+ },
822
+ getExportField() {
823
+ return exportConfig.userConfig
824
+ },
825
+ addressstate() {
826
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
827
+ }
828
+ }
829
+ }
830
+ </script>
831
+ <style lang="less">
832
+ .filechangeHistoryShow {
833
+ td {
834
+ text-align: center !important;
835
+ }
836
+ }
837
+ .back-red{ /* 红色背景 */
838
+ color: #df1335 !important;
839
+ }
840
+ .back-blue{ /* 蓝色背景 */
841
+
842
+ }
843
+ </style>
844
+