manage-client 3.2.193 → 3.2.195

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