safecheck-client 3.0.34-91 → 3.0.34-93

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,785 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
5
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="form-group col-sm-2" >
9
+ <label class="font_normal_body">客户编号</label>
10
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
+ style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
12
+ </div>
13
+ <div class="form-group col-sm-2" >
14
+ <label class="font_normal_body">客户名称</label>
15
+ <input type="text" class="input_search" v-model="model.f_user_name"
16
+ style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
17
+ </div>
18
+ <div class="form-group col-sm-2" >
19
+ <label class="font_normal_body">客户电话</label>
20
+ <input type="text" class="input_search" v-model="model.f_user_phone"
21
+ style="width: 60%" placeholder="客户电话" condition="f_user_phone like '%{}%'">
22
+ </div>
23
+ <div class="form-group col-sm-2" >
24
+ <label class="font_normal_body">客户表号</label>
25
+ <input type="text" class="input_search" v-model="model.f_meternumber"
26
+ style="width: 60%" placeholder="客户表号" condition="f_meternumber like '%{}%'">
27
+ </div>
28
+ <div class="form-group col-sm-2" >
29
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
30
+ <input type="text" class="input_search" v-model="model.f_residential_area"
31
+ style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
32
+ </div>
33
+ <div class="form-group col-sm-2" >
34
+ <label class="font_normal_body">详细地址</label>
35
+ <input type="text" class="input_search" v-model="model.f_address"
36
+ style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
37
+ </div>
38
+ <div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
39
+
40
+ <export-excel-safe :data="$parent.$parent.searchData"
41
+ :field="$parent.$parent.excelHeaders"
42
+ :choose-col="true"
43
+ sqlurl="rs/logic/SafeExportExcel" sql-name="查找安检单" template-name='安检记录明细'></export-excel-safe>
44
+ <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">隐藏</button>
45
+
46
+ <button class="button_spacing button_search" @click="search()">查询</button>
47
+ <div style="float: right" class="button_spacing"
48
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
49
+ @click="$parent.$parent.hidden()"></div>
50
+ </div>
51
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
52
+ <label class="font_normal_body">安检计划</label>
53
+ <input type="text" class="input_search" v-model="$parent.$parent.model.f_check_plan.f_plan_name"
54
+ @click="$parent.$parent.showChooser"
55
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
56
+ </div>
57
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
58
+ <label class="font_normal_body">开始时间</label>
59
+ <datepicker
60
+ :value.sync="model.f_check_start"
61
+ placeholder='开始时间' style="width: 60%"
62
+ :disabled-days-of-week="[]"
63
+ :format="'yyyy-MM-dd'"
64
+ :show-rest-button="reset"
65
+ v-model="model.f_check_start"
66
+ condition="f_offsite_time > ='{} 00:00:00'">
67
+ </datepicker>
68
+ </div>
69
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
70
+ <label class="font_normal_body">结束时间</label>
71
+ <datepicker
72
+ :value.sync="model.f_check_end"
73
+ placeholder='结束时间' style="width: 60%"
74
+ :disabled-days-of-week="[]"
75
+ :format="'yyyy-MM-dd'"
76
+ :show-rest-button="reset"
77
+ v-model="model.f_check_end"
78
+ condition="f_offsite_time <= '{} 23:59:59'">
79
+ </datepicker>
80
+ </div>
81
+
82
+
83
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
84
+
85
+ <label class="font_normal_body">安检类型</label>
86
+ <v-select :value.sync="model.f_safecheck_type" v-model='model.f_safecheck_type'
87
+ :value-single="true" style="width: 60%"
88
+ class="select_list select"
89
+ :options='$parent.$parent.safetype' placeholder='安检类型'
90
+ close-on-select
91
+ condition="f_safecheck_type = '{}'"></v-select>
92
+ </div>
93
+
94
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
95
+
96
+ <label class="font_normal_body">客户类型</label>
97
+ <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
98
+ :value-single="true" style="width: 60%"
99
+ class="select_list select"
100
+ :options='$parent.$parent.checktype' placeholder='客户类型'
101
+ close-on-select
102
+ condition="f_check_type = '{}'"></v-select>
103
+ </div>
104
+
105
+
106
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
107
+ <label class="font_normal_body">安检状态</label>
108
+ <v-select id="f_entry"
109
+ class="select_list select"
110
+ placeholder='安检状态' style="width: 60%"
111
+ v-model='model.f_entry'
112
+ :value.sync="$parent.$parent.model.f_entry"
113
+ :options='$parent.$parent.f_entry_status'
114
+ condition=""
115
+ :value-single="true"
116
+ close-on-select clear-button></v-select>
117
+ </div>
118
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
119
+ <role-selector-safe
120
+ role-name="安检员"
121
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
122
+ @re-res="$parent.$parent.getRes"
123
+ :value.sync="model.f_checker_id"
124
+ v-model="model.f_checker_id"
125
+ condition="f_checker_name = '{}'">
126
+ </role-selector-safe>
127
+ </div>
128
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
129
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
130
+ <v-select class="select_list select"
131
+ placeholder='片区/管理站' style="width: 60%"
132
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
133
+ :options='$parent.$parent.sliceArea'
134
+ filer-key="name"
135
+ close-on-select clear-button
136
+ condition="f_slice_area='{}'"
137
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
138
+ :value-single="true">
139
+ </v-select>
140
+ </div>
141
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
142
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
143
+ <v-select class="select_list select"
144
+ placeholder='抄表册' style="width: 60%"
145
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
146
+ :options='$parent.$parent.cbc'
147
+ filer-key="name"
148
+ close-on-select clear-button
149
+ condition="f_meter_book_num={}"
150
+ :value-single="true">
151
+ </v-select>
152
+ </div>
153
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
154
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
155
+ <v-select class="select_list select"
156
+ placeholder='请选择' style="width: 60%"
157
+ :value.sync="model.f_pcd" v-model="model.f_pcd"
158
+ :options='$parent.$parent.pcds'
159
+ filer-key="name"
160
+ close-on-select clear-button
161
+ condition="f_pcd='{}'"
162
+ :value-single="true">
163
+ </v-select>
164
+ </div>
165
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
166
+ <label class="font_normal_body">开户时间</label>
167
+ <datepicker
168
+ :value.sync="model.f_open_datestart"
169
+ placeholder='开始时间' style="width: 60%"
170
+ :disabled-days-of-week="[]"
171
+ :format="'yyyy-MM-dd'"
172
+ :show-rest-button="reset"
173
+ v-model="model.f_open_datestart"
174
+ condition="f_open_date> ='{} 00:00:00'">
175
+ </datepicker>
176
+ </div>
177
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
178
+ <label class="font_normal_body">开户时间</label>
179
+ <datepicker
180
+ :value.sync="model.f_open_dateend"
181
+ placeholder='结束时间' style="width: 60%"
182
+ :disabled-days-of-week="[]"
183
+ :format="'yyyy-MM-dd'"
184
+ :show-rest-button="reset"
185
+ v-model="model.f_open_dateend"
186
+ condition="f_open_date <= '{} 23:59:59'">
187
+ </datepicker>
188
+ </div>
189
+ <div class="form-group col-sm-2" v-show="$parent.$parent.safeAudit && $parent.$parent.criteriaShow ">
190
+ <label class="font_normal_body">审&ensp;核&ensp;人</label>
191
+ <input type="text" class="input_search" v-model="model.f_approved_by"
192
+ style="width: 60%" placeholder="审核人" condition="f_approved_by like '%{}%'">
193
+ </div>
194
+ <div class="form-group col-sm-2" v-show="$parent.$parent.safeAudit && $parent.$parent.criteriaShow ">
195
+ <label class="font_normal_body">审核时间</label>
196
+ <datepicker
197
+ :value.sync="model.f_approved_timestart"
198
+ placeholder='开始时间' style="width: 60%"
199
+ :disabled-days-of-week="[]"
200
+ :format="'yyyy-MM-dd'"
201
+ :show-rest-button="reset"
202
+ v-model="model.f_approved_timestart"
203
+ condition="f_approved_time > ='{} 00:00:00'">
204
+ </datepicker>
205
+ </div>
206
+ <div class="form-group col-sm-2" v-show="$parent.$parent.safeAudit && $parent.$parent.criteriaShow ">
207
+ <label class="font_normal_body">审核时间</label>
208
+ <datepicker
209
+ :value.sync="model.f_approved_timeend"
210
+ placeholder='结束时间' style="width: 60%"
211
+ :disabled-days-of-week="[]"
212
+ :format="'yyyy-MM-dd'"
213
+ :show-rest-button="reset"
214
+ v-model="model.f_approved_timeend"
215
+ condition="f_approved_time <= '{} 23:59:59'">
216
+ </datepicker>
217
+ </div>
218
+ <div class="form-group col-sm-2" v-show="$parent.$parent.safeAudit &&$parent.$parent.criteriaShow">
219
+ <label class="font_normal_body" title="参数管理:安检审核状态">审核状态</label>
220
+ <v-select class="select_list select"
221
+ placeholder='请选择' style="width: 60%"
222
+ :value.sync="model.f_approved" v-model="model.f_approved"
223
+ :options='$parent.$parent.approveds'
224
+ filer-key="name"
225
+ close-on-select clear-button
226
+ condition="f_approved='{}'"
227
+ :value-single="true">
228
+ </v-select>
229
+ </div>
230
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
231
+ <label class="font_normal_body">气表品牌</label>
232
+ <v-select
233
+ class="select_list select"
234
+ placeholder='气表品牌' style="width: 60%"
235
+ v-model='model.tableBrand'
236
+ :value.sync="model.tableBrand"
237
+ :options='$parent.$parent.tableBrands'
238
+ condition="f_meter_brand = '{}'"
239
+ :value-single="true"
240
+ close-on-select clear-button></v-select>
241
+ </div>
242
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
243
+ <label class="font_normal_body">有无计划</label>
244
+ <v-select class="select_list select"
245
+ placeholder='请选择' style="width: 60%"
246
+ :value.sync="model.f_no_checkplan" v-model="model.f_no_checkplan"
247
+ :options='$parent.$parent.no_checkplans'
248
+ filer-key="name"
249
+ close-on-select clear-button
250
+ condition="f_no_checkplan='{}'"
251
+ :value-single="true">
252
+ </v-select>
253
+ </div>
254
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
255
+ <label class="font_normal_body">未用燃气</label>
256
+ <v-select class="select_list select"
257
+ placeholder='请选择' style="width: 60%"
258
+ :value.sync="model.f_usegas" v-model="model.f_usegas"
259
+ :options='$parent.$parent.usegas'
260
+ filer-key="name"
261
+ close-on-select clear-button
262
+ condition="f_usegas='{}'"
263
+ :value-single="true">
264
+ </v-select>
265
+ </div>
266
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
267
+ <label class="font_normal_body">客户卡号</label>
268
+ <input type="text" class="input_search" v-model="model.f_card_id"
269
+ style="width: 60%" placeholder="客户卡号" condition="f_card_id like '%{}%'">
270
+ </div>
271
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
272
+ <label class="font_normal_body">距上次安检天数</label>
273
+ <input type="number" class="input_search" v-model="model.f_check_date"
274
+ style="width: 60%" placeholder="距上次安检天数" >
275
+ </div>
276
+ </div>
277
+ <modal :show.sync="$parent.$parent.showModal" v-ref:modal backdrop="false">
278
+ <div slot="modal-header" class="modal-header">
279
+ <h4 class="modal-title">
280
+ 选择计划
281
+ </h4>
282
+ </div>
283
+ <div slot="modal-body" class="modal-body">
284
+ <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
285
+ </div>
286
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
287
+ <button class="button_search" @click="$parent.$parent.ok">确认</button>
288
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
289
+ </div>
290
+ </modal>
291
+ </div>
292
+ </criteria>
293
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
294
+ <template partial='head'>
295
+ <tr>
296
+ <th>
297
+ <nobr>客户编号</nobr>
298
+ </th>
299
+ <th>
300
+ <nobr>客户名称</nobr>
301
+ </th>
302
+ <th>
303
+ <nobr>客户表号</nobr>
304
+ </th>
305
+ <th>
306
+ <nobr>气表品牌</nobr>
307
+ </th>
308
+ <th>
309
+ <nobr>客户电话</nobr>
310
+ </th>
311
+ <th>
312
+ <nobr>客户类型</nobr>
313
+ </th>
314
+ <th>
315
+ <nobr>客户地址</nobr>
316
+ </th>
317
+ <th>
318
+ <nobr>安检状态</nobr>
319
+ </th>
320
+ <th>
321
+ <nobr>计划名称</nobr>
322
+ </th>
323
+ <th>
324
+ <nobr>用气状态</nobr>
325
+ </th>
326
+ <th>
327
+ <data-order field="f_offsite_time" name="安检时间"></data-order>
328
+ </th>
329
+ <th>
330
+ <nobr>安检员</nobr>
331
+ </th>
332
+ <th>
333
+ <nobr>备注</nobr>
334
+ </th>
335
+ <th>
336
+ <nobr>开户时间</nobr>
337
+ </th>
338
+ <th v-if="$parent.$parent.$parent.safeAudit">
339
+ <nobr>审核人</nobr>
340
+ </th>
341
+ <th v-if="$parent.$parent.$parent.safeAudit">
342
+ <nobr>审核起始</nobr>
343
+ </th>
344
+ <th v-if="$parent.$parent.$parent.safeAudit">
345
+ <nobr>审核结束</nobr>
346
+ </th>
347
+ <th v-if="$parent.$parent.$parent.safeAudit">
348
+ <nobr>审核状态</nobr>
349
+ </th>
350
+ <th v-if="$parent.$parent.$parent.safeAudit">
351
+ <nobr>审核未通过原因</nobr>
352
+ </th>
353
+ <th>
354
+ <nobr>操作</nobr>
355
+ </th>
356
+ <th v-if="$parent.$parent.$parent.audioshow">
357
+ <nobr>录音</nobr>
358
+ </th>
359
+ </tr>
360
+ </template>
361
+ <template partial='body'>
362
+
363
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
364
+ <td style="text-align: center">{{row.f_user_name}}</td>
365
+ <td style="text-align: center">{{row.f_meternumber}}</td>
366
+ <td style="text-align: center">{{row.f_meter_brand}}</td>
367
+ <td style="text-align: center">{{row.f_user_phone}}</td>
368
+ <td style="text-align: center">{{row.f_check_type}}</td>
369
+
370
+ <td style="text-align: center">{{ row.f_address }}</td>
371
+ <td style="text-align: center">{{ row.f_entry_status }}</td>
372
+ <td style="text-align: center">{{ row.f_plan_name }}</td>
373
+ <td style="text-align: center">{{ row.f_usegas }}</td>
374
+ <td style="text-align: center">{{ row.f_offsite_time }}</td>
375
+ <td style="text-align: center">{{ row.f_checker_name }}</td>
376
+ <td style="text-align: center">{{ row.f_repair_approved_note }}</td>
377
+ <td style="text-align: center">{{ row.f_open_date }}</td>
378
+ <td style="text-align: center" v-show="$parent.$parent.$parent.safeAudit">{{ row.f_approved_by }}</td>
379
+ <td style="text-align: center" v-show="$parent.$parent.$parent.safeAudit">{{ row.f_approvedstart_time }}</td>
380
+ <td style="text-align: center" v-show="$parent.$parent.$parent.safeAudit">{{ row.f_approved_time }}</td>
381
+ <td style="text-align: center" v-show="$parent.$parent.$parent.safeAudit">
382
+ {{ row.f_approved ? row.f_approved : '未审核' }}
383
+ </td>
384
+ <td style="text-align: center" v-show="$parent.$parent.$parent.safeAudit">
385
+ {{row.f_approved_note}}
386
+ </td>
387
+ <td style="text-align: center">
388
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
389
+
390
+
391
+ </td>
392
+ <td style="text-align: center" v-if="$parent.$parent.$parent.audioshow">
393
+ <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>-->
394
+ <audio controls="controls" v-if="row.f_recording1_path">
395
+ <source type="audio/mpeg" :src="'rs/audio/file/'+row.f_recording1_path">
396
+ </audio>
397
+ <!--<button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
398
+ @click="$parent.$parent.$parent.print(row)">
399
+ 打印
400
+ </button>-->
401
+ </td>
402
+ </template>
403
+ </data-grid>
404
+ </criteria-paged>
405
+ <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
406
+ </div>
407
+ </div>
408
+ </template>
409
+
410
+ <script>
411
+ import {PagedList} from 'vue-client'
412
+ import Vue from 'vue'
413
+ import co from 'co'
414
+ import * as Util from '../../Util'
415
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
416
+ //获取json配置文件
417
+ let asyncReady = async function (self) {
418
+ // 获取配置信息
419
+ try {
420
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
421
+ Vue.config = res.data
422
+ } catch (error) {
423
+ // 忽略704,文件找不到异常R
424
+ if (error.status !== 704) {
425
+ throw error
426
+ }
427
+ }
428
+ }
429
+
430
+ let select = function* (self) {
431
+ let http = new HttpResetClass()
432
+ let getGasman = yield http.load('POST', '/rs/search', {
433
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
434
+ userid: self.$login.f.id
435
+ }, {resolveMsg: null, rejectMsg: null})
436
+ ////tag
437
+ self.checkersid.push({label: '全部', value: ''})
438
+ getGasman.data.forEach((checker) => {
439
+ self.checkersid.push({label: checker.name, value: checker.id})
440
+ })
441
+ }
442
+
443
+ export default {
444
+ title: '安检结果查看',
445
+ data() {
446
+ let model = new PagedList('rs/sql/查找安检单', 20, {
447
+ f_plan_id: 'this.f_plan_id',
448
+ f_approved: 'this.f_approved',
449
+ f_entry_status: 'this.f_entry',
450
+ f_no_checkplan: 'this.f_no_checkplan',
451
+ f_filialeid: 'this.f_filialeid',
452
+ orderitem: "'f_offsite_time desc'"
453
+ })
454
+ model.f_check_type = ''
455
+ model.f_plan_id = ''
456
+ model.f_approved = ''
457
+ model.f_entry = ''
458
+ model.f_no_checkplan = ''
459
+ model.f_filialeid = `('${this.$login.f.orgid}')`
460
+ //model.f_check_type='民用'
461
+ // let searchData={
462
+ // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
463
+ // f_approved: this.model.f_approved,
464
+ // f_entry_status: this.model.f_entry,
465
+ // f_no_checkplan:this.model.f_no_checkplan[0],
466
+ // f_filialeid: this.model.f_filialeid,
467
+ // //orderitem: this.model.f_offsite_time,
468
+ // //condition:this.model.condition
469
+ // }
470
+ // model.f_subcompany = this.$login.f.f_fengongsi
471
+ return {
472
+ tableBrands: [{label: '全部', value: ''}],
473
+ audioshow: false,
474
+ safeAudit: this.$appdata.getSingleValue('安检审核') == '是' ? true : false,
475
+ searchData: {
476
+ condition: "1=1",
477
+ orderitem: "f_offsite_time desc",
478
+ f_plan_id: "",
479
+ f_approved: '',
480
+ f_entry_status: '',
481
+ f_no_checkplan: '',
482
+ f_filialeid: `('${this.$login.f.orgid}')`
483
+ },
484
+ model: model,
485
+ excelHeaders: {
486
+ //searchData:searchData,
487
+ 'f_userinfo_code': '客户编号',
488
+ 'f_user_name': '客户姓名',
489
+ 'f_meternumber':'客户表号',
490
+ 'f_user_phone':'客户电话',
491
+ 'f_check_type': '客户类型',
492
+ 'f_residential_area': '小区',
493
+ 'f_address': '客户地址',
494
+ 'f_entry_status': '安检状态',
495
+ 'f_usegas': '用气状态',
496
+ 'f_offsite_time': '安检时间',
497
+ 'f_checker_name': '安检员',
498
+ 'f_safecheck_type':'安检类型',
499
+ 'f_repair_approved_note': '备注',
500
+ 'f_open_date': '开户时间',
501
+ 'f_plan_name': '计划名称'
502
+ },
503
+ fun: this.$login.f,
504
+ pcds:[],
505
+ checkersid: [],
506
+ approveds:this.$appdata.getParam('安检审核状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检审核状态')]:[{label: '全部', value: ''}],
507
+ safetype: this.$appdata.getParam('安检类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')]:[{label: '全部', value: ''}],
508
+ criteriaShow: false,
509
+ checktype: this.$appdata.getParam('用户类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]:[{label: '全部', value: ''}],
510
+ f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
511
+ showModal: false,
512
+ safe_types:this.$appdata.getParam('计划类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('计划类型')]:[{label: '全部', value: ''}],
513
+ f_approval_states: this.$appdata.getParam('安检单审核状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检单审核状态')]:[{label: '全部', value: ''}],
514
+ f_entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
515
+ no_checkplans: this.$appdata.getParam('有无计划')?[{label: '全部', value: ''}, ...this.$appdata.getParam('有无计划')]:[{label: '全部', value: ''}],
516
+ usegas: this.$appdata.getParam('用气状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用气状态')]:[{label: '全部', value: ''}],
517
+ showcheckmsg: false,
518
+ checkInfo: {},
519
+ orderDefault: "'f_offsite_time'",
520
+ orderFields: {
521
+ f_offsite_time: 'no'
522
+ },
523
+ sliceArea: [],
524
+ cbc:[]
525
+ }
526
+ },
527
+ methods: {
528
+ //气表品牌查询
529
+ getTableBrands() {
530
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
531
+ {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
532
+ {resolveMsg: null, rejectMsg: null}).then((resp) => {
533
+ resp.data.forEach((result) => {
534
+ this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
535
+ })
536
+ })
537
+ },
538
+ //获取省市区列表
539
+ getPcd(val){
540
+ this.pcds = [{label:'全部',value:''}]
541
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
542
+ {data:{items:"*",tablename:"t_pcd",orderitem:"id",condition:`f_orgid in ${val}`}},
543
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist)=>{
544
+ pcdlist.data.forEach((result)=>{
545
+ this.pcds.push({label:result.f_pcd,value:result.f_pcd})
546
+ })
547
+ })
548
+ },
549
+ showaudio(){
550
+ //tag
551
+ this.audioshow=!this.audioshow
552
+ //tag
553
+ },
554
+ getmeterbook(val){
555
+ this.cbc=[]
556
+ this.cbc.push({
557
+ label:'全部',
558
+ value:''
559
+ })
560
+ if (val==''){
561
+
562
+ this.cbcs.forEach(res=>{
563
+ this.cbc.push({
564
+ label:res.f_book_name,
565
+ value:res.id
566
+ })
567
+ })
568
+ }else{
569
+ this.cbcs.forEach(res=>{
570
+ if (res.f_book_slice_area==val){
571
+ this.cbc.push({
572
+ label:res.f_book_name,
573
+ value:res.id
574
+ })
575
+ }
576
+ })
577
+ }
578
+ },
579
+ Mreadibook(val){
580
+ ////tag
581
+ ////tag
582
+ if (val){
583
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
584
+ items: 'name',
585
+ tablename: 't_zone',
586
+ condition: `parentid in ${val}`,
587
+ orderitem: 'id'
588
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
589
+ this.sliceArea=[]
590
+ this.sliceArea.push({
591
+ label:'全部',
592
+ value:''
593
+ })
594
+ res.data.forEach(ress=>{
595
+ this.sliceArea.push({
596
+ label:ress.name,
597
+ value:ress.name
598
+ })
599
+ })
600
+
601
+ })
602
+ }
603
+ },
604
+ getAllMeterBook(val){
605
+ ////tag
606
+ ////tag
607
+ this.cbcs=[]
608
+ if (val){
609
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
610
+ items: 'f_book_name,f_book_slice_area,id',
611
+ tablename: 't_meter_book',
612
+ condition: `f_filiale_id in ${val}`,
613
+ orderitem: 'id'
614
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
615
+ res.data.forEach(ress=>{
616
+ this.cbcs.push({
617
+ id:ress.id,
618
+ f_book_name:ress.f_book_name,
619
+ f_book_slice_area:ress.f_book_slice_area
620
+ })
621
+ })
622
+ this.cbc=[]
623
+ this.cbc.push({
624
+ label:'全部',
625
+ value:''
626
+ })
627
+ this.cbcs.forEach(res=>{
628
+ this.cbc.push({
629
+ label:res.f_book_name,
630
+ value:res.id
631
+ })
632
+ })
633
+ })
634
+ }
635
+ },
636
+ getRes(obj) {
637
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids);
638
+ this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
639
+ this.Mreadibook(this.model.f_filialeid)
640
+ this.getAllMeterBook(this.model.f_filialeid)
641
+ this.getPcd(this.model.f_filialeid)
642
+ //this.$refs.paged.$refs.criteria.search()
643
+ },
644
+
645
+ change(row) {
646
+ asyncReady(this).then(() => {
647
+ if (row.f_safe_type == '已挂表未办卡安检'){
648
+ row.f_upload_state = '已传'
649
+ this.$goto('new-check-paper-temp', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
650
+ return
651
+ }
652
+ row.f_upload_state = '已传'
653
+ this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
654
+ }).catch(
655
+ (respanse) => {
656
+ alert('获取配置文件失败')
657
+ })
658
+ },
659
+ readConfig() {
660
+ let gen = asyncReady(this)
661
+ return co(gen)
662
+ },
663
+ showChooser() {
664
+ this.showModal = true
665
+ },
666
+ hidden() {
667
+ this.criteriaShow = !this.criteriaShow
668
+ },
669
+ refresh() {
670
+ this.$refs.paged.$refs.criteria.search()
671
+ },
672
+ ok() {
673
+ this.showModal = false
674
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
675
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
676
+ this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
677
+ }
678
+ },
679
+ cancel() {
680
+ this.showModal = false
681
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
682
+ this.model.f_plan_id=''
683
+ },
684
+ print(row) {
685
+ this.showcheckmsg = true
686
+ this.checkInfo = row
687
+ },
688
+
689
+ sort(field, rule) {
690
+ // 将所有排序方式设为不排序,实现相互排斥
691
+ for (let key in this.orderFields) {
692
+ if (key === field) {
693
+ this.orderFields[key] = rule
694
+ } else {
695
+ this.orderFields[key] = 'no'
696
+ }
697
+ }
698
+ // 如果新规则不排序,还原为默认排序
699
+ if (rule === 'no') {
700
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
701
+ } else {
702
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
703
+ }
704
+ this.search()
705
+ },
706
+ search() {
707
+ console.log('审核通过回调')
708
+ this.$refs.paged.$refs.criteria.search()
709
+ },
710
+ selfSearch(args) {
711
+ ////tag
712
+ //args.condition+=" and f_check_type='民用'"
713
+ if(args.model.f_check_date){
714
+ const daysBefore = Number(args.model.f_check_date);
715
+ if ( daysBefore > 0) {
716
+ // 获取当前日期
717
+ const now = new Date();
718
+ // 计算三天前的日期
719
+ const threeDaysBefore = new Date(now.getTime() - (daysBefore * 24 * 60 * 60 * 1000));
720
+ // 如果需要格式化日期,可以使用Date对象的方法
721
+ var formattedDate = threeDaysBefore.toISOString().split('T')[0];
722
+ args.condition += ` and f_offsite_time <='${formattedDate} 23:59:59'`;
723
+ } else {
724
+ console.error('f_check_date不是一个有效的正整数');
725
+ }
726
+ }
727
+ this.model.search(args.condition, args.model, args.condValue)
728
+ }
729
+ },
730
+ ready() {
731
+ if(this.safeAudit){
732
+ let oa = {
733
+ 'f_approved_by':'审核人',
734
+ 'f_approvedstart_time':'审核开始时间',
735
+ 'f_approved_time':'审核结束时间',
736
+ 'f_approved':'审核状态',
737
+ 'f_approved_note': '审核备注'
738
+ }
739
+ this.excelHeaders = Object.assign({}, this.excelHeaders, oa)
740
+ }
741
+ this.function = this.f
742
+ //获取气表品牌
743
+ this.getTableBrands()
744
+ let gen = select(this)
745
+ //this.pianqu()
746
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
747
+ co(gen)
748
+ this.$refs.paged.$refs.criteria.model.f_check_start = Util.toStartDateString() + ' 00:00:00'
749
+ this.$refs.paged.$refs.criteria.model.f_check_end = Util.toEndDateString() + ' 23:59:59'
750
+ },
751
+ watch: {
752
+ 'model.f_no_checkplan'(val) {
753
+ if (this.model.f_no_checkplan){
754
+ this.searchData.f_no_checkplan = val
755
+ }
756
+ if (this.model.f_no_checkplan == '有计划安检') {
757
+
758
+ this.showChooser()
759
+ }
760
+ },
761
+ 'model.condition'(val) {
762
+ if (val) {
763
+ this.searchData.condition = val
764
+ }
765
+
766
+ },
767
+ 'model.f_entry'(val) {
768
+ this.searchData.f_entry_status = val
769
+ },
770
+ 'model.f_plan_id'(val) {
771
+ if (val) {
772
+ this.searchData.f_plan_id = val
773
+ }
774
+ },
775
+ 'model.f_slice_area'(val) {
776
+ },
777
+ 'model.f_approved'(val) {
778
+ if (val) {
779
+ this.searchData.f_approved = val
780
+ }
781
+ },
782
+ }
783
+
784
+ }
785
+ </script>