safecheck-client 3.0.34-20 → 3.0.34-22

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,928 +1,928 @@
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">小&emsp;&emsp;区</label>
25
- <input type="text" class="input_search" v-model="model.f_residential_area"
26
- style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
27
- </div>
28
- <div class="form-group col-sm-4" style="display: flex; gap: 15px">
29
- <export-excel-safe :data="$parent.$parent.searchData"
30
- :field="$parent.$parent.excelHeaders"
31
- progress="safeGetExportProgress"
32
- sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails" template-name='安检隐患明细'></export-excel-safe>
33
- <button class="button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">隐藏</button>
34
- <button class="button_search" @click="$parent.$parent.toRepair" v-if="$parent.$parent.canToRepair == '是'">转维修</button>
35
- <button class="button_search" @click="search()">查询</button>
36
- <div class="button_spacing"
37
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
38
- @click="$parent.$parent.hidden()"></div>
39
- </div>
40
-
41
- </div>
42
- <div class="row">
43
- <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
44
- <role-selector-safe
45
- role-name="安检员"
46
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
47
- @re-res="$parent.$parent.getRes"
48
- :value.sync="model.f_checker_id"
49
- v-model="model.f_checker_id"
50
- :value-multiple="true"
51
- :value-close="false"
52
- condition="f_checker_name in {}">
53
- </role-selector-safe>
54
- </div>
55
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
56
- <label class="font_normal_body">检&ensp;查&ensp;项</label>
57
- <v-select :value.sync="model.f_device_type"
58
- v-model="model.f_device_type"
59
- style="width: 60%"
60
- class="select_list select"
61
- :options='$parent.$parent.device_types'
62
- placeholder='检查项'
63
- :multiple="true"
64
- condition="f_device_type in {}"></v-select>
65
- <!--<input type="text" class="input_search" v-model="model.f_device_type"-->
66
- <!--style="width: 60%" placeholder="检&ensp;查&ensp;项" condition="f_device_type like '%{}%'">-->
67
- </div>
68
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
69
- <label class="font_normal_body">隐患原因</label>
70
- <v-select :value.sync="model.f_item_name"
71
- v-model='model.f_item_name'
72
- style="width: 60%"
73
- class="select_list select"
74
- :options='$parent.$parent.DefectConfigs'
75
- placeholder='隐患原因'
76
- :multiple="true"
77
- condition="f_item_name in {}"></v-select>
78
- </div>
79
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
80
- <label class="font_normal_body">安检起始</label>
81
- <datepicker
82
- class="select_list select"
83
- :value.sync="model.f_check_start"
84
- placeholder='安检起始时间' style="width: 60%"
85
- :disabled-days-of-week="[]"
86
- :format="'yyyy-MM-dd'"
87
- :show-rest-button="reset"
88
- v-model="model.f_check_start"
89
- condition="f_offsite_time > ='{} 00:00:00'">
90
- </datepicker>
91
- </div>
92
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
93
- <label class="font_normal_body">安检结束</label>
94
- <datepicker
95
- class="select_list select"
96
- :value.sync="model.f_check_end"
97
- placeholder='安检结束时间' style="width: 60%"
98
- :disabled-days-of-week="[]"
99
- :format="'yyyy-MM-dd'"
100
- :show-rest-button="reset"
101
- v-model="model.f_check_end"
102
- condition="f_offsite_time <= '{} 23:59:59'">
103
- </datepicker>
104
- </div>
105
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
106
- <label class="font_normal_body">用户类型</label>
107
- <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
108
- :value-single="true" style="width: 60%"
109
- class="select_list select"
110
- :options='$parent.$parent.f_check_type' placeholder='请选择'
111
- close-on-select
112
- condition="f_check_type = '{}'"></v-select>
113
- </div>
114
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
115
- <label class="font_normal_body">处理方式</label>
116
- <v-select :value.sync="model.f_deal_dispose"
117
- v-model='model.f_deal_dispose'
118
- style="width: 60%"
119
- class="select_list select"
120
- :options='$parent.$parent.deal_dispose' placeholder='请选择'
121
- :multiple="true"
122
- condition="f_deal_dispose in {}"></v-select>
123
- </div>
124
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
125
- <label class="font_normal_body">详细地址</label>
126
- <input type="text" class="input_search" v-model="model.f_address"
127
- style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
128
- </div>
129
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
130
- <label class="font_normal_body">隐患状态</label>
131
- <v-select :value.sync="model.f_is_repaired"
132
- v-model='model.f_is_repaired'
133
- style="width: 60%"
134
- class="select_list select"
135
- :options='$parent.$parent.repairStateOptions' placeholder='请选择'
136
- :multiple="true"
137
- condition="f_is_repaired in {}"></v-select>
138
- </div>
139
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
140
- <label class="font_normal_body">处理人</label>
141
- <input type="text" class="input_search" v-model="model.f_repairman"
142
- style="width: 60%" placeholder="处理人" condition="f_repairman = '{}'">
143
- </div>
144
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
145
- <label for="startDate" class="font_normal_body">处理时间:</label>
146
- <datepicker id="startDate" placeholder="处理开始日期"
147
- style="width: 60%!important;"
148
- v-model="model.sq_startDate"
149
- :value.sync="model.sq_startDate"
150
- :format="'yyyy-MM-dd 00:00:00'"
151
- :show-reset-button="true"
152
- condition="f_repair_date >= '{}'">
153
- </datepicker>
154
- </div>
155
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
156
- <label for="endDate" class="font_normal_body">处理时间:</label>
157
- <datepicker id="endDate" placeholder="处理结束日期"
158
- style="width: 60%!important;"
159
- v-model="model.sq_endDate"
160
- :value.sync="model.sq_endDate"
161
- :format="'yyyy-MM-dd 23:59:59'"
162
- :show-reset-button="true"
163
- condition="f_repair_date<= '{}'">
164
- </datepicker>
165
- </div>
166
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
167
- <label class="font_normal_body">开户时间</label>
168
- <datepicker
169
- :value.sync="model.f_check_gasstart"
170
- placeholder='开始时间' style="width: 60%"
171
- :format="'yyyy-MM-dd'"
172
- :show-rest-button="true"
173
- v-model="model.f_check_gasstart"
174
- condition="f_gas_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_check_gasend"
181
- placeholder='结束时间' style="width: 60%"
182
- :format="'yyyy-MM-dd'"
183
- :show-rest-button="true"
184
- v-model="model.f_check_gasend"
185
- condition="f_gas_date <= '{} 23:59:59'">
186
- </datepicker>
187
- </div>
188
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
189
- <label class="font_normal_body">用户标签</label>
190
- <v-select class="select_list select"
191
- placeholder='请选择' style="width: 60%"
192
- :value.sync="model.f_user_tags"
193
- v-model="model.f_user_tags"
194
- :options='$parent.$parent.userTags'
195
- filer-key="name"
196
- condition="f_user_tags in {}"
197
- :multiple="true">
198
- </v-select>
199
- </div>
200
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
201
- <label class="font_normal_body">用气类型</label>
202
- <v-select class="select_list select"
203
- placeholder='请选择' style="width: 60%"
204
- :value.sync="model.f_user_gas_type"
205
- v-model="model.f_user_gas_type"
206
- :options='$parent.$parent.userGasType'
207
- filer-key="name"
208
- condition="f_user_gas_type in {}"
209
- :multiple="true">
210
- </v-select>
211
- </div>
212
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
213
- <label class="font_normal_body">用气性质</label>
214
- <v-select class="select_list select"
215
- placeholder='请选择' style="width: 60%"
216
- :value.sync="model.f_gasproperties"
217
- v-model="model.f_gasproperties"
218
- :options='$parent.$parent.gasproperties'
219
- filer-key="name"
220
- close-on-select clear-button
221
- condition="f_gasproperties = '{}'"
222
- :value-single="true">
223
- </v-select>
224
- </div>
225
-
226
- </div>
227
- <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
228
- <div slot="modal-header" class="modal-header">
229
- <h4 class="modal-title">
230
- 选择计划
231
- </h4>
232
- </div>
233
- <div slot="modal-body" class="modal-body">
234
- <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
235
- </div>
236
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
237
- <button class="button_search" @click="$parent.$parent.ok">确认</button>
238
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
239
- </div>
240
- </modal>
241
- </div>
242
- </criteria>
243
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
244
- <template partial='head'>
245
- <tr>
246
- <th v-if="$parent.$parent.$parent.canToRepair=='是'"><nobr>选择</nobr></th>
247
- <th>
248
- <nobr>检查项</nobr>
249
- </th>
250
- <th>
251
- <nobr>隐患原因</nobr>
252
- </th>
253
- <th>
254
- <nobr>隐患级别</nobr>
255
- </th>
256
- <th>
257
- <nobr>客户编号</nobr>
258
- </th>
259
- <th>
260
- <nobr>客户名称</nobr>
261
- </th>
262
- <th>
263
- <nobr>客户电话</nobr>
264
- </th>
265
- <th>
266
- <nobr>客户小区</nobr>
267
- </th>
268
- <th>
269
- <nobr>用户标签</nobr>
270
- </th>
271
- <th>
272
- <nobr>用气类型</nobr>
273
- </th>
274
- <th>
275
- <data-order field="f_address" name="客户地址"></data-order>
276
- </th>
277
-
278
- <th>
279
- <data-order field="f_offsite_time" name="安检时间"></data-order>
280
- </th>
281
- <th>
282
- <nobr>安检员</nobr>
283
- </th>
284
- <th>
285
- <nobr>隐患状态</nobr>
286
- </th>
287
- <th>
288
- <nobr>处理人</nobr>
289
- </th>
290
- <th>
291
- <nobr>处理方式</nobr>
292
- </th>
293
- <th>
294
- <nobr>处理时间</nobr>
295
- </th>
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
- </tr>
309
- </template>
310
- <template partial='body'>
311
- <td v-if="$parent.$parent.$parent.canToRepair=='是'" style="text-align: center;white-space:nowrap;"><input type="checkbox" v-if="['用户自行整改', '现场已处理', '维修已处理', '转维修'].indexOf(row.f_is_repaired) == -1" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row)" @change="$parent.$parent.$parent.setCheckes(row)"></input></td>
312
- <td style="text-align: center">{{row.f_device_type}}</td>
313
- <td style="text-align: center">{{row.f_item_name}}</td>
314
- <td style="text-align: center">{{row.f_defect_level}}</td>
315
- <td style="text-align: center">{{row.f_userinfo_code}}</td>
316
- <td style="text-align: center">{{row.f_user_name}}</td>
317
- <td style="text-align: center">{{row.f_user_phone}}</td>
318
- <td style="text-align: center">{{row.f_residential_area}}</td>
319
- <td style="text-align: center">{{ row.f_user_tags }}</td>
320
- <td style="text-align: center">{{ row.f_user_gas_type }}</td>
321
- <td style="text-align: center">{{row.f_address}}</td>
322
- <td style="text-align: center">{{row.f_offsite_time}}</td>
323
- <td style="text-align: center">{{row.f_checker_name}}</td>
324
- <td style="text-align: center">{{row.f_is_repaired}}</td>
325
- <td style="text-align: center">{{row.f_repairman}}</td>
326
- <td style="text-align: center">{{row.f_deal_dispose}}</td>
327
- <td style="text-align: center">{{row.f_repair_date}}</td>
328
- <td style="text-align: center">{{row.f_service_id}}</td>
329
- <td style="text-align: center">{{row.f_handlingtype}}</td>
330
- <td style="text-align: center">{{row.f_order_man}}</td>
331
- <td style="text-align: center">{{row.f_gasproperties}}</td>
332
- </template>
333
- </data-grid>
334
- </criteria-paged>
335
- <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
336
- <modal :show.sync="showModal2" :backdrop="false">
337
- <div slot="modal-header" class="modal-header">
338
- <h4 class="modal-title">
339
- 转维修
340
- </h4>
341
- </div>
342
- <div slot="modal-body" class="modal-body">
343
- <div v-if="true">
344
- <div>
345
-
346
- </div>
347
- <!-- <div v-for="(index, item) in dangerGroup">-->
348
-
349
- <!-- </div>-->
350
- <div class="row" style="margin-top: 10px">
351
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
352
- <div class="col-xs-8 col-md-8">
353
- <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
354
- :options='dispatchTypeOptions' placeholder='派发类型'
355
- close-on-select>
356
- </v-select>
357
- </div>
358
- </div>
359
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
360
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
361
- <div class="col-xs-8 col-md-8">
362
- <v-select
363
- :value.sync="selectData.f_repairman"
364
- :value-single="true"
365
- :options='repairers'
366
- placeholder='请选择维修员'
367
- close-on-select></v-select>
368
- </div>
369
- </div>
370
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
371
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
372
- <div class="col-xs-8 col-md-8">
373
- <right-tree
374
- islist
375
- :userid="userid"
376
- :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
377
- @re-res="getSiteRes"></right-tree>
378
- </div>
379
- </div>
380
- <div class="row" style="margin-top: 10px">
381
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
382
- <div class="col-xs-8 col-md-8">
383
- <v-select :value.sync="selectData.f_repairtype" style="width:60%"
384
- class="select select_list"
385
- :value-single="true"
386
- :options='repairTypeOptions'
387
- close-on-select>
388
- </v-select>
389
- </div>
390
- </div>
391
- <div class="row" style="margin-top: 10px">
392
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
393
- <div class="col-xs-8 col-md-8">
394
- <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
395
- </div>
396
- </div>
397
- </div>
398
- </div>
399
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
400
- <button class="button_search" @click="rectification">转维修</button>
401
- <button class="button_search" @click="cancel1">取消</button>
402
- </div>
403
- </modal>
404
- <modal :show.sync="showModal3">
405
- <div slot="modal-header" class="modal-header">
406
- <h4 class="modal-title">
407
- 转维修进度{{ progressbarWidth }}%
408
- </h4>
409
- </div>
410
- <div slot="modal-body" class="modal-body">
411
- <div class="progress">
412
- <div class="progress-bar" role="progressbar" aria-valuenow="60"
413
- aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
414
- </div>
415
- </div>
416
- </div>
417
- <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
418
- </modal>
419
- </div>
420
- </div>
421
- </template>
422
-
423
- <script>
424
- import {PagedList} from 'vue-client'
425
- import Vue from 'vue'
426
- import co from 'co'
427
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
428
- //获取json配置文件
429
- let asyncReady = async function (self) {
430
- // 获取配置信息
431
- try {
432
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
433
- Vue.config = res.data
434
- self.getDeviceTypes(res.data)
435
- } catch (error) {
436
- // 忽略704,文件找不到异常R
437
- if (error.status !== 704) {
438
- throw error
439
- }
440
- }
441
- }
442
-
443
- let select = function* (self) {
444
- let http = new HttpResetClass()
445
- let getGasman = yield http.load('POST', '/rs/search', {
446
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
447
- userid: self.$login.f.id
448
- }, {resolveMsg: null, rejectMsg: null})
449
- ////tag
450
- self.checkersid.push({label: '全部', value: ''})
451
- getGasman.data.forEach((checker) => {
452
- self.checkersid.push({label: checker.name, value: checker.id})
453
- })
454
- }
455
-
456
- export default {
457
- title: '隐患明细查看',
458
- data() {
459
- let model = new PagedList('rs/sql/defectDetails', 20,{
460
- f_filialeid: 'this.f_filialeid'
461
- })
462
- model.f_plan_id = ''
463
- model.f_approved = ''
464
- model.f_entry = ''
465
- model.f_no_checkplan = ''
466
- model.f_check_type=''
467
- model.f_filialeid = `('${this.$login.f.orgid}')`
468
- return {
469
- audioshow:false,
470
- userTags:[{label: '全部', value: ''},...this.$appdata.getParam('用户标签')],
471
- userGasType:[{label: '全部', value: ''},...this.$appdata.getParam('用气类型')],
472
- model: model,
473
- deal_dispose:[{label:'全部',value:''},{label:'报修',value:'报修'},{label:'现场整改',value:'现场整改'},{label:'自行处理',value:'自行处理'},{label:'未处理',value:'未处理'}],
474
- repairStateOptions: this.getSafeParam('隐患状态'),
475
- //searchData:searchData,
476
- excelHeaders: {
477
- 'f_device_type': '检查项',
478
- 'f_item_name': '隐患名称',
479
- 'f_userinfo_code': '客户编号',
480
- 'f_user_name': '客户姓名',
481
- 'f_user_phone': '客户电话',
482
- 'f_residential_area': '小区',
483
- 'f_address': '客户地址',
484
- 'f_offsite_time': '安检时间',
485
- 'f_checker_name': '安检员',
486
- 'f_deal_dispose': '处理方式',
487
- 'f_is_repaired': '隐患状态',
488
- 'f_repairman':'处理人',
489
- 'f_gasproperties':'用气性质',
490
- 'f_repair_date':'处理时间'
491
- },
492
- fun: this.$login.f,
493
- checkersid: [],
494
- safetype: this.getSafeParam('安检类型'),
495
- criteriaShow: false,
496
- showModal: false,
497
- f_approval_states: this.getSafeParam('安检单审核状态'),
498
- f_entry_status:this.getSafeParam('安检状态'),
499
- f_checkplans: this.getSafeParam('有无计划'),
500
- showcheckmsg: false,
501
- checkInfo: {},
502
- orderDefault: "'f_offsite_time'",
503
- orderFields: {
504
- f_offsite_time: 'no'
505
- },
506
- sliceArea: [],
507
- cbc:[],
508
- DefectConfig:'' ,
509
- gasproperties:this.$appdata.getParam('用气性质') ? [{
510
- label: '全部',
511
- value: ''
512
- }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}],
513
- DefectConfigs:[{label:'全部',value:''},{label: '金额异常差值', value: '金额异常差值'},{label: '气量异常差值', value: '气量异常差值'}],
514
- device_types:[{label:'全部',value:''}],
515
- f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
516
- showModal2: false,
517
- selectData:{
518
- dispatchType:'',
519
- f_repairman:'',
520
- f_remarks:'',
521
- f_repairtype:''
522
- },
523
- repairers: [],
524
- repairTypeOptions:this.$appdata.getParam('报修类型'),
525
- dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
526
- dangerGroups: [],
527
- showModal3: false,
528
- progressbarWidth:'0',
529
- canToRepair: this.$appdata.getSingleValue('隐患明细转维修'),
530
- checkes: []
531
- }
532
- },
533
- computed :{
534
- searchData() {
535
- return {condition: this.model.condition}
536
- }
537
- },
538
- methods: {
539
- getDeviceTypes(val) {
540
- try {
541
- if (val.safecheck.DevicesSetConfig != undefined) {
542
- this.DefectConfig = val.safecheck.DevicesConfig
543
- for (var Key1 in this.DefectConfig) {
544
- this.device_types.push({label: Key1, value: Key1})
545
- }
546
- }
547
- } catch (e) {
548
- }
549
- },
550
- async getDefectInfoConfig() {
551
- var resData = await new HttpResetClass().load('POST', '/rs/sql/tel_singleTable_GroupBy', {data: {
552
- items: 'f_item_name',
553
- tablename: 't_devices_items',
554
- condition: "f_is_defect = 'true'",
555
- groupitem: 'f_item_name',
556
- }}, {
557
- warnMsg: null,
558
- resolveMsg: null
559
- })
560
- if (resData.data) {
561
- for (let i = 0; i < resData.data.length; i++) {
562
- this.DefectConfigs.push({label: resData.data[i].f_item_name, value: resData.data[i].f_item_name})
563
- }
564
- }
565
- },
566
- isChecked(row) {
567
- return this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id) != -1
568
- },
569
- setCheckes(row) {
570
- let index=this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id)
571
- if(index<0){
572
- this.checkes.push(row)
573
- }else{
574
- this.checkes.splice(index,1)
575
- }
576
- console.log('this.checkes=', JSON.stringify(this.checkes))
577
- },
578
- toRepair(){
579
- console.log('this.checkes=', JSON.stringify(this.checkes))
580
- if(this.checkes.length==0){
581
- return this.$showMessage('请先选择需要转维修的隐患!')
582
- }
583
-
584
- const dangerGroups = []
585
- for (const danger of this.checkes) {
586
- let i = dangerGroups.findIndex(dangerGroup => dangerGroup.f_userinfo_code === danger.f_userinfo_code)
587
- if (i == -1){
588
- dangerGroups.push({
589
- f_userinfo_code: danger.f_userinfo_code,
590
- dangers: []
591
- })
592
- i = dangerGroups.length - 1
593
- }
594
- dangerGroups[i].dangers.push(danger)
595
- }
596
- this.dangerGroups = dangerGroups
597
- console.log('this.dangerGroups=', JSON.stringify(this.dangerGroups))
598
- this.showModal2=true
599
- },
600
- getEmp() {
601
- let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
602
- let http = new HttpResetClass()
603
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
604
- if (res.data.length == 0){
605
- this.repairers= []
606
- return
607
- }
608
- let str=``
609
- res.data.forEach((item,idx,arr) => {
610
- if(idx+1==arr.length){
611
- str += item.id
612
- }else{
613
- str += item.id+`','`
614
- }
615
- })
616
- let http1 = new HttpResetClass()
617
- http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
618
- data: {
619
- items: 'id,f_user_telephone',
620
- tablename: 't_user',
621
- condition: `id in ('${str}')`,
622
- orderitem: 'id'
623
- }
624
- }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
625
- res.data.forEach((user)=>{
626
- try {
627
- ress.data.forEach((tel,tidx,arr)=>{
628
- if(user.id==tel.id){
629
- this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
630
- ress.data.splice(tidx,1)
631
- }
632
- })
633
- }catch (e) {
634
- }
635
- })
636
- }).catch(error=>{
637
- res.data.forEach((user)=>{
638
- this.repairers.push({label: user.name, value: user.name})
639
- })
640
- })
641
-
642
- })
643
- },
644
- getSiteRes(obj) {
645
- console.log('siteRes ---> ')
646
- console.log(obj)
647
- if(obj.resids[0]){
648
- this.selectData.f_meetunit = obj.res.join('.')
649
- this.selectData.f_reciever = obj.resids.join('.')
650
- this.selectData.f_outlets = obj.res[obj.res.length - 1]
651
- }else {
652
- this.selectData.f_meetunit = ''
653
- this.selectData.f_reciever = ''
654
- this.selectData.f_outlets = ''
655
- }
656
- },
657
- cancel1(){
658
- this.showModal2=false
659
- this.selectData={
660
- dispatchType:'',
661
- f_repairman:'',
662
- f_remarks:'',
663
- f_repairtype:''
664
- }
665
- },
666
- async rectification(){
667
- if(this.selectData.dispatchType){
668
- if(this.selectData.dispatchType=='派发给站点'){
669
- if(!this.selectData.f_reciever){
670
- this.$showMessage('请选择部门!')
671
- return
672
- }
673
- }else{
674
- if(!this.selectData.f_repairman){
675
- this.$showMessage('请选择维修员!')
676
- return
677
- }
678
- }
679
- }else {
680
- this.$showMessage('请选择派发类型!')
681
- return
682
- }
683
-
684
- if(!this.selectData.f_repairtype){
685
- this.$showMessage('请选择报修类型!')
686
- return
687
- }
688
- this.showModal3=true
689
- let act={}
690
- let toRepair=''
691
- let successCount=0
692
- if(this.selectData.dispatchType=='派发给站点'){
693
- act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
694
- toRepair=null
695
- }else{
696
- console.log('派发给维修员---------'+this.selectData.f_repairman)
697
- act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
698
- toRepair='一级派单'
699
- }
700
- let rep={
701
- loginUser: {
702
- name: this.$login.f.name,
703
- ename: this.$login.f.ename
704
- },
705
- f_meetunit: this.$login.f.deps,
706
- f_attendant: this.$login.f.name,
707
- f_outlets: this.$login.f.deps,
708
- f_remarks: this.selectData.f_remarks,
709
- f_repairtype: this.selectData.f_repairtype,
710
- toRepair: toRepair,
711
- activity:act
712
- }
713
- for(let i=0; i<this.dangerGroups.length; i++){
714
- let defectIdStr = ''
715
- const defectIds = []
716
- for (let j = 0; j < this.dangerGroups[i].dangers.length; j++) {
717
- defectIds.push(`'${this.dangerGroups[i].dangers[j].f_defect_id}'`)
718
- }
719
- defectIdStr = `(${defectIds.join(',')})`
720
- const data = {
721
- id:this.dangerGroups[i].dangers[0].f_paper_id,
722
- repData:rep,
723
- source:'pc',
724
- defectIdStr: defectIdStr
725
- }
726
- console.log('data=', JSON.stringify(data))
727
- try {
728
- let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', data, {resolveMsg: null, rejectMsg: null})
729
- if (result.data.code==200) {
730
- successCount += result.data.successcon
731
- this.progressbarWidth=Math.ceil((i+1)*100/(this.dangerGroups.length))
732
- }
733
- }catch (e) {
734
- this.showModal3=false
735
- this.$showMessage('网络异常,请稍后再试!')
736
- return
737
- }
738
- }
739
- this.showModal3=false
740
- this.cancel1()
741
- this.$showMessage('本次转维修成功'+successCount+'单')
742
- },
743
- showaudio(){
744
- //tag
745
- this.audioshow=!this.audioshow
746
- //tag
747
- },
748
- getmeterbook(val){
749
- this.cbc=[]
750
- this.cbc.push({
751
- label:'全部',
752
- value:''
753
- })
754
- if (val==''){
755
-
756
- this.cbcs.forEach(res=>{
757
- this.cbc.push({
758
- label:res.f_book_name,
759
- value:res.id
760
- })
761
- })
762
- }else{
763
- this.cbcs.forEach(res=>{
764
- if (res.f_book_slice_area==val){
765
- this.cbc.push({
766
- label:res.f_book_name,
767
- value:res.id
768
- })
769
- }
770
- })
771
- }
772
- },
773
- getSafeParam(val){
774
- if(this.$appdata.getParam(val)){
775
- return [{label: '全部', value: ''}, ...this.$appdata.getParam(val)]
776
- }else{
777
- return [{label: '全部', value: ''}]
778
- }
779
-
780
- },
781
- Mreadibook(val){
782
- ////tag
783
- ////tag
784
- this.sliceArea=[]
785
- if (val){
786
- new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
787
- items: 'name',
788
- tablename: 't_zone',
789
- condition: `parentid in ${val}`,
790
- orderitem: 'id'
791
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
792
- this.sliceArea.push({
793
- label:'全部',
794
- value:''
795
- })
796
- res.data.forEach(ress=>{
797
- this.sliceArea.push({
798
- label:ress.name,
799
- value:ress.name
800
- })
801
- })
802
-
803
- })
804
- }
805
- },
806
- getAllMeterBook(val){
807
- ////tag
808
- ////tag
809
- this.cbcs=[]
810
- if (val){
811
- new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
812
- items: 'f_book_name,f_book_slice_area,id',
813
- tablename: 't_meter_book',
814
- condition: `f_filiale_id in ${val}`,
815
- orderitem: 'id'
816
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
817
- res.data.forEach(ress=>{
818
- this.cbcs.push({
819
- id:ress.id,
820
- f_book_name:ress.f_book_name,
821
- f_book_slice_area:ress.f_book_slice_area
822
- })
823
- })
824
- this.cbc=[]
825
- this.cbc.push({
826
- label:'全部',
827
- value:''
828
- })
829
- this.cbcs.forEach(res=>{
830
- this.cbc.push({
831
- label:res.f_book_name,
832
- value:res.id
833
- })
834
- })
835
- })
836
- }
837
- },
838
- getRes(obj) {
839
- this.model.f_filialeid = this.$login.convertToIn(obj.resids);
840
- this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
841
- this.Mreadibook(this.model.f_filialeid)
842
- this.getAllMeterBook(this.model.f_filialeid)
843
- //this.$refs.paged.$refs.criteria.search()
844
- },
845
-
846
- change(row) {
847
- // Vue.$login = {jwt: row.f_checker_id}
848
- asyncReady(this).then(() => {
849
- ////tag)
850
- row.f_upload_state = '已传'
851
- this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
852
- }).catch(
853
- (respanse) => {
854
- alert('获取配置文件失败')
855
- })
856
- },
857
- readConfig() {
858
- let gen = asyncReady(this)
859
- return co(gen)
860
- },
861
- showChooser() {
862
- this.showModal = true
863
- },
864
- hidden() {
865
- this.criteriaShow = !this.criteriaShow
866
- },
867
- refresh() {
868
- this.$refs.paged.$refs.criteria.search()
869
- },
870
- ok() {
871
- this.showModal = false
872
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
873
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
874
- this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
875
- }
876
- },
877
- cancel() {
878
- this.showModal = false
879
- this.model.f_check_plan = {f_plan_name: '', id: ''}
880
- this.model.f_plan_id=''
881
- },
882
- print(row) {
883
- this.showcheckmsg = true
884
- this.checkInfo = row
885
- },
886
-
887
- sort(field, rule) {
888
- // 将所有排序方式设为不排序,实现相互排斥
889
- for (let key in this.orderFields) {
890
- if (key === field) {
891
- this.orderFields[key] = rule
892
- } else {
893
- this.orderFields[key] = 'no'
894
- }
895
- }
896
- // 如果新规则不排序,还原为默认排序
897
- if (rule === 'no') {
898
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
899
- } else {
900
- this.model.paramSource.orderitem = `'${field} ${rule}'`
901
- }
902
- this.search()
903
- },
904
- search() {
905
- this.$refs.paged.$refs.criteria.search()
906
- },
907
- selfSearch(args) {
908
- ////tag
909
- args.condition += ` and f_filialeid in ${this.model.f_filialeid}`
910
- this.model.search(args.condition, args.model, args.condValue)
911
- }
912
- },
913
-
914
- ready() {
915
- this.getEmp()
916
- this.readConfig()
917
- ////tag
918
- this.function = this.f
919
- ////tag
920
-
921
- let gen = select(this)
922
- //this.pianqu()
923
- this.Mreadibook(`('${this.$login.f.orgid}')`)
924
- co(gen)
925
- this.getDefectInfoConfig()
926
- }
927
- }
928
- </script>
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">小&emsp;&emsp;区</label>
25
+ <input type="text" class="input_search" v-model="model.f_residential_area"
26
+ style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
27
+ </div>
28
+ <div class="form-group col-sm-4" style="display: flex; gap: 15px">
29
+ <export-excel-safe :data="$parent.$parent.searchData"
30
+ :field="$parent.$parent.excelHeaders"
31
+ progress="safeGetExportProgress"
32
+ sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails" template-name='安检隐患明细'></export-excel-safe>
33
+ <button class="button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">隐藏</button>
34
+ <button class="button_search" @click="$parent.$parent.toRepair" v-if="$parent.$parent.canToRepair == '是'">转维修</button>
35
+ <button class="button_search" @click="search()">查询</button>
36
+ <div class="button_spacing"
37
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
38
+ @click="$parent.$parent.hidden()"></div>
39
+ </div>
40
+
41
+ </div>
42
+ <div class="row">
43
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
44
+ <role-selector-safe
45
+ role-name="安检员"
46
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
47
+ @re-res="$parent.$parent.getRes"
48
+ :value.sync="model.f_checker_id"
49
+ v-model="model.f_checker_id"
50
+ :value-multiple="true"
51
+ :value-close="false"
52
+ condition="f_checker_name in {}">
53
+ </role-selector-safe>
54
+ </div>
55
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
56
+ <label class="font_normal_body">检&ensp;查&ensp;项</label>
57
+ <v-select :value.sync="model.f_device_type"
58
+ v-model="model.f_device_type"
59
+ style="width: 60%"
60
+ class="select_list select"
61
+ :options='$parent.$parent.device_types'
62
+ placeholder='检查项'
63
+ :multiple="true"
64
+ condition="f_device_type in {}"></v-select>
65
+ <!--<input type="text" class="input_search" v-model="model.f_device_type"-->
66
+ <!--style="width: 60%" placeholder="检&ensp;查&ensp;项" condition="f_device_type like '%{}%'">-->
67
+ </div>
68
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
69
+ <label class="font_normal_body">隐患原因</label>
70
+ <v-select :value.sync="model.f_item_name"
71
+ v-model='model.f_item_name'
72
+ style="width: 60%"
73
+ class="select_list select"
74
+ :options='$parent.$parent.DefectConfigs'
75
+ placeholder='隐患原因'
76
+ :multiple="true"
77
+ condition="f_item_name in {}"></v-select>
78
+ </div>
79
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
80
+ <label class="font_normal_body">安检起始</label>
81
+ <datepicker
82
+ class="select_list select"
83
+ :value.sync="model.f_check_start"
84
+ placeholder='安检起始时间' style="width: 60%"
85
+ :disabled-days-of-week="[]"
86
+ :format="'yyyy-MM-dd'"
87
+ :show-rest-button="reset"
88
+ v-model="model.f_check_start"
89
+ condition="f_offsite_time > ='{} 00:00:00'">
90
+ </datepicker>
91
+ </div>
92
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
93
+ <label class="font_normal_body">安检结束</label>
94
+ <datepicker
95
+ class="select_list select"
96
+ :value.sync="model.f_check_end"
97
+ placeholder='安检结束时间' style="width: 60%"
98
+ :disabled-days-of-week="[]"
99
+ :format="'yyyy-MM-dd'"
100
+ :show-rest-button="reset"
101
+ v-model="model.f_check_end"
102
+ condition="f_offsite_time <= '{} 23:59:59'">
103
+ </datepicker>
104
+ </div>
105
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
106
+ <label class="font_normal_body">用户类型</label>
107
+ <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
108
+ :value-single="true" style="width: 60%"
109
+ class="select_list select"
110
+ :options='$parent.$parent.f_check_type' placeholder='请选择'
111
+ close-on-select
112
+ condition="f_check_type = '{}'"></v-select>
113
+ </div>
114
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
115
+ <label class="font_normal_body">处理方式</label>
116
+ <v-select :value.sync="model.f_deal_dispose"
117
+ v-model='model.f_deal_dispose'
118
+ style="width: 60%"
119
+ class="select_list select"
120
+ :options='$parent.$parent.deal_dispose' placeholder='请选择'
121
+ :multiple="true"
122
+ condition="f_deal_dispose in {}"></v-select>
123
+ </div>
124
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
125
+ <label class="font_normal_body">详细地址</label>
126
+ <input type="text" class="input_search" v-model="model.f_address"
127
+ style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
128
+ </div>
129
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
130
+ <label class="font_normal_body">隐患状态</label>
131
+ <v-select :value.sync="model.f_is_repaired"
132
+ v-model='model.f_is_repaired'
133
+ style="width: 60%"
134
+ class="select_list select"
135
+ :options='$parent.$parent.repairStateOptions' placeholder='请选择'
136
+ :multiple="true"
137
+ condition="f_is_repaired in {}"></v-select>
138
+ </div>
139
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
140
+ <label class="font_normal_body">处理人</label>
141
+ <input type="text" class="input_search" v-model="model.f_repairman"
142
+ style="width: 60%" placeholder="处理人" condition="f_repairman = '{}'">
143
+ </div>
144
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
145
+ <label for="startDate" class="font_normal_body">处理时间:</label>
146
+ <datepicker id="startDate" placeholder="处理开始日期"
147
+ style="width: 60%!important;"
148
+ v-model="model.sq_startDate"
149
+ :value.sync="model.sq_startDate"
150
+ :format="'yyyy-MM-dd 00:00:00'"
151
+ :show-reset-button="true"
152
+ condition="f_repair_date >= '{}'">
153
+ </datepicker>
154
+ </div>
155
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
156
+ <label for="endDate" class="font_normal_body">处理时间:</label>
157
+ <datepicker id="endDate" placeholder="处理结束日期"
158
+ style="width: 60%!important;"
159
+ v-model="model.sq_endDate"
160
+ :value.sync="model.sq_endDate"
161
+ :format="'yyyy-MM-dd 23:59:59'"
162
+ :show-reset-button="true"
163
+ condition="f_repair_date<= '{}'">
164
+ </datepicker>
165
+ </div>
166
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
167
+ <label class="font_normal_body">开户时间</label>
168
+ <datepicker
169
+ :value.sync="model.f_check_gasstart"
170
+ placeholder='开始时间' style="width: 60%"
171
+ :format="'yyyy-MM-dd'"
172
+ :show-rest-button="true"
173
+ v-model="model.f_check_gasstart"
174
+ condition="f_gas_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_check_gasend"
181
+ placeholder='结束时间' style="width: 60%"
182
+ :format="'yyyy-MM-dd'"
183
+ :show-rest-button="true"
184
+ v-model="model.f_check_gasend"
185
+ condition="f_gas_date <= '{} 23:59:59'">
186
+ </datepicker>
187
+ </div>
188
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
189
+ <label class="font_normal_body">用户标签</label>
190
+ <v-select class="select_list select"
191
+ placeholder='请选择' style="width: 60%"
192
+ :value.sync="model.f_user_tags"
193
+ v-model="model.f_user_tags"
194
+ :options='$parent.$parent.userTags'
195
+ filer-key="name"
196
+ condition="f_user_tags in {}"
197
+ :multiple="true">
198
+ </v-select>
199
+ </div>
200
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
201
+ <label class="font_normal_body">用气类型</label>
202
+ <v-select class="select_list select"
203
+ placeholder='请选择' style="width: 60%"
204
+ :value.sync="model.f_user_gas_type"
205
+ v-model="model.f_user_gas_type"
206
+ :options='$parent.$parent.userGasType'
207
+ filer-key="name"
208
+ condition="f_user_gas_type in {}"
209
+ :multiple="true">
210
+ </v-select>
211
+ </div>
212
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
213
+ <label class="font_normal_body">用气性质</label>
214
+ <v-select class="select_list select"
215
+ placeholder='请选择' style="width: 60%"
216
+ :value.sync="model.f_gasproperties"
217
+ v-model="model.f_gasproperties"
218
+ :options='$parent.$parent.gasproperties'
219
+ filer-key="name"
220
+ close-on-select clear-button
221
+ condition="f_gasproperties = '{}'"
222
+ :value-single="true">
223
+ </v-select>
224
+ </div>
225
+
226
+ </div>
227
+ <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
228
+ <div slot="modal-header" class="modal-header">
229
+ <h4 class="modal-title">
230
+ 选择计划
231
+ </h4>
232
+ </div>
233
+ <div slot="modal-body" class="modal-body">
234
+ <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
235
+ </div>
236
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
237
+ <button class="button_search" @click="$parent.$parent.ok">确认</button>
238
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
239
+ </div>
240
+ </modal>
241
+ </div>
242
+ </criteria>
243
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
244
+ <template partial='head'>
245
+ <tr>
246
+ <th v-if="$parent.$parent.$parent.canToRepair=='是'"><nobr>选择</nobr></th>
247
+ <th>
248
+ <nobr>检查项</nobr>
249
+ </th>
250
+ <th>
251
+ <nobr>隐患原因</nobr>
252
+ </th>
253
+ <th>
254
+ <nobr>隐患级别</nobr>
255
+ </th>
256
+ <th>
257
+ <nobr>客户编号</nobr>
258
+ </th>
259
+ <th>
260
+ <nobr>客户名称</nobr>
261
+ </th>
262
+ <th>
263
+ <nobr>客户电话</nobr>
264
+ </th>
265
+ <th>
266
+ <nobr>客户小区</nobr>
267
+ </th>
268
+ <th>
269
+ <nobr>用户标签</nobr>
270
+ </th>
271
+ <th>
272
+ <nobr>用气类型</nobr>
273
+ </th>
274
+ <th>
275
+ <data-order field="f_address" name="客户地址"></data-order>
276
+ </th>
277
+
278
+ <th>
279
+ <data-order field="f_offsite_time" name="安检时间"></data-order>
280
+ </th>
281
+ <th>
282
+ <nobr>安检员</nobr>
283
+ </th>
284
+ <th>
285
+ <nobr>隐患状态</nobr>
286
+ </th>
287
+ <th>
288
+ <nobr>处理人</nobr>
289
+ </th>
290
+ <th>
291
+ <nobr>处理方式</nobr>
292
+ </th>
293
+ <th>
294
+ <nobr>处理时间</nobr>
295
+ </th>
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
+ </tr>
309
+ </template>
310
+ <template partial='body'>
311
+ <td v-if="$parent.$parent.$parent.canToRepair=='是'" style="text-align: center;white-space:nowrap;"><input type="checkbox" v-if="['用户自行整改', '现场已处理', '维修已处理', '转维修'].indexOf(row.f_is_repaired) == -1" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row)" @change="$parent.$parent.$parent.setCheckes(row)"></input></td>
312
+ <td style="text-align: center">{{row.f_device_type}}</td>
313
+ <td style="text-align: center">{{row.f_item_name}}</td>
314
+ <td style="text-align: center">{{row.f_defect_level}}</td>
315
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
316
+ <td style="text-align: center">{{row.f_user_name}}</td>
317
+ <td style="text-align: center">{{row.f_user_phone}}</td>
318
+ <td style="text-align: center">{{row.f_residential_area}}</td>
319
+ <td style="text-align: center">{{ row.f_user_tags }}</td>
320
+ <td style="text-align: center">{{ row.f_user_gas_type }}</td>
321
+ <td style="text-align: center">{{row.f_address}}</td>
322
+ <td style="text-align: center">{{row.f_offsite_time}}</td>
323
+ <td style="text-align: center">{{row.f_checker_name}}</td>
324
+ <td style="text-align: center">{{row.f_is_repaired}}</td>
325
+ <td style="text-align: center">{{row.f_repairman}}</td>
326
+ <td style="text-align: center">{{row.f_deal_dispose}}</td>
327
+ <td style="text-align: center">{{row.f_repair_date}}</td>
328
+ <td style="text-align: center">{{row.f_service_id}}</td>
329
+ <td style="text-align: center">{{row.f_handlingtype}}</td>
330
+ <td style="text-align: center">{{row.f_order_man}}</td>
331
+ <td style="text-align: center">{{row.f_gasproperties}}</td>
332
+ </template>
333
+ </data-grid>
334
+ </criteria-paged>
335
+ <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
336
+ <modal :show.sync="showModal2" :backdrop="false">
337
+ <div slot="modal-header" class="modal-header">
338
+ <h4 class="modal-title">
339
+ 转维修
340
+ </h4>
341
+ </div>
342
+ <div slot="modal-body" class="modal-body">
343
+ <div v-if="true">
344
+ <div>
345
+
346
+ </div>
347
+ <!-- <div v-for="(index, item) in dangerGroup">-->
348
+
349
+ <!-- </div>-->
350
+ <div class="row" style="margin-top: 10px">
351
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
352
+ <div class="col-xs-8 col-md-8">
353
+ <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
354
+ :options='dispatchTypeOptions' placeholder='派发类型'
355
+ close-on-select>
356
+ </v-select>
357
+ </div>
358
+ </div>
359
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
360
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
361
+ <div class="col-xs-8 col-md-8">
362
+ <v-select
363
+ :value.sync="selectData.f_repairman"
364
+ :value-single="true"
365
+ :options='repairers'
366
+ placeholder='请选择维修员'
367
+ close-on-select></v-select>
368
+ </div>
369
+ </div>
370
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
371
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
372
+ <div class="col-xs-8 col-md-8">
373
+ <right-tree
374
+ islist
375
+ :userid="userid"
376
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
377
+ @re-res="getSiteRes"></right-tree>
378
+ </div>
379
+ </div>
380
+ <div class="row" style="margin-top: 10px">
381
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
382
+ <div class="col-xs-8 col-md-8">
383
+ <v-select :value.sync="selectData.f_repairtype" style="width:60%"
384
+ class="select select_list"
385
+ :value-single="true"
386
+ :options='repairTypeOptions'
387
+ close-on-select>
388
+ </v-select>
389
+ </div>
390
+ </div>
391
+ <div class="row" style="margin-top: 10px">
392
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
393
+ <div class="col-xs-8 col-md-8">
394
+ <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
395
+ </div>
396
+ </div>
397
+ </div>
398
+ </div>
399
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
400
+ <button class="button_search" @click="rectification">转维修</button>
401
+ <button class="button_search" @click="cancel1">取消</button>
402
+ </div>
403
+ </modal>
404
+ <modal :show.sync="showModal3">
405
+ <div slot="modal-header" class="modal-header">
406
+ <h4 class="modal-title">
407
+ 转维修进度{{ progressbarWidth }}%
408
+ </h4>
409
+ </div>
410
+ <div slot="modal-body" class="modal-body">
411
+ <div class="progress">
412
+ <div class="progress-bar" role="progressbar" aria-valuenow="60"
413
+ aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
414
+ </div>
415
+ </div>
416
+ </div>
417
+ <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
418
+ </modal>
419
+ </div>
420
+ </div>
421
+ </template>
422
+
423
+ <script>
424
+ import {PagedList} from 'vue-client'
425
+ import Vue from 'vue'
426
+ import co from 'co'
427
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
428
+ //获取json配置文件
429
+ let asyncReady = async function (self) {
430
+ // 获取配置信息
431
+ try {
432
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
433
+ Vue.config = res.data
434
+ self.getDeviceTypes(res.data)
435
+ } catch (error) {
436
+ // 忽略704,文件找不到异常R
437
+ if (error.status !== 704) {
438
+ throw error
439
+ }
440
+ }
441
+ }
442
+
443
+ let select = function* (self) {
444
+ let http = new HttpResetClass()
445
+ let getGasman = yield http.load('POST', '/rs/search', {
446
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
447
+ userid: self.$login.f.id
448
+ }, {resolveMsg: null, rejectMsg: null})
449
+ ////tag
450
+ self.checkersid.push({label: '全部', value: ''})
451
+ getGasman.data.forEach((checker) => {
452
+ self.checkersid.push({label: checker.name, value: checker.id})
453
+ })
454
+ }
455
+
456
+ export default {
457
+ title: '隐患明细查看',
458
+ data() {
459
+ let model = new PagedList('rs/sql/defectDetails', 20,{
460
+ f_filialeid: 'this.f_filialeid'
461
+ })
462
+ model.f_plan_id = ''
463
+ model.f_approved = ''
464
+ model.f_entry = ''
465
+ model.f_no_checkplan = ''
466
+ model.f_check_type=''
467
+ model.f_filialeid = `('${this.$login.f.orgid}')`
468
+ return {
469
+ audioshow:false,
470
+ userTags:[{label: '全部', value: ''},...this.$appdata.getParam('用户标签')],
471
+ userGasType:[{label: '全部', value: ''},...this.$appdata.getParam('用气类型')],
472
+ model: model,
473
+ deal_dispose:[{label:'全部',value:''},{label:'报修',value:'报修'},{label:'现场整改',value:'现场整改'},{label:'自行处理',value:'自行处理'},{label:'未处理',value:'未处理'}],
474
+ repairStateOptions: this.getSafeParam('隐患状态'),
475
+ //searchData:searchData,
476
+ excelHeaders: {
477
+ 'f_device_type': '检查项',
478
+ 'f_item_name': '隐患名称',
479
+ 'f_userinfo_code': '客户编号',
480
+ 'f_user_name': '客户姓名',
481
+ 'f_user_phone': '客户电话',
482
+ 'f_residential_area': '小区',
483
+ 'f_address': '客户地址',
484
+ 'f_offsite_time': '安检时间',
485
+ 'f_checker_name': '安检员',
486
+ 'f_deal_dispose': '处理方式',
487
+ 'f_is_repaired': '隐患状态',
488
+ 'f_repairman':'处理人',
489
+ 'f_gasproperties':'用气性质',
490
+ 'f_repair_date':'处理时间'
491
+ },
492
+ fun: this.$login.f,
493
+ checkersid: [],
494
+ safetype: this.getSafeParam('安检类型'),
495
+ criteriaShow: false,
496
+ showModal: false,
497
+ f_approval_states: this.getSafeParam('安检单审核状态'),
498
+ f_entry_status:this.getSafeParam('安检状态'),
499
+ f_checkplans: this.getSafeParam('有无计划'),
500
+ showcheckmsg: false,
501
+ checkInfo: {},
502
+ orderDefault: "'f_offsite_time'",
503
+ orderFields: {
504
+ f_offsite_time: 'no'
505
+ },
506
+ sliceArea: [],
507
+ cbc:[],
508
+ DefectConfig:'' ,
509
+ gasproperties:this.$appdata.getParam('用气性质') ? [{
510
+ label: '全部',
511
+ value: ''
512
+ }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}],
513
+ DefectConfigs:[{label:'全部',value:''},{label: '金额异常差值', value: '金额异常差值'},{label: '气量异常差值', value: '气量异常差值'}],
514
+ device_types:[{label:'全部',value:''}],
515
+ f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
516
+ showModal2: false,
517
+ selectData:{
518
+ dispatchType:'',
519
+ f_repairman:'',
520
+ f_remarks:'',
521
+ f_repairtype:''
522
+ },
523
+ repairers: [],
524
+ repairTypeOptions:this.$appdata.getParam('报修类型'),
525
+ dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
526
+ dangerGroups: [],
527
+ showModal3: false,
528
+ progressbarWidth:'0',
529
+ canToRepair: this.$appdata.getSingleValue('隐患明细转维修'),
530
+ checkes: []
531
+ }
532
+ },
533
+ computed :{
534
+ searchData() {
535
+ return {condition: this.model.condition}
536
+ }
537
+ },
538
+ methods: {
539
+ getDeviceTypes(val) {
540
+ try {
541
+ if (val.safecheck.DevicesSetConfig != undefined) {
542
+ this.DefectConfig = val.safecheck.DevicesConfig
543
+ for (var Key1 in this.DefectConfig) {
544
+ this.device_types.push({label: Key1, value: Key1})
545
+ }
546
+ }
547
+ } catch (e) {
548
+ }
549
+ },
550
+ async getDefectInfoConfig() {
551
+ var resData = await new HttpResetClass().load('POST', '/rs/sql/tel_singleTable_GroupBy', {data: {
552
+ items: 'f_item_name',
553
+ tablename: 't_devices_items',
554
+ condition: "f_is_defect = 'true'",
555
+ groupitem: 'f_item_name',
556
+ }}, {
557
+ warnMsg: null,
558
+ resolveMsg: null
559
+ })
560
+ if (resData.data) {
561
+ for (let i = 0; i < resData.data.length; i++) {
562
+ this.DefectConfigs.push({label: resData.data[i].f_item_name, value: resData.data[i].f_item_name})
563
+ }
564
+ }
565
+ },
566
+ isChecked(row) {
567
+ return this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id) != -1
568
+ },
569
+ setCheckes(row) {
570
+ let index=this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id)
571
+ if(index<0){
572
+ this.checkes.push(row)
573
+ }else{
574
+ this.checkes.splice(index,1)
575
+ }
576
+ console.log('this.checkes=', JSON.stringify(this.checkes))
577
+ },
578
+ toRepair(){
579
+ console.log('this.checkes=', JSON.stringify(this.checkes))
580
+ if(this.checkes.length==0){
581
+ return this.$showMessage('请先选择需要转维修的隐患!')
582
+ }
583
+
584
+ const dangerGroups = []
585
+ for (const danger of this.checkes) {
586
+ let i = dangerGroups.findIndex(dangerGroup => dangerGroup.f_userinfo_code === danger.f_userinfo_code)
587
+ if (i == -1){
588
+ dangerGroups.push({
589
+ f_userinfo_code: danger.f_userinfo_code,
590
+ dangers: []
591
+ })
592
+ i = dangerGroups.length - 1
593
+ }
594
+ dangerGroups[i].dangers.push(danger)
595
+ }
596
+ this.dangerGroups = dangerGroups
597
+ console.log('this.dangerGroups=', JSON.stringify(this.dangerGroups))
598
+ this.showModal2=true
599
+ },
600
+ getEmp() {
601
+ let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
602
+ let http = new HttpResetClass()
603
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
604
+ if (res.data.length == 0){
605
+ this.repairers= []
606
+ return
607
+ }
608
+ let str=``
609
+ res.data.forEach((item,idx,arr) => {
610
+ if(idx+1==arr.length){
611
+ str += item.id
612
+ }else{
613
+ str += item.id+`','`
614
+ }
615
+ })
616
+ let http1 = new HttpResetClass()
617
+ http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
618
+ data: {
619
+ items: 'id,f_user_telephone',
620
+ tablename: 't_user',
621
+ condition: `id in ('${str}')`,
622
+ orderitem: 'id'
623
+ }
624
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
625
+ res.data.forEach((user)=>{
626
+ try {
627
+ ress.data.forEach((tel,tidx,arr)=>{
628
+ if(user.id==tel.id){
629
+ this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
630
+ ress.data.splice(tidx,1)
631
+ }
632
+ })
633
+ }catch (e) {
634
+ }
635
+ })
636
+ }).catch(error=>{
637
+ res.data.forEach((user)=>{
638
+ this.repairers.push({label: user.name, value: user.name})
639
+ })
640
+ })
641
+
642
+ })
643
+ },
644
+ getSiteRes(obj) {
645
+ console.log('siteRes ---> ')
646
+ console.log(obj)
647
+ if(obj.resids[0]){
648
+ this.selectData.f_meetunit = obj.res.join('.')
649
+ this.selectData.f_reciever = obj.resids.join('.')
650
+ this.selectData.f_outlets = obj.res[obj.res.length - 1]
651
+ }else {
652
+ this.selectData.f_meetunit = ''
653
+ this.selectData.f_reciever = ''
654
+ this.selectData.f_outlets = ''
655
+ }
656
+ },
657
+ cancel1(){
658
+ this.showModal2=false
659
+ this.selectData={
660
+ dispatchType:'',
661
+ f_repairman:'',
662
+ f_remarks:'',
663
+ f_repairtype:''
664
+ }
665
+ },
666
+ async rectification(){
667
+ if(this.selectData.dispatchType){
668
+ if(this.selectData.dispatchType=='派发给站点'){
669
+ if(!this.selectData.f_reciever){
670
+ this.$showMessage('请选择部门!')
671
+ return
672
+ }
673
+ }else{
674
+ if(!this.selectData.f_repairman){
675
+ this.$showMessage('请选择维修员!')
676
+ return
677
+ }
678
+ }
679
+ }else {
680
+ this.$showMessage('请选择派发类型!')
681
+ return
682
+ }
683
+
684
+ if(!this.selectData.f_repairtype){
685
+ this.$showMessage('请选择报修类型!')
686
+ return
687
+ }
688
+ this.showModal3=true
689
+ let act={}
690
+ let toRepair=''
691
+ let successCount=0
692
+ if(this.selectData.dispatchType=='派发给站点'){
693
+ act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
694
+ toRepair=null
695
+ }else{
696
+ console.log('派发给维修员---------'+this.selectData.f_repairman)
697
+ act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
698
+ toRepair='一级派单'
699
+ }
700
+ let rep={
701
+ loginUser: {
702
+ name: this.$login.f.name,
703
+ ename: this.$login.f.ename
704
+ },
705
+ f_meetunit: this.$login.f.deps,
706
+ f_attendant: this.$login.f.name,
707
+ f_outlets: this.$login.f.deps,
708
+ f_remarks: this.selectData.f_remarks,
709
+ f_repairtype: this.selectData.f_repairtype,
710
+ toRepair: toRepair,
711
+ activity:act
712
+ }
713
+ for(let i=0; i<this.dangerGroups.length; i++){
714
+ let defectIdStr = ''
715
+ const defectIds = []
716
+ for (let j = 0; j < this.dangerGroups[i].dangers.length; j++) {
717
+ defectIds.push(`'${this.dangerGroups[i].dangers[j].f_defect_id}'`)
718
+ }
719
+ defectIdStr = `(${defectIds.join(',')})`
720
+ const data = {
721
+ id:this.dangerGroups[i].dangers[0].f_paper_id,
722
+ repData:rep,
723
+ source:'pc',
724
+ defectIdStr: defectIdStr
725
+ }
726
+ console.log('data=', JSON.stringify(data))
727
+ try {
728
+ let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', data, {resolveMsg: null, rejectMsg: null})
729
+ if (result.data.code==200) {
730
+ successCount += result.data.successcon
731
+ this.progressbarWidth=Math.ceil((i+1)*100/(this.dangerGroups.length))
732
+ }
733
+ }catch (e) {
734
+ this.showModal3=false
735
+ this.$showMessage('网络异常,请稍后再试!')
736
+ return
737
+ }
738
+ }
739
+ this.showModal3=false
740
+ this.cancel1()
741
+ this.$showMessage('本次转维修成功'+successCount+'单')
742
+ },
743
+ showaudio(){
744
+ //tag
745
+ this.audioshow=!this.audioshow
746
+ //tag
747
+ },
748
+ getmeterbook(val){
749
+ this.cbc=[]
750
+ this.cbc.push({
751
+ label:'全部',
752
+ value:''
753
+ })
754
+ if (val==''){
755
+
756
+ this.cbcs.forEach(res=>{
757
+ this.cbc.push({
758
+ label:res.f_book_name,
759
+ value:res.id
760
+ })
761
+ })
762
+ }else{
763
+ this.cbcs.forEach(res=>{
764
+ if (res.f_book_slice_area==val){
765
+ this.cbc.push({
766
+ label:res.f_book_name,
767
+ value:res.id
768
+ })
769
+ }
770
+ })
771
+ }
772
+ },
773
+ getSafeParam(val){
774
+ if(this.$appdata.getParam(val)){
775
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam(val)]
776
+ }else{
777
+ return [{label: '全部', value: ''}]
778
+ }
779
+
780
+ },
781
+ Mreadibook(val){
782
+ ////tag
783
+ ////tag
784
+ this.sliceArea=[]
785
+ if (val){
786
+ new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
787
+ items: 'name',
788
+ tablename: 't_zone',
789
+ condition: `parentid in ${val}`,
790
+ orderitem: 'id'
791
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
792
+ this.sliceArea.push({
793
+ label:'全部',
794
+ value:''
795
+ })
796
+ res.data.forEach(ress=>{
797
+ this.sliceArea.push({
798
+ label:ress.name,
799
+ value:ress.name
800
+ })
801
+ })
802
+
803
+ })
804
+ }
805
+ },
806
+ getAllMeterBook(val){
807
+ ////tag
808
+ ////tag
809
+ this.cbcs=[]
810
+ if (val){
811
+ new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
812
+ items: 'f_book_name,f_book_slice_area,id',
813
+ tablename: 't_meter_book',
814
+ condition: `f_filiale_id in ${val}`,
815
+ orderitem: 'id'
816
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
817
+ res.data.forEach(ress=>{
818
+ this.cbcs.push({
819
+ id:ress.id,
820
+ f_book_name:ress.f_book_name,
821
+ f_book_slice_area:ress.f_book_slice_area
822
+ })
823
+ })
824
+ this.cbc=[]
825
+ this.cbc.push({
826
+ label:'全部',
827
+ value:''
828
+ })
829
+ this.cbcs.forEach(res=>{
830
+ this.cbc.push({
831
+ label:res.f_book_name,
832
+ value:res.id
833
+ })
834
+ })
835
+ })
836
+ }
837
+ },
838
+ getRes(obj) {
839
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids);
840
+ this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
841
+ this.Mreadibook(this.model.f_filialeid)
842
+ this.getAllMeterBook(this.model.f_filialeid)
843
+ //this.$refs.paged.$refs.criteria.search()
844
+ },
845
+
846
+ change(row) {
847
+ // Vue.$login = {jwt: row.f_checker_id}
848
+ asyncReady(this).then(() => {
849
+ ////tag)
850
+ row.f_upload_state = '已传'
851
+ this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
852
+ }).catch(
853
+ (respanse) => {
854
+ alert('获取配置文件失败')
855
+ })
856
+ },
857
+ readConfig() {
858
+ let gen = asyncReady(this)
859
+ return co(gen)
860
+ },
861
+ showChooser() {
862
+ this.showModal = true
863
+ },
864
+ hidden() {
865
+ this.criteriaShow = !this.criteriaShow
866
+ },
867
+ refresh() {
868
+ this.$refs.paged.$refs.criteria.search()
869
+ },
870
+ ok() {
871
+ this.showModal = false
872
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
873
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
874
+ this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
875
+ }
876
+ },
877
+ cancel() {
878
+ this.showModal = false
879
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
880
+ this.model.f_plan_id=''
881
+ },
882
+ print(row) {
883
+ this.showcheckmsg = true
884
+ this.checkInfo = row
885
+ },
886
+
887
+ sort(field, rule) {
888
+ // 将所有排序方式设为不排序,实现相互排斥
889
+ for (let key in this.orderFields) {
890
+ if (key === field) {
891
+ this.orderFields[key] = rule
892
+ } else {
893
+ this.orderFields[key] = 'no'
894
+ }
895
+ }
896
+ // 如果新规则不排序,还原为默认排序
897
+ if (rule === 'no') {
898
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
899
+ } else {
900
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
901
+ }
902
+ this.search()
903
+ },
904
+ search() {
905
+ this.$refs.paged.$refs.criteria.search()
906
+ },
907
+ selfSearch(args) {
908
+ ////tag
909
+ args.condition += ` and f_filialeid in ${this.model.f_filialeid}`
910
+ this.model.search(args.condition, args.model, args.condValue)
911
+ }
912
+ },
913
+
914
+ ready() {
915
+ this.getEmp()
916
+ this.readConfig()
917
+ ////tag
918
+ this.function = this.f
919
+ ////tag
920
+
921
+ let gen = select(this)
922
+ //this.pianqu()
923
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
924
+ co(gen)
925
+ this.getDefectInfoConfig()
926
+ }
927
+ }
928
+ </script>