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