safecheck-client 4.0.0-55 → 4.0.0-57

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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +31 -31
  3. package/src/components/NewDefectList/DefectListNew.vue +663 -663
  4. package/src/components/Util/SafecheckUpload.vue +281 -281
  5. package/src/components/android/AndroidDefectDetails.vue +725 -725
  6. package/src/components/android/PhoneUpUserinfo.vue +1249 -1249
  7. package/src/components/android/SafecheckDevices.vue +1340 -1339
  8. package/src/components/pc/AddToCheckBook.vue +237 -237
  9. package/src/components/pc/CheckBook.vue +303 -303
  10. package/src/components/pc/CheckBookArea.vue +146 -146
  11. package/src/components/pc/CheckBookCompany.vue +144 -144
  12. package/src/components/pc/CheckBookDetails.vue +161 -161
  13. package/src/components/pc/CheckBookEntry.vue +60 -60
  14. package/src/components/pc/CheckBookList.vue +366 -366
  15. package/src/components/pc/CheckBookSearchArea.vue +560 -560
  16. package/src/components/pc/CheckBookSearchUnit.vue +229 -229
  17. package/src/components/pc/CheckBookSearchUser.vue +659 -659
  18. package/src/components/pc/CheckBookSearchUserList.vue +674 -674
  19. package/src/components/pc/CheckBookUser.vue +333 -333
  20. package/src/components/pc/DefectDeal.vue +1007 -1007
  21. package/src/components/pc/PaperDefectMain.vue +880 -879
  22. package/src/filiale/meihekou/android/AreaPlan.vue +569 -569
  23. package/src/filiale/meihekou/android/CheckPlanList.vue +198 -198
  24. package/src/filiale/meihekou/android/CheckPlanListArea.vue +190 -190
  25. package/src/filiale/meihekou/android/CurrentCreate.vue +1087 -1087
  26. package/src/filiale/meihekou/android/MeterReading.vue +106 -106
  27. package/src/filiale/meihekou/android/SafecheckOrderV.vue +4 -3
  28. package/src/filiale/meihekou/android/SafecheckUserInfo.vue +787 -787
  29. package/src/filiale/meihekou/android.js +19 -19
  30. package/src/filiale/meihekou/pc.js +12 -12
