safecheck-client 3.0.39-41 → 3.0.39-43

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.
@@ -1,949 +1,955 @@
1
- <template>
2
- <div class="flex-row">
3
- <work-busy :is-busy="showbusy"></work-busy>
4
- <div class="basic-main">
5
- <criteria-paged :model="model" v-ref:paged @sort="sort">
6
- <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- <div class="row">
9
- <div class="form-group col-sm-2">
10
- <label class="font_normal_body">客户编号</label>
11
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
12
- style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
13
- </div>
14
- <div class="form-group col-sm-2">
15
- <label class="font_normal_body">客户名称</label>
16
- <input type="text" class="input_search" v-model="model.f_user_name"
17
- style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
18
- </div>
19
- <div class="form-group col-sm-2">
20
- <label class="font_normal_body">客户电话</label>
21
- <input type="text" class="input_search" v-model="model.f_user_phone"
22
- style="width: 60%" placeholder="客户电话" condition="f_user_phone like '%{}%'">
23
- </div>
24
- <div class="form-group col-sm-2">
25
- <label class="font_normal_body">小&emsp;&emsp;区</label>
26
- <input type="text" class="input_search" v-model="model.f_residential_area"
27
- style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
28
- </div>
29
- <div class="form-group col-sm-2" >
30
- <label class="font_normal_body">详细地址</label>
31
- <input type="text" class="input_search" v-model="model.f_address"
32
- style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
33
- </div>
34
- <div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
35
-
36
- <export-excel-safe :data="$parent.$parent.searchData"
37
- :field="$parent.$parent.excelHeaders"
38
- :choose-col="true"
39
- progress="safeGetExportProgress"
40
- sqlurl="rs/logic/SafeExportExcel" sql-name="查找安检单"
41
- template-name='安检结果明细'></export-excel-safe>
42
- <!-- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="!$parent.$parent.audioshow">录音</button>-->
43
- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()"
44
- v-if="$parent.$parent.audioshow">隐藏
45
- </button>
46
-
47
- <button id="btnbbb" class="button_spacing button_search" @click="search()">查询</button>
48
- <div style="float: right" class="button_spacing"
49
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
50
- @click="$parent.$parent.hidden()"></div>
51
- </div>
52
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow" >
53
- <label class="font_normal_body">安检计划</label>
54
- <input type="text" class="input_search" v-model="$parent.$parent.model.f_check_plan.f_plan_name"
55
- @click="$parent.$parent.showChooser"
56
- style="width: 60%" placeholder="安检计划" readonly="readonly">
57
- </div>
58
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
59
- <label class="font_normal_body">开始时间</label>
60
- <datepicker
61
- class="select_list select"
62
- :value.sync="model.f_check_start"
63
- placeholder='开始时间' style="width: 60%"
64
- :disabled-days-of-week="[]"
65
- :format="'yyyy-MM-dd'"
66
- :show-rest-button="reset"
67
- v-model="model.f_check_start"
68
- condition="f_offsite_time > ='{} 00:00:00'">
69
- </datepicker>
70
- </div>
71
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
72
- <label class="font_normal_body">结束时间</label>
73
- <datepicker
74
- :value.sync="model.f_check_end"
75
- placeholder='结束时间' style="width: 60%"
76
- :disabled-days-of-week="[]"
77
- :format="'yyyy-MM-dd'"
78
- :show-rest-button="reset"
79
- v-model="model.f_check_end"
80
- condition="f_offsite_time <= '{} 23:59:59'">
81
- </datepicker>
82
- </div>
83
- <!-- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow" v-show="false">-->
84
- <!-- <label class="font_normal_body" >安检类型</label>-->
85
- <!-- <v-select :value.sync="model.f_safecheck_type" v-model='model.f_safecheck_type'-->
86
- <!-- :value-single="true" style="width: 60%"-->
87
- <!-- class="select_list select"-->
88
- <!-- :options='$parent.$parent.safetype' placeholder='安检类型'-->
89
- <!-- close-on-select-->
90
- <!-- condition="f_safecheck_type = '{}'"></v-select>-->
91
- <!-- </div>-->
92
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
93
- <label class="font_normal_body">安检状态</label>
94
- <v-select id="f_entry"
95
- class="select_list select"
96
- placeholder='安检状态' style="width: 60%"
97
- v-model='model.f_entry'
98
- :value.sync="$parent.$parent.model.f_entry"
99
- :options='$parent.$parent.f_entry_status'
100
- condition=""
101
- :value-single="true"
102
- close-on-select clear-button></v-select>
103
- </div>
104
-
105
- <!-- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">-->
106
- <!-- <label class="font_normal_body">安&ensp;检&ensp;员</label>-->
107
- <!-- <v-select :value.sync="model.f_checker_id" v-model='model.f_checker_id'-->
108
- <!-- :value-single="true" style="width: 60%"-->
109
- <!-- class="select_list select"-->
110
- <!-- :options='$parent.$parent.checkersid' placeholder='安检员'-->
111
- <!-- close-on-select-->
112
- <!-- condition="f_checker_id = '{}'"></v-select>-->
113
- <!-- </div>-->
114
- <!-- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">-->
115
- <!-- <label class="font_normal_body" style="margin-right: 2px">公&emsp;&emsp;司</label>-->
116
- <!-- <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">-->
117
- <!-- </right-tree>-->
118
- <!-- </div>-->
119
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
120
-
121
- <label class="font_normal_body">用户状态</label>
122
- <v-select :value.sync="model.f_user_state" v-model='model.f_user_state'
123
- :value-single="true" style="width: 60%"
124
- class="select_list select"
125
- :options='$parent.$parent.user_states' placeholder='用户状态'
126
- close-on-select
127
- condition="f_user_state = '{}'"></v-select>
128
- </div>
129
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
130
-
131
- <label class="font_normal_body">录音照片状态</label>
132
- <v-select :value.sync="model.f_downloadpath" v-model='model.f_downloadpath'
133
- :value-single="true" style="width: 60%"
134
- class="select_list select"
135
- :options='$parent.$parent.downloadpaths' placeholder='录音/照片'
136
- close-on-select
137
- condition="f_downloadpath = '{}'"></v-select>
138
- </div>
139
- <div class="col-sm-4 form-group" v-if="$parent.$parent.criteriaShow" style="margin: 0">
140
- <role-selector-safe
141
- role-name="安检员"
142
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
143
- @re-res="$parent.$parent.getRes"
144
- :value.sync="model.f_checker_id"
145
- v-model="model.f_checker_id"
146
- condition="f_checker_name = '{}'">
147
- </role-selector-safe>
148
- </div>
149
- <div class="form-group col-sm-2" v-show="false">
150
- <label class="font_normal_body">片&emsp;&emsp;区</label>
151
- <v-select class="select_list select"
152
- placeholder='片区/管理站' style="width: 60%"
153
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
154
- :options='$parent.$parent.sliceArea'
155
- filer-key="name"
156
- close-on-select clear-button
157
- condition="f_slice_area='{}'"
158
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
159
- :value-single="true">
160
- </v-select>
161
- </div>
162
- <div class="form-group col-sm-2" v-show="false">
163
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
164
- <v-select class="select_list select"
165
- placeholder='抄表册' style="width: 60%"
166
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
167
- :options='$parent.$parent.cbc'
168
- filer-key="name"
169
- close-on-select clear-button
170
- condition="f_meter_book_num={}"
171
- :value-single="true">
172
- </v-select>
173
- </div>
174
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
175
- <label class="font_normal_body">是否作废</label>
176
- <v-select class="select_list select"
177
- placeholder='是否作废' style="width: 60%"
178
- :value.sync="model.f_is_delete" v-model="model.f_is_delete"
179
- :options='$parent.$parent.isdels'
180
- filer-key="name"
181
- close-on-select clear-button
182
- :value-single="true">
183
- </v-select>
184
- </div>
185
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
186
- <label class="font_normal_body">维修结果</label>
187
- <v-select class="select_list select"
188
- placeholder='维修结果' style="width: 60%"
189
- :value.sync="model.f_repaired" v-model="model.f_repaired"
190
- :options='$parent.$parent.repaireds'
191
- filer-key="name"
192
- close-on-select clear-button
193
- condition="f_repaired = '{}'"
194
- :value-single="true">
195
- </v-select>
196
- </div>
197
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
198
- <label class="font_normal_body">安检结果</label>
199
- <v-select class="select_list select"
200
- placeholder='安检结果' style="width: 60%"
201
- :value.sync="model.f_check_result" v-model="model.f_check_result"
202
- :options='$parent.$parent.checkresults'
203
- filer-key="name"
204
- close-on-select clear-button
205
- condition="f_defect_content like'%{}%'"
206
- :value-single="true">
207
- </v-select>
208
- </div>
209
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
210
-
211
- <label class="font_normal_body">安检类型</label>
212
- <v-select :value.sync="model.f_safecheck_type" v-model='model.f_safecheck_type'
213
- :value-single="true" style="width: 60%"
214
- class="select_list select"
215
- :options='$parent.$parent.safecheck_type' placeholder='安检类型'
216
- close-on-select
217
- condition="f_safecheck_type = '{}'"></v-select>
218
- </div>
219
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
220
- <label class="font_normal_body">是否有改动</label>
221
- <v-select class="select_list select"
222
- placeholder='安检结果' style="width: 60%"
223
- :value.sync="model.f_gaodong_flag" v-model="model.f_gaodong_flag"
224
- :options='$parent.$parent.isdels'
225
- filer-key="name"
226
- close-on-select clear-button
227
- condition="f_gaodong_flag = '{}'"
228
- :value-single="true">
229
- </v-select>
230
- </div>
231
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
232
- <label class="font_normal_body">气表状态</label>
233
- <v-select :value.sync="model.f_table_state" v-model='model.f_table_state'
234
- :value-single="true" style="width: 60%"
235
- class="select_list select"
236
- :options='$parent.$parent.table_state' placeholder='气表状态'
237
- close-on-select
238
- condition="f_table_state = '{}'"></v-select>
239
- </div>
240
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
241
- <label class="font_normal_body">审核状态</label>
242
- <v-select :value.sync="model.f_approved" v-model='model.f_approved'
243
- :value-single="true" style="width: 60%"
244
- class="select_list select"
245
- :options='$parent.$parent.review_status' placeholder='审核状态'
246
- close-on-select
247
- condition="f_approved= '{}'"></v-select>
248
- </div>
249
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
250
- <label class="font_normal_body">审核开始</label>
251
- <datepicker
252
- class="select_list select"
253
- :value.sync="model.f_checksh_start"
254
- placeholder='审核开始时间' style="width: 60%"
255
- :disabled-days-of-week="[]"
256
- :format="'yyyy-MM-dd'"
257
- :show-rest-button="reset"
258
- v-model="model.f_checksh_start"
259
- condition="f_approved_time > ='{} 00:00:00'">
260
- </datepicker>
261
- </div>
262
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
263
- <label class="font_normal_body">审核结束</label>
264
- <datepicker
265
- :value.sync="model.f_checksh_end"
266
- placeholder='审核结束时间' style="width: 60%"
267
- :disabled-days-of-week="[]"
268
- :format="'yyyy-MM-dd'"
269
- :show-rest-button="reset"
270
- v-model="model.f_checksh_end"
271
- condition="f_approved_time <= '{} 23:59:59'">
272
- </datepicker>
273
- </div>
274
- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
275
- <label class="font_normal_body">审&ensp;核&ensp;人</label>
276
- <input type="text" class="input_search" v-model="model.f_approved_by"
277
- style="width: 60%" placeholder="审核人" condition="f_approved_by like '%{}%'">
278
- </div>
279
- </div>
280
- <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
281
- <div slot="modal-header" class="modal-header">
282
- <h4 class="modal-title">
283
- 选择计划
284
- </h4>
285
- </div>
286
- <div slot="modal-body" class="modal-body">
287
- <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
288
- </div>
289
- <div slot="modal-footer" class="modal-footer" style="text-align: center;white-space: nowrap">
290
- <button class="button_search" @click="$parent.$parent.ok">确认</button>
291
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
292
- </div>
293
- </modal>
294
- </div>
295
- </criteria>
296
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
297
- <template partial='head'>
298
- <tr>
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
- <nobr>剩余气量</nobr>
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>
339
- <nobr>表号</nobr>
340
- </th>
341
- <th>
342
- <nobr>表品牌</nobr>
343
- </th>
344
- <th>
345
- <nobr>表位置</nobr>
346
- </th>
347
- <th>
348
- <nobr>左右表</nobr>
349
- </th>
350
- <th>
351
- <nobr>表封号</nobr>
352
- </th>
353
- <th>
354
- <nobr>气表状态</nobr>
355
- </th>
356
- <th>
357
- <nobr>安检类型</nobr>
358
- </th>
359
- <th>
360
- <nobr>安检结果</nobr>
361
- </th>
362
- <th>
363
- <nobr>隐患详情</nobr>
364
- </th>
365
- <!-- <th>-->
366
- <!-- <nobr>维修状态</nobr>-->
367
- <!-- </th>-->
368
- <!-- <th>-->
369
- <!-- <nobr>维修人</nobr>-->
370
- <!-- </th>-->
371
- <!-- <th>-->
372
- <!-- <nobr>维修时间</nobr>-->
373
- <!-- </th>-->
374
- <!-- <th>-->
375
- <!-- <nobr>维修描述</nobr>-->
376
- <!-- </th>-->
377
-
378
- <th>
379
- <nobr>备注</nobr>
380
- </th>
381
- <th>
382
- <nobr>安检状态</nobr>
383
- </th>
384
- <th>
385
- <nobr>安检计划</nobr>
386
- </th>
387
- <th>
388
- <nobr>整改通知书</nobr>
389
- </th>
390
- <th>
391
- <nobr>录音/照片</nobr>
392
- </th>
393
- <th>
394
- <data-order field="f_offsite_time" name="安检时间"></data-order>
395
- </th>
396
- <th>
397
- <nobr>安检员</nobr>
398
- </th>
399
- <th>
400
- <nobr>审核状态</nobr>
401
- </th>
402
- <th>
403
- <nobr>审核人</nobr>
404
- </th>
405
- <th>
406
- <nobr>审核时间</nobr>
407
- </th>
408
- <th>
409
- <nobr>操作</nobr>
410
- </th>
411
- <th v-if="$parent.$parent.$parent.audioshow">
412
- <nobr>录音</nobr>
413
- </th>
414
- </tr>
415
- </template>
416
- <template partial='body'>
417
- <td style="text-align: center;white-space: nowrap">{{ row.f_userinfo_code }}</td>
418
- <td style="text-align: center;white-space: nowrap">{{ row.f_user_name }}</td>
419
- <td style="text-align: center;white-space: nowrap">{{ row.f_user_phone }}</td>
420
- <td style="text-align: center;white-space: nowrap">{{ row.f_check_type }}</td>
421
- <td style="text-align: center;white-space: nowrap">{{ row.f_user_state }}</td>
422
- <td style="text-align: center;white-space: nowrap">{{ row.f_residential_area }}</td>
423
- <td style="text-align: center;white-space: nowrap">{{ row.f_address }}</td>
424
- <td style="text-align: center;white-space: nowrap">{{ row.f_mapanshu }}</td>
425
- <td style="text-align: center;white-space: nowrap"
426
- @dblclick.stop="$parent.$parent.$parent.tochangeRemark(row)">{{ row.f_chazhi }}
427
- </td>
428
- <td style="text-align: center;white-space: nowrap">{{ row.f_shengyu_gas }}</td>
429
- <td style="text-align: center;white-space: nowrap">{{ row.f_bowenguan }}</td>
430
- <td style="text-align: center;white-space: nowrap">{{ row.f_zibifa }}</td>
431
- <td style="text-align: center;white-space: nowrap">{{ row.f_contractdate }}</td>
432
- <td style="text-align: center;white-space: nowrap">{{ row.f_meternumber }}</td>
433
- <td style="text-align: center;white-space: nowrap">{{ row.f_meter_classify }}</td>
434
- <td style="text-align: center;white-space: nowrap">{{ row.f_position }}</td>
435
- <td style="text-align: center;white-space: nowrap">{{ row.f_aroundmeter }}</td>
436
- <td style="text-align: center;white-space: nowrap">{{ row.f_metertitles }}</td>
437
- <td style="text-align: center;white-space: nowrap">{{ row.f_table_state }}</td>
438
- <td style="text-align: center;white-space: nowrap">{{ row.f_safecheck_type }}</td>
439
- <td style="text-align: center;white-space: nowrap">{{ row.defect_content == '无隐患' ? '正常' : '有隐患' }}</td>
440
- <td style="text-align: center;white-space: nowrap">{{ row.defect_content }}</td>
441
- <!-- <td style="text-align: center;white-space: nowrap">{{ row.repaired}}</td>-->
442
- <!-- <td style="text-align: center;white-space: nowrap">{{ row.f_repairman}}</td>-->
443
- <!-- <td style="text-align: center;white-space: nowrap">{{ row.f_repair_date}}</td>-->
444
- <!-- <td style="text-align: center;white-space: nowrap">{{ row.f_ratification_des}}</td>-->
445
- <td style="text-align: center;white-space: nowrap">{{ row.f_repair_approved_note }}</td>
446
- <td style="text-align: center;white-space: nowrap">{{ row.f_entry_status }}</td>
447
- <td style="text-align: center;white-space: nowrap">{{ row.f_plan_name }}</td>
448
- <!--整改通知书别名-->
449
- <td style="text-align: center;white-space: nowrap">{{ row.f_rectification_notice }}</td>
450
- <td style="text-align: center;white-space: nowrap"
451
- v-if="row.f_entry_status=='到访不遇'|| row.f_entry_status=='拒检'">{{ row.f_downloadpath }}
452
- </td>
453
- <td style="text-align: center;white-space: nowrap" v-else></td>
454
- <td style="text-align: center;white-space: nowrap">{{ row.f_offsite_time }}</td>
455
- <td style="text-align: center;white-space: nowrap">{{ row.f_checker_name }}</td>
456
- <td style="text-align: center;white-space: nowrap">{{ row.f_approved }}</td>
457
- <td style="text-align: center;white-space: nowrap">{{ row.f_approved_by }}</td>
458
- <td style="text-align: center;white-space: nowrap">{{ row.f_approved_time }}</td>
459
- <td style="text-align: center;white-space: nowrap">
460
- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
461
- <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.del(row)' v-show="$parent.$parent.$parent.isdel=='否'">作废</button>-->
462
- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.pass(row)'
463
- v-show ="row.f_approved == '未审核'">通过
464
- </button>
465
- <button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
466
- @click="$parent.$parent.$parent.print(row)">
467
- 打印
468
- </button>
469
- </td>
470
- <td style="text-align: center;white-space: nowrap" v-if="$parent.$parent.$parent.audioshow">
471
- <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>-->
472
- <audio controls="controls" v-if="row.f_recording1_path">
473
- <source type="audio/mpeg" :src="'rs/audio/file/'+row.f_recording1_path">
474
- </audio>
475
- </td>
476
- </template>
477
- </data-grid>
478
- </criteria-paged>
479
- <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
480
- </div>
481
- <modal :show.sync="showModal2" :backdrop="false">
482
- <div slot="modal-header" class="modal-header">
483
- <h4 class="modal-title">
484
- 用户{{ this.paperrow.f_user_name }}备注修改
485
- </h4>
486
- </div>
487
- <div slot="modal-body" class="modal-body">
488
- <div class="row" style="margin-top: 10px">
489
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备注</label>
490
- <div class="col-xs-8 col-md-8">
491
- <textarea class="form-control" type="text" v-model="paperRemark"></textarea>
492
- </div>
493
- </div>
494
- </div>
495
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
496
- <button class="button_search" @click="okshow">确认</button>
497
- <button class="button_search" @click="cancelshow">取消</button>
498
- </div>
499
- </modal>
500
- </div>
501
- </template>
502
-
503
- <script>
504
- import {PagedList} from 'vue-client'
505
- import Vue from 'vue'
506
- import co from 'co'
507
- import AppData from '../../../stores/AppData'
508
- import * as Util from '../../Util'
509
- import getNowDate from "../../../utils/getNowDate";
510
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
511
- import BenzAMRRecorder from 'benz-amr-recorder'
512
-
513
- //获取json配置文件
514
- let asyncReady = async function (self) {
515
- // 获取配置信息
516
- try {
517
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
518
- Vue.config = res.data
519
- } catch (error) {
520
- // 忽略704,文件找不到异常R
521
- if (error.status !== 704) {
522
- throw error
523
- }
524
- }
525
- }
526
-
527
- let select = function* (self) {
528
- let http = new HttpResetClass()
529
- let getGasman = yield http.load('POST', '/rs/search', {
530
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
531
- userid: self.$login.f.id
532
- }, {resolveMsg: null, rejectMsg: null})
533
- ////tag
534
- self.checkersid.push({label: '全部', value: ''})
535
- getGasman.data.forEach((checker) => {
536
- self.checkersid.push({label: checker.name, value: checker.id})
537
- })
538
- }
539
-
540
- export default {
541
- title: '安检结果查看',
542
- data() {
543
- let model = new PagedList('rs/sql/查找安检单', 20, {
544
- f_plan_id: 'this.f_plan_id',
545
- f_approved: 'this.f_approved',
546
- f_entry_status: 'this.f_entry',
547
- f_no_checkplan: 'this.f_no_checkplan',
548
- f_filialeid: 'this.f_filialeid',
549
- f_defect_content:'this.f_defect_content',
550
- orderitem: "'f_offsite_time desc'"
551
- })
552
- model.f_plan_id = ''
553
- model.f_approved = ''
554
- model.f_entry = ''
555
- model.f_no_checkplan = ''
556
- model.f_filialeid = `('${this.$login.f.orgid}')`
557
- model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
558
- return {
559
- showbusy:false,
560
- audioshow: false,
561
- paperRemark:'',
562
- searchData: {
563
- condition: "1=1",
564
- orderitem: "f_offsite_time desc",
565
- f_plan_id: "",
566
- f_approved: '',
567
- f_entry_status: '',
568
- f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
569
- f_no_checkplan: '',
570
- f_filialeid: `('${this.$login.f.orgid}')`
571
- },
572
- model: model,
573
- //searchData:searchData,
574
- excelHeaders: {
575
- 'f_userinfo_code': '客户编号',
576
- 'f_user_name': '客户名称',
577
- 'f_user_phone': '客户电话',
578
- 'f_check_type': '客户类型',
579
- 'f_user_state': '客户状态',
580
- 'f_residential_area': '小区',
581
- 'f_address': '地址',
582
- 'f_mapanshu': '码盘数',
583
- 'f_chazhi': '气量差值',
584
- 'f_shengyu_gas':'剩余气量',
585
- 'f_bowenguan':'波纹管数量',
586
- 'f_zibifa':'自闭阀数量',
587
- 'f_contractdate': '合同日期',
588
- 'f_table_state': '气表状态',
589
- 'f_meternumber': '表号',
590
- 'f_meter_classify': '表品牌',
591
- 'f_position': '表位置',
592
- 'f_aroundmeter': '左右表',
593
- 'f_metertitles': '表封号',
594
- 'defect_content': '安检结果',
595
- // 'repaired': '维修状态',
596
- // 'f_repairman': '维修人',
597
- // 'f_repair_date': '维修时间',
598
- // 'f_ratification_des': '维修描述',
599
- 'f_repair_approved_note': '备注',
600
- 'f_plan_name':'计划名称',
601
- 'f_rectification_notice':'整改通知书',
602
- 'f_downloadpath':'录音/照片',
603
- 'f_entry_status': '安检状态',
604
- 'f_offsite_time': '安检时间',
605
- 'f_checker_name': '安检员',
606
- 'f_approved' : '审核状态',
607
- 'f_approved_by' : '审核人',
608
- 'f_approved_time':'审核时间'
609
- },
610
- fun: this.$login.f,
611
- showModal2:false,
612
- paperrow:{},
613
- checkersid: [],
614
- safetype: [
615
- {label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')],
616
- downloadpaths: [{label: '全部', value: ''},{label: '已上传', value: '已上传'},{label: '未上传', value: '未上传'}],
617
- criteriaShow: false,
618
- showModal: false,
619
- table_state: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')],
620
- f_approval_states: this.$appdata.getParam('安检单审核状态'),
621
- f_entry_status: [{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')],
622
- user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
623
- safecheck_type:[{label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')],
624
- f_checkplans: this.$appdata.getParam('有无计划'),
625
- showcheckmsg: false,
626
- checkInfo: {},
627
- orderDefault: "'f_offsite_time'",
628
- orderFields: {
629
- f_offsite_time: 'no'
630
- },
631
- sliceArea: [],
632
- review_status:[{label: '全部', value: ''},{label: '待审核', value: '未审核'},{label: '正常', value: '通过'}],
633
- isdels: [{label: '全部', value: ''},{label: '是', value: '是'},{label: '否', value: '否'}],
634
- repaireds: [{label: '全部', value: ''},{label: '已修', value: '已修'},{label: '未修', value: '未修'}],
635
- checkresults: [{label: '全部', value: ''},{label: '正常', value: '正常'},{label: '有隐患', value: '有隐患'}],
636
- isdel: '否',
637
- cbc: []
638
- }
639
- },
640
- methods: {
641
- tochangeRemark(row){
642
- //tag
643
- this.paperRemark=row.f_chazhi
644
- this.paperrow=row
645
- this.showModal2=true
646
-
647
- },
648
- okshow(){
649
- let sql=`update t_check_paper set f_chazhi='${this.paperRemark}' where id='${this.paperrow.id}'`
650
- //tag
651
- new HttpResetClass().load('post','rs/logic/runSQL',{data:{sql:sql}},{resolveMsg:'修改成功',rejectMsg:'修改失败'}).then(res=>{
652
- // this.$showMessage("修改成功")
653
- let e = document.createEvent("MouseEvents");
654
- e.initEvent("click", true, true);
655
- document.getElementById("btnbbb").dispatchEvent(e);
656
- this.showModal2=false
657
- })
658
-
659
- },
660
- cancelshow(){
661
- this.showModal2=false
662
- },
663
- pass(row) {
664
- //判断当前登录人是否有审核权限
665
- if(this.$appdata.getSingleValue('开启安检审核权限')=='是'){
666
- if(!this.$login.r.includes('安检结果审核')){
667
- //提示无审核权限
668
- this.$showMessage('您无审核权限')
669
- return
670
- }
671
- }
672
- var reqdata = {
673
- audit_result: '通过',
674
- operator: "success",
675
- audit_time: Util.getNowDate(),
676
- user_name: this.$login.f.name,
677
- id: row.id,
678
- f_check_item_id: row.f_check_item_id
679
- }
680
- this.$showMessage('确认通过当前安检单吗?', ['confirm', 'cancel']).then((res) => {
681
- if (res === 'confirm') {
682
- this.$resetpost('/rs/logic/updateAafeAudit', {data: reqdata}).then((res) => {
683
- //tag
684
- if (res.data.code == 200) {
685
- this.$showMessage('通过成功')
686
- this.search()
687
- } else {
688
- this.$showMessage('通过失败!')
689
- }
690
- }).catch((e) => {
691
- this.$showMessage(JSON.stringify(e) + '通过失败!')
692
- })
693
- }
694
- })
695
- },
696
- del(row) {
697
- //tag
698
- this.$showMessage('确认作废当前安检单吗?', ['confirm', 'cancel']).then((res) => {
699
- if (res === 'confirm') {
700
- this.$resetpost('rs/logic/DelCheckPaper', {id:row.id}).then((res) => {
701
- //tag
702
- if(res.data.code == 200){
703
- this.$showMessage('作废成功')
704
- this.search()
705
- }else {
706
- this.$showMessage('作废失败!')
707
- }
708
- }).catch((e) => {
709
- this.$showMessage(JSON.stringify(e) +'作废失败!')
710
- })
711
- }
712
- })
713
- },
714
- showaudio() {
715
- //tag
716
- this.audioshow = !this.audioshow
717
- //tag
718
- },
719
- getmeterbook(val) {
720
- this.cbc = []
721
- this.cbc.push({
722
- label: '全部',
723
- value: ''
724
- })
725
- if (val == '') {
726
-
727
- this.cbcs.forEach(res => {
728
- this.cbc.push({
729
- label: res.f_book_name,
730
- value: res.id
731
- })
732
- })
733
- } else {
734
- this.cbcs.forEach(res => {
735
- if (res.f_book_slice_area == val) {
736
- this.cbc.push({
737
- label: res.f_book_name,
738
- value: res.id
739
- })
740
- }
741
- })
742
- }
743
- },
744
- Mreadibook(val) {
745
- ////tag
746
- ////tag
747
- this.sliceArea = []
748
- if (val) {
749
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
750
- data: {
751
- items: 'name',
752
- tablename: 't_zone',
753
- condition: `parentid in ${val}`,
754
- orderitem: 'id'
755
- }
756
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
757
- this.sliceArea.push({
758
- label: '全部',
759
- value: ''
760
- })
761
- res.data.forEach(ress => {
762
- this.sliceArea.push({
763
- label: ress.name,
764
- value: ress.name
765
- })
766
- })
767
-
768
- })
769
- }
770
- },
771
- getAllMeterBook(val) {
772
- ////tag
773
- ////tag
774
- this.cbcs = []
775
- if (val) {
776
- new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
777
- data: {
778
- items: 'f_book_name,f_book_slice_area,id',
779
- tablename: 't_meter_book',
780
- condition: `f_filiale_id in ${val}`,
781
- orderitem: 'id'
782
- }
783
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
784
- res.data.forEach(ress => {
785
- this.cbcs.push({
786
- id: ress.id,
787
- f_book_name: ress.f_book_name,
788
- f_book_slice_area: ress.f_book_slice_area
789
- })
790
- })
791
- this.cbc = []
792
- this.cbc.push({
793
- label: '全部',
794
- value: ''
795
- })
796
- this.cbcs.forEach(res => {
797
- this.cbc.push({
798
- label: res.f_book_name,
799
- value: res.id
800
- })
801
- })
802
- })
803
- }
804
- },
805
- getRes(obj) {
806
- this.model.f_filialeid = this.$login.convertToIn(obj.resids);
807
- this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
808
- this.Mreadibook(this.model.f_filialeid)
809
- this.getAllMeterBook(this.model.f_filialeid)
810
- //this.$refs.paged.$refs.criteria.search()
811
- },
812
-
813
- change(row) {
814
- // Vue.$login = {jwt: row.f_checker_id}
815
- asyncReady(this).then(() => {
816
- ////tag)
817
- row.f_upload_state = '已传'
818
- this.$goto('new-check-paper', {
819
- f_plan_id: row.f_check_plan_id,
820
- item: row,
821
- role: 'view',
822
- isdel: this.isdel
823
- }, 'self')
824
- }).catch(
825
- (respanse) => {
826
- alert('获取配置文件失败')
827
- })
828
- },
829
- readConfig() {
830
- let gen = asyncReady(this)
831
- return co(gen)
832
- },
833
- showChooser() {
834
- this.showModal = true
835
- },
836
- hidden() {
837
- this.criteriaShow = !this.criteriaShow
838
- },
839
- refresh() {
840
- this.$refs.paged.$refs.criteria.search()
841
- },
842
- ok() {
843
- this.showModal = false
844
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
845
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
846
- this.model.f_check_plan = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
847
- }
848
- },
849
- cancel() {
850
- this.showModal = false
851
- this.model.f_check_plan = {f_plan_name: '', id: ''}
852
- this.model.f_plan_id = ''
853
- },
854
- print(row) {
855
- this.showcheckmsg = true
856
- this.checkInfo = row
857
- },
858
- sort(field, rule) {
859
- // 将所有排序方式设为不排序,实现相互排斥
860
- for (let key in this.orderFields) {
861
- if (key === field) {
862
- this.orderFields[key] = rule
863
- } else {
864
- this.orderFields[key] = 'no'
865
- }
866
- }
867
- // 如果新规则不排序,还原为默认排序
868
- if (rule === 'no') {
869
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
870
- } else {
871
- this.model.paramSource.orderitem = `'${field} ${rule}'`
872
- }
873
- this.search()
874
- },
875
- search() {
876
- this.$refs.paged.$refs.criteria.search()
877
- },
878
- selfSearch(args) {
879
- ////tag
880
- //args.condition+=" and f_check_type='民用'"
881
- //tag
882
- // //tag
883
- if (this.$refs.paged.$refs.criteria.model.f_is_delete == '是') {
884
- //tag
885
- this.isdel = '是'
886
- this.model.url = 'rs/sql/QueryDelCheckPaper'
887
-
888
- } else {
889
- //tag
890
- this.isdel = '否'
891
- this.model.url = 'rs/sql/查找安检单'
892
- }
893
- // if (args.condition.indexOf('f_table_state') == -1){
894
- // args.condition += " and f_table_state = '正常'"
895
- // }
896
- this.model.search(args.condition, args.model, args.condValue)
897
- }
898
- },
899
-
900
- ready() {
901
- ////tag
902
- this.function = this.f
903
- ////tag
904
-
905
- let gen = select(this)
906
- //this.pianqu()
907
- this.Mreadibook(`('${this.$login.f.orgid}')`)
908
- co(gen)
909
- },
910
- watch: {
911
- 'model.f_no_checkplan'(val) {
912
- if (this.model.f_no_checkplan) {
913
- this.searchData.f_no_checkplan = val
914
- }
915
- if (this.model.f_no_checkplan == '有计划安检') {
916
-
917
- this.showChooser()
918
- }
919
- },
920
- 'model.condition'(val) {
921
- if (val) {
922
- this.searchData.condition = val
923
- }
924
-
925
- },
926
- 'model.f_entry'(val) {
927
- if (val) {
928
- this.searchData.f_entry_status = val
929
- }
930
- },
931
- 'model.f_plan_id'(val) {
932
- if (val) {
933
- this.searchData.f_plan_id = val
934
- }
935
- },
936
- 'model.f_slice_area'(val) {
937
- if (val) {
938
-
939
- }
940
- },
941
- 'model.f_approved'(val) {
942
- if (val) {
943
- this.searchData.f_approved = val
944
- }
945
- },
946
- }
947
-
948
- }
949
- </script>
1
+ <template>
2
+ <div class="flex-row">
3
+ <work-busy :is-busy="showbusy"></work-busy>
4
+ <div class="basic-main">
5
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
6
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="form-group col-sm-2">
10
+ <label class="font_normal_body">客户编号</label>
11
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
12
+ style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
13
+ </div>
14
+ <div class="form-group col-sm-2">
15
+ <label class="font_normal_body">客户名称</label>
16
+ <input type="text" class="input_search" v-model="model.f_user_name"
17
+ style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
18
+ </div>
19
+ <div class="form-group col-sm-2">
20
+
21
+ <label class="font_normal_body">客户类型</label>
22
+ <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
23
+ :value-single="true" style="width: 60%"
24
+ class="select_list select"
25
+ :options='$parent.$parent.check_types' placeholder='客户类型'
26
+ close-on-select
27
+ condition="f_check_type = '{}'"></v-select>
28
+ </div>
29
+ <div class="form-group col-sm-2">
30
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
31
+ <input type="text" class="input_search" v-model="model.f_residential_area"
32
+ style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
33
+ </div>
34
+ <div class="form-group col-sm-2" >
35
+ <label class="font_normal_body">详细地址</label>
36
+ <input type="text" class="input_search" v-model="model.f_address"
37
+ style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
38
+ </div>
39
+ <div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
40
+
41
+ <export-excel-safe :data="$parent.$parent.searchData"
42
+ :field="$parent.$parent.excelHeaders"
43
+ :choose-col="true"
44
+ progress="safeGetExportProgress"
45
+ sqlurl="rs/logic/SafeExportExcel" sql-name="查找安检单"
46
+ template-name='安检结果明细'></export-excel-safe>
47
+ <!-- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="!$parent.$parent.audioshow">录音</button>-->
48
+ <button class="button_spacing button_search" @click="$parent.$parent.showaudio()"
49
+ v-if="$parent.$parent.audioshow">隐藏
50
+ </button>
51
+
52
+ <button id="btnbbb" class="button_spacing button_search" @click="search()">查询</button>
53
+ <div style="float: right" class="button_spacing"
54
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
55
+ @click="$parent.$parent.hidden()"></div>
56
+ </div>
57
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow" >
58
+ <label class="font_normal_body">安检计划</label>
59
+ <input type="text" class="input_search" v-model="$parent.$parent.model.f_check_plan.f_plan_name"
60
+ @click="$parent.$parent.showChooser"
61
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
62
+ </div>
63
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
64
+ <label class="font_normal_body">开始时间</label>
65
+ <datepicker
66
+ class="select_list select"
67
+ :value.sync="model.f_check_start"
68
+ placeholder='开始时间' style="width: 60%"
69
+ :disabled-days-of-week="[]"
70
+ :format="'yyyy-MM-dd'"
71
+ :show-rest-button="reset"
72
+ v-model="model.f_check_start"
73
+ condition="f_offsite_time > ='{} 00:00:00'">
74
+ </datepicker>
75
+ </div>
76
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
77
+ <label class="font_normal_body">结束时间</label>
78
+ <datepicker
79
+ :value.sync="model.f_check_end"
80
+ placeholder='结束时间' style="width: 60%"
81
+ :disabled-days-of-week="[]"
82
+ :format="'yyyy-MM-dd'"
83
+ :show-rest-button="reset"
84
+ v-model="model.f_check_end"
85
+ condition="f_offsite_time <= '{} 23:59:59'">
86
+ </datepicker>
87
+ </div>
88
+ <!-- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow" v-show="false">-->
89
+ <!-- <label class="font_normal_body" >安检类型</label>-->
90
+ <!-- <v-select :value.sync="model.f_safecheck_type" v-model='model.f_safecheck_type'-->
91
+ <!-- :value-single="true" style="width: 60%"-->
92
+ <!-- class="select_list select"-->
93
+ <!-- :options='$parent.$parent.safetype' placeholder='安检类型'-->
94
+ <!-- close-on-select-->
95
+ <!-- condition="f_safecheck_type = '{}'"></v-select>-->
96
+ <!-- </div>-->
97
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
98
+ <label class="font_normal_body">安检状态</label>
99
+ <v-select id="f_entry"
100
+ class="select_list select"
101
+ placeholder='安检状态' style="width: 60%"
102
+ v-model='model.f_entry'
103
+ :value.sync="$parent.$parent.model.f_entry"
104
+ :options='$parent.$parent.f_entry_status'
105
+ condition=""
106
+ :value-single="true"
107
+ close-on-select clear-button></v-select>
108
+ </div>
109
+
110
+ <!-- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">-->
111
+ <!-- <label class="font_normal_body">安&ensp;检&ensp;员</label>-->
112
+ <!-- <v-select :value.sync="model.f_checker_id" v-model='model.f_checker_id'-->
113
+ <!-- :value-single="true" style="width: 60%"-->
114
+ <!-- class="select_list select"-->
115
+ <!-- :options='$parent.$parent.checkersid' placeholder='安检员'-->
116
+ <!-- close-on-select-->
117
+ <!-- condition="f_checker_id = '{}'"></v-select>-->
118
+ <!-- </div>-->
119
+ <!-- <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">-->
120
+ <!-- <label class="font_normal_body" style="margin-right: 2px">公&emsp;&emsp;司</label>-->
121
+ <!-- <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">-->
122
+ <!-- </right-tree>-->
123
+ <!-- </div>-->
124
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
125
+
126
+ <label class="font_normal_body">用户状态</label>
127
+ <v-select :value.sync="model.f_user_state" v-model='model.f_user_state'
128
+ :value-single="true" style="width: 60%"
129
+ class="select_list select"
130
+ :options='$parent.$parent.user_states' placeholder='用户状态'
131
+ close-on-select
132
+ condition="f_user_state = '{}'"></v-select>
133
+ </div>
134
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
135
+
136
+ <label class="font_normal_body">录音照片状态</label>
137
+ <v-select :value.sync="model.f_downloadpath" v-model='model.f_downloadpath'
138
+ :value-single="true" style="width: 60%"
139
+ class="select_list select"
140
+ :options='$parent.$parent.downloadpaths' placeholder='录音/照片'
141
+ close-on-select
142
+ condition="f_downloadpath = '{}'"></v-select>
143
+ </div>
144
+ <div class="col-sm-4 form-group" v-if="$parent.$parent.criteriaShow" style="margin: 0">
145
+ <role-selector-safe
146
+ role-name="安检员"
147
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
148
+ @re-res="$parent.$parent.getRes"
149
+ :value.sync="model.f_checker_id"
150
+ v-model="model.f_checker_id"
151
+ condition="f_checker_name = '{}'">
152
+ </role-selector-safe>
153
+ </div>
154
+ <div class="form-group col-sm-2" v-show="false">
155
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
156
+ <v-select class="select_list select"
157
+ placeholder='片区/管理站' style="width: 60%"
158
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
159
+ :options='$parent.$parent.sliceArea'
160
+ filer-key="name"
161
+ close-on-select clear-button
162
+ condition="f_slice_area='{}'"
163
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
164
+ :value-single="true">
165
+ </v-select>
166
+ </div>
167
+ <div class="form-group col-sm-2" v-show="false">
168
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
169
+ <v-select class="select_list select"
170
+ placeholder='抄表册' style="width: 60%"
171
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
172
+ :options='$parent.$parent.cbc'
173
+ filer-key="name"
174
+ close-on-select clear-button
175
+ condition="f_meter_book_num={}"
176
+ :value-single="true">
177
+ </v-select>
178
+ </div>
179
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
180
+ <label class="font_normal_body">是否作废</label>
181
+ <v-select class="select_list select"
182
+ placeholder='是否作废' style="width: 60%"
183
+ :value.sync="model.f_is_delete" v-model="model.f_is_delete"
184
+ :options='$parent.$parent.isdels'
185
+ filer-key="name"
186
+ close-on-select clear-button
187
+ :value-single="true">
188
+ </v-select>
189
+ </div>
190
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
191
+ <label class="font_normal_body">维修结果</label>
192
+ <v-select class="select_list select"
193
+ placeholder='维修结果' style="width: 60%"
194
+ :value.sync="model.f_repaired" v-model="model.f_repaired"
195
+ :options='$parent.$parent.repaireds'
196
+ filer-key="name"
197
+ close-on-select clear-button
198
+ condition="f_repaired = '{}'"
199
+ :value-single="true">
200
+ </v-select>
201
+ </div>
202
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
203
+ <label class="font_normal_body">安检结果</label>
204
+ <v-select class="select_list select"
205
+ placeholder='安检结果' style="width: 60%"
206
+ :value.sync="model.f_check_result" v-model="model.f_check_result"
207
+ :options='$parent.$parent.checkresults'
208
+ filer-key="name"
209
+ close-on-select clear-button
210
+ condition="f_defect_content like'%{}%'"
211
+ :value-single="true">
212
+ </v-select>
213
+ </div>
214
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
215
+
216
+ <label class="font_normal_body">安检类型</label>
217
+ <v-select :value.sync="model.f_safecheck_type" v-model='model.f_safecheck_type'
218
+ :value-single="true" style="width: 60%"
219
+ class="select_list select"
220
+ :options='$parent.$parent.safecheck_type' placeholder='安检类型'
221
+ close-on-select
222
+ condition="f_safecheck_type = '{}'"></v-select>
223
+ </div>
224
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
225
+ <label class="font_normal_body">是否有改动</label>
226
+ <v-select class="select_list select"
227
+ placeholder='安检结果' style="width: 60%"
228
+ :value.sync="model.f_gaodong_flag" v-model="model.f_gaodong_flag"
229
+ :options='$parent.$parent.isdels'
230
+ filer-key="name"
231
+ close-on-select clear-button
232
+ condition="f_gaodong_flag = '{}'"
233
+ :value-single="true">
234
+ </v-select>
235
+ </div>
236
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
237
+ <label class="font_normal_body">气表状态</label>
238
+ <v-select :value.sync="model.f_table_state" v-model='model.f_table_state'
239
+ :value-single="true" style="width: 60%"
240
+ class="select_list select"
241
+ :options='$parent.$parent.table_state' placeholder='气表状态'
242
+ close-on-select
243
+ condition="f_table_state = '{}'"></v-select>
244
+ </div>
245
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
246
+ <label class="font_normal_body">审核状态</label>
247
+ <v-select :value.sync="model.f_approved" v-model='model.f_approved'
248
+ :value-single="true" style="width: 60%"
249
+ class="select_list select"
250
+ :options='$parent.$parent.review_status' placeholder='审核状态'
251
+ close-on-select
252
+ condition="f_approved= '{}'"></v-select>
253
+ </div>
254
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
255
+ <label class="font_normal_body">审核开始</label>
256
+ <datepicker
257
+ class="select_list select"
258
+ :value.sync="model.f_checksh_start"
259
+ placeholder='审核开始时间' style="width: 60%"
260
+ :disabled-days-of-week="[]"
261
+ :format="'yyyy-MM-dd'"
262
+ :show-rest-button="reset"
263
+ v-model="model.f_checksh_start"
264
+ condition="f_approved_time > ='{} 00:00:00'">
265
+ </datepicker>
266
+ </div>
267
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
268
+ <label class="font_normal_body">审核结束</label>
269
+ <datepicker
270
+ :value.sync="model.f_checksh_end"
271
+ placeholder='审核结束时间' style="width: 60%"
272
+ :disabled-days-of-week="[]"
273
+ :format="'yyyy-MM-dd'"
274
+ :show-rest-button="reset"
275
+ v-model="model.f_checksh_end"
276
+ condition="f_approved_time <= '{} 23:59:59'">
277
+ </datepicker>
278
+ </div>
279
+ <div class="form-group col-sm-2" v-if="$parent.$parent.criteriaShow">
280
+ <label class="font_normal_body">审&ensp;核&ensp;人</label>
281
+ <input type="text" class="input_search" v-model="model.f_approved_by"
282
+ style="width: 60%" placeholder="审核人" condition="f_approved_by like '%{}%'">
283
+ </div>
284
+ </div>
285
+ <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
286
+ <div slot="modal-header" class="modal-header">
287
+ <h4 class="modal-title">
288
+ 选择计划
289
+ </h4>
290
+ </div>
291
+ <div slot="modal-body" class="modal-body">
292
+ <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
293
+ </div>
294
+ <div slot="modal-footer" class="modal-footer" style="text-align: center;white-space: nowrap">
295
+ <button class="button_search" @click="$parent.$parent.ok">确认</button>
296
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
297
+ </div>
298
+ </modal>
299
+ </div>
300
+ </criteria>
301
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
302
+ <template partial='head'>
303
+ <tr>
304
+ <th>
305
+ <nobr>客户编号</nobr>
306
+ </th>
307
+ <th>
308
+ <nobr>客户名称</nobr>
309
+ </th>
310
+ <th>
311
+ <nobr>客户电话</nobr>
312
+ </th>
313
+ <th>
314
+ <nobr>客户类型</nobr>
315
+ </th>
316
+ <th>
317
+ <nobr>用户状态</nobr>
318
+ </th>
319
+ <th>
320
+ <nobr>小区</nobr>
321
+ </th>
322
+ <th>
323
+ <nobr>地址</nobr>
324
+ </th>
325
+ <th>
326
+ <nobr>码盘数</nobr>
327
+ </th>
328
+ <th>
329
+ <nobr>气量差值</nobr>
330
+ </th>
331
+ <th>
332
+ <nobr>剩余气量</nobr>
333
+ </th>
334
+ <th>
335
+ <nobr>波纹管数量</nobr>
336
+ </th>
337
+ <th>
338
+ <nobr>自闭阀数量</nobr>
339
+ </th>
340
+ <th>
341
+ <nobr>合同日期</nobr>
342
+ </th>
343
+ <th>
344
+ <nobr>表号</nobr>
345
+ </th>
346
+ <th>
347
+ <nobr>表品牌</nobr>
348
+ </th>
349
+ <th>
350
+ <nobr>表位置</nobr>
351
+ </th>
352
+ <th>
353
+ <nobr>左右表</nobr>
354
+ </th>
355
+ <th>
356
+ <nobr>表封号</nobr>
357
+ </th>
358
+ <th>
359
+ <nobr>气表状态</nobr>
360
+ </th>
361
+ <th>
362
+ <nobr>安检类型</nobr>
363
+ </th>
364
+ <th>
365
+ <nobr>安检结果</nobr>
366
+ </th>
367
+ <th>
368
+ <nobr>隐患详情</nobr>
369
+ </th>
370
+ <!-- <th>-->
371
+ <!-- <nobr>维修状态</nobr>-->
372
+ <!-- </th>-->
373
+ <!-- <th>-->
374
+ <!-- <nobr>维修人</nobr>-->
375
+ <!-- </th>-->
376
+ <!-- <th>-->
377
+ <!-- <nobr>维修时间</nobr>-->
378
+ <!-- </th>-->
379
+ <!-- <th>-->
380
+ <!-- <nobr>维修描述</nobr>-->
381
+ <!-- </th>-->
382
+
383
+ <th>
384
+ <nobr>备注</nobr>
385
+ </th>
386
+ <th>
387
+ <nobr>安检状态</nobr>
388
+ </th>
389
+ <th>
390
+ <nobr>安检计划</nobr>
391
+ </th>
392
+ <th>
393
+ <nobr>整改通知书</nobr>
394
+ </th>
395
+ <th>
396
+ <nobr>录音/照片</nobr>
397
+ </th>
398
+ <th>
399
+ <data-order field="f_offsite_time" name="安检时间"></data-order>
400
+ </th>
401
+ <th>
402
+ <nobr>安检员</nobr>
403
+ </th>
404
+ <th>
405
+ <nobr>审核状态</nobr>
406
+ </th>
407
+ <th>
408
+ <nobr>审核人</nobr>
409
+ </th>
410
+ <th>
411
+ <nobr>审核时间</nobr>
412
+ </th>
413
+ <th>
414
+ <nobr>操作</nobr>
415
+ </th>
416
+ <th v-if="$parent.$parent.$parent.audioshow">
417
+ <nobr>录音</nobr>
418
+ </th>
419
+ </tr>
420
+ </template>
421
+ <template partial='body'>
422
+ <td style="text-align: center;white-space: nowrap">{{ row.f_userinfo_code }}</td>
423
+ <td style="text-align: center;white-space: nowrap">{{ row.f_user_name }}</td>
424
+ <td style="text-align: center;white-space: nowrap">{{ row.f_user_phone }}</td>
425
+ <td style="text-align: center;white-space: nowrap">{{ row.f_check_type }}</td>
426
+ <td style="text-align: center;white-space: nowrap">{{ row.f_user_state }}</td>
427
+ <td style="text-align: center;white-space: nowrap">{{ row.f_residential_area }}</td>
428
+ <td style="text-align: center;white-space: nowrap">{{ row.f_address }}</td>
429
+ <td style="text-align: center;white-space: nowrap">{{ row.f_mapanshu }}</td>
430
+ <td style="text-align: center;white-space: nowrap"
431
+ @dblclick.stop="$parent.$parent.$parent.tochangeRemark(row)">{{ row.f_chazhi }}
432
+ </td>
433
+ <td style="text-align: center;white-space: nowrap">{{ row.f_shengyu_gas }}</td>
434
+ <td style="text-align: center;white-space: nowrap">{{ row.f_bowenguan }}</td>
435
+ <td style="text-align: center;white-space: nowrap">{{ row.f_zibifa }}</td>
436
+ <td style="text-align: center;white-space: nowrap">{{ row.f_contractdate }}</td>
437
+ <td style="text-align: center;white-space: nowrap">{{ row.f_meternumber }}</td>
438
+ <td style="text-align: center;white-space: nowrap">{{ row.f_meter_classify }}</td>
439
+ <td style="text-align: center;white-space: nowrap">{{ row.f_position }}</td>
440
+ <td style="text-align: center;white-space: nowrap">{{ row.f_aroundmeter }}</td>
441
+ <td style="text-align: center;white-space: nowrap">{{ row.f_metertitles }}</td>
442
+ <td style="text-align: center;white-space: nowrap">{{ row.f_table_state }}</td>
443
+ <td style="text-align: center;white-space: nowrap">{{ row.f_safecheck_type }}</td>
444
+ <td style="text-align: center;white-space: nowrap">{{ row.defect_content == '无隐患' ? '正常' : '有隐患' }}</td>
445
+ <td style="text-align: center;white-space: nowrap">{{ row.defect_content }}</td>
446
+ <!-- <td style="text-align: center;white-space: nowrap">{{ row.repaired}}</td>-->
447
+ <!-- <td style="text-align: center;white-space: nowrap">{{ row.f_repairman}}</td>-->
448
+ <!-- <td style="text-align: center;white-space: nowrap">{{ row.f_repair_date}}</td>-->
449
+ <!-- <td style="text-align: center;white-space: nowrap">{{ row.f_ratification_des}}</td>-->
450
+ <td style="text-align: center;white-space: nowrap">{{ row.f_repair_approved_note }}</td>
451
+ <td style="text-align: center;white-space: nowrap">{{ row.f_entry_status }}</td>
452
+ <td style="text-align: center;white-space: nowrap">{{ row.f_plan_name }}</td>
453
+ <!--整改通知书别名-->
454
+ <td style="text-align: center;white-space: nowrap">{{ row.f_rectification_notice }}</td>
455
+ <td style="text-align: center;white-space: nowrap"
456
+ v-if="row.f_entry_status=='到访不遇'|| row.f_entry_status=='拒检'">{{ row.f_downloadpath }}
457
+ </td>
458
+ <td style="text-align: center;white-space: nowrap" v-else></td>
459
+ <td style="text-align: center;white-space: nowrap">{{ row.f_offsite_time }}</td>
460
+ <td style="text-align: center;white-space: nowrap">{{ row.f_checker_name }}</td>
461
+ <td style="text-align: center;white-space: nowrap">{{ row.f_approved }}</td>
462
+ <td style="text-align: center;white-space: nowrap">{{ row.f_approved_by }}</td>
463
+ <td style="text-align: center;white-space: nowrap">{{ row.f_approved_time }}</td>
464
+ <td style="text-align: center;white-space: nowrap">
465
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
466
+ <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.del(row)' v-show="$parent.$parent.$parent.isdel=='否'">作废</button>-->
467
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.pass(row)'
468
+ v-show ="row.f_approved == '未审核'">通过
469
+ </button>
470
+ <button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
471
+ @click="$parent.$parent.$parent.print(row)">
472
+ 打印
473
+ </button>
474
+ </td>
475
+ <td style="text-align: center;white-space: nowrap" v-if="$parent.$parent.$parent.audioshow">
476
+ <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>-->
477
+ <audio controls="controls" v-if="row.f_recording1_path">
478
+ <source type="audio/mpeg" :src="'rs/audio/file/'+row.f_recording1_path">
479
+ </audio>
480
+ </td>
481
+ </template>
482
+ </data-grid>
483
+ </criteria-paged>
484
+ <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
485
+ </div>
486
+ <modal :show.sync="showModal2" :backdrop="false">
487
+ <div slot="modal-header" class="modal-header">
488
+ <h4 class="modal-title">
489
+ 用户{{ this.paperrow.f_user_name }}备注修改
490
+ </h4>
491
+ </div>
492
+ <div slot="modal-body" class="modal-body">
493
+ <div class="row" style="margin-top: 10px">
494
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备注</label>
495
+ <div class="col-xs-8 col-md-8">
496
+ <textarea class="form-control" type="text" v-model="paperRemark"></textarea>
497
+ </div>
498
+ </div>
499
+ </div>
500
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
501
+ <button class="button_search" @click="okshow">确认</button>
502
+ <button class="button_search" @click="cancelshow">取消</button>
503
+ </div>
504
+ </modal>
505
+ </div>
506
+ </template>
507
+
508
+ <script>
509
+ import {PagedList} from 'vue-client'
510
+ import Vue from 'vue'
511
+ import co from 'co'
512
+ import AppData from '../../../stores/AppData'
513
+ import * as Util from '../../Util'
514
+ import getNowDate from "../../../utils/getNowDate";
515
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
516
+ import BenzAMRRecorder from 'benz-amr-recorder'
517
+
518
+ //获取json配置文件
519
+ let asyncReady = async function (self) {
520
+ // 获取配置信息
521
+ try {
522
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
523
+ Vue.config = res.data
524
+ } catch (error) {
525
+ // 忽略704,文件找不到异常R
526
+ if (error.status !== 704) {
527
+ throw error
528
+ }
529
+ }
530
+ }
531
+
532
+ let select = function* (self) {
533
+ let http = new HttpResetClass()
534
+ let getGasman = yield http.load('POST', '/rs/search', {
535
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
536
+ userid: self.$login.f.id
537
+ }, {resolveMsg: null, rejectMsg: null})
538
+ ////tag
539
+ self.checkersid.push({label: '全部', value: ''})
540
+ getGasman.data.forEach((checker) => {
541
+ self.checkersid.push({label: checker.name, value: checker.id})
542
+ })
543
+ }
544
+
545
+ export default {
546
+ title: '安检结果查看',
547
+ data() {
548
+ let model = new PagedList('rs/sql/查找安检单', 20, {
549
+ f_plan_id: 'this.f_plan_id',
550
+ f_approved: 'this.f_approved',
551
+ f_entry_status: 'this.f_entry',
552
+ f_no_checkplan: 'this.f_no_checkplan',
553
+ f_filialeid: 'this.f_filialeid',
554
+ f_defect_content:'this.f_defect_content',
555
+ orderitem: "'f_offsite_time desc'"
556
+ })
557
+ model.f_plan_id = ''
558
+ model.f_approved = ''
559
+ model.f_entry = ''
560
+ model.f_no_checkplan = ''
561
+ model.f_filialeid = `('${this.$login.f.orgid}')`
562
+ model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
563
+ return {
564
+ showbusy:false,
565
+ audioshow: false,
566
+ paperRemark:'',
567
+ searchData: {
568
+ condition: "1=1",
569
+ orderitem: "f_offsite_time desc",
570
+ f_plan_id: "",
571
+ f_approved: '',
572
+ f_entry_status: '',
573
+ f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
574
+ f_no_checkplan: '',
575
+ f_filialeid: `('${this.$login.f.orgid}')`
576
+ },
577
+ model: model,
578
+ //searchData:searchData,
579
+ excelHeaders: {
580
+ 'f_userinfo_code': '客户编号',
581
+ 'f_user_name': '客户名称',
582
+ 'f_user_phone': '客户电话',
583
+ 'f_check_type': '客户类型',
584
+ 'f_user_state': '客户状态',
585
+ 'f_residential_area': '小区',
586
+ 'f_address': '地址',
587
+ 'f_mapanshu': '码盘数',
588
+ 'f_chazhi': '气量差值',
589
+ 'f_shengyu_gas':'剩余气量',
590
+ 'f_bowenguan':'波纹管数量',
591
+ 'f_zibifa':'自闭阀数量',
592
+ 'f_contractdate': '合同日期',
593
+ 'f_table_state': '气表状态',
594
+ 'f_meternumber': '表号',
595
+ 'f_meter_classify': '表品牌',
596
+ 'f_position': '表位置',
597
+ 'f_aroundmeter': '左右表',
598
+ 'f_metertitles': '表封号',
599
+ 'defect_content': '安检结果',
600
+ // 'repaired': '维修状态',
601
+ // 'f_repairman': '维修人',
602
+ // 'f_repair_date': '维修时间',
603
+ // 'f_ratification_des': '维修描述',
604
+ 'f_repair_approved_note': '备注',
605
+ 'f_plan_name':'计划名称',
606
+ 'f_rectification_notice':'整改通知书',
607
+ 'f_downloadpath':'录音/照片',
608
+ 'f_entry_status': '安检状态',
609
+ 'f_offsite_time': '安检时间',
610
+ 'f_checker_name': '安检员',
611
+ 'f_approved' : '审核状态',
612
+ 'f_approved_by' : '审核人',
613
+ 'f_approved_time':'审核时间'
614
+ },
615
+ fun: this.$login.f,
616
+ showModal2:false,
617
+ paperrow:{},
618
+ checkersid: [],
619
+ safetype: [
620
+ {label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')],
621
+ downloadpaths: [{label: '全部', value: ''},{label: '已上传', value: '已上传'},{label: '未上传', value: '未上传'}],
622
+ criteriaShow: false,
623
+ showModal: false,
624
+ table_state: [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')],
625
+ f_approval_states: this.$appdata.getParam('安检单审核状态'),
626
+ f_entry_status: [{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')],
627
+ user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
628
+ safecheck_type:[{label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')],
629
+ check_types:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')],
630
+ f_checkplans: this.$appdata.getParam('有无计划'),
631
+ showcheckmsg: false,
632
+ checkInfo: {},
633
+ orderDefault: "'f_offsite_time'",
634
+ orderFields: {
635
+ f_offsite_time: 'no'
636
+ },
637
+ sliceArea: [],
638
+ review_status:[{label: '全部', value: ''},{label: '待审核', value: '未审核'},{label: '正常', value: '通过'}],
639
+ isdels: [{label: '全部', value: ''},{label: '是', value: '是'},{label: '否', value: '否'}],
640
+ repaireds: [{label: '全部', value: ''},{label: '已修', value: '已修'},{label: '未修', value: '未修'}],
641
+ checkresults: [{label: '全部', value: ''},{label: '正常', value: '正常'},{label: '有隐患', value: '有隐患'}],
642
+ isdel: '否',
643
+ cbc: []
644
+ }
645
+ },
646
+ methods: {
647
+ tochangeRemark(row){
648
+ //tag
649
+ this.paperRemark=row.f_chazhi
650
+ this.paperrow=row
651
+ this.showModal2=true
652
+
653
+ },
654
+ okshow(){
655
+ let sql=`update t_check_paper set f_chazhi='${this.paperRemark}' where id='${this.paperrow.id}'`
656
+ //tag
657
+ new HttpResetClass().load('post','rs/logic/runSQL',{data:{sql:sql}},{resolveMsg:'修改成功',rejectMsg:'修改失败'}).then(res=>{
658
+ // this.$showMessage("修改成功")
659
+ let e = document.createEvent("MouseEvents");
660
+ e.initEvent("click", true, true);
661
+ document.getElementById("btnbbb").dispatchEvent(e);
662
+ this.showModal2=false
663
+ })
664
+
665
+ },
666
+ cancelshow(){
667
+ this.showModal2=false
668
+ },
669
+ pass(row) {
670
+ //判断当前登录人是否有审核权限
671
+ if(this.$appdata.getSingleValue('开启安检审核权限')=='是'){
672
+ if(!this.$login.r.includes('安检结果审核')){
673
+ //提示无审核权限
674
+ this.$showMessage('您无审核权限')
675
+ return
676
+ }
677
+ }
678
+ var reqdata = {
679
+ audit_result: '通过',
680
+ operator: "success",
681
+ audit_time: Util.getNowDate(),
682
+ user_name: this.$login.f.name,
683
+ id: row.id,
684
+ f_check_item_id: row.f_check_item_id
685
+ }
686
+ this.$showMessage('确认通过当前安检单吗?', ['confirm', 'cancel']).then((res) => {
687
+ if (res === 'confirm') {
688
+ this.$resetpost('/rs/logic/updateAafeAudit', {data: reqdata}).then((res) => {
689
+ //tag
690
+ if (res.data.code == 200) {
691
+ this.$showMessage('通过成功')
692
+ this.search()
693
+ } else {
694
+ this.$showMessage('通过失败!')
695
+ }
696
+ }).catch((e) => {
697
+ this.$showMessage(JSON.stringify(e) + '通过失败!')
698
+ })
699
+ }
700
+ })
701
+ },
702
+ del(row) {
703
+ //tag
704
+ this.$showMessage('确认作废当前安检单吗?', ['confirm', 'cancel']).then((res) => {
705
+ if (res === 'confirm') {
706
+ this.$resetpost('rs/logic/DelCheckPaper', {id:row.id}).then((res) => {
707
+ //tag
708
+ if(res.data.code == 200){
709
+ this.$showMessage('作废成功')
710
+ this.search()
711
+ }else {
712
+ this.$showMessage('作废失败!')
713
+ }
714
+ }).catch((e) => {
715
+ this.$showMessage(JSON.stringify(e) +'作废失败!')
716
+ })
717
+ }
718
+ })
719
+ },
720
+ showaudio() {
721
+ //tag
722
+ this.audioshow = !this.audioshow
723
+ //tag
724
+ },
725
+ getmeterbook(val) {
726
+ this.cbc = []
727
+ this.cbc.push({
728
+ label: '全部',
729
+ value: ''
730
+ })
731
+ if (val == '') {
732
+
733
+ this.cbcs.forEach(res => {
734
+ this.cbc.push({
735
+ label: res.f_book_name,
736
+ value: res.id
737
+ })
738
+ })
739
+ } else {
740
+ this.cbcs.forEach(res => {
741
+ if (res.f_book_slice_area == val) {
742
+ this.cbc.push({
743
+ label: res.f_book_name,
744
+ value: res.id
745
+ })
746
+ }
747
+ })
748
+ }
749
+ },
750
+ Mreadibook(val) {
751
+ ////tag
752
+ ////tag
753
+ this.sliceArea = []
754
+ if (val) {
755
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
756
+ data: {
757
+ items: 'name',
758
+ tablename: 't_zone',
759
+ condition: `parentid in ${val}`,
760
+ orderitem: 'id'
761
+ }
762
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
763
+ this.sliceArea.push({
764
+ label: '全部',
765
+ value: ''
766
+ })
767
+ res.data.forEach(ress => {
768
+ this.sliceArea.push({
769
+ label: ress.name,
770
+ value: ress.name
771
+ })
772
+ })
773
+
774
+ })
775
+ }
776
+ },
777
+ getAllMeterBook(val) {
778
+ ////tag
779
+ ////tag
780
+ this.cbcs = []
781
+ if (val) {
782
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
783
+ data: {
784
+ items: 'f_book_name,f_book_slice_area,id',
785
+ tablename: 't_meter_book',
786
+ condition: `f_filiale_id in ${val}`,
787
+ orderitem: 'id'
788
+ }
789
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
790
+ res.data.forEach(ress => {
791
+ this.cbcs.push({
792
+ id: ress.id,
793
+ f_book_name: ress.f_book_name,
794
+ f_book_slice_area: ress.f_book_slice_area
795
+ })
796
+ })
797
+ this.cbc = []
798
+ this.cbc.push({
799
+ label: '全部',
800
+ value: ''
801
+ })
802
+ this.cbcs.forEach(res => {
803
+ this.cbc.push({
804
+ label: res.f_book_name,
805
+ value: res.id
806
+ })
807
+ })
808
+ })
809
+ }
810
+ },
811
+ getRes(obj) {
812
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids);
813
+ this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
814
+ this.Mreadibook(this.model.f_filialeid)
815
+ this.getAllMeterBook(this.model.f_filialeid)
816
+ //this.$refs.paged.$refs.criteria.search()
817
+ },
818
+
819
+ change(row) {
820
+ // Vue.$login = {jwt: row.f_checker_id}
821
+ asyncReady(this).then(() => {
822
+ ////tag)
823
+ row.f_upload_state = '已传'
824
+ this.$goto('new-check-paper', {
825
+ f_plan_id: row.f_check_plan_id,
826
+ item: row,
827
+ role: 'view',
828
+ isdel: this.isdel
829
+ }, 'self')
830
+ }).catch(
831
+ (respanse) => {
832
+ alert('获取配置文件失败')
833
+ })
834
+ },
835
+ readConfig() {
836
+ let gen = asyncReady(this)
837
+ return co(gen)
838
+ },
839
+ showChooser() {
840
+ this.showModal = true
841
+ },
842
+ hidden() {
843
+ this.criteriaShow = !this.criteriaShow
844
+ },
845
+ refresh() {
846
+ this.$refs.paged.$refs.criteria.search()
847
+ },
848
+ ok() {
849
+ this.showModal = false
850
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
851
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
852
+ this.model.f_check_plan = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
853
+ }
854
+ },
855
+ cancel() {
856
+ this.showModal = false
857
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
858
+ this.model.f_plan_id = ''
859
+ },
860
+ print(row) {
861
+ this.showcheckmsg = true
862
+ this.checkInfo = row
863
+ },
864
+ sort(field, rule) {
865
+ // 将所有排序方式设为不排序,实现相互排斥
866
+ for (let key in this.orderFields) {
867
+ if (key === field) {
868
+ this.orderFields[key] = rule
869
+ } else {
870
+ this.orderFields[key] = 'no'
871
+ }
872
+ }
873
+ // 如果新规则不排序,还原为默认排序
874
+ if (rule === 'no') {
875
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
876
+ } else {
877
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
878
+ }
879
+ this.search()
880
+ },
881
+ search() {
882
+ this.$refs.paged.$refs.criteria.search()
883
+ },
884
+ selfSearch(args) {
885
+ ////tag
886
+ //args.condition+=" and f_check_type='民用'"
887
+ //tag
888
+ // //tag
889
+ if (this.$refs.paged.$refs.criteria.model.f_is_delete == '是') {
890
+ //tag
891
+ this.isdel = ''
892
+ this.model.url = 'rs/sql/QueryDelCheckPaper'
893
+
894
+ } else {
895
+ //tag
896
+ this.isdel = '否'
897
+ this.model.url = 'rs/sql/查找安检单'
898
+ }
899
+ // if (args.condition.indexOf('f_table_state') == -1){
900
+ // args.condition += " and f_table_state = '正常'"
901
+ // }
902
+ this.model.search(args.condition, args.model, args.condValue)
903
+ }
904
+ },
905
+
906
+ ready() {
907
+ ////tag
908
+ this.function = this.f
909
+ ////tag
910
+
911
+ let gen = select(this)
912
+ //this.pianqu()
913
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
914
+ co(gen)
915
+ },
916
+ watch: {
917
+ 'model.f_no_checkplan'(val) {
918
+ if (this.model.f_no_checkplan) {
919
+ this.searchData.f_no_checkplan = val
920
+ }
921
+ if (this.model.f_no_checkplan == '有计划安检') {
922
+
923
+ this.showChooser()
924
+ }
925
+ },
926
+ 'model.condition'(val) {
927
+ if (val) {
928
+ this.searchData.condition = val
929
+ }
930
+
931
+ },
932
+ 'model.f_entry'(val) {
933
+ if (val) {
934
+ this.searchData.f_entry_status = val
935
+ }
936
+ },
937
+ 'model.f_plan_id'(val) {
938
+ if (val) {
939
+ this.searchData.f_plan_id = val
940
+ }
941
+ },
942
+ 'model.f_slice_area'(val) {
943
+ if (val) {
944
+
945
+ }
946
+ },
947
+ 'model.f_approved'(val) {
948
+ if (val) {
949
+ this.searchData.f_approved = val
950
+ }
951
+ },
952
+ }
953
+
954
+ }
955
+ </script>