safecheck-client 3.0.35-48 → 3.0.35-50
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +3 -3
- package/src/components/NewDefectList/DefectPaperNew.vue +1079 -1079
- package/src/components/android/PaperFeedback.vue +1514 -1514
- package/src/components/pc/SecurityCheckLedger.vue +133 -133
- package/src/components/pc/SecurityCheckList.vue +160 -144
- package/src/filiale/dexin/pc/DefectListNew.vue +643 -643
- package/src/filiale/dexin/pc/DefectPaperNew.vue +1066 -1066
- package/src/filiale/dexin/pc.js +13 -13
- package/src/filiale/huaran/pc/PaperList.vue +843 -843
- package/src/filiale/jingyang/android/AddPlanItem.vue +458 -458
- package/src/filiale/jingyang/android/CurrentCreate.vue +1080 -1080
- package/src/filiale/jingyang/android/SafecheckOrderV.vue +2734 -2734
- package/src/filiale/jingyang/android.js +15 -15
- package/src/filiale/qingtongxia/android/AddPlanItem.vue +450 -450
- package/src/filiale/qingtongxia/android/CurrentCreate.vue +1053 -1053
- package/src/filiale/qingtongxia/android/PhoneUpUserinfo.vue +1230 -1230
- package/src/filiale/qingtongxia/android/SafecheckUserInfo.vue +782 -782
- package/src/filiale/qingtongxia/android.js +14 -14
- package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -2747
- package/src/filiale/ruihua/android.js +11 -11
- package/src/filiale/siyang/android/AppCheckPlan.vue +246 -246
- package/src/filiale/siyang/android/PaperFeedback.vue +1514 -0
- package/src/filiale/siyang/android.js +1 -0
- package/src/filiale/siyang/pc/CheckBookList.vue +396 -396
- package/src/filiale/siyang/pc/checkUserList.vue +765 -765
- package/src/filiale/siyang/pc.js +22 -22
- package/src/filiale/tianke/pc/DefectListNew.vue +545 -545
- package/src/filiale/wuan/android/SafecheckOrderV.vue +2241 -2241
- package/src/filiale/wuan/android/SafecheckUserInfo.vue +596 -596
- package/src/main.js +33 -31
@@ -1,1079 +1,1079 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="flex">
|
3
|
-
<work-busy :is-busy="isbusy"></work-busy>
|
4
|
-
<criteria-paged :model="model" v-ref:paged>
|
5
|
-
<criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
|
6
|
-
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
7
|
-
<div class="row" v-show="!$parent.$parent.$parent.showItem">
|
8
|
-
<div :class="$parent.$parent.style">
|
9
|
-
<label class="font_normal_body">安检计划</label>
|
10
|
-
<input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
|
11
|
-
@click="$parent.$parent.showChooser"
|
12
|
-
style="width: 60%" placeholder="安检计划" readonly="readonly">
|
13
|
-
</div>
|
14
|
-
<div :class="$parent.$parent.style" v-show="false">
|
15
|
-
<label class="font_normal_body">存在隐患</label>
|
16
|
-
<v-select style="width:60% "
|
17
|
-
class="select select_list"
|
18
|
-
:value.sync="model.f_has_defect"
|
19
|
-
v-model="model.f_has_defect"
|
20
|
-
:options='$parent.$parent.hasDefectOptions'
|
21
|
-
:placeholder='model.f_has_defect'
|
22
|
-
condition="f_has_defect = '{}'"
|
23
|
-
close-on-select>
|
24
|
-
</v-select>
|
25
|
-
</div>
|
26
|
-
<div :class="$parent.$parent.style">
|
27
|
-
<label class="font_normal_body">用户编号</label>
|
28
|
-
<input type="text" class="input_search" v-model="model.f_userinfo_code"
|
29
|
-
condition="f_userinfo_code = '{}'"
|
30
|
-
style="width: 60%" placeholder="用户编号">
|
31
|
-
</div>
|
32
|
-
<div :class="$parent.$parent.style">
|
33
|
-
<label class="font_normal_body">完成情况</label>
|
34
|
-
<v-select
|
35
|
-
placeholder='完成情况查询'
|
36
|
-
:value-single="true"
|
37
|
-
class="select select_list" style="width: 60%"
|
38
|
-
v-model='model.f_is_repair'
|
39
|
-
:value.sync="model.f_is_repair"
|
40
|
-
:options='$parent.$parent.repaired'
|
41
|
-
condition="f_is_repair = '{}'"
|
42
|
-
close-on-select clear-button> </v-select>
|
43
|
-
</div>
|
44
|
-
<div :class="$parent.$parent.style">
|
45
|
-
<label class="font_normal_body">处理情况</label>
|
46
|
-
<v-select
|
47
|
-
placeholder='处理情况查询'
|
48
|
-
:value-single="true"
|
49
|
-
class="select select_list" style="width: 60%"
|
50
|
-
v-model='model.f_is_deal'
|
51
|
-
:value.sync="model.f_is_deal"
|
52
|
-
:options='$parent.$parent.deals'
|
53
|
-
condition="f_is_deal = '{}'"
|
54
|
-
close-on-select clear-button> </v-select>
|
55
|
-
</div>
|
56
|
-
<div class=" col-sm-4 form-group button-range" >
|
57
|
-
<div class="span" style="float: right;margin-top: 8px">
|
58
|
-
<div style="float: right" class="button_spacing"
|
59
|
-
:class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
|
60
|
-
@click="$parent.$parent.hiddenr()"></div>
|
61
|
-
<div style="float: right" class="button_spacing"
|
62
|
-
:class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
|
63
|
-
@click="$parent.$parent.hidden()"></div>
|
64
|
-
<button style="float: right" class="button_search button_spacing" @click="search">查询</button>
|
65
|
-
<button style="float: right" v-if="$parent.$parent.transfer=='是'" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>
|
66
|
-
<div style="float: right">
|
67
|
-
<export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
|
68
|
-
:field="$parent.$parent.getfield"
|
69
|
-
progress="safeGetExportProgress"
|
70
|
-
sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
|
71
|
-
</div>
|
72
|
-
</div>
|
73
|
-
</div>
|
74
|
-
</div>
|
75
|
-
<div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
|
76
|
-
<div :class="$parent.$parent.style">
|
77
|
-
<label class="font_normal_body">片  区</label>
|
78
|
-
<v-select class="select_list select"
|
79
|
-
placeholder='片区/管理站' style="width: 60%"
|
80
|
-
:value.sync="model.f_slice_area" v-model="model.f_slice_area"
|
81
|
-
:options='$parent.$parent.sliceArea'
|
82
|
-
filer-key="name"
|
83
|
-
close-on-select clear-button
|
84
|
-
condition="f_slice_area='{}'"
|
85
|
-
@change="$parent.$parent.getmeterbook(model.f_slice_area)"
|
86
|
-
:value-single="true">
|
87
|
-
</v-select>
|
88
|
-
</div>
|
89
|
-
<div :class="$parent.$parent.style2" style="margin: 0">
|
90
|
-
<role-selector-safe
|
91
|
-
role-name="安检员"
|
92
|
-
role-lable="安 检 员 "
|
93
|
-
:resobjprop.sync="$parent.$parent.resids"
|
94
|
-
@re-res="$parent.$parent.getRes"
|
95
|
-
:value.sync="model.f_checker_id"
|
96
|
-
v-model="model.f_checker_id"
|
97
|
-
condition="f_checker_name = '{}'">
|
98
|
-
</role-selector-safe>
|
99
|
-
</div>
|
100
|
-
|
101
|
-
<div :class="$parent.$parent.style">
|
102
|
-
<label class="font_normal_body">抄 表 册</label>
|
103
|
-
<v-select class="select_list select"
|
104
|
-
placeholder='抄表册' style="width: 60%"
|
105
|
-
:value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
|
106
|
-
:options='$parent.$parent.cbc'
|
107
|
-
filer-key="name"
|
108
|
-
close-on-select clear-button
|
109
|
-
condition="f_meter_book_num={}"
|
110
|
-
:value-single="true">
|
111
|
-
</v-select>
|
112
|
-
</div>
|
113
|
-
<div :class="$parent.$parent.style">
|
114
|
-
<label class="font_normal_body">起始时间</label>
|
115
|
-
<datepicker
|
116
|
-
placeholder='起始时间' style="width:60%"
|
117
|
-
:disabled-days-of-week="[]"
|
118
|
-
:format="'yyyy-MM-dd'"
|
119
|
-
:show-rest-button="reset"
|
120
|
-
:value.sync="model.f_start_time"
|
121
|
-
v-model="model.f_start_time"
|
122
|
-
condition="f_offsite_time >= '{} 00:00:00'">
|
123
|
-
</datepicker>
|
124
|
-
</div>
|
125
|
-
<div :class="$parent.$parent.style">
|
126
|
-
<label class="font_normal_body">结束时间</label>
|
127
|
-
<datepicker
|
128
|
-
placeholder='结束时间' style="width:60%"
|
129
|
-
:disabled-days-of-week="[]"
|
130
|
-
:format="'yyyy-MM-dd'"
|
131
|
-
:show-rest-button="reset"
|
132
|
-
:value.sync="model.f_end_time"
|
133
|
-
v-model="model.f_end_time"
|
134
|
-
condition="f_offsite_time <= '{} 23:59:59'">
|
135
|
-
</datepicker>
|
136
|
-
</div>
|
137
|
-
|
138
|
-
</div>
|
139
|
-
<div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
|
140
|
-
|
141
|
-
<div :class="$parent.$parent.style">
|
142
|
-
<label class="font_normal_body">维 修 员</label>
|
143
|
-
<input type="text" class="input_search" v-model="model.f_repairman"
|
144
|
-
condition="f_repairman = '{}'"
|
145
|
-
style="width: 60%" placeholder="维修员">
|
146
|
-
</div>
|
147
|
-
<div :class="$parent.$parent.style">
|
148
|
-
<label class="font_normal_body">用户名称</label>
|
149
|
-
<input type="text" class="input_search" v-model="model.f_user_name"
|
150
|
-
condition="f_user_name = '{}'"
|
151
|
-
style="width: 60%" placeholder="用户名称">
|
152
|
-
</div>
|
153
|
-
<div :class="$parent.$parent.style">
|
154
|
-
<label class="font_normal_body">小区名称:</label>
|
155
|
-
<input style="width: 60%" class="input_search" v-model="model.f_residential_area" placeholder="请输入小区(可模糊查询)" condition="f_residential_area like '%{}%'">
|
156
|
-
</div>
|
157
|
-
|
158
|
-
</div>
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
<div class="row" v-show="$parent.$parent.$parent.showItem">
|
163
|
-
<div :class="$parent.$parent.style">
|
164
|
-
<label class="font_normal_body">安检计划</label>
|
165
|
-
<input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
|
166
|
-
@click="$parent.$parent.showChooser"
|
167
|
-
style="width: 60%" placeholder="安检计划" readonly="readonly">
|
168
|
-
</div>
|
169
|
-
<div :class="$parent.$parent.style" v-show="false">
|
170
|
-
<label class="font_normal_body">存在隐患</label>
|
171
|
-
<v-select style="width:60% "
|
172
|
-
class="select select_list"
|
173
|
-
:value.sync="model.f_has_defect"
|
174
|
-
v-model="model.f_has_defect"
|
175
|
-
:options='$parent.$parent.hasDefectOptions'
|
176
|
-
:placeholder='model.f_has_defect'
|
177
|
-
condition="f_has_defect = '{}'"
|
178
|
-
close-on-select>
|
179
|
-
</v-select>
|
180
|
-
</div>
|
181
|
-
<div class="row" v-show="$parent.$parent.$parent.showItem">
|
182
|
-
<div :class="$parent.$parent.style">
|
183
|
-
<label class="font_normal_body">用户编号</label>
|
184
|
-
<input type="text" class="input_search" v-model="model.f_userinfo_code"
|
185
|
-
condition="f_userinfo_code = '{}'"
|
186
|
-
style="width: 60%" placeholder="用户编号">
|
187
|
-
</div>
|
188
|
-
|
189
|
-
<div class=" col-sm-4 form-group button-range">
|
190
|
-
<div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
|
191
|
-
<div style="float: right" class="button_spacing"
|
192
|
-
:class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
|
193
|
-
@click="$parent.$parent.hiddenr()"></div>
|
194
|
-
<div style="float: right" class="button_spacing"
|
195
|
-
:class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
|
196
|
-
@click="$parent.$parent.hidden()"></div>
|
197
|
-
<button style="float: right" class="button_search button_spacing" @click="search">查询</button>
|
198
|
-
<button style="float: right" v-if="$parent.$parent.transfer=='是'" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>
|
199
|
-
<div style="float: right">
|
200
|
-
<export-excel-old :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids}"
|
201
|
-
:field="$parent.$parent.getfield"
|
202
|
-
progress="safeGetExportProgress"
|
203
|
-
sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew" template-name='安检计划明细' :choose-col="true"></export-excel-old>
|
204
|
-
</div>
|
205
|
-
</div>
|
206
|
-
</div>
|
207
|
-
|
208
|
-
</div>
|
209
|
-
|
210
|
-
<div :class="$parent.$parent.style">
|
211
|
-
<label class="font_normal_body">完成情况</label>
|
212
|
-
<v-select
|
213
|
-
placeholder='完成情况查询'
|
214
|
-
:value-single="true"
|
215
|
-
class="select select_list" style="width: 60%"
|
216
|
-
v-model='model.f_is_repair'
|
217
|
-
:value.sync="model.f_is_repair"
|
218
|
-
:options='$parent.$parent.repaired'
|
219
|
-
condition="f_is_repair = '{}'"
|
220
|
-
close-on-select clear-button> </v-select>
|
221
|
-
</div>
|
222
|
-
<div :class="$parent.$parent.style">
|
223
|
-
<label class="font_normal_body">处理情况</label>
|
224
|
-
<v-select
|
225
|
-
placeholder='处理情况查询'
|
226
|
-
:value-single="true"
|
227
|
-
class="select select_list" style="width: 60%"
|
228
|
-
v-model='model.f_is_deal'
|
229
|
-
:value.sync="model.f_is_deal"
|
230
|
-
:options='$parent.$parent.deals'
|
231
|
-
condition="f_is_deal = '{}'"
|
232
|
-
close-on-select clear-button> </v-select>
|
233
|
-
</div>
|
234
|
-
<div :class="$parent.$parent.style2" style="margin: 0">
|
235
|
-
<role-selector-safe
|
236
|
-
role-name="安检员"
|
237
|
-
:resobjprop.sync="$parent.$parent.resids"
|
238
|
-
role-lable="安 检 员 "
|
239
|
-
@re-res="$parent.$parent.getRes"
|
240
|
-
:value.sync="model.f_checker_id"
|
241
|
-
v-model="model.f_checker_id"
|
242
|
-
condition="f_checker_name = '{}'">
|
243
|
-
</role-selector-safe>
|
244
|
-
</div>
|
245
|
-
</div>
|
246
|
-
<div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
|
247
|
-
<div :class="$parent.$parent.style">
|
248
|
-
<label class="font_normal_body">片  区</label>
|
249
|
-
<v-select class="select_list select"
|
250
|
-
placeholder='片区/管理站' style="width: 60%"
|
251
|
-
:value.sync="model.f_slice_area" v-model="model.f_slice_area"
|
252
|
-
:options='$parent.$parent.sliceArea'
|
253
|
-
filer-key="name"
|
254
|
-
close-on-select clear-button
|
255
|
-
condition="f_slice_area='{}'"
|
256
|
-
@change="$parent.$parent.getmeterbook(model.f_slice_area)"
|
257
|
-
:value-single="true">
|
258
|
-
</v-select>
|
259
|
-
</div>
|
260
|
-
<div :class="$parent.$parent.style">
|
261
|
-
<label class="font_normal_body">抄 表 册</label>
|
262
|
-
<v-select class="select_list select"
|
263
|
-
placeholder='抄表册' style="width: 60%"
|
264
|
-
:value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
|
265
|
-
:options='$parent.$parent.cbc'
|
266
|
-
filer-key="name"
|
267
|
-
close-on-select clear-button
|
268
|
-
condition="f_meter_book_num={}"
|
269
|
-
:value-single="true">
|
270
|
-
</v-select>
|
271
|
-
</div>
|
272
|
-
<div :class="$parent.$parent.style">
|
273
|
-
<label class="font_normal_body">起始时间</label>
|
274
|
-
<datepicker
|
275
|
-
placeholder='起始时间' style="width:60%"
|
276
|
-
:disabled-days-of-week="[]"
|
277
|
-
:format="'yyyy-MM-dd'"
|
278
|
-
:show-rest-button="reset"
|
279
|
-
:value.sync="model.f_start_time"
|
280
|
-
v-model="model.f_start_time"
|
281
|
-
condition="f_offsite_time >= '{} 00:00:00'">
|
282
|
-
</datepicker>
|
283
|
-
</div>
|
284
|
-
<div :class="$parent.$parent.style">
|
285
|
-
<label class="font_normal_body">结束时间</label>
|
286
|
-
<datepicker
|
287
|
-
placeholder='结束时间' style="width:60%"
|
288
|
-
:disabled-days-of-week="[]"
|
289
|
-
:format="'yyyy-MM-dd'"
|
290
|
-
:show-rest-button="reset"
|
291
|
-
:value.sync="model.f_end_time"
|
292
|
-
v-model="model.f_end_time"
|
293
|
-
condition="f_offsite_time <= '{} 23:59:59'">
|
294
|
-
</datepicker>
|
295
|
-
</div>
|
296
|
-
</div>
|
297
|
-
<div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
|
298
|
-
<div :class="$parent.$parent.style">
|
299
|
-
<label class="font_normal_body">维 修 员</label>
|
300
|
-
<input type="text" class="input_search" v-model="model.f_repairman"
|
301
|
-
condition="f_repairman = '{}'"
|
302
|
-
style="width: 60%" placeholder="维修员">
|
303
|
-
</div>
|
304
|
-
<div :class="$parent.$parent.style">
|
305
|
-
<label class="font_normal_body">用户名称</label>
|
306
|
-
<input type="text" class="input_search" v-model="model.f_user_name"
|
307
|
-
condition="f_user_name = '{}'"
|
308
|
-
style="width: 60%" placeholder="用户名称">
|
309
|
-
</div>
|
310
|
-
<div :class="$parent.$parent.style">
|
311
|
-
<label class="font_normal_body">小区名称:</label>
|
312
|
-
<div class="col-xs-8" >
|
313
|
-
<input style="width: 60%" class="input_search" v-model="model.f_residential_area" placeholder="请输入小区(可模糊查询)" condition="f_residential_area like '%{}%'">
|
314
|
-
</div>
|
315
|
-
</div>
|
316
|
-
</div>
|
317
|
-
</div>
|
318
|
-
</criteria>
|
319
|
-
<data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
|
320
|
-
<template partial='head'>
|
321
|
-
<tr>
|
322
|
-
<th v-if="$parent.$parent.$parent.transfer=='是'"><nobr><!--<input type="checkbox" v-model="$parent.$parent.$parent.checkAll" @click.stop="()=>{return}" />-->选择</nobr></th>
|
323
|
-
<th><nobr>入户状态</nobr></th>
|
324
|
-
<th><nobr>用户编号</nobr></th>
|
325
|
-
<th><nobr>用户名</nobr></th>
|
326
|
-
<th><nobr>用户电话</nobr></th>
|
327
|
-
<th><nobr>用户小区</nobr></th>
|
328
|
-
<th><nobr>用户地址</nobr></th>
|
329
|
-
<th><nobr>安检时间</nobr></th>
|
330
|
-
<th><nobr>安检员</nobr></th>
|
331
|
-
<th><nobr>计划名</nobr></th>
|
332
|
-
<th><nobr>是否有隐患</nobr></th>
|
333
|
-
<th><nobr>隐患数</nobr></th>
|
334
|
-
<th><nobr>处理数</nobr></th>
|
335
|
-
<th><nobr>完成数</nobr></th>
|
336
|
-
<th><nobr>处理情况</nobr></th>
|
337
|
-
<th><nobr>完成情况</nobr></th>
|
338
|
-
<!-- <th><nobr>维修情况</nobr></th>-->
|
339
|
-
<th><nobr>维修员</nobr></th>
|
340
|
-
<th><nobr>隐患明细</nobr></th>
|
341
|
-
</tr>
|
342
|
-
</template>
|
343
|
-
<template partial='body'>
|
344
|
-
<td v-if="$parent.$parent.$parent.transfer=='是'" style="text-align: center;white-space:nowrap;"><input type="checkbox" v-if="row.f_defect_count>row.f_deal_count && (row.f_defect_count - row.f_repair_count) > row.zxzg_count" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)"></input></td>
|
345
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
|
346
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
|
347
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
|
348
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
|
349
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
|
350
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
|
351
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
|
352
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
|
353
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
|
354
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
|
355
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
|
356
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_deal_count}}</td>
|
357
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>
|
358
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_is_deal}}</td>
|
359
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_is_repair}}</td>
|
360
|
-
<!-- <td style="text-align: center;white-space:nowrap;">{{row.f_repaired}}</td>-->
|
361
|
-
<td style="text-align: center;white-space:nowrap;">{{row.f_repairman}}</td>
|
362
|
-
<td style="text-align: center;white-space:nowrap;"><span :title="$parent.$parent.$parent.trouble(row.f_defect_content)" style="display: block;max-width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ $parent.$parent.$parent.trouble(row.f_defect_content)}}</span></td>
|
363
|
-
</template>
|
364
|
-
</data-grid>
|
365
|
-
</criteria-paged>
|
366
|
-
|
367
|
-
<modal :show.sync="showModal" v-ref:modal>
|
368
|
-
<div slot="modal-header" class="modal-header">
|
369
|
-
<h4 class="modal-title">
|
370
|
-
选择计划
|
371
|
-
</h4>
|
372
|
-
</div>
|
373
|
-
<div slot="modal-body" class="modal-body">
|
374
|
-
<plan-chooser :f.sync="this.$login.f" v-ref:chooser></plan-chooser>
|
375
|
-
</div>
|
376
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
377
|
-
<button class="button_search" @click="ok">确认</button>
|
378
|
-
<button class="button_search" @click="cancel">取消</button>
|
379
|
-
</div>
|
380
|
-
</modal>
|
381
|
-
<modal :show.sync="showModal2" :backdrop="false">
|
382
|
-
<div slot="modal-header" class="modal-header">
|
383
|
-
<h4 class="modal-title">
|
384
|
-
转维修
|
385
|
-
</h4>
|
386
|
-
</div>
|
387
|
-
<div slot="modal-body" class="modal-body">
|
388
|
-
<div v-if="true">
|
389
|
-
<div class="row" style="margin-top: 10px">
|
390
|
-
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
|
391
|
-
<div class="col-xs-8 col-md-8">
|
392
|
-
<v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
|
393
|
-
:options='dispatchTypeOptions' placeholder='派发类型'
|
394
|
-
close-on-select>
|
395
|
-
</v-select>
|
396
|
-
</div>
|
397
|
-
</div>
|
398
|
-
<div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
|
399
|
-
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维 修 员</label>
|
400
|
-
<div class="col-xs-8 col-md-8">
|
401
|
-
<v-select
|
402
|
-
:value.sync="selectData.f_repairman"
|
403
|
-
:value-single="true"
|
404
|
-
:options='repairers'
|
405
|
-
placeholder='请选择维修员'
|
406
|
-
close-on-select></v-select>
|
407
|
-
</div>
|
408
|
-
</div>
|
409
|
-
<div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
|
410
|
-
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站    点</label>
|
411
|
-
<div class="col-xs-8 col-md-8">
|
412
|
-
<right-tree
|
413
|
-
islist
|
414
|
-
:userid="userid"
|
415
|
-
:source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
|
416
|
-
@re-res="getSiteRes"></right-tree>
|
417
|
-
</div>
|
418
|
-
</div>
|
419
|
-
<div class="row" style="margin-top: 10px">
|
420
|
-
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
|
421
|
-
<div class="col-xs-8 col-md-8">
|
422
|
-
<v-select :value.sync="selectData.f_repairtype" style="width:60%"
|
423
|
-
class="select select_list"
|
424
|
-
:value-single="true"
|
425
|
-
:options='repairTypeOptions'
|
426
|
-
close-on-select>
|
427
|
-
</v-select>
|
428
|
-
</div>
|
429
|
-
</div>
|
430
|
-
<div class="row" style="margin-top: 10px">
|
431
|
-
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备 注</label>
|
432
|
-
<div class="col-xs-8 col-md-8">
|
433
|
-
<textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
|
434
|
-
</div>
|
435
|
-
</div>
|
436
|
-
</div>
|
437
|
-
</div>
|
438
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
439
|
-
<button class="button_search" @click="rectification">转维修</button>
|
440
|
-
<button class="button_search" @click="cancel1">取消</button>
|
441
|
-
</div>
|
442
|
-
</modal>
|
443
|
-
<modal :show.sync="showModal3">
|
444
|
-
<div slot="modal-header" class="modal-header">
|
445
|
-
<h4 class="modal-title">
|
446
|
-
转维修进度{{ progressbarWidth }}%
|
447
|
-
</h4>
|
448
|
-
</div>
|
449
|
-
<div slot="modal-body" class="modal-body">
|
450
|
-
<div class="progress">
|
451
|
-
<div class="progress-bar" role="progressbar" aria-valuenow="60"
|
452
|
-
aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
|
453
|
-
<!-- <span class="sr-only">40% 完成</span>-->
|
454
|
-
</div>
|
455
|
-
</div>
|
456
|
-
</div>
|
457
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
|
458
|
-
</modal>
|
459
|
-
</div>
|
460
|
-
</template>
|
461
|
-
<script>
|
462
|
-
import {PagedList} from 'vue-client'
|
463
|
-
import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
|
464
|
-
import co from 'co'
|
465
|
-
import Vue from 'vue'
|
466
|
-
import * as Util from '../../components/Util'
|
467
|
-
|
468
|
-
let select = function* (self) {
|
469
|
-
let http = new HttpResetClass()
|
470
|
-
let getGasman = yield http.load('POST', '/rs/search', {
|
471
|
-
source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
|
472
|
-
userid: self.$login.f.id
|
473
|
-
}, {resolveMsg: null, rejectMsg: null})
|
474
|
-
//tag
|
475
|
-
self.checkersid.push({label: '全部', value: ''})
|
476
|
-
getGasman.data.forEach((checker) => {
|
477
|
-
self.checkersid.push({label: checker.name, value: checker.name})
|
478
|
-
})
|
479
|
-
}
|
480
|
-
export default {
|
481
|
-
title: '隐患查询',
|
482
|
-
data() {
|
483
|
-
let model = new PagedList('rs/sql/GetCheckPaperByDefectNew', 20, {
|
484
|
-
f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
|
485
|
-
})
|
486
|
-
model.f_filialeids = '(' + this.$login.f.orgid + ')'
|
487
|
-
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"
|
488
|
-
return {
|
489
|
-
repaired:[{label: '全部', value: ''},{label: '未完成', value: '未完成'}, {label: '已完成', value: '已完成'}],
|
490
|
-
deals:[{label: '全部', value: ''},{label: '未处理', value: '未处理'}, {label: '已处理', value: '已处理'}],
|
491
|
-
hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
|
492
|
-
f: this.$login.f,
|
493
|
-
model: model,
|
494
|
-
criteriaShow: false,
|
495
|
-
checkAll:false,
|
496
|
-
timercount:0,
|
497
|
-
showModal2:false,
|
498
|
-
repairTypeOptions:this.$appdata.getParam('报修类型'),
|
499
|
-
dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
|
500
|
-
checkes:[],
|
501
|
-
showModal: false,
|
502
|
-
f_check_plan: {f_plan_name: '', id: ''},
|
503
|
-
sumsmodel: {},
|
504
|
-
resids:{},
|
505
|
-
all: false,
|
506
|
-
fields: {},
|
507
|
-
|
508
|
-
selectData:{
|
509
|
-
dispatchType:'',
|
510
|
-
f_repairman:'',
|
511
|
-
f_remarks:'',
|
512
|
-
f_repairtype:''
|
513
|
-
},
|
514
|
-
progressbarWidth:'0',
|
515
|
-
modelval: [],
|
516
|
-
isbusy:false,
|
517
|
-
transfer: null,
|
518
|
-
checkersid: [],
|
519
|
-
showModal3:false,
|
520
|
-
toRepairCount:0,
|
521
|
-
sliceArea: [],
|
522
|
-
callSends:[],
|
523
|
-
cbc:[],
|
524
|
-
repairedOptions:[{label: '全部', value: ''},{label: '已修', value: '已修'}, {label: '未修', value: '未修'}],
|
525
|
-
repairers:[],
|
526
|
-
cbcs:[],
|
527
|
-
thead: '',
|
528
|
-
headData: ['入户状态','用户编号','用户名','用户电话','用户小区','用户地址','安检时间','安检员','计划名','是否有隐患','隐患数','隐患明细','处理数','完成数','处理情况','完成情况','维修员'],
|
529
|
-
bodyData: ['f_entry_status','f_userinfo_code','f_user_name','f_user_phone','f_residential_area','f_address','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','defecttext','f_deal_count','f_repair_count','f_is_deal','f_is_repair','f_repairman'],
|
530
|
-
}
|
531
|
-
},
|
532
|
-
props:{
|
533
|
-
style: {
|
534
|
-
type: String,
|
535
|
-
default: 'col-sm-2 form-group'
|
536
|
-
},
|
537
|
-
style2: {
|
538
|
-
type: String,
|
539
|
-
default: 'col-sm-4 form-group'
|
540
|
-
}
|
541
|
-
|
542
|
-
},
|
543
|
-
|
544
|
-
methods: {
|
545
|
-
getSiteRes(obj) {
|
546
|
-
console.log('siteRes ---> ')
|
547
|
-
console.log(obj)
|
548
|
-
if(obj.resids[0]){
|
549
|
-
this.selectData.f_meetunit = obj.res.join('.')
|
550
|
-
this.selectData.f_reciever = obj.resids.join('.')
|
551
|
-
this.selectData.f_outlets = obj.res[obj.res.length - 1]
|
552
|
-
}else {
|
553
|
-
this.selectData.f_meetunit = ''
|
554
|
-
this.selectData.f_reciever = ''
|
555
|
-
this.selectData.f_outlets = ''
|
556
|
-
}
|
557
|
-
},
|
558
|
-
trouble(val) {
|
559
|
-
// return val.replaceAll("'",'')
|
560
|
-
// .replaceAll("\"",'')
|
561
|
-
// .replaceAll("{",'')
|
562
|
-
// .replaceAll("}",'')
|
563
|
-
// .replaceAll("]",'')
|
564
|
-
// .replaceAll("[",'')
|
565
|
-
// .replaceAll("result:",'')
|
566
|
-
// .replaceAll("data:",'')
|
567
|
-
// .replaceAll("有隐患",'')
|
568
|
-
// .replaceAll(",",'')
|
569
|
-
|
570
|
-
|
571
|
-
const defect_content = JSON.parse(val)
|
572
|
-
let result = ''
|
573
|
-
if (defect_content.data) {
|
574
|
-
const jsonData = defect_content.data
|
575
|
-
for (const itemdata of jsonData) {
|
576
|
-
const keys = Object.keys(itemdata)
|
577
|
-
for (const itm of keys) {
|
578
|
-
const value = itemdata[itm]
|
579
|
-
result += itm + ':' + value
|
580
|
-
}
|
581
|
-
}
|
582
|
-
}
|
583
|
-
return result
|
584
|
-
},
|
585
|
-
getEmp() {
|
586
|
-
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}`}
|
587
|
-
let http = new HttpResetClass()
|
588
|
-
http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
589
|
-
let str=`'`
|
590
|
-
res.data.forEach((item,idx,arr) => {
|
591
|
-
//tag
|
592
|
-
if(idx+1==arr.length){
|
593
|
-
str += item.id + `'`
|
594
|
-
}else{
|
595
|
-
str += item.id+`','`
|
596
|
-
}
|
597
|
-
|
598
|
-
})
|
599
|
-
let http1 = new HttpResetClass()
|
600
|
-
http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
|
601
|
-
data: {
|
602
|
-
items: 'id,f_user_telephone',
|
603
|
-
tablename: 't_user',
|
604
|
-
condition: `id in (${str})`,
|
605
|
-
orderitem: 'id'
|
606
|
-
}
|
607
|
-
}, {resolveMsg: null, rejectMsg: null}).then((ress) => {
|
608
|
-
|
609
|
-
res.data.forEach((user)=>{
|
610
|
-
try {
|
611
|
-
ress.data.forEach((tel,tidx,arr)=>{
|
612
|
-
//tag
|
613
|
-
if(user.id==tel.id){
|
614
|
-
this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
|
615
|
-
ress.data.splice(tidx,1)
|
616
|
-
//tag
|
617
|
-
throw new Error("跳出循环");
|
618
|
-
}
|
619
|
-
})
|
620
|
-
}catch (e) {
|
621
|
-
//tag
|
622
|
-
}
|
623
|
-
})
|
624
|
-
})
|
625
|
-
|
626
|
-
})
|
627
|
-
},
|
628
|
-
toRepair(){
|
629
|
-
if(this.checkes.length==0){
|
630
|
-
return this.$showMessage('请先选择需要转维修的用户!')
|
631
|
-
}
|
632
|
-
this.showModal2=true
|
633
|
-
},
|
634
|
-
async rectification(){
|
635
|
-
|
636
|
-
if(this.selectData.dispatchType){
|
637
|
-
if(this.selectData.dispatchType=='派发给站点'){
|
638
|
-
if(!this.selectData.f_reciever){
|
639
|
-
this.$showMessage('请选择部门!')
|
640
|
-
return
|
641
|
-
}
|
642
|
-
}else{
|
643
|
-
if(!this.selectData.f_repairman){
|
644
|
-
this.$showMessage('请选择维修员!')
|
645
|
-
return
|
646
|
-
}
|
647
|
-
}
|
648
|
-
}else {
|
649
|
-
this.$showMessage('请选择派发类型!')
|
650
|
-
return
|
651
|
-
}
|
652
|
-
|
653
|
-
if(!this.selectData.f_repairtype){
|
654
|
-
this.$showMessage('请选择报修类型!')
|
655
|
-
return
|
656
|
-
}
|
657
|
-
this.showModal3=true
|
658
|
-
let act={}
|
659
|
-
let toRepair=''
|
660
|
-
let successCount=0
|
661
|
-
if(this.selectData.dispatchType=='派发给站点'){
|
662
|
-
act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
|
663
|
-
toRepair=null
|
664
|
-
}else{
|
665
|
-
console.log('派发给维修员---------'+this.selectData.f_repairman)
|
666
|
-
act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
|
667
|
-
toRepair='一级派单'
|
668
|
-
}
|
669
|
-
let rep={
|
670
|
-
loginUser: {
|
671
|
-
name: this.$login.f.name,
|
672
|
-
ename: this.$login.f.ename
|
673
|
-
},
|
674
|
-
f_meetunit: this.$login.f.deps,
|
675
|
-
f_attendant: this.$login.f.name,
|
676
|
-
f_outlets: this.$login.f.deps,
|
677
|
-
f_remarks: this.selectData.f_remarks,
|
678
|
-
f_repairtype: this.selectData.f_repairtype,
|
679
|
-
toRepair: toRepair,
|
680
|
-
activity:act
|
681
|
-
}
|
682
|
-
for(let i=0; i<this.checkes.length; i++){
|
683
|
-
try {
|
684
|
-
let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', {
|
685
|
-
id:this.checkes[i],
|
686
|
-
repData:rep,
|
687
|
-
source:'pc'
|
688
|
-
}, {resolveMsg: null, rejectMsg: null})
|
689
|
-
if (result.data.code==200) {
|
690
|
-
successCount += result.data.successcon
|
691
|
-
this.progressbarWidth=Math.ceil((i+1)*100/(this.checkes.length))
|
692
|
-
}
|
693
|
-
}catch (e) {
|
694
|
-
this.showModal3=false
|
695
|
-
this.$showMessage('网络异常,请稍后再试!')
|
696
|
-
return
|
697
|
-
}
|
698
|
-
}
|
699
|
-
this.showModal3=false
|
700
|
-
this.cancel1()
|
701
|
-
this.$showMessage('本次转维修成功'+successCount+'单')
|
702
|
-
},
|
703
|
-
/*async rectification(){
|
704
|
-
this.isbusy =true
|
705
|
-
console.log("----this.checkes",this.checkes.toString())
|
706
|
-
console.log("----this.getcon()",this.getcon())
|
707
|
-
if(this.checkes.length==0){
|
708
|
-
return this.$showMessage('请先选择需要转维修的用户!')
|
709
|
-
}
|
710
|
-
// if (this.checkAll){
|
711
|
-
let data={
|
712
|
-
f_filialeids: this.model.params.f_filialeids,
|
713
|
-
f_defect_content: this.model.params.f_defect_content,
|
714
|
-
condition: `${this.model.params.condition} and id in(${this.getcon()})`
|
715
|
-
}
|
716
|
-
let res1= await new HttpResetClass().load('post','rs/sql/GetCheckPaperByDefectNew',{data: data })
|
717
|
-
for (let i = 0; i < res1.data.length; i++) {
|
718
|
-
let data1={
|
719
|
-
f_paper_id: res1.data[i].id,
|
720
|
-
condition:`f_repaire_type = '隐患未处理'`
|
721
|
-
}
|
722
|
-
let res2 = await new HttpResetClass().load('POST' , 'rs/sql/GetDefectByPaperIdNew' , {data: data1 } )
|
723
|
-
//tag
|
724
|
-
if(res2.data.length==0){
|
725
|
-
continue
|
726
|
-
}
|
727
|
-
const uploadData = {
|
728
|
-
model: {
|
729
|
-
serviceacitivity: [{
|
730
|
-
f_service_acitivity_type: '派单'
|
731
|
-
}],
|
732
|
-
f_repairitems: {},
|
733
|
-
failure: '',
|
734
|
-
f_source: '安检',
|
735
|
-
f_service_id: '',
|
736
|
-
f_contact_phone: res1.data[i].f_user_phone,
|
737
|
-
f_meetunit: this.$login.f.deps,
|
738
|
-
f_phone: '',
|
739
|
-
f_user_name: res1.data[i].f_user_name,
|
740
|
-
f_address: res1.data[i].f_address,
|
741
|
-
f_repair_date: Util.getNowDate(),
|
742
|
-
f_reciever: '',
|
743
|
-
f_remarks: this.selectData.f_remarks,
|
744
|
-
f_user_type: res1.data[i].f_check_type,
|
745
|
-
f_area: '',
|
746
|
-
f_unit_name: '',
|
747
|
-
f_street: res1.data[i].f_street,
|
748
|
-
f_residential_area: res1.data[i].f_residential_area,
|
749
|
-
f_building: res1.data[i].f_building,
|
750
|
-
f_unit: res1.data[i].f_unit,
|
751
|
-
f_floor: res1.data[i].f_floor,
|
752
|
-
f_room: res1.data[i].f_room,
|
753
|
-
aState: '',
|
754
|
-
f_repairtype: this.selectData.f_repairtype,
|
755
|
-
f_userinfo_id: res1.data[i].f_userinfo_id,
|
756
|
-
f_userinfo_code: res1.data[i].f_userinfo_code,
|
757
|
-
f_orgstr: res1.data[i].f_filialeid,
|
758
|
-
f_outlets: '',
|
759
|
-
f_attendant: this.$login.f.name
|
760
|
-
},
|
761
|
-
loginUser: {
|
762
|
-
name: this.$login.f.name,
|
763
|
-
ename: this.$login.f.ename
|
764
|
-
},
|
765
|
-
user: {
|
766
|
-
f_userinfo_id: res1.data[i].f_userinfo_id
|
767
|
-
},
|
768
|
-
callObj: null
|
769
|
-
}
|
770
|
-
uploadData.model.serviceacitivity[0].f_reciever = this.selectData.f_repairman
|
771
|
-
// uploadData.model.f_meetunit = self.$login.f.orgpathnames
|
772
|
-
// uploadData.model.f_orgstr = self.$login.f.orgpathstr
|
773
|
-
// uploadData.model.f_outlets = self.$login.f.f_parentname
|
774
|
-
uploadData.model.f_orgid = this.$login.f.orgid
|
775
|
-
uploadData.model.f_filiale = this.$login.f.org
|
776
|
-
uploadData.model.f_outlets = this.$login.f.deps
|
777
|
-
uploadData.model.f_filiale_id = this.$login.f.orgid
|
778
|
-
uploadData.toRepair = '一级派单'
|
779
|
-
// let res3 = await new HttpResetClass().load('post','/rs/sql/GetUserForRepaireNew', {data: {f_userinfo_id: res1.data[i].f_userinfo_id}})
|
780
|
-
// uploadData.model = Object.assign(uploadData.model, res3.data[0])
|
781
|
-
let failure = []
|
782
|
-
res2.data.forEach(row => {
|
783
|
-
console.log('row.f_item_value',row.f_item_value)
|
784
|
-
failure.push({
|
785
|
-
f_failure_type: row.f_item_name,
|
786
|
-
failurecase: row.f_item_value?row.f_item_value.split(','):''
|
787
|
-
})
|
788
|
-
})
|
789
|
-
uploadData.model.failure = failure
|
790
|
-
// 拼接repairitems
|
791
|
-
let rows = JSON.parse(JSON.stringify(res2.data))
|
792
|
-
let repairitems = {
|
793
|
-
data: []
|
794
|
-
}
|
795
|
-
let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
|
796
|
-
// 取隐患未处理的
|
797
|
-
rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
|
798
|
-
//tag)
|
799
|
-
// 开始拼接
|
800
|
-
rows.forEach(row => {
|
801
|
-
let existIndex = -1
|
802
|
-
// 判断该设备是否已经存在
|
803
|
-
for (let i = 0; i < repairitems.data.length; i++) {
|
804
|
-
if (repairitems.data[i].f_type == row.f_device_type) {
|
805
|
-
existIndex = i
|
806
|
-
break
|
807
|
-
}
|
808
|
-
}
|
809
|
-
if (existIndex == -1) {
|
810
|
-
// 不存在则新建
|
811
|
-
let newItem = {
|
812
|
-
f_type: row.f_device_type,
|
813
|
-
details: [{
|
814
|
-
f_defect_id: row.id,
|
815
|
-
f_project: `${row.f_item_name}:${row.f_item_value}`,
|
816
|
-
type: 'selector',
|
817
|
-
options: safecheckOptions
|
818
|
-
}]
|
819
|
-
}
|
820
|
-
repairitems.data.push(newItem)
|
821
|
-
} else {
|
822
|
-
// 存在则追加
|
823
|
-
repairitems.data[existIndex].details.push({
|
824
|
-
f_defect_id: row.id,
|
825
|
-
f_project: `${row.f_item_name}:${row.f_item_value}`,
|
826
|
-
type: 'selector',
|
827
|
-
options: safecheckOptions
|
828
|
-
})
|
829
|
-
}
|
830
|
-
})
|
831
|
-
uploadData.model.f_repairitems = repairitems
|
832
|
-
uploadData.rows=rows
|
833
|
-
//tag)
|
834
|
-
//tag
|
835
|
-
console.log('uploadData---', uploadData)
|
836
|
-
if (uploadData.model.f_repairitems.data.length>0){
|
837
|
-
this.callSends.push(uploadData)
|
838
|
-
}else{
|
839
|
-
//tag
|
840
|
-
}
|
841
|
-
}
|
842
|
-
//tag)
|
843
|
-
let timer = setInterval(async ()=>{
|
844
|
-
this.showModal3=true
|
845
|
-
this.isbusy=false
|
846
|
-
if (this.timercount<this.callSends.length){
|
847
|
-
//tag)
|
848
|
-
let rows=this.callSends[this.timercount].rows
|
849
|
-
//tag)
|
850
|
-
let result = await this.$resetpost('/rs/logic/callerSend1', this.callSends[this.timercount])
|
851
|
-
//tag)
|
852
|
-
if (result.data.f_service_id) {
|
853
|
-
const data = {
|
854
|
-
f_paper_id: rows[0].f_paper_id,
|
855
|
-
f_service_id: result.data.f_service_id,
|
856
|
-
itemsId: this.$login.convertToIn(rows.map(row => row.id))
|
857
|
-
}
|
858
|
-
//tag
|
859
|
-
let updateRes = await this.$resetpost('/rs/logic/updateDefectStateNew', data)
|
860
|
-
}
|
861
|
-
this.toRepairCount++
|
862
|
-
//tag
|
863
|
-
this.timercount++
|
864
|
-
}else{
|
865
|
-
clearInterval(timer)
|
866
|
-
//tag
|
867
|
-
this.callSends=[]
|
868
|
-
this.timercount=0
|
869
|
-
this.showModal3=false
|
870
|
-
this.cancel1()
|
871
|
-
this.$showMessage('本次转维修成功'+this.toRepairCount+'单')
|
872
|
-
this.toRepairCount=0
|
873
|
-
}
|
874
|
-
}, 3000)
|
875
|
-
},*/
|
876
|
-
cancel1(){
|
877
|
-
this.showModal2=false
|
878
|
-
this.selectData={
|
879
|
-
dispatchType:'',
|
880
|
-
f_repairman:'',
|
881
|
-
f_remarks:'',
|
882
|
-
f_repairtype:''
|
883
|
-
}
|
884
|
-
},
|
885
|
-
sleep(d){
|
886
|
-
//tag)
|
887
|
-
var t = Date.now()
|
888
|
-
while(Date.now - t <= d){
|
889
|
-
|
890
|
-
}
|
891
|
-
//tag)
|
892
|
-
},
|
893
|
-
isChecked(v) {
|
894
|
-
// 如果全选,不在的按选中算,否则,在的按选中算
|
895
|
-
if (this.checkAll) {
|
896
|
-
return this.checkes.indexOf(v) == -1
|
897
|
-
} else {
|
898
|
-
return this.checkes.indexOf(v) != -1
|
899
|
-
}
|
900
|
-
},
|
901
|
-
setCheckAll() {
|
902
|
-
this.checkAll=this.checkAll?false:true;
|
903
|
-
// 全选改变后,清空选中数据
|
904
|
-
this.checkes = []
|
905
|
-
},
|
906
|
-
setCheckes(id) {
|
907
|
-
let index=this.checkes.indexOf(id)
|
908
|
-
if(index<0){
|
909
|
-
this.checkes.push(id)
|
910
|
-
}else{
|
911
|
-
this.checkes.splice(index,1)
|
912
|
-
}
|
913
|
-
},
|
914
|
-
|
915
|
-
getmeterbook(val){
|
916
|
-
this.cbc=[]
|
917
|
-
this.cbc.push({
|
918
|
-
label:'全部',
|
919
|
-
value:''
|
920
|
-
})
|
921
|
-
if (val==''){
|
922
|
-
|
923
|
-
this.cbcs.forEach(res=>{
|
924
|
-
this.cbc.push({
|
925
|
-
label:res.f_book_name,
|
926
|
-
value:res.id
|
927
|
-
})
|
928
|
-
})
|
929
|
-
}else{
|
930
|
-
this.cbcs.forEach(res=>{
|
931
|
-
if (res.f_book_slice_area==val){
|
932
|
-
this.cbc.push({
|
933
|
-
label:res.f_book_name,
|
934
|
-
value:res.id
|
935
|
-
})
|
936
|
-
}
|
937
|
-
})
|
938
|
-
}
|
939
|
-
},
|
940
|
-
|
941
|
-
Mreadibook(val){
|
942
|
-
//tag
|
943
|
-
//tag
|
944
|
-
this.sliceArea=[]
|
945
|
-
if (val){
|
946
|
-
new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
|
947
|
-
items: 'name',
|
948
|
-
tablename: 't_zone',
|
949
|
-
condition: `parentid in ${val}`,
|
950
|
-
orderitem: 'id'
|
951
|
-
}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
952
|
-
this.sliceArea.push({
|
953
|
-
label:'全部',
|
954
|
-
value:''
|
955
|
-
})
|
956
|
-
res.data.forEach(ress=>{
|
957
|
-
this.sliceArea.push({
|
958
|
-
label:ress.name,
|
959
|
-
value:ress.name
|
960
|
-
})
|
961
|
-
})
|
962
|
-
|
963
|
-
})
|
964
|
-
}
|
965
|
-
},
|
966
|
-
getAllMeterBook(val){
|
967
|
-
//tag
|
968
|
-
//tag
|
969
|
-
this.cbcs=[]
|
970
|
-
if (val){
|
971
|
-
new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
|
972
|
-
items: 'f_book_name,f_book_slice_area,id',
|
973
|
-
tablename: 't_meter_book',
|
974
|
-
condition: `f_filiale_id in ${val}`,
|
975
|
-
orderitem: 'id'
|
976
|
-
}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
977
|
-
res.data.forEach(ress=>{
|
978
|
-
this.cbcs.push({
|
979
|
-
id:ress.id,
|
980
|
-
f_book_name:ress.f_book_name,
|
981
|
-
f_book_slice_area:ress.f_book_slice_area
|
982
|
-
})
|
983
|
-
})
|
984
|
-
this.cbc=[]
|
985
|
-
this.cbc.push({
|
986
|
-
label:'全部',
|
987
|
-
value:''
|
988
|
-
})
|
989
|
-
this.cbcs.forEach(res=>{
|
990
|
-
this.cbc.push({
|
991
|
-
label:res.f_book_name,
|
992
|
-
value:res.id
|
993
|
-
})
|
994
|
-
})
|
995
|
-
})
|
996
|
-
}
|
997
|
-
},
|
998
|
-
hiddenr() {
|
999
|
-
this.$parent.showItem = !this.$parent.showItem
|
1000
|
-
},
|
1001
|
-
hidden() {
|
1002
|
-
this.criteriaShow = !this.criteriaShow
|
1003
|
-
},
|
1004
|
-
search(args) {
|
1005
|
-
//tag
|
1006
|
-
if (this.f_check_plan.f_plan_name) {
|
1007
|
-
args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
|
1008
|
-
}
|
1009
|
-
this.checkes = []
|
1010
|
-
this.checkAll=false
|
1011
|
-
this.model.search(args.condition, args.model)
|
1012
|
-
},
|
1013
|
-
getRes(obj) {
|
1014
|
-
//tag
|
1015
|
-
this.resids = {res:obj.res[0], resids:obj.resids[0]}
|
1016
|
-
this.model.f_filialeids = this.$login.convertToIn(obj.resids);
|
1017
|
-
this.Mreadibook(this.model.f_filialeids)
|
1018
|
-
this.getAllMeterBook(this.model.f_filialeids)
|
1019
|
-
},
|
1020
|
-
showChooser() {
|
1021
|
-
this.showModal = true
|
1022
|
-
},
|
1023
|
-
ok() {
|
1024
|
-
this.showModal = false
|
1025
|
-
if (this.$refs.modal.$children[0].selectedRow.id) {
|
1026
|
-
this.f_check_plan = this.$refs.modal.$children[0].selectedRow
|
1027
|
-
}
|
1028
|
-
},
|
1029
|
-
cancel() {
|
1030
|
-
this.showModal = false
|
1031
|
-
this.f_check_plan = {f_plan_name: '', id: ''}
|
1032
|
-
}
|
1033
|
-
},
|
1034
|
-
ready() {
|
1035
|
-
//tag
|
1036
|
-
this.transfer=Vue.$appdata.getSingleValue('安检转工单')
|
1037
|
-
this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
|
1038
|
-
this.getEmp()
|
1039
|
-
let gen = select(this)
|
1040
|
-
// this.Mreadibook(`('${this.$login.f.orgid}')`)
|
1041
|
-
co(gen)
|
1042
|
-
},
|
1043
|
-
watch:{
|
1044
|
-
'timercount'(){
|
1045
|
-
if (this.timercount===0){
|
1046
|
-
this.progressbarWidth = '0'
|
1047
|
-
}else {
|
1048
|
-
//tag
|
1049
|
-
//tag
|
1050
|
-
this.progressbarWidth=parseInt(this.timercount*100/(this.callSends.length+1))
|
1051
|
-
}
|
1052
|
-
|
1053
|
-
}
|
1054
|
-
},
|
1055
|
-
computed: {
|
1056
|
-
selected() {
|
1057
|
-
return this.$refs.paged.$refs.grid.selected
|
1058
|
-
},
|
1059
|
-
getfield () {
|
1060
|
-
//tag
|
1061
|
-
let data = {}
|
1062
|
-
this.bodyData.forEach((value, index) => {
|
1063
|
-
data[this.bodyData[index]] = this.headData[index]
|
1064
|
-
})
|
1065
|
-
//合计字段打印
|
1066
|
-
this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
|
1067
|
-
if (this.sumsmodel) {
|
1068
|
-
Object.keys(this.sumsmodel).forEach((key) => {
|
1069
|
-
this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
|
1070
|
-
})
|
1071
|
-
} else {
|
1072
|
-
this.tfoot += '暂无'
|
1073
|
-
}
|
1074
|
-
this.tfoot += '</th></tr>'
|
1075
|
-
return data
|
1076
|
-
}
|
1077
|
-
}
|
1078
|
-
}
|
1079
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div class="flex">
|
3
|
+
<work-busy :is-busy="isbusy"></work-busy>
|
4
|
+
<criteria-paged :model="model" v-ref:paged>
|
5
|
+
<criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
|
6
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
7
|
+
<div class="row" v-show="!$parent.$parent.$parent.showItem">
|
8
|
+
<div :class="$parent.$parent.style">
|
9
|
+
<label class="font_normal_body">安检计划</label>
|
10
|
+
<input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
|
11
|
+
@click="$parent.$parent.showChooser"
|
12
|
+
style="width: 60%" placeholder="安检计划" readonly="readonly">
|
13
|
+
</div>
|
14
|
+
<div :class="$parent.$parent.style" v-show="false">
|
15
|
+
<label class="font_normal_body">存在隐患</label>
|
16
|
+
<v-select style="width:60% "
|
17
|
+
class="select select_list"
|
18
|
+
:value.sync="model.f_has_defect"
|
19
|
+
v-model="model.f_has_defect"
|
20
|
+
:options='$parent.$parent.hasDefectOptions'
|
21
|
+
:placeholder='model.f_has_defect'
|
22
|
+
condition="f_has_defect = '{}'"
|
23
|
+
close-on-select>
|
24
|
+
</v-select>
|
25
|
+
</div>
|
26
|
+
<div :class="$parent.$parent.style">
|
27
|
+
<label class="font_normal_body">用户编号</label>
|
28
|
+
<input type="text" class="input_search" v-model="model.f_userinfo_code"
|
29
|
+
condition="f_userinfo_code = '{}'"
|
30
|
+
style="width: 60%" placeholder="用户编号">
|
31
|
+
</div>
|
32
|
+
<div :class="$parent.$parent.style">
|
33
|
+
<label class="font_normal_body">完成情况</label>
|
34
|
+
<v-select
|
35
|
+
placeholder='完成情况查询'
|
36
|
+
:value-single="true"
|
37
|
+
class="select select_list" style="width: 60%"
|
38
|
+
v-model='model.f_is_repair'
|
39
|
+
:value.sync="model.f_is_repair"
|
40
|
+
:options='$parent.$parent.repaired'
|
41
|
+
condition="f_is_repair = '{}'"
|
42
|
+
close-on-select clear-button> </v-select>
|
43
|
+
</div>
|
44
|
+
<div :class="$parent.$parent.style">
|
45
|
+
<label class="font_normal_body">处理情况</label>
|
46
|
+
<v-select
|
47
|
+
placeholder='处理情况查询'
|
48
|
+
:value-single="true"
|
49
|
+
class="select select_list" style="width: 60%"
|
50
|
+
v-model='model.f_is_deal'
|
51
|
+
:value.sync="model.f_is_deal"
|
52
|
+
:options='$parent.$parent.deals'
|
53
|
+
condition="f_is_deal = '{}'"
|
54
|
+
close-on-select clear-button> </v-select>
|
55
|
+
</div>
|
56
|
+
<div class=" col-sm-4 form-group button-range" >
|
57
|
+
<div class="span" style="float: right;margin-top: 8px">
|
58
|
+
<div style="float: right" class="button_spacing"
|
59
|
+
:class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
|
60
|
+
@click="$parent.$parent.hiddenr()"></div>
|
61
|
+
<div style="float: right" class="button_spacing"
|
62
|
+
:class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
|
63
|
+
@click="$parent.$parent.hidden()"></div>
|
64
|
+
<button style="float: right" class="button_search button_spacing" @click="search">查询</button>
|
65
|
+
<button style="float: right" v-if="$parent.$parent.transfer=='是'" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>
|
66
|
+
<div style="float: right">
|
67
|
+
<export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
|
68
|
+
:field="$parent.$parent.getfield"
|
69
|
+
progress="safeGetExportProgress"
|
70
|
+
sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
<div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
|
76
|
+
<div :class="$parent.$parent.style">
|
77
|
+
<label class="font_normal_body">片  区</label>
|
78
|
+
<v-select class="select_list select"
|
79
|
+
placeholder='片区/管理站' style="width: 60%"
|
80
|
+
:value.sync="model.f_slice_area" v-model="model.f_slice_area"
|
81
|
+
:options='$parent.$parent.sliceArea'
|
82
|
+
filer-key="name"
|
83
|
+
close-on-select clear-button
|
84
|
+
condition="f_slice_area='{}'"
|
85
|
+
@change="$parent.$parent.getmeterbook(model.f_slice_area)"
|
86
|
+
:value-single="true">
|
87
|
+
</v-select>
|
88
|
+
</div>
|
89
|
+
<div :class="$parent.$parent.style2" style="margin: 0">
|
90
|
+
<role-selector-safe
|
91
|
+
role-name="安检员"
|
92
|
+
role-lable="安 检 员 "
|
93
|
+
:resobjprop.sync="$parent.$parent.resids"
|
94
|
+
@re-res="$parent.$parent.getRes"
|
95
|
+
:value.sync="model.f_checker_id"
|
96
|
+
v-model="model.f_checker_id"
|
97
|
+
condition="f_checker_name = '{}'">
|
98
|
+
</role-selector-safe>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<div :class="$parent.$parent.style">
|
102
|
+
<label class="font_normal_body">抄 表 册</label>
|
103
|
+
<v-select class="select_list select"
|
104
|
+
placeholder='抄表册' style="width: 60%"
|
105
|
+
:value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
|
106
|
+
:options='$parent.$parent.cbc'
|
107
|
+
filer-key="name"
|
108
|
+
close-on-select clear-button
|
109
|
+
condition="f_meter_book_num={}"
|
110
|
+
:value-single="true">
|
111
|
+
</v-select>
|
112
|
+
</div>
|
113
|
+
<div :class="$parent.$parent.style">
|
114
|
+
<label class="font_normal_body">起始时间</label>
|
115
|
+
<datepicker
|
116
|
+
placeholder='起始时间' style="width:60%"
|
117
|
+
:disabled-days-of-week="[]"
|
118
|
+
:format="'yyyy-MM-dd'"
|
119
|
+
:show-rest-button="reset"
|
120
|
+
:value.sync="model.f_start_time"
|
121
|
+
v-model="model.f_start_time"
|
122
|
+
condition="f_offsite_time >= '{} 00:00:00'">
|
123
|
+
</datepicker>
|
124
|
+
</div>
|
125
|
+
<div :class="$parent.$parent.style">
|
126
|
+
<label class="font_normal_body">结束时间</label>
|
127
|
+
<datepicker
|
128
|
+
placeholder='结束时间' style="width:60%"
|
129
|
+
:disabled-days-of-week="[]"
|
130
|
+
:format="'yyyy-MM-dd'"
|
131
|
+
:show-rest-button="reset"
|
132
|
+
:value.sync="model.f_end_time"
|
133
|
+
v-model="model.f_end_time"
|
134
|
+
condition="f_offsite_time <= '{} 23:59:59'">
|
135
|
+
</datepicker>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
</div>
|
139
|
+
<div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
|
140
|
+
|
141
|
+
<div :class="$parent.$parent.style">
|
142
|
+
<label class="font_normal_body">维 修 员</label>
|
143
|
+
<input type="text" class="input_search" v-model="model.f_repairman"
|
144
|
+
condition="f_repairman = '{}'"
|
145
|
+
style="width: 60%" placeholder="维修员">
|
146
|
+
</div>
|
147
|
+
<div :class="$parent.$parent.style">
|
148
|
+
<label class="font_normal_body">用户名称</label>
|
149
|
+
<input type="text" class="input_search" v-model="model.f_user_name"
|
150
|
+
condition="f_user_name = '{}'"
|
151
|
+
style="width: 60%" placeholder="用户名称">
|
152
|
+
</div>
|
153
|
+
<div :class="$parent.$parent.style">
|
154
|
+
<label class="font_normal_body">小区名称:</label>
|
155
|
+
<input style="width: 60%" class="input_search" v-model="model.f_residential_area" placeholder="请输入小区(可模糊查询)" condition="f_residential_area like '%{}%'">
|
156
|
+
</div>
|
157
|
+
|
158
|
+
</div>
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<div class="row" v-show="$parent.$parent.$parent.showItem">
|
163
|
+
<div :class="$parent.$parent.style">
|
164
|
+
<label class="font_normal_body">安检计划</label>
|
165
|
+
<input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
|
166
|
+
@click="$parent.$parent.showChooser"
|
167
|
+
style="width: 60%" placeholder="安检计划" readonly="readonly">
|
168
|
+
</div>
|
169
|
+
<div :class="$parent.$parent.style" v-show="false">
|
170
|
+
<label class="font_normal_body">存在隐患</label>
|
171
|
+
<v-select style="width:60% "
|
172
|
+
class="select select_list"
|
173
|
+
:value.sync="model.f_has_defect"
|
174
|
+
v-model="model.f_has_defect"
|
175
|
+
:options='$parent.$parent.hasDefectOptions'
|
176
|
+
:placeholder='model.f_has_defect'
|
177
|
+
condition="f_has_defect = '{}'"
|
178
|
+
close-on-select>
|
179
|
+
</v-select>
|
180
|
+
</div>
|
181
|
+
<div class="row" v-show="$parent.$parent.$parent.showItem">
|
182
|
+
<div :class="$parent.$parent.style">
|
183
|
+
<label class="font_normal_body">用户编号</label>
|
184
|
+
<input type="text" class="input_search" v-model="model.f_userinfo_code"
|
185
|
+
condition="f_userinfo_code = '{}'"
|
186
|
+
style="width: 60%" placeholder="用户编号">
|
187
|
+
</div>
|
188
|
+
|
189
|
+
<div class=" col-sm-4 form-group button-range">
|
190
|
+
<div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
|
191
|
+
<div style="float: right" class="button_spacing"
|
192
|
+
:class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
|
193
|
+
@click="$parent.$parent.hiddenr()"></div>
|
194
|
+
<div style="float: right" class="button_spacing"
|
195
|
+
:class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
|
196
|
+
@click="$parent.$parent.hidden()"></div>
|
197
|
+
<button style="float: right" class="button_search button_spacing" @click="search">查询</button>
|
198
|
+
<button style="float: right" v-if="$parent.$parent.transfer=='是'" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>
|
199
|
+
<div style="float: right">
|
200
|
+
<export-excel-old :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids}"
|
201
|
+
:field="$parent.$parent.getfield"
|
202
|
+
progress="safeGetExportProgress"
|
203
|
+
sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew" template-name='安检计划明细' :choose-col="true"></export-excel-old>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
</div>
|
209
|
+
|
210
|
+
<div :class="$parent.$parent.style">
|
211
|
+
<label class="font_normal_body">完成情况</label>
|
212
|
+
<v-select
|
213
|
+
placeholder='完成情况查询'
|
214
|
+
:value-single="true"
|
215
|
+
class="select select_list" style="width: 60%"
|
216
|
+
v-model='model.f_is_repair'
|
217
|
+
:value.sync="model.f_is_repair"
|
218
|
+
:options='$parent.$parent.repaired'
|
219
|
+
condition="f_is_repair = '{}'"
|
220
|
+
close-on-select clear-button> </v-select>
|
221
|
+
</div>
|
222
|
+
<div :class="$parent.$parent.style">
|
223
|
+
<label class="font_normal_body">处理情况</label>
|
224
|
+
<v-select
|
225
|
+
placeholder='处理情况查询'
|
226
|
+
:value-single="true"
|
227
|
+
class="select select_list" style="width: 60%"
|
228
|
+
v-model='model.f_is_deal'
|
229
|
+
:value.sync="model.f_is_deal"
|
230
|
+
:options='$parent.$parent.deals'
|
231
|
+
condition="f_is_deal = '{}'"
|
232
|
+
close-on-select clear-button> </v-select>
|
233
|
+
</div>
|
234
|
+
<div :class="$parent.$parent.style2" style="margin: 0">
|
235
|
+
<role-selector-safe
|
236
|
+
role-name="安检员"
|
237
|
+
:resobjprop.sync="$parent.$parent.resids"
|
238
|
+
role-lable="安 检 员 "
|
239
|
+
@re-res="$parent.$parent.getRes"
|
240
|
+
:value.sync="model.f_checker_id"
|
241
|
+
v-model="model.f_checker_id"
|
242
|
+
condition="f_checker_name = '{}'">
|
243
|
+
</role-selector-safe>
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
<div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
|
247
|
+
<div :class="$parent.$parent.style">
|
248
|
+
<label class="font_normal_body">片  区</label>
|
249
|
+
<v-select class="select_list select"
|
250
|
+
placeholder='片区/管理站' style="width: 60%"
|
251
|
+
:value.sync="model.f_slice_area" v-model="model.f_slice_area"
|
252
|
+
:options='$parent.$parent.sliceArea'
|
253
|
+
filer-key="name"
|
254
|
+
close-on-select clear-button
|
255
|
+
condition="f_slice_area='{}'"
|
256
|
+
@change="$parent.$parent.getmeterbook(model.f_slice_area)"
|
257
|
+
:value-single="true">
|
258
|
+
</v-select>
|
259
|
+
</div>
|
260
|
+
<div :class="$parent.$parent.style">
|
261
|
+
<label class="font_normal_body">抄 表 册</label>
|
262
|
+
<v-select class="select_list select"
|
263
|
+
placeholder='抄表册' style="width: 60%"
|
264
|
+
:value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
|
265
|
+
:options='$parent.$parent.cbc'
|
266
|
+
filer-key="name"
|
267
|
+
close-on-select clear-button
|
268
|
+
condition="f_meter_book_num={}"
|
269
|
+
:value-single="true">
|
270
|
+
</v-select>
|
271
|
+
</div>
|
272
|
+
<div :class="$parent.$parent.style">
|
273
|
+
<label class="font_normal_body">起始时间</label>
|
274
|
+
<datepicker
|
275
|
+
placeholder='起始时间' style="width:60%"
|
276
|
+
:disabled-days-of-week="[]"
|
277
|
+
:format="'yyyy-MM-dd'"
|
278
|
+
:show-rest-button="reset"
|
279
|
+
:value.sync="model.f_start_time"
|
280
|
+
v-model="model.f_start_time"
|
281
|
+
condition="f_offsite_time >= '{} 00:00:00'">
|
282
|
+
</datepicker>
|
283
|
+
</div>
|
284
|
+
<div :class="$parent.$parent.style">
|
285
|
+
<label class="font_normal_body">结束时间</label>
|
286
|
+
<datepicker
|
287
|
+
placeholder='结束时间' style="width:60%"
|
288
|
+
:disabled-days-of-week="[]"
|
289
|
+
:format="'yyyy-MM-dd'"
|
290
|
+
:show-rest-button="reset"
|
291
|
+
:value.sync="model.f_end_time"
|
292
|
+
v-model="model.f_end_time"
|
293
|
+
condition="f_offsite_time <= '{} 23:59:59'">
|
294
|
+
</datepicker>
|
295
|
+
</div>
|
296
|
+
</div>
|
297
|
+
<div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
|
298
|
+
<div :class="$parent.$parent.style">
|
299
|
+
<label class="font_normal_body">维 修 员</label>
|
300
|
+
<input type="text" class="input_search" v-model="model.f_repairman"
|
301
|
+
condition="f_repairman = '{}'"
|
302
|
+
style="width: 60%" placeholder="维修员">
|
303
|
+
</div>
|
304
|
+
<div :class="$parent.$parent.style">
|
305
|
+
<label class="font_normal_body">用户名称</label>
|
306
|
+
<input type="text" class="input_search" v-model="model.f_user_name"
|
307
|
+
condition="f_user_name = '{}'"
|
308
|
+
style="width: 60%" placeholder="用户名称">
|
309
|
+
</div>
|
310
|
+
<div :class="$parent.$parent.style">
|
311
|
+
<label class="font_normal_body">小区名称:</label>
|
312
|
+
<div class="col-xs-8" >
|
313
|
+
<input style="width: 60%" class="input_search" v-model="model.f_residential_area" placeholder="请输入小区(可模糊查询)" condition="f_residential_area like '%{}%'">
|
314
|
+
</div>
|
315
|
+
</div>
|
316
|
+
</div>
|
317
|
+
</div>
|
318
|
+
</criteria>
|
319
|
+
<data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
|
320
|
+
<template partial='head'>
|
321
|
+
<tr>
|
322
|
+
<th v-if="$parent.$parent.$parent.transfer=='是'"><nobr><!--<input type="checkbox" v-model="$parent.$parent.$parent.checkAll" @click.stop="()=>{return}" />-->选择</nobr></th>
|
323
|
+
<th><nobr>入户状态</nobr></th>
|
324
|
+
<th><nobr>用户编号</nobr></th>
|
325
|
+
<th><nobr>用户名</nobr></th>
|
326
|
+
<th><nobr>用户电话</nobr></th>
|
327
|
+
<th><nobr>用户小区</nobr></th>
|
328
|
+
<th><nobr>用户地址</nobr></th>
|
329
|
+
<th><nobr>安检时间</nobr></th>
|
330
|
+
<th><nobr>安检员</nobr></th>
|
331
|
+
<th><nobr>计划名</nobr></th>
|
332
|
+
<th><nobr>是否有隐患</nobr></th>
|
333
|
+
<th><nobr>隐患数</nobr></th>
|
334
|
+
<th><nobr>处理数</nobr></th>
|
335
|
+
<th><nobr>完成数</nobr></th>
|
336
|
+
<th><nobr>处理情况</nobr></th>
|
337
|
+
<th><nobr>完成情况</nobr></th>
|
338
|
+
<!-- <th><nobr>维修情况</nobr></th>-->
|
339
|
+
<th><nobr>维修员</nobr></th>
|
340
|
+
<th><nobr>隐患明细</nobr></th>
|
341
|
+
</tr>
|
342
|
+
</template>
|
343
|
+
<template partial='body'>
|
344
|
+
<td v-if="$parent.$parent.$parent.transfer=='是'" style="text-align: center;white-space:nowrap;"><input type="checkbox" v-if="row.f_defect_count>row.f_deal_count && (row.f_defect_count - row.f_repair_count) > row.zxzg_count" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)"></input></td>
|
345
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
|
346
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
|
347
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
|
348
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
|
349
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
|
350
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
|
351
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
|
352
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
|
353
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
|
354
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
|
355
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
|
356
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_deal_count}}</td>
|
357
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_repair_count}}</td>
|
358
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_is_deal}}</td>
|
359
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_is_repair}}</td>
|
360
|
+
<!-- <td style="text-align: center;white-space:nowrap;">{{row.f_repaired}}</td>-->
|
361
|
+
<td style="text-align: center;white-space:nowrap;">{{row.f_repairman}}</td>
|
362
|
+
<td style="text-align: center;white-space:nowrap;"><span :title="$parent.$parent.$parent.trouble(row.f_defect_content)" style="display: block;max-width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ $parent.$parent.$parent.trouble(row.f_defect_content)}}</span></td>
|
363
|
+
</template>
|
364
|
+
</data-grid>
|
365
|
+
</criteria-paged>
|
366
|
+
|
367
|
+
<modal :show.sync="showModal" v-ref:modal>
|
368
|
+
<div slot="modal-header" class="modal-header">
|
369
|
+
<h4 class="modal-title">
|
370
|
+
选择计划
|
371
|
+
</h4>
|
372
|
+
</div>
|
373
|
+
<div slot="modal-body" class="modal-body">
|
374
|
+
<plan-chooser :f.sync="this.$login.f" v-ref:chooser></plan-chooser>
|
375
|
+
</div>
|
376
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
377
|
+
<button class="button_search" @click="ok">确认</button>
|
378
|
+
<button class="button_search" @click="cancel">取消</button>
|
379
|
+
</div>
|
380
|
+
</modal>
|
381
|
+
<modal :show.sync="showModal2" :backdrop="false">
|
382
|
+
<div slot="modal-header" class="modal-header">
|
383
|
+
<h4 class="modal-title">
|
384
|
+
转维修
|
385
|
+
</h4>
|
386
|
+
</div>
|
387
|
+
<div slot="modal-body" class="modal-body">
|
388
|
+
<div v-if="true">
|
389
|
+
<div class="row" style="margin-top: 10px">
|
390
|
+
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
|
391
|
+
<div class="col-xs-8 col-md-8">
|
392
|
+
<v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
|
393
|
+
:options='dispatchTypeOptions' placeholder='派发类型'
|
394
|
+
close-on-select>
|
395
|
+
</v-select>
|
396
|
+
</div>
|
397
|
+
</div>
|
398
|
+
<div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
|
399
|
+
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维 修 员</label>
|
400
|
+
<div class="col-xs-8 col-md-8">
|
401
|
+
<v-select
|
402
|
+
:value.sync="selectData.f_repairman"
|
403
|
+
:value-single="true"
|
404
|
+
:options='repairers'
|
405
|
+
placeholder='请选择维修员'
|
406
|
+
close-on-select></v-select>
|
407
|
+
</div>
|
408
|
+
</div>
|
409
|
+
<div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
|
410
|
+
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站    点</label>
|
411
|
+
<div class="col-xs-8 col-md-8">
|
412
|
+
<right-tree
|
413
|
+
islist
|
414
|
+
:userid="userid"
|
415
|
+
:source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
|
416
|
+
@re-res="getSiteRes"></right-tree>
|
417
|
+
</div>
|
418
|
+
</div>
|
419
|
+
<div class="row" style="margin-top: 10px">
|
420
|
+
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
|
421
|
+
<div class="col-xs-8 col-md-8">
|
422
|
+
<v-select :value.sync="selectData.f_repairtype" style="width:60%"
|
423
|
+
class="select select_list"
|
424
|
+
:value-single="true"
|
425
|
+
:options='repairTypeOptions'
|
426
|
+
close-on-select>
|
427
|
+
</v-select>
|
428
|
+
</div>
|
429
|
+
</div>
|
430
|
+
<div class="row" style="margin-top: 10px">
|
431
|
+
<label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备 注</label>
|
432
|
+
<div class="col-xs-8 col-md-8">
|
433
|
+
<textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
|
434
|
+
</div>
|
435
|
+
</div>
|
436
|
+
</div>
|
437
|
+
</div>
|
438
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
439
|
+
<button class="button_search" @click="rectification">转维修</button>
|
440
|
+
<button class="button_search" @click="cancel1">取消</button>
|
441
|
+
</div>
|
442
|
+
</modal>
|
443
|
+
<modal :show.sync="showModal3">
|
444
|
+
<div slot="modal-header" class="modal-header">
|
445
|
+
<h4 class="modal-title">
|
446
|
+
转维修进度{{ progressbarWidth }}%
|
447
|
+
</h4>
|
448
|
+
</div>
|
449
|
+
<div slot="modal-body" class="modal-body">
|
450
|
+
<div class="progress">
|
451
|
+
<div class="progress-bar" role="progressbar" aria-valuenow="60"
|
452
|
+
aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
|
453
|
+
<!-- <span class="sr-only">40% 完成</span>-->
|
454
|
+
</div>
|
455
|
+
</div>
|
456
|
+
</div>
|
457
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
|
458
|
+
</modal>
|
459
|
+
</div>
|
460
|
+
</template>
|
461
|
+
<script>
|
462
|
+
import {PagedList} from 'vue-client'
|
463
|
+
import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
|
464
|
+
import co from 'co'
|
465
|
+
import Vue from 'vue'
|
466
|
+
import * as Util from '../../components/Util'
|
467
|
+
|
468
|
+
let select = function* (self) {
|
469
|
+
let http = new HttpResetClass()
|
470
|
+
let getGasman = yield http.load('POST', '/rs/search', {
|
471
|
+
source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
|
472
|
+
userid: self.$login.f.id
|
473
|
+
}, {resolveMsg: null, rejectMsg: null})
|
474
|
+
//tag
|
475
|
+
self.checkersid.push({label: '全部', value: ''})
|
476
|
+
getGasman.data.forEach((checker) => {
|
477
|
+
self.checkersid.push({label: checker.name, value: checker.name})
|
478
|
+
})
|
479
|
+
}
|
480
|
+
export default {
|
481
|
+
title: '隐患查询',
|
482
|
+
data() {
|
483
|
+
let model = new PagedList('rs/sql/GetCheckPaperByDefectNew', 20, {
|
484
|
+
f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
|
485
|
+
})
|
486
|
+
model.f_filialeids = '(' + this.$login.f.orgid + ')'
|
487
|
+
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"
|
488
|
+
return {
|
489
|
+
repaired:[{label: '全部', value: ''},{label: '未完成', value: '未完成'}, {label: '已完成', value: '已完成'}],
|
490
|
+
deals:[{label: '全部', value: ''},{label: '未处理', value: '未处理'}, {label: '已处理', value: '已处理'}],
|
491
|
+
hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
|
492
|
+
f: this.$login.f,
|
493
|
+
model: model,
|
494
|
+
criteriaShow: false,
|
495
|
+
checkAll:false,
|
496
|
+
timercount:0,
|
497
|
+
showModal2:false,
|
498
|
+
repairTypeOptions:this.$appdata.getParam('报修类型'),
|
499
|
+
dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
|
500
|
+
checkes:[],
|
501
|
+
showModal: false,
|
502
|
+
f_check_plan: {f_plan_name: '', id: ''},
|
503
|
+
sumsmodel: {},
|
504
|
+
resids:{},
|
505
|
+
all: false,
|
506
|
+
fields: {},
|
507
|
+
|
508
|
+
selectData:{
|
509
|
+
dispatchType:'',
|
510
|
+
f_repairman:'',
|
511
|
+
f_remarks:'',
|
512
|
+
f_repairtype:''
|
513
|
+
},
|
514
|
+
progressbarWidth:'0',
|
515
|
+
modelval: [],
|
516
|
+
isbusy:false,
|
517
|
+
transfer: null,
|
518
|
+
checkersid: [],
|
519
|
+
showModal3:false,
|
520
|
+
toRepairCount:0,
|
521
|
+
sliceArea: [],
|
522
|
+
callSends:[],
|
523
|
+
cbc:[],
|
524
|
+
repairedOptions:[{label: '全部', value: ''},{label: '已修', value: '已修'}, {label: '未修', value: '未修'}],
|
525
|
+
repairers:[],
|
526
|
+
cbcs:[],
|
527
|
+
thead: '',
|
528
|
+
headData: ['入户状态','用户编号','用户名','用户电话','用户小区','用户地址','安检时间','安检员','计划名','是否有隐患','隐患数','隐患明细','处理数','完成数','处理情况','完成情况','维修员'],
|
529
|
+
bodyData: ['f_entry_status','f_userinfo_code','f_user_name','f_user_phone','f_residential_area','f_address','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','defecttext','f_deal_count','f_repair_count','f_is_deal','f_is_repair','f_repairman'],
|
530
|
+
}
|
531
|
+
},
|
532
|
+
props:{
|
533
|
+
style: {
|
534
|
+
type: String,
|
535
|
+
default: 'col-sm-2 form-group'
|
536
|
+
},
|
537
|
+
style2: {
|
538
|
+
type: String,
|
539
|
+
default: 'col-sm-4 form-group'
|
540
|
+
}
|
541
|
+
|
542
|
+
},
|
543
|
+
|
544
|
+
methods: {
|
545
|
+
getSiteRes(obj) {
|
546
|
+
console.log('siteRes ---> ')
|
547
|
+
console.log(obj)
|
548
|
+
if(obj.resids[0]){
|
549
|
+
this.selectData.f_meetunit = obj.res.join('.')
|
550
|
+
this.selectData.f_reciever = obj.resids.join('.')
|
551
|
+
this.selectData.f_outlets = obj.res[obj.res.length - 1]
|
552
|
+
}else {
|
553
|
+
this.selectData.f_meetunit = ''
|
554
|
+
this.selectData.f_reciever = ''
|
555
|
+
this.selectData.f_outlets = ''
|
556
|
+
}
|
557
|
+
},
|
558
|
+
trouble(val) {
|
559
|
+
// return val.replaceAll("'",'')
|
560
|
+
// .replaceAll("\"",'')
|
561
|
+
// .replaceAll("{",'')
|
562
|
+
// .replaceAll("}",'')
|
563
|
+
// .replaceAll("]",'')
|
564
|
+
// .replaceAll("[",'')
|
565
|
+
// .replaceAll("result:",'')
|
566
|
+
// .replaceAll("data:",'')
|
567
|
+
// .replaceAll("有隐患",'')
|
568
|
+
// .replaceAll(",",'')
|
569
|
+
|
570
|
+
|
571
|
+
const defect_content = JSON.parse(val)
|
572
|
+
let result = ''
|
573
|
+
if (defect_content.data) {
|
574
|
+
const jsonData = defect_content.data
|
575
|
+
for (const itemdata of jsonData) {
|
576
|
+
const keys = Object.keys(itemdata)
|
577
|
+
for (const itm of keys) {
|
578
|
+
const value = itemdata[itm]
|
579
|
+
result += itm + ':' + value
|
580
|
+
}
|
581
|
+
}
|
582
|
+
}
|
583
|
+
return result
|
584
|
+
},
|
585
|
+
getEmp() {
|
586
|
+
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}`}
|
587
|
+
let http = new HttpResetClass()
|
588
|
+
http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
589
|
+
let str=`'`
|
590
|
+
res.data.forEach((item,idx,arr) => {
|
591
|
+
//tag
|
592
|
+
if(idx+1==arr.length){
|
593
|
+
str += item.id + `'`
|
594
|
+
}else{
|
595
|
+
str += item.id+`','`
|
596
|
+
}
|
597
|
+
|
598
|
+
})
|
599
|
+
let http1 = new HttpResetClass()
|
600
|
+
http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
|
601
|
+
data: {
|
602
|
+
items: 'id,f_user_telephone',
|
603
|
+
tablename: 't_user',
|
604
|
+
condition: `id in (${str})`,
|
605
|
+
orderitem: 'id'
|
606
|
+
}
|
607
|
+
}, {resolveMsg: null, rejectMsg: null}).then((ress) => {
|
608
|
+
|
609
|
+
res.data.forEach((user)=>{
|
610
|
+
try {
|
611
|
+
ress.data.forEach((tel,tidx,arr)=>{
|
612
|
+
//tag
|
613
|
+
if(user.id==tel.id){
|
614
|
+
this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
|
615
|
+
ress.data.splice(tidx,1)
|
616
|
+
//tag
|
617
|
+
throw new Error("跳出循环");
|
618
|
+
}
|
619
|
+
})
|
620
|
+
}catch (e) {
|
621
|
+
//tag
|
622
|
+
}
|
623
|
+
})
|
624
|
+
})
|
625
|
+
|
626
|
+
})
|
627
|
+
},
|
628
|
+
toRepair(){
|
629
|
+
if(this.checkes.length==0){
|
630
|
+
return this.$showMessage('请先选择需要转维修的用户!')
|
631
|
+
}
|
632
|
+
this.showModal2=true
|
633
|
+
},
|
634
|
+
async rectification(){
|
635
|
+
|
636
|
+
if(this.selectData.dispatchType){
|
637
|
+
if(this.selectData.dispatchType=='派发给站点'){
|
638
|
+
if(!this.selectData.f_reciever){
|
639
|
+
this.$showMessage('请选择部门!')
|
640
|
+
return
|
641
|
+
}
|
642
|
+
}else{
|
643
|
+
if(!this.selectData.f_repairman){
|
644
|
+
this.$showMessage('请选择维修员!')
|
645
|
+
return
|
646
|
+
}
|
647
|
+
}
|
648
|
+
}else {
|
649
|
+
this.$showMessage('请选择派发类型!')
|
650
|
+
return
|
651
|
+
}
|
652
|
+
|
653
|
+
if(!this.selectData.f_repairtype){
|
654
|
+
this.$showMessage('请选择报修类型!')
|
655
|
+
return
|
656
|
+
}
|
657
|
+
this.showModal3=true
|
658
|
+
let act={}
|
659
|
+
let toRepair=''
|
660
|
+
let successCount=0
|
661
|
+
if(this.selectData.dispatchType=='派发给站点'){
|
662
|
+
act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
|
663
|
+
toRepair=null
|
664
|
+
}else{
|
665
|
+
console.log('派发给维修员---------'+this.selectData.f_repairman)
|
666
|
+
act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
|
667
|
+
toRepair='一级派单'
|
668
|
+
}
|
669
|
+
let rep={
|
670
|
+
loginUser: {
|
671
|
+
name: this.$login.f.name,
|
672
|
+
ename: this.$login.f.ename
|
673
|
+
},
|
674
|
+
f_meetunit: this.$login.f.deps,
|
675
|
+
f_attendant: this.$login.f.name,
|
676
|
+
f_outlets: this.$login.f.deps,
|
677
|
+
f_remarks: this.selectData.f_remarks,
|
678
|
+
f_repairtype: this.selectData.f_repairtype,
|
679
|
+
toRepair: toRepair,
|
680
|
+
activity:act
|
681
|
+
}
|
682
|
+
for(let i=0; i<this.checkes.length; i++){
|
683
|
+
try {
|
684
|
+
let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', {
|
685
|
+
id:this.checkes[i],
|
686
|
+
repData:rep,
|
687
|
+
source:'pc'
|
688
|
+
}, {resolveMsg: null, rejectMsg: null})
|
689
|
+
if (result.data.code==200) {
|
690
|
+
successCount += result.data.successcon
|
691
|
+
this.progressbarWidth=Math.ceil((i+1)*100/(this.checkes.length))
|
692
|
+
}
|
693
|
+
}catch (e) {
|
694
|
+
this.showModal3=false
|
695
|
+
this.$showMessage('网络异常,请稍后再试!')
|
696
|
+
return
|
697
|
+
}
|
698
|
+
}
|
699
|
+
this.showModal3=false
|
700
|
+
this.cancel1()
|
701
|
+
this.$showMessage('本次转维修成功'+successCount+'单')
|
702
|
+
},
|
703
|
+
/*async rectification(){
|
704
|
+
this.isbusy =true
|
705
|
+
console.log("----this.checkes",this.checkes.toString())
|
706
|
+
console.log("----this.getcon()",this.getcon())
|
707
|
+
if(this.checkes.length==0){
|
708
|
+
return this.$showMessage('请先选择需要转维修的用户!')
|
709
|
+
}
|
710
|
+
// if (this.checkAll){
|
711
|
+
let data={
|
712
|
+
f_filialeids: this.model.params.f_filialeids,
|
713
|
+
f_defect_content: this.model.params.f_defect_content,
|
714
|
+
condition: `${this.model.params.condition} and id in(${this.getcon()})`
|
715
|
+
}
|
716
|
+
let res1= await new HttpResetClass().load('post','rs/sql/GetCheckPaperByDefectNew',{data: data })
|
717
|
+
for (let i = 0; i < res1.data.length; i++) {
|
718
|
+
let data1={
|
719
|
+
f_paper_id: res1.data[i].id,
|
720
|
+
condition:`f_repaire_type = '隐患未处理'`
|
721
|
+
}
|
722
|
+
let res2 = await new HttpResetClass().load('POST' , 'rs/sql/GetDefectByPaperIdNew' , {data: data1 } )
|
723
|
+
//tag
|
724
|
+
if(res2.data.length==0){
|
725
|
+
continue
|
726
|
+
}
|
727
|
+
const uploadData = {
|
728
|
+
model: {
|
729
|
+
serviceacitivity: [{
|
730
|
+
f_service_acitivity_type: '派单'
|
731
|
+
}],
|
732
|
+
f_repairitems: {},
|
733
|
+
failure: '',
|
734
|
+
f_source: '安检',
|
735
|
+
f_service_id: '',
|
736
|
+
f_contact_phone: res1.data[i].f_user_phone,
|
737
|
+
f_meetunit: this.$login.f.deps,
|
738
|
+
f_phone: '',
|
739
|
+
f_user_name: res1.data[i].f_user_name,
|
740
|
+
f_address: res1.data[i].f_address,
|
741
|
+
f_repair_date: Util.getNowDate(),
|
742
|
+
f_reciever: '',
|
743
|
+
f_remarks: this.selectData.f_remarks,
|
744
|
+
f_user_type: res1.data[i].f_check_type,
|
745
|
+
f_area: '',
|
746
|
+
f_unit_name: '',
|
747
|
+
f_street: res1.data[i].f_street,
|
748
|
+
f_residential_area: res1.data[i].f_residential_area,
|
749
|
+
f_building: res1.data[i].f_building,
|
750
|
+
f_unit: res1.data[i].f_unit,
|
751
|
+
f_floor: res1.data[i].f_floor,
|
752
|
+
f_room: res1.data[i].f_room,
|
753
|
+
aState: '',
|
754
|
+
f_repairtype: this.selectData.f_repairtype,
|
755
|
+
f_userinfo_id: res1.data[i].f_userinfo_id,
|
756
|
+
f_userinfo_code: res1.data[i].f_userinfo_code,
|
757
|
+
f_orgstr: res1.data[i].f_filialeid,
|
758
|
+
f_outlets: '',
|
759
|
+
f_attendant: this.$login.f.name
|
760
|
+
},
|
761
|
+
loginUser: {
|
762
|
+
name: this.$login.f.name,
|
763
|
+
ename: this.$login.f.ename
|
764
|
+
},
|
765
|
+
user: {
|
766
|
+
f_userinfo_id: res1.data[i].f_userinfo_id
|
767
|
+
},
|
768
|
+
callObj: null
|
769
|
+
}
|
770
|
+
uploadData.model.serviceacitivity[0].f_reciever = this.selectData.f_repairman
|
771
|
+
// uploadData.model.f_meetunit = self.$login.f.orgpathnames
|
772
|
+
// uploadData.model.f_orgstr = self.$login.f.orgpathstr
|
773
|
+
// uploadData.model.f_outlets = self.$login.f.f_parentname
|
774
|
+
uploadData.model.f_orgid = this.$login.f.orgid
|
775
|
+
uploadData.model.f_filiale = this.$login.f.org
|
776
|
+
uploadData.model.f_outlets = this.$login.f.deps
|
777
|
+
uploadData.model.f_filiale_id = this.$login.f.orgid
|
778
|
+
uploadData.toRepair = '一级派单'
|
779
|
+
// let res3 = await new HttpResetClass().load('post','/rs/sql/GetUserForRepaireNew', {data: {f_userinfo_id: res1.data[i].f_userinfo_id}})
|
780
|
+
// uploadData.model = Object.assign(uploadData.model, res3.data[0])
|
781
|
+
let failure = []
|
782
|
+
res2.data.forEach(row => {
|
783
|
+
console.log('row.f_item_value',row.f_item_value)
|
784
|
+
failure.push({
|
785
|
+
f_failure_type: row.f_item_name,
|
786
|
+
failurecase: row.f_item_value?row.f_item_value.split(','):''
|
787
|
+
})
|
788
|
+
})
|
789
|
+
uploadData.model.failure = failure
|
790
|
+
// 拼接repairitems
|
791
|
+
let rows = JSON.parse(JSON.stringify(res2.data))
|
792
|
+
let repairitems = {
|
793
|
+
data: []
|
794
|
+
}
|
795
|
+
let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
|
796
|
+
// 取隐患未处理的
|
797
|
+
rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
|
798
|
+
//tag)
|
799
|
+
// 开始拼接
|
800
|
+
rows.forEach(row => {
|
801
|
+
let existIndex = -1
|
802
|
+
// 判断该设备是否已经存在
|
803
|
+
for (let i = 0; i < repairitems.data.length; i++) {
|
804
|
+
if (repairitems.data[i].f_type == row.f_device_type) {
|
805
|
+
existIndex = i
|
806
|
+
break
|
807
|
+
}
|
808
|
+
}
|
809
|
+
if (existIndex == -1) {
|
810
|
+
// 不存在则新建
|
811
|
+
let newItem = {
|
812
|
+
f_type: row.f_device_type,
|
813
|
+
details: [{
|
814
|
+
f_defect_id: row.id,
|
815
|
+
f_project: `${row.f_item_name}:${row.f_item_value}`,
|
816
|
+
type: 'selector',
|
817
|
+
options: safecheckOptions
|
818
|
+
}]
|
819
|
+
}
|
820
|
+
repairitems.data.push(newItem)
|
821
|
+
} else {
|
822
|
+
// 存在则追加
|
823
|
+
repairitems.data[existIndex].details.push({
|
824
|
+
f_defect_id: row.id,
|
825
|
+
f_project: `${row.f_item_name}:${row.f_item_value}`,
|
826
|
+
type: 'selector',
|
827
|
+
options: safecheckOptions
|
828
|
+
})
|
829
|
+
}
|
830
|
+
})
|
831
|
+
uploadData.model.f_repairitems = repairitems
|
832
|
+
uploadData.rows=rows
|
833
|
+
//tag)
|
834
|
+
//tag
|
835
|
+
console.log('uploadData---', uploadData)
|
836
|
+
if (uploadData.model.f_repairitems.data.length>0){
|
837
|
+
this.callSends.push(uploadData)
|
838
|
+
}else{
|
839
|
+
//tag
|
840
|
+
}
|
841
|
+
}
|
842
|
+
//tag)
|
843
|
+
let timer = setInterval(async ()=>{
|
844
|
+
this.showModal3=true
|
845
|
+
this.isbusy=false
|
846
|
+
if (this.timercount<this.callSends.length){
|
847
|
+
//tag)
|
848
|
+
let rows=this.callSends[this.timercount].rows
|
849
|
+
//tag)
|
850
|
+
let result = await this.$resetpost('/rs/logic/callerSend1', this.callSends[this.timercount])
|
851
|
+
//tag)
|
852
|
+
if (result.data.f_service_id) {
|
853
|
+
const data = {
|
854
|
+
f_paper_id: rows[0].f_paper_id,
|
855
|
+
f_service_id: result.data.f_service_id,
|
856
|
+
itemsId: this.$login.convertToIn(rows.map(row => row.id))
|
857
|
+
}
|
858
|
+
//tag
|
859
|
+
let updateRes = await this.$resetpost('/rs/logic/updateDefectStateNew', data)
|
860
|
+
}
|
861
|
+
this.toRepairCount++
|
862
|
+
//tag
|
863
|
+
this.timercount++
|
864
|
+
}else{
|
865
|
+
clearInterval(timer)
|
866
|
+
//tag
|
867
|
+
this.callSends=[]
|
868
|
+
this.timercount=0
|
869
|
+
this.showModal3=false
|
870
|
+
this.cancel1()
|
871
|
+
this.$showMessage('本次转维修成功'+this.toRepairCount+'单')
|
872
|
+
this.toRepairCount=0
|
873
|
+
}
|
874
|
+
}, 3000)
|
875
|
+
},*/
|
876
|
+
cancel1(){
|
877
|
+
this.showModal2=false
|
878
|
+
this.selectData={
|
879
|
+
dispatchType:'',
|
880
|
+
f_repairman:'',
|
881
|
+
f_remarks:'',
|
882
|
+
f_repairtype:''
|
883
|
+
}
|
884
|
+
},
|
885
|
+
sleep(d){
|
886
|
+
//tag)
|
887
|
+
var t = Date.now()
|
888
|
+
while(Date.now - t <= d){
|
889
|
+
|
890
|
+
}
|
891
|
+
//tag)
|
892
|
+
},
|
893
|
+
isChecked(v) {
|
894
|
+
// 如果全选,不在的按选中算,否则,在的按选中算
|
895
|
+
if (this.checkAll) {
|
896
|
+
return this.checkes.indexOf(v) == -1
|
897
|
+
} else {
|
898
|
+
return this.checkes.indexOf(v) != -1
|
899
|
+
}
|
900
|
+
},
|
901
|
+
setCheckAll() {
|
902
|
+
this.checkAll=this.checkAll?false:true;
|
903
|
+
// 全选改变后,清空选中数据
|
904
|
+
this.checkes = []
|
905
|
+
},
|
906
|
+
setCheckes(id) {
|
907
|
+
let index=this.checkes.indexOf(id)
|
908
|
+
if(index<0){
|
909
|
+
this.checkes.push(id)
|
910
|
+
}else{
|
911
|
+
this.checkes.splice(index,1)
|
912
|
+
}
|
913
|
+
},
|
914
|
+
|
915
|
+
getmeterbook(val){
|
916
|
+
this.cbc=[]
|
917
|
+
this.cbc.push({
|
918
|
+
label:'全部',
|
919
|
+
value:''
|
920
|
+
})
|
921
|
+
if (val==''){
|
922
|
+
|
923
|
+
this.cbcs.forEach(res=>{
|
924
|
+
this.cbc.push({
|
925
|
+
label:res.f_book_name,
|
926
|
+
value:res.id
|
927
|
+
})
|
928
|
+
})
|
929
|
+
}else{
|
930
|
+
this.cbcs.forEach(res=>{
|
931
|
+
if (res.f_book_slice_area==val){
|
932
|
+
this.cbc.push({
|
933
|
+
label:res.f_book_name,
|
934
|
+
value:res.id
|
935
|
+
})
|
936
|
+
}
|
937
|
+
})
|
938
|
+
}
|
939
|
+
},
|
940
|
+
|
941
|
+
Mreadibook(val){
|
942
|
+
//tag
|
943
|
+
//tag
|
944
|
+
this.sliceArea=[]
|
945
|
+
if (val){
|
946
|
+
new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
|
947
|
+
items: 'name',
|
948
|
+
tablename: 't_zone',
|
949
|
+
condition: `parentid in ${val}`,
|
950
|
+
orderitem: 'id'
|
951
|
+
}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
952
|
+
this.sliceArea.push({
|
953
|
+
label:'全部',
|
954
|
+
value:''
|
955
|
+
})
|
956
|
+
res.data.forEach(ress=>{
|
957
|
+
this.sliceArea.push({
|
958
|
+
label:ress.name,
|
959
|
+
value:ress.name
|
960
|
+
})
|
961
|
+
})
|
962
|
+
|
963
|
+
})
|
964
|
+
}
|
965
|
+
},
|
966
|
+
getAllMeterBook(val){
|
967
|
+
//tag
|
968
|
+
//tag
|
969
|
+
this.cbcs=[]
|
970
|
+
if (val){
|
971
|
+
new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
|
972
|
+
items: 'f_book_name,f_book_slice_area,id',
|
973
|
+
tablename: 't_meter_book',
|
974
|
+
condition: `f_filiale_id in ${val}`,
|
975
|
+
orderitem: 'id'
|
976
|
+
}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
977
|
+
res.data.forEach(ress=>{
|
978
|
+
this.cbcs.push({
|
979
|
+
id:ress.id,
|
980
|
+
f_book_name:ress.f_book_name,
|
981
|
+
f_book_slice_area:ress.f_book_slice_area
|
982
|
+
})
|
983
|
+
})
|
984
|
+
this.cbc=[]
|
985
|
+
this.cbc.push({
|
986
|
+
label:'全部',
|
987
|
+
value:''
|
988
|
+
})
|
989
|
+
this.cbcs.forEach(res=>{
|
990
|
+
this.cbc.push({
|
991
|
+
label:res.f_book_name,
|
992
|
+
value:res.id
|
993
|
+
})
|
994
|
+
})
|
995
|
+
})
|
996
|
+
}
|
997
|
+
},
|
998
|
+
hiddenr() {
|
999
|
+
this.$parent.showItem = !this.$parent.showItem
|
1000
|
+
},
|
1001
|
+
hidden() {
|
1002
|
+
this.criteriaShow = !this.criteriaShow
|
1003
|
+
},
|
1004
|
+
search(args) {
|
1005
|
+
//tag
|
1006
|
+
if (this.f_check_plan.f_plan_name) {
|
1007
|
+
args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
|
1008
|
+
}
|
1009
|
+
this.checkes = []
|
1010
|
+
this.checkAll=false
|
1011
|
+
this.model.search(args.condition, args.model)
|
1012
|
+
},
|
1013
|
+
getRes(obj) {
|
1014
|
+
//tag
|
1015
|
+
this.resids = {res:obj.res[0], resids:obj.resids[0]}
|
1016
|
+
this.model.f_filialeids = this.$login.convertToIn(obj.resids);
|
1017
|
+
this.Mreadibook(this.model.f_filialeids)
|
1018
|
+
this.getAllMeterBook(this.model.f_filialeids)
|
1019
|
+
},
|
1020
|
+
showChooser() {
|
1021
|
+
this.showModal = true
|
1022
|
+
},
|
1023
|
+
ok() {
|
1024
|
+
this.showModal = false
|
1025
|
+
if (this.$refs.modal.$children[0].selectedRow.id) {
|
1026
|
+
this.f_check_plan = this.$refs.modal.$children[0].selectedRow
|
1027
|
+
}
|
1028
|
+
},
|
1029
|
+
cancel() {
|
1030
|
+
this.showModal = false
|
1031
|
+
this.f_check_plan = {f_plan_name: '', id: ''}
|
1032
|
+
}
|
1033
|
+
},
|
1034
|
+
ready() {
|
1035
|
+
//tag
|
1036
|
+
this.transfer=Vue.$appdata.getSingleValue('安检转工单')
|
1037
|
+
this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
|
1038
|
+
this.getEmp()
|
1039
|
+
let gen = select(this)
|
1040
|
+
// this.Mreadibook(`('${this.$login.f.orgid}')`)
|
1041
|
+
co(gen)
|
1042
|
+
},
|
1043
|
+
watch:{
|
1044
|
+
'timercount'(){
|
1045
|
+
if (this.timercount===0){
|
1046
|
+
this.progressbarWidth = '0'
|
1047
|
+
}else {
|
1048
|
+
//tag
|
1049
|
+
//tag
|
1050
|
+
this.progressbarWidth=parseInt(this.timercount*100/(this.callSends.length+1))
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
}
|
1054
|
+
},
|
1055
|
+
computed: {
|
1056
|
+
selected() {
|
1057
|
+
return this.$refs.paged.$refs.grid.selected
|
1058
|
+
},
|
1059
|
+
getfield () {
|
1060
|
+
//tag
|
1061
|
+
let data = {}
|
1062
|
+
this.bodyData.forEach((value, index) => {
|
1063
|
+
data[this.bodyData[index]] = this.headData[index]
|
1064
|
+
})
|
1065
|
+
//合计字段打印
|
1066
|
+
this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
|
1067
|
+
if (this.sumsmodel) {
|
1068
|
+
Object.keys(this.sumsmodel).forEach((key) => {
|
1069
|
+
this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
|
1070
|
+
})
|
1071
|
+
} else {
|
1072
|
+
this.tfoot += '暂无'
|
1073
|
+
}
|
1074
|
+
this.tfoot += '</th></tr>'
|
1075
|
+
return data
|
1076
|
+
}
|
1077
|
+
}
|
1078
|
+
}
|
1079
|
+
</script>
|