@@ -1,1087 +1,1087 @@
1
- <style scoped>
2
- .bg {
3
- background-color: blue;
4
- height: 1px;
5
- border: 0;
6
- }
7
- .app-row {
8
- background-color: white;
9
- padding: 10px 10px 0 10px;
10
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
11
- }
12
- .search_input {
13
- border: 0;
14
- outline: none;
15
- }
16
- .font{
17
- font: 15px PingFang-SC-Medium;
18
- color: #666666;
19
- }
20
- .input-font{
21
- font: 15px PingFang-SC-Medium;
22
- color: #333333;
23
- }
24
- .btn-font{
25
- font:600 16px PingFang-SC-Bold;
26
- color: #499EDF;
27
- }
28
- .btn-color{
29
- background-color: #FFFFFF;
30
- border-radius: 10px ;
31
- border: 1px solid #499EDF;
32
- }
33
- .app-text {
34
- font-size: 12px;
35
- }
36
- .panel-self{
37
- border-radius: 10px;
38
- border:1px solid #499EDF;
39
- background-color: #F8F8F8;
40
- }
41
- .yybtn-color{
42
- background-color:#499edf;
43
- border-radius: 4px ;
44
- border: 1px solid #499EDF;
45
- color: #FFFFFF;
46
- font: 14px PingFang-SC-Bold;
47
- }
48
- .qxbtn-color{
49
- background-color: #FFFFFF;
50
- border-radius: 4px ;
51
- color: #499edf;
52
- font: 14px PingFang-SC-Bold;
53
- border: 1px solid #499EDF;
54
- }
55
-
56
- .button_shrink_top {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_top.png")}
57
- .button_shrink_bottom {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_bottom.png")}
58
- .button_shrink_left {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_left.png")}
59
- .button_shrink_right {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_right.png")}
60
- </style>
61
- <style>
62
- .clear-select-with .dropdown-menu{
63
- left: 0px !important;
64
- width: 200% !important;
65
- }
66
- </style>
67
- <template>
68
- <div style="height: auto;width: 100%">
69
- <criteria-paged :model="model" v-ref:paged>
70
- <criteria partial='criteria' @condition-changed='search' v-ref:cri>
71
- <div partial>
72
- <form>
73
- <div class="row app-row">
74
- <!--小区名称-->
75
- <v-select :value.sync="model.f_residential_area"
76
- class="input-font clear-select-with"
77
- :options='$parent.$parent.residentialAreaOptions'
78
- placeholder='小区名称'
79
- :width="'32.5%'"
80
- v-model="model.f_residential_area"
81
- condition="ti.f_residential_area = '{}'"
82
- @change="$parent.$parent.getbuilds"
83
- :value-single = true
84
- close-on-select clear-button>
85
- </v-select>
86
- <!--楼栋-->
87
- <v-select :value.sync="model.f_building"
88
- class="input-font"
89
- :options='$parent.$parent.buildOptions'
90
- placeholder='楼栋'
91
- :width="'32.5%'"
92
- v-model="model.f_building"
93
- condition="ti.f_building = '{}'"
94
- @change="$parent.$parent.getUnits"
95
- :value-single = true
96
- close-on-select clear-button>
97
- </v-select>
98
- <!--单元-->
99
- <v-select :value.sync="model.f_unit"
100
- class="input-font"
101
- :options='$parent.$parent.unitOptions'
102
- placeholder='单元'
103
- :width="'32.5%'"
104
- :value-single = true
105
- v-model="model.f_unit"
106
- condition="ti.f_unit = '{}'"
107
- close-on-select clear-button>
108
- </v-select>
109
- </div>
110
- <div class="row app-row">
111
- <div class="col-xs-4">
112
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
113
- <label for="f_userinfo_code" class="font text-left">用户编号:</label>
114
- </div>
115
- <div class="col-xs-8" >
116
- <input id="f_userinfo_code" class="search_input input-font"
117
- v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'" />
118
- </div>
119
- </div>
120
- <div class="row app-row">
121
- <div class="col-xs-4">
122
- <img src="../../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
123
- <label class="font text-left">用户姓名:</label>
124
- </div>
125
- <div class="col-xs-8" >
126
- <input class="search_input input-font" v-model=model.f_user_name condition="f_user_name like '%{}%'" />
127
- </div>
128
- </div>
129
-
130
- <div class="row app-row">
131
- <div class="col-xs-4">
132
- <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
133
- <label class="font text-left">用户证号:</label>
134
- </div>
135
- <div class="col-xs-8" >
136
- <input class="search_input input-font" v-model=model.f_enter_number condition="f_enter_number like '%{}%'" />
137
- </div>
138
- </div>
139
-
140
- <div class="row app-row" v-if="$parent.$parent.criteriaShow && !$parent.$parent.planName">
141
- <div class="col-xs-4">
142
- <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
143
- <label for="f_plan_name" class="font text-left">计划名称:</label>
144
- </div>
145
- <v-select
146
- id="f_plan_name"
147
- :value.sync="model.f_plan_name"
148
- class="input-font"
149
- :options='$parent.$parent.planNameOptions'
150
- placeholder='计划名称'
151
- :width="'60%'"
152
- v-model="model.f_plan_name"
153
- condition="f_plan_name like '%{}%'"
154
- close-on-select clear-button>
155
- </v-select>
156
- </div>
157
-
158
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
159
- <div class="col-xs-4">
160
- <img src="../../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
161
- <label for="f_state" class="font text-left">是否已检:</label>
162
- </div>
163
- <v-select id="f_state"
164
- :value.sync="model.f_state"
165
- class="input-font"
166
- :options='$parent.$parent.check_states'
167
- placeholder='是否已检'
168
- :width="'60%'"
169
- v-model="model.f_state"
170
- condition="f_state='{}'"
171
- close-on-select clear-button>
172
- </v-select>
173
- </div>
174
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
175
- <div class="col-xs-4">
176
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
177
- <label class="font text-left">表&emsp;&emsp;号:</label>
178
- </div>
179
- <div class="col-xs-5" >
180
- <input class="search_input input-font"
181
- v-model=model.f_meter_no condition="f_meter_no like '%{}%'" />
182
- </div>
183
- <div class="col-xs-3">
184
- <button type="button" class="btn btn-lg btn-font btn-color" @click="$parent.$parent.scan()">扫码</button>
185
- </div>
186
- </div>
187
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
188
- <div class="col-xs-4">
189
- <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
190
- <label class="font text-left">客户电话:</label>
191
- </div>
192
- <div class="col-xs-8" >
193
- <input class="search_input input-font"
194
- v-model=model.f_user_phone condition="f_user_phone like '%{}%'" />
195
- </div>
196
- </div>
197
-
198
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
199
- <div class="col-xs-4">
200
- <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
201
- <label class="font text-left">用户地址:</label>
202
- </div>
203
- <div class="col-xs-8" >
204
- <input class="search_input input-font"
205
- v-model=model.f_keyword condition="f_address like '%{}%'" />
206
- </div>
207
- </div>
208
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
209
- <div class="col-xs-4">
210
- <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
211
- <label for="f_user_type" class="font text-left">用户类型:</label>
212
- </div>
213
- <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
214
- :width="'60%'"
215
- :options='$parent.$parent.user_types' placeholder='请选择用户类型'
216
- v-model="model.f_user_type" condition="f_user_type='{}'" close-on-select clear-button></v-select>
217
- </div>
218
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
219
- <div class="col-xs-4">
220
- <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
221
- <label for="f_user_type" class="font text-left">安检状态:</label>
222
- </div>
223
- <v-select id="f_user_type" :value.sync="model.f_last_state" class="input-font"
224
- :width="'60%'"
225
- :options='$parent.$parent.last_check_states' placeholder='请选择用户类型'
226
- v-model="model.f_last_state"
227
- close-on-select clear-button></v-select>
228
- </div>
229
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
230
- <div class="col-xs-6">
231
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
232
- <label class="font text-left">到访不遇:</label>
233
- </div>
234
- <div class="col-xs-8" >
235
- <input class="search_input input-font" type="number"
236
- v-model=model.f_check_version condition="f_check_version <= '{}'" />
237
- </div>
238
- </div>
239
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
240
- <div class="col-xs-6" style="text-align: center">
241
- <span class="font text-left">待办{{$parent.$parent.upcomingCount}}条</span>
242
- </div>
243
- <div class="col-xs-6" style="text-align: center">
244
- <span class="font text-left">已办{{$parent.$parent.doneCount}}条</span>
245
- </div>
246
- <div class="col-xs-6" style="text-align: center">
247
- <span class="font text-left">临时保存{{$parent.$parent.tempSaveCount}}条</span>
248
- </div>
249
- <div class="col-xs-6" style="text-align: center">
250
- <span class="font text-left">总共{{$parent.$parent.allPlanCount}}条</span>
251
- </div>
252
- </div>
253
-
254
- <div class="row text-center" style="margin-top: 20px;">
255
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="$parent.$parent.selfSearch">查询</button>
256
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%; margin-left: 10px" @click="$parent.$parent.queryplanmany">转发</button>
257
- <div style="float: right;margin-right: 3% " class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
258
- <img v-if="!$parent.$parent.planName" style="float: right;margin-right: 3% " @click="$parent.$parent.getNewOrder" src="../../../assets/shuaxindaiban1.png" style="width: 40px;padding: 5px; float:right">
259
- </div>
260
- <div class="col-sm-12">
261
-
262
- </div>
263
- <!--<div class="row app-btn">-->
264
- <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
265
- <!--</div>-->
266
- <div style="height:30px;"></div>
267
- </form>
268
- </div>
269
- </criteria>
270
- <list :model="model" partial='list'>
271
- <div partial>
272
- <div class="auto app-text" style="margin-top: 5px;">
273
- <div class="panel" style="padding: 10px 10px 5px 10px;">
274
- <div class="panel-body panel-self">
275
-
276
- <div class="col-xs-12">
277
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
278
- <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
279
- <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
280
- <input type="checkbox" @click="$parent.$parent.$parent.setPlanParam(row.id, $event)"/>
281
- </p>
282
- </div>
283
- <div class="col-xs-12">
284
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
285
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
286
- </div>
287
- <div class="col-xs-6">
288
- <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
289
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
290
- </p>
291
- </div>
292
- <div class="col-xs-6">
293
- <p class="panel-title col-xs-5 text-left font"><b>计划名称:</b></p>
294
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_plan_name }}</p>
295
- </div>
296
- <div class="col-xs-6">
297
- <p class="panel-title col-xs-5 text-left font"><b>小区名称:</b></p>
298
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_residential_area }}</p>
299
- </div>
300
- <div class="col-xs-12">
301
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
302
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone }}
303
- <img src="../../../assets/phone.png" style="width: 6%"
304
- v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_user_phone)'/>
305
- </p>
306
- </div>
307
- <div class="col-xs-12">
308
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>备用电话:</b></p>
309
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_rent_phone}}
310
- <img v-if="row.f_rent_phone" src="../../../assets/phone.png" style="width: 6%"
311
- v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_rent_phone)'/>
312
- </p>
313
- </div>
314
- <div class="col-xs-12">
315
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>租户电话:</b></p>
316
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_zuhu_phone }}
317
- <img v-if="row.f_zuhu_phone" src="../../../assets/phone.png" style="width: 6%"
318
- v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_zuhu_phone)'/>
319
- </p>
320
- </div>
321
-
322
- <div class="col-xs-12">
323
- <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
324
- <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
325
- </div>
326
-
327
- <!-- <div class="row">-->
328
- <!-- <p class="panel-title col-xs-4 text-left font">计划年份</p>-->
329
- <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_year }}</p>-->
330
- <!-- </div>-->
331
- <!-- <div class="row">-->
332
- <!-- <p class="panel-title col-xs-4 text-left font">计划月份</p>-->
333
- <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_month }}</p>-->
334
- <!-- </div>-->
335
- <!-- <div class="row">-->
336
- <!-- <p class="panel-title col-xs-4 text-left font">预约时间</p>-->
337
- <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_prearranged_date }}</p>-->
338
- <!-- </div>-->
339
- <div class="row">
340
- <p class="panel-title col-xs-4 text-left font"><b>上次安检状态:</b></p>
341
- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_last_check_state }}</p>
342
- </div>
343
- <div class="col-xs-6">
344
- <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
345
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_state }}</p>
346
- </div>
347
- <div class="col-xs-6">
348
- <p class="panel-title col-xs-5 text-left font"><b>上传状态:</b></p>
349
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
350
- </div>
351
- <div class="col-xs-12" v-if="row.f_prearranged_date !=null">
352
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>预约时间:</b></p>
353
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_prearranged_date }}</p>
354
- </div>
355
- <div class="col-xs-6">
356
- <p class="panel-title col-xs-5 text-left font"><b>安检类型:</b></p>
357
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_safecheck_type }}</p>
358
- </div>
359
- <div class="col-xs-12">
360
- <p class="panel-title col-xs-5 text-left font"><b>到访不遇次数:</b></p>
361
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_check_version }}</p>
362
- </div>
363
- <div class="col-xs-6">
364
- <p class="panel-title col-xs-5 text-left font" ><b>是否通过:</b></p>
365
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_approved }}</p>
366
- </div>
367
- <div class="col-xs-6" v-show="row.f_approved == '不通过'">
368
- <p class="panel-title col-xs-5 text-left font" style="color: red;"><b>未通过原因:</b></p>
369
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_approved_note }}</p>
370
- </div>
371
- <!--<div class="col-xs-12">-->
372
- <!--<p class="panel-title col-xs-5 text-left font"><b>送气期限:</b></p>-->
373
- <!--<p class="panel-title col-xs-7 text-left input-font">{{timeSet(row.f_issue_time)}}</p>-->
374
- <!--</div>-->
375
- <div class="col-xs-12">
376
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.inspect(row)">处理</button>
377
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right;margin-right:10px;" @click="$parent.$parent.$parent.queryplan(row.id)">转发</button>
378
- <!--<button type="button" class="btn btn-default" @click="$parent.$parent.$parent.ceshi">确认2</button>-->
379
- </div>
380
- <!-- <div class="row text-right" v-show="row.f_upload_state != '已传'" >-->
381
- <!-- <button type="button" class="btn yybtn-color" v-on:click.stop.prevent='$parent.$parent.$parent.reserve($index)'>预约</button>&nbsp;-->
382
- <!-- <button type="button" class="btn qxbtn-color" v-if ='row.f_prearranged_date'-->
383
- <!-- v-on:click.stop.prevent='$parent.$parent.$parent.cancelReserve($index, row.id)'>取消预约</button>-->
384
- <!-- </div>-->
385
- </div>
386
- </div>
387
- </div>
388
- </div>
389
- </list>
390
- </criteria-paged>
391
- <modal :show.sync="showModal">
392
- <div slot="modal-header" class="modal-header">
393
- <h4 class="modal-title">
394
- 选择预约时间
395
- </h4>
396
- </div>
397
- <div slot="modal-body" class="modal-body">
398
- <input type="datetime-local" v-model="f_preset_dt">
399
- </div>
400
- <div slot="modal-footer" class="modal-footer">
401
- <button type="button" class="btn btn-default" @click="genuineReserve">确认</button>
402
- </div>
403
- </modal>
404
- <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
405
- <modal :show.sync="showModal2" v-ref:modal>
406
- <div slot="modal-header" class="modal-header">
407
- <h4 class="modal-title">
408
- 选择计划
409
- </h4>
410
- </div>
411
- <div slot="modal-body" class="modal-body">
412
- <div class="col-xs-12">
413
-
414
- <div class="col-xs-4">
415
- <v-select :value.sync="check" v-model='check'
416
- :value-single="true"
417
- class="select_list select"
418
- :options='checkers' placeholder='安检员'
419
- close-on-select width="100%"></v-select>
420
- </div>
421
-
422
- <div class="col-xs-1">
423
- <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
424
- </div>
425
- <div class="col-xs-4" style="padding-left: 2px">
426
- <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
427
- </div>
428
- <div class="col-xs-1" >
429
- <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
430
- </div>
431
- <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
432
- <div class="col-xs-2" style="float: right">
433
- <button type="button" class="btn btn-primary" @click="plansearch" style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">查询</button>
434
- </div>
435
- </div>
436
- <table class="table table_sy">
437
- <thead>
438
- <tr>
439
- <th style="width: 30px"></th>
440
- <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
441
- </tr>
442
- </thead>
443
- <tbody>
444
- <tr v-for="row in planoption">
445
- <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
446
- <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
447
-
448
-
449
- </tr>
450
- </tbody>
451
- </table>
452
- </div>
453
- <div slot="modal-footer" class="modal-footer">
454
- <button class="btn btn-default" @click="isok()">确认</button>
455
- <button class="btn btn-default" @click="iscancel()">取消</button>
456
- </div>
457
- </modal>
458
- <modal :show.sync="showModal3" v-ref:modal>
459
- <div slot="modal-header" class="modal-header">
460
- <h4 class="modal-title">
461
- 选择计划
462
- </h4>
463
- </div>
464
- <div slot="modal-body" class="modal-body">
465
- <div class="col-xs-12">
466
-
467
- <div class="col-xs-4">
468
- <v-select :value.sync="check" v-model='check'
469
- :value-single="true"
470
- class="select_list select"
471
- :options='checkers' placeholder='安检员'
472
- close-on-select width="100%"></v-select>
473
- </div>
474
-
475
- <div class="col-xs-1">
476
- <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
477
- </div>
478
- <div class="col-xs-4" style="padding-left: 2px">
479
- <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
480
- </div>
481
- <div class="col-xs-1" >
482
- <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
483
- </div>
484
- <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
485
- <div class="col-xs-2" style="float: right">
486
- <button type="button" class="btn btn-primary" @click="plansearch" style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">查询</button>
487
- </div>
488
- </div>
489
- <table class="table table_sy">
490
- <thead>
491
- <tr>
492
- <th style="width: 30px"></th>
493
- <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
494
- </tr>
495
- </thead>
496
- <tbody>
497
- <tr v-for="row in planoption">
498
- <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
499
- <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
500
-
501
-
502
- </tr>
503
- </tbody>
504
- </table>
505
- </div>
506
- <div slot="modal-footer" class="modal-footer">
507
- <button class="btn btn-default" @click="manyisok()">确认</button>
508
- <button class="btn btn-default" @click="iscancel()">取消</button>
509
- </div>
510
- </modal>
511
- </div>
512
-
513
- </template>
514
-
515
- <script>
516
- import LocalPagedList from '../../../plugins/LocalPagedList'
517
- import Vue from 'vue'
518
- import { PagedList,HttpResetClass } from 'vue-client'
519
- import * as Util from '../../Util'
520
- import co from 'co'
521
- import {isEmpty} from '../../Util'
522
- let select = function * (self) {
523
- let http = new HttpResetClass()
524
- http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
525
- source: 'this.getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1)',
526
- userid: Vue.user.orgid
527
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
528
- //tag
529
- self.checkers.push({label:'全部',value:''})
530
- res.data.forEach((checker)=>{
531
- self.checkers.push({label:checker.name,value:checker.id})
532
- })
533
- })
534
- }
535
- export default {
536
- title: '无计划安检查询',
537
- props: ['planName','f_residential_area','f_building'],
538
- data() {
539
- return {
540
- f_filialeids:'('+Vue.user.orgid+')',
541
- //f_filialeids:'(305)',
542
- planparam:[],
543
- check:'',
544
- plan:'',
545
- planid:'',
546
- model:Vue.android? new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}): new PagedList( 'AndroidRest/api/af-safecheck/sql/androidGetuserinfo',20,{condition:'this.condition'}),
547
- showModal: false,
548
- showModal2:false,
549
- showModal3:false,
550
- needid:'',
551
- criteriaShow: false,
552
- planoption:[],
553
- condition:'',
554
- checkers:[],
555
- param: null,
556
- f_preset_dt : Util.to3339TimeString(),
557
- flow_direction:[
558
- {label: '请选择挂表方式', value: ''},
559
- {label: '左表', value: '左表'},
560
- {label: '右表', value: '右表'}
561
- ],
562
- check_states: [
563
- {label: '请选择安检状态', value: ''},
564
- {label: '未检', value: '未检'},
565
- {label: '已检', value: '已检'},
566
- ],
567
- last_check_states: [
568
- {label: '请选择上次安检状态', value: ''},
569
- {label: '入户', value: '入户'},
570
- {label: '拒检', value: '拒检'},
571
- {label: '到访不遇', value: '到访不遇'},
572
- {label: '未使用天然气', value: '未使用天然气'}
573
- ],
574
- upload_states: [
575
- {label: '请选择上传状态', value: ''},
576
- {label: '未传', value: '未传'},
577
- {label: '已传', value: '已传'}
578
- ],
579
- user_types: [
580
- {label: '请选择用户类型', value: ''},
581
- {label: '民用', value: '民用'},
582
- {label: '非民用', value: '非民用'},
583
- ],
584
- verify_state: [
585
- {label: '请选择审核状态', value: ''},
586
- {label: '未审核', value: '未审核'},
587
- {label: '打回', value: '打回'}
588
- ],
589
- residentialAreaOptions: [],
590
- buildOptions: [],
591
- unitOptions: [],
592
- planNameOptions: [],
593
- upcomingCount: 0,
594
- doneCount: 0,
595
- tempSaveCount: 0,
596
- allPlanCount: 0
597
- }
598
- },
599
- ready(){
600
- this.getAllArea()
601
- this.getAllPlanName()
602
- if (!isEmpty(this.f_residential_area)){
603
- this.$refs.paged.$refs.cri.model.f_residential_area = this.f_residential_area
604
- }
605
- if (!isEmpty(this.f_building)){
606
- this.$refs.paged.$refs.cri.model.f_building = this.f_building
607
- }
608
- this.selfSearch()
609
- let gen = select(this)
610
- co(gen)
611
- },
612
- mounted(){
613
- //tag
614
- if (window.history && window.history.pushState) {
615
- history.pushState(null, null, document.URL);
616
- window.addEventListener('popstate', this.fun, false);//false阻止默认事件
617
- }
618
- },
619
- destroyed(){
620
- //tag
621
- window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
622
- },
623
- methods: {
624
- scan(){
625
- HostApp.__this__=this,
626
- HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
627
- },
628
- getCode(){
629
- const datapa = HostApp.getCode().data;
630
- //tag
631
- this.$refs.paged.$refs.cri.model.f_meter_no = datapa
632
-
633
- },
634
- fun () {
635
- //tag
636
- //tag
637
- },
638
- iscancel(){
639
- this.showModal2=false
640
- this.showModal3=false
641
- this.planoption=[]
642
- },
643
- timeSet(val){
644
- return val
645
- },
646
- async isok(){
647
- if(this.planoption.length==0){
648
- this.$showMessage("请选择计划")
649
- return false
650
- }
651
- for (let i = 0; i <this.planoption.length ; i++) {
652
- if (this.planoption[i]["selected"]==true){
653
- this.planid=this.planoption[i].value
654
- break
655
- }
656
- }
657
- if(this.planid==''){
658
- this.$showMessage("请选择计划")
659
- return false
660
- }
661
- await this.okput()
662
- },
663
- async manyisok(){
664
- if(this.planoption.length==0){
665
- this.$showMessage("请选择计划")
666
- return false
667
- }
668
- for (let i = 0; i <this.planoption.length ; i++) {
669
- if (this.planoption[i]["selected"]==true){
670
- this.planid=this.planoption[i].value
671
- break
672
- }
673
- }
674
- if(this.planid==''){
675
- this.$showMessage("请选择计划")
676
- return false
677
- }
678
- await this.manyokput()
679
- },
680
- changenull(){
681
- this.showModal2=false
682
- this.showModal3=false
683
- this.planoption=[]
684
- this.plan=''
685
- this.check=''
686
- },
687
- async okput(){
688
- let result = this.$androidUtil.bzLogic('UpCheckPlanItemAndroid', {condition:`id='`+this.needid+`'`,f_plan_id:this.planid})
689
- if (result.code == 200) {
690
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/UpCheckPlanItem`, {data:{
691
- condition:`i.id='`+this.needid+`'`,
692
- f_plan_id:this.planid,
693
- switchCheckAll:false,
694
- checkAll:false,
695
- f_operator:Vue.user.name
696
- }
697
- })
698
- await this.changenull()
699
- }
700
- },
701
- async manyokput(){
702
- let condition = `1=1`
703
- let criteria = {
704
- items: 'id',
705
- tablename: 't_check_plan',
706
- condition: `f_checker_id = '${Vue.user.id}'`,
707
- groupitem: 'id'
708
- }
709
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
710
- if (result.code==200){
711
- condition = `1=1 and i.f_plan_id in (${result.data.rows.map(row => { return `'${row.id}'` }).join()})`
712
- }
713
- let result2 = this.$androidUtil.bzLogic('UpCheckPlanItemAndroid', {condition:`f_plan_id in (${result.data.rows.map(row => { return `'${row.id}'` }).join()})`,f_plan_id:this.planid})
714
- if (result2.code == 200) {
715
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/UpCheckPlanItem`, {data:{
716
- columnName:"i.id",
717
- condition:condition,
718
- f_plan_id:this.planid,
719
- switchCheckAll:true,
720
- param:this.planparam,
721
- checkAll:true,
722
- f_operator:Vue.user.name
723
- }
724
- })
725
- await this.changenull()
726
- }
727
- },
728
- async plansearch(){
729
- this.planoption=[]
730
- let condition= ` f_plan_year=${new Date().getFullYear()}`
731
- if(this.check){
732
- condition += ` and f_checker_id= '${this.check}'`
733
- }
734
- if(this.plan){
735
- condition += ` and f_plan_name like '%${this.plan}%'`
736
- }
737
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/预约计划下发`, {data:{
738
- condition:condition,
739
- f_filialeids:this.f_filialeids,
740
- groupitem:'',
741
- orderitem:'id'
742
- }})
743
- let resoult=res.data
744
- for (let i = 0; i < resoult.length; i++) {
745
- this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
746
- }
747
- },
748
-
749
- select(row, idx) {
750
- this.$set('planoption[' + idx + '].selected', true)
751
- for (let i = 0; i <this.planoption.length ; i++) {
752
- if (i!=idx){
753
- this.planoption[i]["selected"]=false
754
- }
755
- }
756
- },
757
- planclose(){
758
- this.showModal2=false
759
- this.showModal3=false
760
- },
761
- queryplan(val){
762
- this.needid=val
763
- this.showModal2 = true
764
- },
765
- queryplanmany(){
766
-
767
- this.showModal3 = true
768
- },
769
- reload(){
770
- // this.getAllArea()
771
- // this.getAllPlanName()
772
- this.selfSearch()
773
- },
774
- cancelReserve (idx, id) {
775
- if(Vue.android){
776
- let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
777
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
778
- if (res.code == 200) {
779
- this.$showMessage("取消预约成功")
780
- }
781
- }else {
782
- this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
783
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
784
- if (repanse.data.code == 200) {
785
- alert("取消预约成功!")
786
- }
787
- })
788
- }},
789
- genuineReserve () {
790
- if(Vue.android){
791
- if (!this.f_preset_dt) {
792
- this.$showMessage('请选择一个日期')
793
- return
794
- }
795
- let pdt = this.f_preset_dt.replace('T', ' ')
796
- let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
797
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
798
- if(respanse.code == 200) {
799
- this.$showMessage("预约成功!")
800
- }
801
- this.showModal = false
802
- }else {
803
- if (!this.f_preset_dt) {
804
- alert('请选择一个日期')
805
- return
806
- }
807
- let pdt = this.f_preset_dt.replace('T', ' ')
808
- this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
809
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
810
- if(res.data.code == 200) {
811
- alert("预约成功!")
812
- }
813
- this.showModal = false
814
- })
815
- }
816
- },
817
- inspect(row) {
818
- var _this = this
819
- let http = new HttpResetClass()
820
- http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
821
- items: 'id',
822
- tablename: 't_check_plan_item',
823
- condition: `id = '${row.id}'`,
824
- orderitem: ' id '
825
- }}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
826
- this.getcheckplandata = getcheckplan.data[0]
827
- if(this.getcheckplandata){
828
- if (row.f_no_checkplan != '无计划安检') {
829
- _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
830
- row['f_plan_meters'] = response.data
831
- var pardate = {
832
- _this:_this,
833
- title:'安全检查',
834
- safe:true
835
- }
836
- _this.$dispatch('gotoson',pardate)
837
- //tag
838
- _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
839
- }).catch ((msg)=>{
840
- this.$showMessage("网络异常,请检查网络后再试!")
841
- })
842
- }
843
- }else {
844
- this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
845
- }
846
- })
847
- },
848
- makeAPhoneCall(phoneNumber) {
849
- this.$androidUtil.makeAPhoneCall(phoneNumber)
850
- },
851
- reserve (idx) {
852
- this.param = idx
853
- this.showModal = true
854
- },
855
- search(args) {
856
- this.model.rows = []
857
- this.model.search(args.condition, args.model)
858
- },
859
- selfSearch () {
860
- this.getPlanCount()
861
- let condition = ""
862
- if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
863
- condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
864
- }else if(typeof this.$refs.paged.$refs.cri.model.f_residential_area == 'string' && this.$refs.paged.$refs.cri.model.f_residential_area){
865
- condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
866
- }
867
- if(this.$refs.paged.$refs.cri.model.f_building)
868
- condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
869
- if(this.$refs.paged.$refs.cri.model.f_unit)
870
- condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
871
- if (this.planName){
872
- condition += " and f_plan_name like '%"+this.planName +"%'"
873
- }else {
874
- if(this.$refs.paged.$refs.cri.model.f_plan_name)
875
- condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
876
- }
877
- // if(this.$refs.paged.$refs.cri.model.f_plan_year)
878
- // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
879
- // if(this.$refs.paged.$refs.cri.model.f_plan_month)
880
- // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
881
- if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
882
- condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
883
- if(this.$refs.paged.$refs.cri.model.f_keyword)
884
- condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
885
- if(this.$refs.paged.$refs.cri.model.f_user_name)
886
- condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
887
- if(this.$refs.paged.$refs.cri.model.f_state[0])
888
- condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
889
- if(this.$refs.paged.$refs.cri.model.f_last_state[0])
890
- condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
891
- if(this.$refs.paged.$refs.cri.model.f_user_type[0])
892
- condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
893
- if(this.$refs.paged.$refs.cri.model.f_meter_no)
894
- condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
895
- // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
896
- // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
897
- if(this.$refs.paged.$refs.cri.model.f_user_phone){
898
- condition += `and ti.f_user_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%'`
899
- }
900
- if(this.$refs.paged.$refs.cri.model.f_enter_number)
901
- condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
902
- if(this.$refs.paged.$refs.cri.model.f_check_version)
903
- condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version
904
- //tag
905
- this.model.search("ti.f_no_checkplan = '有计划安检'" + condition)
906
- },
907
- getNewOrder(){
908
- HostApp.__this__ = this
909
- HostApp.logicWithHint({
910
- // logic别名,key必须为logic
911
- 'logic': 'SafeCheckServiceTimeOut',
912
- // 回调执行方法名,key必须为callback
913
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
914
- // logic执行需要的业务参数
915
- 'data': {params: ''},
916
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
917
- // 执行回调方法传入key为backresult
918
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
919
- 'backresult': 1
920
- })
921
- HostApp.logicWithHint({
922
- // logic别名,key必须为logic
923
- 'logic': 'FreshPlanItem',
924
- // 回调执行方法名,key必须为callback
925
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
926
- // logic执行需要的业务参数
927
- 'data': {params: ''},
928
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
929
- // 执行回调方法传入key为backresult
930
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
931
- 'backresult': 1
932
- })
933
- },
934
- getNewOrderCallBack() {
935
- this.selfSearch()
936
- this.getAllArea()
937
- this.getAllPlanName()
938
- },
939
- hidden() {
940
- this.criteriaShow = !this.criteriaShow
941
- },
942
- getAllArea(){
943
- this.residentialAreaOptions = []
944
- this.buildOptions = []
945
- this.unitOptions = []
946
- this.$refs.paged.$refs.cri.model.f_unit = ''
947
- let criteria = {
948
- items: 'f_residential_area',
949
- tablename: 't_check_plan_item',
950
- condition: `f_residential_area IS NOT NULL AND f_residential_area != ''`,
951
- groupitem: 'f_residential_area'
952
- }
953
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
954
- //tag)
955
- if(result.code == 200){
956
- result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
957
- }
958
- //tag)
959
- },
960
- getbuilds(f_residential_area){
961
- //tag)
962
- this.buildOptions = []
963
- this.unitOptions = []
964
- this.$refs.paged.$refs.cri.model.f_unit = ''
965
- if(!f_residential_area){
966
- return
967
- }
968
- let criteria = {
969
- items: 'f_building',
970
- tablename: 't_check_plan_item',
971
- condition: `f_building IS NOT NULL AND f_building != '' AND f_residential_area = '${f_residential_area}'`,
972
- groupitem: 'f_building order by f_building+0'
973
- }
974
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
975
- if(result.code == 200){
976
- result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
977
- }
978
- this.buildOptions.sort((a,b)=>{
979
- return Number(a.label)- Number(b.label)
980
- })
981
- //tag)
982
- },
983
- getUnits(f_building){
984
- f_building = f_building[0]
985
- //tag)
986
- this.unitOptions = []
987
- this.$refs.paged.$refs.cri.model.f_unit = ''
988
- if(!f_building){
989
- return
990
- }
991
- let criteria = {
992
- items: 'f_unit',
993
- tablename: 't_check_plan_item',
994
- condition: `f_unit IS NOT NULL AND f_unit != '' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
995
- groupitem: 'f_unit'
996
- }
997
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
998
- if(result.code == 200){
999
- result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
1000
- }
1001
- this.unitOptions.sort((a,b)=>{
1002
- return Number(a.label)- Number(b.label)
1003
- })
1004
- },
1005
- getPlanCount(){
1006
- this.upcomingCount = 0
1007
- this.tempSaveCount = 0
1008
- this.doneCount = 0
1009
- this.allPlanCount = 0
1010
- let criteria = {
1011
- items: 'count(id) count',
1012
- tablename: 't_check_plan_item',
1013
- condition: `f_state = '未检'`,
1014
- groupitem: 'f_state'
1015
- }
1016
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1017
- if(result.code && result.code == 200){
1018
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
1019
- this.upcomingCount = result.data.rows[0].count
1020
- }
1021
- }
1022
- criteria = {
1023
- items: 'count(id) count',
1024
- tablename: 't_check_plan_item',
1025
- condition: `(f_complete = '' or f_complete is null or f_complete = '未完成') AND f_state = '已检'`,
1026
- groupitem: 'f_state'
1027
- }
1028
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1029
- if(result.code && result.code == 200){
1030
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1031
- this.tempSaveCount = result.data.rows[0].count
1032
- }
1033
- }
1034
- criteria = {
1035
- items: 'count(id) count',
1036
- tablename: 't_check_plan_item',
1037
- condition: `f_complete = '已完成' AND f_state = '已检'`,
1038
- groupitem: 'f_state'
1039
- }
1040
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1041
- if(result.code && result.code == 200){
1042
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1043
- this.doneCount = result.data.rows[0].count
1044
- }
1045
- }
1046
- this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
1047
-
1048
- //tag
1049
- //tag
1050
- //tag
1051
- //tag
1052
- },
1053
- getAllPlanName(){
1054
- this.planNameOptions = []
1055
- this.$refs.paged.$refs.cri.model.f_plan_name = ''
1056
- let criteria = {
1057
- items: 'f_plan_name',
1058
- tablename: 't_check_plan',
1059
- condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1060
- groupitem: 'f_plan_name'
1061
- }
1062
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1063
- //tag)
1064
- if(result.code == 200){
1065
- result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
1066
- }
1067
- //tag)
1068
- },
1069
- setPlanParam(detailsType, event) {
1070
- if (event.srcElement.checked) {
1071
- this.planparam.push(detailsType)
1072
- //tag
1073
- } else {
1074
- if(this.planparam.length>0){
1075
- let planid= this.planparam.findIndex((value) => {
1076
- return value === detailsType
1077
- })
1078
- this.planparam.splice(planid, 1)
1079
- //tag
1080
-
1081
- }
1082
-
1083
- }
1084
- }
1085
- }
1086
- }
1087
- </script>
1
+ <style scoped>
2
+ .bg {
3
+ background-color: blue;
4
+ height: 1px;
5
+ border: 0;
6
+ }
7
+ .app-row {
8
+ background-color: white;
9
+ padding: 10px 10px 0 10px;
10
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
11
+ }
12
+ .search_input {
13
+ border: 0;
14
+ outline: none;
15
+ }
16
+ .font{
17
+ font: 15px PingFang-SC-Medium;
18
+ color: #666666;
19
+ }
20
+ .input-font{
21
+ font: 15px PingFang-SC-Medium;
22
+ color: #333333;
23
+ }
24
+ .btn-font{
25
+ font:600 16px PingFang-SC-Bold;
26
+ color: #499EDF;
27
+ }
28
+ .btn-color{
29
+ background-color: #FFFFFF;
30
+ border-radius: 10px ;
31
+ border: 1px solid #499EDF;
32
+ }
33
+ .app-text {
34
+ font-size: 12px;
35
+ }
36
+ .panel-self{
37
+ border-radius: 10px;
38
+ border:1px solid #499EDF;
39
+ background-color: #F8F8F8;
40
+ }
41
+ .yybtn-color{
42
+ background-color:#499edf;
43
+ border-radius: 4px ;
44
+ border: 1px solid #499EDF;
45
+ color: #FFFFFF;
46
+ font: 14px PingFang-SC-Bold;
47
+ }
48
+ .qxbtn-color{
49
+ background-color: #FFFFFF;
50
+ border-radius: 4px ;
51
+ color: #499edf;
52
+ font: 14px PingFang-SC-Bold;
53
+ border: 1px solid #499EDF;
54
+ }
55
+
56
+ .button_shrink_top {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_top.png")}
57
+ .button_shrink_bottom {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_bottom.png")}
58
+ .button_shrink_left {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_left.png")}
59
+ .button_shrink_right {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_right.png")}
60
+ </style>
61
+ <style>
62
+ .clear-select-with .dropdown-menu{
63
+ left: 0px !important;
64
+ width: 200% !important;
65
+ }
66
+ </style>
67
+ <template>
68
+ <div style="height: auto;width: 100%">
69
+ <criteria-paged :model="model" v-ref:paged>
70
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri>
71
+ <div partial>
72
+ <form>
73
+ <div class="row app-row">
74
+ <!--小区名称-->
75
+ <v-select :value.sync="model.f_residential_area"
76
+ class="input-font clear-select-with"
77
+ :options='$parent.$parent.residentialAreaOptions'
78
+ placeholder='小区名称'
79
+ :width="'32.5%'"
80
+ v-model="model.f_residential_area"
81
+ condition="ti.f_residential_area = '{}'"
82
+ @change="$parent.$parent.getbuilds"
83
+ :value-single = true
84
+ close-on-select clear-button>
85
+ </v-select>
86
+ <!--楼栋-->
87
+ <v-select :value.sync="model.f_building"
88
+ class="input-font"
89
+ :options='$parent.$parent.buildOptions'
90
+ placeholder='楼栋'
91
+ :width="'32.5%'"
92
+ v-model="model.f_building"
93
+ condition="ti.f_building = '{}'"
94
+ @change="$parent.$parent.getUnits"
95
+ :value-single = true
96
+ close-on-select clear-button>
97
+ </v-select>
98
+ <!--单元-->
99
+ <v-select :value.sync="model.f_unit"
100
+ class="input-font"
101
+ :options='$parent.$parent.unitOptions'
102
+ placeholder='单元'
103
+ :width="'32.5%'"
104
+ :value-single = true
105
+ v-model="model.f_unit"
106
+ condition="ti.f_unit = '{}'"
107
+ close-on-select clear-button>
108
+ </v-select>
109
+ </div>
110
+ <div class="row app-row">
111
+ <div class="col-xs-4">
112
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
113
+ <label for="f_userinfo_code" class="font text-left">用户编号:</label>
114
+ </div>
115
+ <div class="col-xs-8" >
116
+ <input id="f_userinfo_code" class="search_input input-font"
117
+ v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'" />
118
+ </div>
119
+ </div>
120
+ <div class="row app-row">
121
+ <div class="col-xs-4">
122
+ <img src="../../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
123
+ <label class="font text-left">用户姓名:</label>
124
+ </div>
125
+ <div class="col-xs-8" >
126
+ <input class="search_input input-font" v-model=model.f_user_name condition="f_user_name like '%{}%'" />
127
+ </div>
128
+ </div>
129
+
130
+ <div class="row app-row">
131
+ <div class="col-xs-4">
132
+ <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
133
+ <label class="font text-left">用户证号:</label>
134
+ </div>
135
+ <div class="col-xs-8" >
136
+ <input class="search_input input-font" v-model=model.f_enter_number condition="f_enter_number like '%{}%'" />
137
+ </div>
138
+ </div>
139
+
140
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow && !$parent.$parent.planName">
141
+ <div class="col-xs-4">
142
+ <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
143
+ <label for="f_plan_name" class="font text-left">计划名称:</label>
144
+ </div>
145
+ <v-select
146
+ id="f_plan_name"
147
+ :value.sync="model.f_plan_name"
148
+ class="input-font"
149
+ :options='$parent.$parent.planNameOptions'
150
+ placeholder='计划名称'
151
+ :width="'60%'"
152
+ v-model="model.f_plan_name"
153
+ condition="f_plan_name like '%{}%'"
154
+ close-on-select clear-button>
155
+ </v-select>
156
+ </div>
157
+
158
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
159
+ <div class="col-xs-4">
160
+ <img src="../../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
161
+ <label for="f_state" class="font text-left">是否已检:</label>
162
+ </div>
163
+ <v-select id="f_state"
164
+ :value.sync="model.f_state"
165
+ class="input-font"
166
+ :options='$parent.$parent.check_states'
167
+ placeholder='是否已检'
168
+ :width="'60%'"
169
+ v-model="model.f_state"
170
+ condition="f_state='{}'"
171
+ close-on-select clear-button>
172
+ </v-select>
173
+ </div>
174
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
175
+ <div class="col-xs-4">
176
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
177
+ <label class="font text-left">表&emsp;&emsp;号:</label>
178
+ </div>
179
+ <div class="col-xs-5" >
180
+ <input class="search_input input-font"
181
+ v-model=model.f_meter_no condition="f_meter_no like '%{}%'" />
182
+ </div>
183
+ <div class="col-xs-3">
184
+ <button type="button" class="btn btn-lg btn-font btn-color" @click="$parent.$parent.scan()">扫码</button>
185
+ </div>
186
+ </div>
187
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
188
+ <div class="col-xs-4">
189
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
190
+ <label class="font text-left">客户电话:</label>
191
+ </div>
192
+ <div class="col-xs-8" >
193
+ <input class="search_input input-font"
194
+ v-model=model.f_user_phone condition="f_user_phone like '%{}%'" />
195
+ </div>
196
+ </div>
197
+
198
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
199
+ <div class="col-xs-4">
200
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
201
+ <label class="font text-left">用户地址:</label>
202
+ </div>
203
+ <div class="col-xs-8" >
204
+ <input class="search_input input-font"
205
+ v-model=model.f_keyword condition="f_address like '%{}%'" />
206
+ </div>
207
+ </div>
208
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
209
+ <div class="col-xs-4">
210
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
211
+ <label for="f_user_type" class="font text-left">用户类型:</label>
212
+ </div>
213
+ <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
214
+ :width="'60%'"
215
+ :options='$parent.$parent.user_types' placeholder='请选择用户类型'
216
+ v-model="model.f_user_type" condition="f_user_type='{}'" close-on-select clear-button></v-select>
217
+ </div>
218
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
219
+ <div class="col-xs-4">
220
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
221
+ <label for="f_user_type" class="font text-left">安检状态:</label>
222
+ </div>
223
+ <v-select id="f_user_type" :value.sync="model.f_last_state" class="input-font"
224
+ :width="'60%'"
225
+ :options='$parent.$parent.last_check_states' placeholder='请选择用户类型'
226
+ v-model="model.f_last_state"
227
+ close-on-select clear-button></v-select>
228
+ </div>
229
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
230
+ <div class="col-xs-6">
231
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
232
+ <label class="font text-left">到访不遇:</label>
233
+ </div>
234
+ <div class="col-xs-8" >
235
+ <input class="search_input input-font" type="number"
236
+ v-model=model.f_check_version condition="f_check_version <= '{}'" />
237
+ </div>
238
+ </div>
239
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
240
+ <div class="col-xs-6" style="text-align: center">
241
+ <span class="font text-left">待办{{$parent.$parent.upcomingCount}}条</span>
242
+ </div>
243
+ <div class="col-xs-6" style="text-align: center">
244
+ <span class="font text-left">已办{{$parent.$parent.doneCount}}条</span>
245
+ </div>
246
+ <div class="col-xs-6" style="text-align: center">
247
+ <span class="font text-left">临时保存{{$parent.$parent.tempSaveCount}}条</span>
248
+ </div>
249
+ <div class="col-xs-6" style="text-align: center">
250
+ <span class="font text-left">总共{{$parent.$parent.allPlanCount}}条</span>
251
+ </div>
252
+ </div>
253
+
254
+ <div class="row text-center" style="margin-top: 20px;">
255
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="$parent.$parent.selfSearch">查询</button>
256
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%; margin-left: 10px" @click="$parent.$parent.queryplanmany">转发</button>
257
+ <div style="float: right;margin-right: 3% " class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
258
+ <img v-if="!$parent.$parent.planName" style="float: right;margin-right: 3% " @click="$parent.$parent.getNewOrder" src="../../../assets/shuaxindaiban1.png" style="width: 40px;padding: 5px; float:right">
259
+ </div>
260
+ <div class="col-sm-12">
261
+
262
+ </div>
263
+ <!--<div class="row app-btn">-->
264
+ <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
265
+ <!--</div>-->
266
+ <div style="height:30px;"></div>
267
+ </form>
268
+ </div>
269
+ </criteria>
270
+ <list :model="model" partial='list'>
271
+ <div partial>
272
+ <div class="auto app-text" style="margin-top: 5px;">
273
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
274
+ <div class="panel-body panel-self">
275
+
276
+ <div class="col-xs-12">
277
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
278
+ <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
279
+ <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
280
+ <input type="checkbox" @click="$parent.$parent.$parent.setPlanParam(row.id, $event)"/>
281
+ </p>
282
+ </div>
283
+ <div class="col-xs-12">
284
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
285
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
286
+ </div>
287
+ <div class="col-xs-6">
288
+ <p class="panel-title col-xs-5 text-left font"><b>用户类型:</b></p>
289
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_user_type }}
290
+ </p>
291
+ </div>
292
+ <div class="col-xs-6">
293
+ <p class="panel-title col-xs-5 text-left font"><b>计划名称:</b></p>
294
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_plan_name }}</p>
295
+ </div>
296
+ <div class="col-xs-6">
297
+ <p class="panel-title col-xs-5 text-left font"><b>小区名称:</b></p>
298
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_residential_area }}</p>
299
+ </div>
300
+ <div class="col-xs-12">
301
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
302
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone }}
303
+ <img src="../../../assets/phone.png" style="width: 6%"
304
+ v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_user_phone)'/>
305
+ </p>
306
+ </div>
307
+ <div class="col-xs-12">
308
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>备用电话:</b></p>
309
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_rent_phone}}
310
+ <img v-if="row.f_rent_phone" src="../../../assets/phone.png" style="width: 6%"
311
+ v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_rent_phone)'/>
312
+ </p>
313
+ </div>
314
+ <div class="col-xs-12">
315
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>租户电话:</b></p>
316
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_zuhu_phone }}
317
+ <img v-if="row.f_zuhu_phone" src="../../../assets/phone.png" style="width: 6%"
318
+ v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_zuhu_phone)'/>
319
+ </p>
320
+ </div>
321
+
322
+ <div class="col-xs-12">
323
+ <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
324
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
325
+ </div>
326
+
327
+ <!-- <div class="row">-->
328
+ <!-- <p class="panel-title col-xs-4 text-left font">计划年份</p>-->
329
+ <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_year }}</p>-->
330
+ <!-- </div>-->
331
+ <!-- <div class="row">-->
332
+ <!-- <p class="panel-title col-xs-4 text-left font">计划月份</p>-->
333
+ <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_plan_month }}</p>-->
334
+ <!-- </div>-->
335
+ <!-- <div class="row">-->
336
+ <!-- <p class="panel-title col-xs-4 text-left font">预约时间</p>-->
337
+ <!-- <p class="panel-title col-xs-8 text-left input-font">{{ row.f_prearranged_date }}</p>-->
338
+ <!-- </div>-->
339
+ <div class="row">
340
+ <p class="panel-title col-xs-4 text-left font"><b>上次安检状态:</b></p>
341
+ <p class="panel-title col-xs-8 text-left input-font">{{ row.f_last_check_state }}</p>
342
+ </div>
343
+ <div class="col-xs-6">
344
+ <p class="panel-title col-xs-5 text-left font"><b>安检状态:</b></p>
345
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_state }}</p>
346
+ </div>
347
+ <div class="col-xs-6">
348
+ <p class="panel-title col-xs-5 text-left font"><b>上传状态:</b></p>
349
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
350
+ </div>
351
+ <div class="col-xs-12" v-if="row.f_prearranged_date !=null">
352
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>预约时间:</b></p>
353
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_prearranged_date }}</p>
354
+ </div>
355
+ <div class="col-xs-6">
356
+ <p class="panel-title col-xs-5 text-left font"><b>安检类型:</b></p>
357
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_safecheck_type }}</p>
358
+ </div>
359
+ <div class="col-xs-12">
360
+ <p class="panel-title col-xs-5 text-left font"><b>到访不遇次数:</b></p>
361
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_check_version }}</p>
362
+ </div>
363
+ <div class="col-xs-6">
364
+ <p class="panel-title col-xs-5 text-left font" ><b>是否通过:</b></p>
365
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_approved }}</p>
366
+ </div>
367
+ <div class="col-xs-6" v-show="row.f_approved == '不通过'">
368
+ <p class="panel-title col-xs-5 text-left font" style="color: red;"><b>未通过原因:</b></p>
369
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_approved_note }}</p>
370
+ </div>
371
+ <!--<div class="col-xs-12">-->
372
+ <!--<p class="panel-title col-xs-5 text-left font"><b>送气期限:</b></p>-->
373
+ <!--<p class="panel-title col-xs-7 text-left input-font">{{timeSet(row.f_issue_time)}}</p>-->
374
+ <!--</div>-->
375
+ <div class="col-xs-12">
376
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.inspect(row)">处理</button>
377
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right;margin-right:10px;" @click="$parent.$parent.$parent.queryplan(row.id)">转发</button>
378
+ <!--<button type="button" class="btn btn-default" @click="$parent.$parent.$parent.ceshi">确认2</button>-->
379
+ </div>
380
+ <!-- <div class="row text-right" v-show="row.f_upload_state != '已传'" >-->
381
+ <!-- <button type="button" class="btn yybtn-color" v-on:click.stop.prevent='$parent.$parent.$parent.reserve($index)'>预约</button>&nbsp;-->
382
+ <!-- <button type="button" class="btn qxbtn-color" v-if ='row.f_prearranged_date'-->
383
+ <!-- v-on:click.stop.prevent='$parent.$parent.$parent.cancelReserve($index, row.id)'>取消预约</button>-->
384
+ <!-- </div>-->
385
+ </div>
386
+ </div>
387
+ </div>
388
+ </div>
389
+ </list>
390
+ </criteria-paged>
391
+ <modal :show.sync="showModal">
392
+ <div slot="modal-header" class="modal-header">
393
+ <h4 class="modal-title">
394
+ 选择预约时间
395
+ </h4>
396
+ </div>
397
+ <div slot="modal-body" class="modal-body">
398
+ <input type="datetime-local" v-model="f_preset_dt">
399
+ </div>
400
+ <div slot="modal-footer" class="modal-footer">
401
+ <button type="button" class="btn btn-default" @click="genuineReserve">确认</button>
402
+ </div>
403
+ </modal>
404
+ <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
405
+ <modal :show.sync="showModal2" v-ref:modal>
406
+ <div slot="modal-header" class="modal-header">
407
+ <h4 class="modal-title">
408
+ 选择计划
409
+ </h4>
410
+ </div>
411
+ <div slot="modal-body" class="modal-body">
412
+ <div class="col-xs-12">
413
+
414
+ <div class="col-xs-4">
415
+ <v-select :value.sync="check" v-model='check'
416
+ :value-single="true"
417
+ class="select_list select"
418
+ :options='checkers' placeholder='安检员'
419
+ close-on-select width="100%"></v-select>
420
+ </div>
421
+
422
+ <div class="col-xs-1">
423
+ <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
424
+ </div>
425
+ <div class="col-xs-4" style="padding-left: 2px">
426
+ <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
427
+ </div>
428
+ <div class="col-xs-1" >
429
+ <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
430
+ </div>
431
+ <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
432
+ <div class="col-xs-2" style="float: right">
433
+ <button type="button" class="btn btn-primary" @click="plansearch" style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">查询</button>
434
+ </div>
435
+ </div>
436
+ <table class="table table_sy">
437
+ <thead>
438
+ <tr>
439
+ <th style="width: 30px"></th>
440
+ <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
441
+ </tr>
442
+ </thead>
443
+ <tbody>
444
+ <tr v-for="row in planoption">
445
+ <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
446
+ <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
447
+
448
+
449
+ </tr>
450
+ </tbody>
451
+ </table>
452
+ </div>
453
+ <div slot="modal-footer" class="modal-footer">
454
+ <button class="btn btn-default" @click="isok()">确认</button>
455
+ <button class="btn btn-default" @click="iscancel()">取消</button>
456
+ </div>
457
+ </modal>
458
+ <modal :show.sync="showModal3" v-ref:modal>
459
+ <div slot="modal-header" class="modal-header">
460
+ <h4 class="modal-title">
461
+ 选择计划
462
+ </h4>
463
+ </div>
464
+ <div slot="modal-body" class="modal-body">
465
+ <div class="col-xs-12">
466
+
467
+ <div class="col-xs-4">
468
+ <v-select :value.sync="check" v-model='check'
469
+ :value-single="true"
470
+ class="select_list select"
471
+ :options='checkers' placeholder='安检员'
472
+ close-on-select width="100%"></v-select>
473
+ </div>
474
+
475
+ <div class="col-xs-1">
476
+ <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
477
+ </div>
478
+ <div class="col-xs-4" style="padding-left: 2px">
479
+ <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
480
+ </div>
481
+ <div class="col-xs-1" >
482
+ <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
483
+ </div>
484
+ <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
485
+ <div class="col-xs-2" style="float: right">
486
+ <button type="button" class="btn btn-primary" @click="plansearch" style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">查询</button>
487
+ </div>
488
+ </div>
489
+ <table class="table table_sy">
490
+ <thead>
491
+ <tr>
492
+ <th style="width: 30px"></th>
493
+ <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
494
+ </tr>
495
+ </thead>
496
+ <tbody>
497
+ <tr v-for="row in planoption">
498
+ <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
499
+ <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
500
+
501
+
502
+ </tr>
503
+ </tbody>
504
+ </table>
505
+ </div>
506
+ <div slot="modal-footer" class="modal-footer">
507
+ <button class="btn btn-default" @click="manyisok()">确认</button>
508
+ <button class="btn btn-default" @click="iscancel()">取消</button>
509
+ </div>
510
+ </modal>
511
+ </div>
512
+
513
+ </template>
514
+
515
+ <script>
516
+ import LocalPagedList from '../../../plugins/LocalPagedList'
517
+ import Vue from 'vue'
518
+ import { PagedList,HttpResetClass } from 'vue-client'
519
+ import * as Util from '../../Util'
520
+ import co from 'co'
521
+ import {isEmpty} from '../../Util'
522
+ let select = function * (self) {
523
+ let http = new HttpResetClass()
524
+ http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
525
+ source: 'this.getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1)',
526
+ userid: Vue.user.orgid
527
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
528
+ //tag
529
+ self.checkers.push({label:'全部',value:''})
530
+ res.data.forEach((checker)=>{
531
+ self.checkers.push({label:checker.name,value:checker.id})
532
+ })
533
+ })
534
+ }
535
+ export default {
536
+ title: '无计划安检查询',
537
+ props: ['planName','f_residential_area','f_building'],
538
+ data() {
539
+ return {
540
+ f_filialeids:'('+Vue.user.orgid+')',
541
+ //f_filialeids:'(305)',
542
+ planparam:[],
543
+ check:'',
544
+ plan:'',
545
+ planid:'',
546
+ model:Vue.android? new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}): new PagedList( 'AndroidRest/api/af-safecheck/sql/androidGetuserinfo',20,{condition:'this.condition'}),
547
+ showModal: false,
548
+ showModal2:false,
549
+ showModal3:false,
550
+ needid:'',
551
+ criteriaShow: false,
552
+ planoption:[],
553
+ condition:'',
554
+ checkers:[],
555
+ param: null,
556
+ f_preset_dt : Util.to3339TimeString(),
557
+ flow_direction:[
558
+ {label: '请选择挂表方式', value: ''},
559
+ {label: '左表', value: '左表'},
560
+ {label: '右表', value: '右表'}
561
+ ],
562
+ check_states: [
563
+ {label: '请选择安检状态', value: ''},
564
+ {label: '未检', value: '未检'},
565
+ {label: '已检', value: '已检'},
566
+ ],
567
+ last_check_states: [
568
+ {label: '请选择上次安检状态', value: ''},
569
+ {label: '入户', value: '入户'},
570
+ {label: '拒检', value: '拒检'},
571
+ {label: '到访不遇', value: '到访不遇'},
572
+ {label: '未使用天然气', value: '未使用天然气'}
573
+ ],
574
+ upload_states: [
575
+ {label: '请选择上传状态', value: ''},
576
+ {label: '未传', value: '未传'},
577
+ {label: '已传', value: '已传'}
578
+ ],
579
+ user_types: [
580
+ {label: '请选择用户类型', value: ''},
581
+ {label: '民用', value: '民用'},
582
+ {label: '非民用', value: '非民用'},
583
+ ],
584
+ verify_state: [
585
+ {label: '请选择审核状态', value: ''},
586
+ {label: '未审核', value: '未审核'},
587
+ {label: '打回', value: '打回'}
588
+ ],
589
+ residentialAreaOptions: [],
590
+ buildOptions: [],
591
+ unitOptions: [],
592
+ planNameOptions: [],
593
+ upcomingCount: 0,
594
+ doneCount: 0,
595
+ tempSaveCount: 0,
596
+ allPlanCount: 0
597
+ }
598
+ },
599
+ ready(){
600
+ this.getAllArea()
601
+ this.getAllPlanName()
602
+ if (!isEmpty(this.f_residential_area)){
603
+ this.$refs.paged.$refs.cri.model.f_residential_area = this.f_residential_area
604
+ }
605
+ if (!isEmpty(this.f_building)){
606
+ this.$refs.paged.$refs.cri.model.f_building = this.f_building
607
+ }
608
+ this.selfSearch()
609
+ let gen = select(this)
610
+ co(gen)
611
+ },
612
+ mounted(){
613
+ //tag
614
+ if (window.history && window.history.pushState) {
615
+ history.pushState(null, null, document.URL);
616
+ window.addEventListener('popstate', this.fun, false);//false阻止默认事件
617
+ }
618
+ },
619
+ destroyed(){
620
+ //tag
621
+ window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
622
+ },
623
+ methods: {
624
+ scan(){
625
+ HostApp.__this__=this,
626
+ HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
627
+ },
628
+ getCode(){
629
+ const datapa = HostApp.getCode().data;
630
+ //tag
631
+ this.$refs.paged.$refs.cri.model.f_meter_no = datapa
632
+
633
+ },
634
+ fun () {
635
+ //tag
636
+ //tag
637
+ },
638
+ iscancel(){
639
+ this.showModal2=false
640
+ this.showModal3=false
641
+ this.planoption=[]
642
+ },
643
+ timeSet(val){
644
+ return val
645
+ },
646
+ async isok(){
647
+ if(this.planoption.length==0){
648
+ this.$showMessage("请选择计划")
649
+ return false
650
+ }
651
+ for (let i = 0; i <this.planoption.length ; i++) {
652
+ if (this.planoption[i]["selected"]==true){
653
+ this.planid=this.planoption[i].value
654
+ break
655
+ }
656
+ }
657
+ if(this.planid==''){
658
+ this.$showMessage("请选择计划")
659
+ return false
660
+ }
661
+ await this.okput()
662
+ },
663
+ async manyisok(){
664
+ if(this.planoption.length==0){
665
+ this.$showMessage("请选择计划")
666
+ return false
667
+ }
668
+ for (let i = 0; i <this.planoption.length ; i++) {
669
+ if (this.planoption[i]["selected"]==true){
670
+ this.planid=this.planoption[i].value
671
+ break
672
+ }
673
+ }
674
+ if(this.planid==''){
675
+ this.$showMessage("请选择计划")
676
+ return false
677
+ }
678
+ await this.manyokput()
679
+ },
680
+ changenull(){
681
+ this.showModal2=false
682
+ this.showModal3=false
683
+ this.planoption=[]
684
+ this.plan=''
685
+ this.check=''
686
+ },
687
+ async okput(){
688
+ let result = this.$androidUtil.bzLogic('UpCheckPlanItemAndroid', {condition:`id='`+this.needid+`'`,f_plan_id:this.planid})
689
+ if (result.code == 200) {
690
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/UpCheckPlanItem`, {data:{
691
+ condition:`i.id='`+this.needid+`'`,
692
+ f_plan_id:this.planid,
693
+ switchCheckAll:false,
694
+ checkAll:false,
695
+ f_operator:Vue.user.name
696
+ }
697
+ })
698
+ await this.changenull()
699
+ }
700
+ },
701
+ async manyokput(){
702
+ let condition = `1=1`
703
+ let criteria = {
704
+ items: 'id',
705
+ tablename: 't_check_plan',
706
+ condition: `f_checker_id = '${Vue.user.id}'`,
707
+ groupitem: 'id'
708
+ }
709
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
710
+ if (result.code==200){
711
+ condition = `1=1 and i.f_plan_id in (${result.data.rows.map(row => { return `'${row.id}'` }).join()})`
712
+ }
713
+ let result2 = this.$androidUtil.bzLogic('UpCheckPlanItemAndroid', {condition:`f_plan_id in (${result.data.rows.map(row => { return `'${row.id}'` }).join()})`,f_plan_id:this.planid})
714
+ if (result2.code == 200) {
715
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/UpCheckPlanItem`, {data:{
716
+ columnName:"i.id",
717
+ condition:condition,
718
+ f_plan_id:this.planid,
719
+ switchCheckAll:true,
720
+ param:this.planparam,
721
+ checkAll:true,
722
+ f_operator:Vue.user.name
723
+ }
724
+ })
725
+ await this.changenull()
726
+ }
727
+ },
728
+ async plansearch(){
729
+ this.planoption=[]
730
+ let condition= ` f_plan_year=${new Date().getFullYear()}`
731
+ if(this.check){
732
+ condition += ` and f_checker_id= '${this.check}'`
733
+ }
734
+ if(this.plan){
735
+ condition += ` and f_plan_name like '%${this.plan}%'`
736
+ }
737
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/预约计划下发`, {data:{
738
+ condition:condition,
739
+ f_filialeids:this.f_filialeids,
740
+ groupitem:'',
741
+ orderitem:'id'
742
+ }})
743
+ let resoult=res.data
744
+ for (let i = 0; i < resoult.length; i++) {
745
+ this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
746
+ }
747
+ },
748
+
749
+ select(row, idx) {
750
+ this.$set('planoption[' + idx + '].selected', true)
751
+ for (let i = 0; i <this.planoption.length ; i++) {
752
+ if (i!=idx){
753
+ this.planoption[i]["selected"]=false
754
+ }
755
+ }
756
+ },
757
+ planclose(){
758
+ this.showModal2=false
759
+ this.showModal3=false
760
+ },
761
+ queryplan(val){
762
+ this.needid=val
763
+ this.showModal2 = true
764
+ },
765
+ queryplanmany(){
766
+
767
+ this.showModal3 = true
768
+ },
769
+ reload(){
770
+ // this.getAllArea()
771
+ // this.getAllPlanName()
772
+ this.selfSearch()
773
+ },
774
+ cancelReserve (idx, id) {
775
+ if(Vue.android){
776
+ let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
777
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
778
+ if (res.code == 200) {
779
+ this.$showMessage("取消预约成功")
780
+ }
781
+ }else {
782
+ this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
783
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
784
+ if (repanse.data.code == 200) {
785
+ alert("取消预约成功!")
786
+ }
787
+ })
788
+ }},
789
+ genuineReserve () {
790
+ if(Vue.android){
791
+ if (!this.f_preset_dt) {
792
+ this.$showMessage('请选择一个日期')
793
+ return
794
+ }
795
+ let pdt = this.f_preset_dt.replace('T', ' ')
796
+ let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
797
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
798
+ if(respanse.code == 200) {
799
+ this.$showMessage("预约成功!")
800
+ }
801
+ this.showModal = false
802
+ }else {
803
+ if (!this.f_preset_dt) {
804
+ alert('请选择一个日期')
805
+ return
806
+ }
807
+ let pdt = this.f_preset_dt.replace('T', ' ')
808
+ this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
809
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
810
+ if(res.data.code == 200) {
811
+ alert("预约成功!")
812
+ }
813
+ this.showModal = false
814
+ })
815
+ }
816
+ },
817
+ inspect(row) {
818
+ var _this = this
819
+ let http = new HttpResetClass()
820
+ http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
821
+ items: 'id',
822
+ tablename: 't_check_plan_item',
823
+ condition: `id = '${row.id}'`,
824
+ orderitem: ' id '
825
+ }}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
826
+ this.getcheckplandata = getcheckplan.data[0]
827
+ if(this.getcheckplandata){
828
+ if (row.f_no_checkplan != '无计划安检') {
829
+ _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
830
+ row['f_plan_meters'] = response.data
831
+ var pardate = {
832
+ _this:_this,
833
+ title:'安全检查',
834
+ safe:true
835
+ }
836
+ _this.$dispatch('gotoson',pardate)
837
+ //tag
838
+ _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
839
+ }).catch ((msg)=>{
840
+ this.$showMessage("网络异常,请检查网络后再试!")
841
+ })
842
+ }
843
+ }else {
844
+ this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
845
+ }
846
+ })
847
+ },
848
+ makeAPhoneCall(phoneNumber) {
849
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
850
+ },
851
+ reserve (idx) {
852
+ this.param = idx
853
+ this.showModal = true
854
+ },
855
+ search(args) {
856
+ this.model.rows = []
857
+ this.model.search(args.condition, args.model)
858
+ },
859
+ selfSearch () {
860
+ this.getPlanCount()
861
+ let condition = ""
862
+ if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
863
+ condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
864
+ }else if(typeof this.$refs.paged.$refs.cri.model.f_residential_area == 'string' && this.$refs.paged.$refs.cri.model.f_residential_area){
865
+ condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
866
+ }
867
+ if(this.$refs.paged.$refs.cri.model.f_building)
868
+ condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
869
+ if(this.$refs.paged.$refs.cri.model.f_unit)
870
+ condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
871
+ if (this.planName){
872
+ condition += " and f_plan_name like '%"+this.planName +"%'"
873
+ }else {
874
+ if(this.$refs.paged.$refs.cri.model.f_plan_name)
875
+ condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
876
+ }
877
+ // if(this.$refs.paged.$refs.cri.model.f_plan_year)
878
+ // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
879
+ // if(this.$refs.paged.$refs.cri.model.f_plan_month)
880
+ // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
881
+ if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
882
+ condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
883
+ if(this.$refs.paged.$refs.cri.model.f_keyword)
884
+ condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
885
+ if(this.$refs.paged.$refs.cri.model.f_user_name)
886
+ condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
887
+ if(this.$refs.paged.$refs.cri.model.f_state[0])
888
+ condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
889
+ if(this.$refs.paged.$refs.cri.model.f_last_state[0])
890
+ condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
891
+ if(this.$refs.paged.$refs.cri.model.f_user_type[0])
892
+ condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
893
+ if(this.$refs.paged.$refs.cri.model.f_meter_no)
894
+ condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
895
+ // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
896
+ // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
897
+ if(this.$refs.paged.$refs.cri.model.f_user_phone){
898
+ condition += `and ti.f_user_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%'`
899
+ }
900
+ if(this.$refs.paged.$refs.cri.model.f_enter_number)
901
+ condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
902
+ if(this.$refs.paged.$refs.cri.model.f_check_version)
903
+ condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version
904
+ //tag
905
+ this.model.search("ti.f_no_checkplan = '有计划安检'" + condition)
906
+ },
907
+ getNewOrder(){
908
+ HostApp.__this__ = this
909
+ HostApp.logicWithHint({
910
+ // logic别名,key必须为logic
911
+ 'logic': 'SafeCheckServiceTimeOut',
912
+ // 回调执行方法名,key必须为callback
913
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
914
+ // logic执行需要的业务参数
915
+ 'data': {params: ''},
916
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
917
+ // 执行回调方法传入key为backresult
918
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
919
+ 'backresult': 1
920
+ })
921
+ HostApp.logicWithHint({
922
+ // logic别名,key必须为logic
923
+ 'logic': 'FreshPlanItem',
924
+ // 回调执行方法名,key必须为callback
925
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
926
+ // logic执行需要的业务参数
927
+ 'data': {params: ''},
928
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
929
+ // 执行回调方法传入key为backresult
930
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
931
+ 'backresult': 1
932
+ })
933
+ },
934
+ getNewOrderCallBack() {
935
+ this.selfSearch()
936
+ this.getAllArea()
937
+ this.getAllPlanName()
938
+ },
939
+ hidden() {
940
+ this.criteriaShow = !this.criteriaShow
941
+ },
942
+ getAllArea(){
943
+ this.residentialAreaOptions = []
944
+ this.buildOptions = []
945
+ this.unitOptions = []
946
+ this.$refs.paged.$refs.cri.model.f_unit = ''
947
+ let criteria = {
948
+ items: 'f_residential_area',
949
+ tablename: 't_check_plan_item',
950
+ condition: `f_residential_area IS NOT NULL AND f_residential_area != ''`,
951
+ groupitem: 'f_residential_area'
952
+ }
953
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
954
+ //tag)
955
+ if(result.code == 200){
956
+ result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
957
+ }
958
+ //tag)
959
+ },
960
+ getbuilds(f_residential_area){
961
+ //tag)
962
+ this.buildOptions = []
963
+ this.unitOptions = []
964
+ this.$refs.paged.$refs.cri.model.f_unit = ''
965
+ if(!f_residential_area){
966
+ return
967
+ }
968
+ let criteria = {
969
+ items: 'f_building',
970
+ tablename: 't_check_plan_item',
971
+ condition: `f_building IS NOT NULL AND f_building != '' AND f_residential_area = '${f_residential_area}'`,
972
+ groupitem: 'f_building order by f_building+0'
973
+ }
974
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
975
+ if(result.code == 200){
976
+ result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
977
+ }
978
+ this.buildOptions.sort((a,b)=>{
979
+ return Number(a.label)- Number(b.label)
980
+ })
981
+ //tag)
982
+ },
983
+ getUnits(f_building){
984
+ f_building = f_building[0]
985
+ //tag)
986
+ this.unitOptions = []
987
+ this.$refs.paged.$refs.cri.model.f_unit = ''
988
+ if(!f_building){
989
+ return
990
+ }
991
+ let criteria = {
992
+ items: 'f_unit',
993
+ tablename: 't_check_plan_item',
994
+ condition: `f_unit IS NOT NULL AND f_unit != '' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
995
+ groupitem: 'f_unit'
996
+ }
997
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
998
+ if(result.code == 200){
999
+ result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
1000
+ }
1001
+ this.unitOptions.sort((a,b)=>{
1002
+ return Number(a.label)- Number(b.label)
1003
+ })
1004
+ },
1005
+ getPlanCount(){
1006
+ this.upcomingCount = 0
1007
+ this.tempSaveCount = 0
1008
+ this.doneCount = 0
1009
+ this.allPlanCount = 0
1010
+ let criteria = {
1011
+ items: 'count(id) count',
1012
+ tablename: 't_check_plan_item',
1013
+ condition: `f_state = '未检'`,
1014
+ groupitem: 'f_state'
1015
+ }
1016
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1017
+ if(result.code && result.code == 200){
1018
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
1019
+ this.upcomingCount = result.data.rows[0].count
1020
+ }
1021
+ }
1022
+ criteria = {
1023
+ items: 'count(id) count',
1024
+ tablename: 't_check_plan_item',
1025
+ condition: `(f_complete = '' or f_complete is null or f_complete = '未完成') AND f_state = '已检'`,
1026
+ groupitem: 'f_state'
1027
+ }
1028
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1029
+ if(result.code && result.code == 200){
1030
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1031
+ this.tempSaveCount = result.data.rows[0].count
1032
+ }
1033
+ }
1034
+ criteria = {
1035
+ items: 'count(id) count',
1036
+ tablename: 't_check_plan_item',
1037
+ condition: `f_complete = '已完成' AND f_state = '已检'`,
1038
+ groupitem: 'f_state'
1039
+ }
1040
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1041
+ if(result.code && result.code == 200){
1042
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
1043
+ this.doneCount = result.data.rows[0].count
1044
+ }
1045
+ }
1046
+ this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
1047
+
1048
+ //tag
1049
+ //tag
1050
+ //tag
1051
+ //tag
1052
+ },
1053
+ getAllPlanName(){
1054
+ this.planNameOptions = []
1055
+ this.$refs.paged.$refs.cri.model.f_plan_name = ''
1056
+ let criteria = {
1057
+ items: 'f_plan_name',
1058
+ tablename: 't_check_plan',
1059
+ condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1060
+ groupitem: 'f_plan_name'
1061
+ }
1062
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1063
+ //tag)
1064
+ if(result.code == 200){
1065
+ result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
1066
+ }
1067
+ //tag)
1068
+ },
1069
+ setPlanParam(detailsType, event) {
1070
+ if (event.srcElement.checked) {
1071
+ this.planparam.push(detailsType)
1072
+ //tag
1073
+ } else {
1074
+ if(this.planparam.length>0){
1075
+ let planid= this.planparam.findIndex((value) => {
1076
+ return value === detailsType
1077
+ })
1078
+ this.planparam.splice(planid, 1)
1079
+ //tag
1080
+
1081
+ }
1082
+
1083
+ }
1084
+ }
1085
+ }
1086
+ }
1087
+ </script>