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,765 +1,765 @@
1
- <template>
2
- <div>
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div partial>
6
- <div class="row " >
7
- <label class="form-group font_normal_body"><b>用户信息</b></label>
8
-
9
- <div class="form-group col-sm-1" >
10
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
- style="width: 95%" placeholder="客户编号" condition="ui.f_userinfo_code='{}'">
12
- </div>
13
- <div class="form-group col-sm-1" >
14
- <input type="text" class="input_search" v-model="model.f_user_name"
15
- style="width: 95%" placeholder="客户名称" condition="ui.f_user_name like '%{}%'">
16
- </div>
17
- <div class="form-group col-sm-1" >
18
- <input type="text" class="input_search" v-model="model.f_address"
19
- style="width: 95%" placeholder="客户地址" condition="ua.f_address like '%{}%'">
20
- </div>
21
- <div class="form-group col-sm-1 upuserinfo_sel" >
22
- <v-select
23
- class="select select_list"
24
- :width="'95%'"
25
- :value.sync="model.f_area"
26
- v-model="model.f_area"
27
- :options='$parent.$parent.areaList'
28
- :timeout="500"
29
- @select-search="$parent.$parent.select_search"
30
- placeholder='小区选择'
31
- condition="ua.f_residential_area = '{}'"
32
- close-on-select
33
- value-single
34
- >
35
- </v-select>
36
- </div>
37
- <div class="form-group col-sm-4" >
38
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUserCondition()">更多条件</button>
39
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUploadCodeCondition()">导入编号</button>
40
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.clearUserInfoId()">清空编号</button>
41
- <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
42
- </div>
43
- <div class="form-group col-sm-1" style="float: right">
44
- <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.dragtoPlanItem()">添入计划</button>
45
- </div>
46
- <modal :show.sync="$parent.$parent.showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
47
- <div slot="modal-header" class="modal-header">
48
- <h4 class="modal-title">
49
- 用户查询条件
50
- </h4>
51
- </div>
52
- <div slot="modal-body" class="modal-body">
53
- <div class="row">
54
- <div class="form-group col-sm-4" >
55
- <label class="font_normal_body">用户类型:</label>
56
- <v-select
57
- class="select select_list"
58
- :value.sync="model.f_user_type"
59
- v-model="model.f_user_type"
60
- :options='$parent.$parent.userTypes'
61
- placeholder='请选择'
62
- condition="uf.f_user_type='{}'"
63
- :search="false"
64
- close-on-select
65
- value-single
66
- >
67
- </v-select>
68
- </div>
69
- <div class="form-group col-sm-4" >
70
- <label class="font_normal_body">用户状态:</label>
71
- <v-select
72
- class="select select_list"
73
- :value.sync="model.f_user_state"
74
- v-model="model.f_user_state"
75
- :options='$parent.$parent.userStates'
76
- placeholder='请选择'
77
- condition="ui.f_user_state='{}'"
78
- :search="false"
79
- close-on-select
80
- value-single
81
- >
82
- </v-select>
83
- </div>
84
- <div class="form-group col-sm-4" >
85
- <label class="font_normal_body">用气性质:</label>
86
- <v-select
87
- class="select select_list"
88
- :value.sync="model.f_gasproperties"
89
- v-model="model.f_gasproperties"
90
- :options='$parent.$parent.gasproperties'
91
- placeholder='请选择'
92
- condition="uf.f_gasproperties='{}'"
93
- :search="false"
94
- close-on-select
95
- value-single
96
- >
97
- </v-select>
98
- </div>
99
- <!-- <div class="form-group col-sm-4" >-->
100
- <!-- <label class="font_normal_body">气表类型:</label>-->
101
- <!-- <v-select-->
102
- <!-- class="select select_list"-->
103
- <!-- :value.sync="model.meter_classify"-->
104
- <!-- v-model="model.meter_classify"-->
105
- <!-- :options='$parent.$parent.meter_classifys'-->
106
- <!-- placeholder='请选择'-->
107
- <!-- condition="uf.F_METER_CLASSIFY='{}'"-->
108
- <!-- :search="false"-->
109
- <!-- close-on-select-->
110
- <!-- value-single-->
111
- <!-- >-->
112
- <!-- </v-select>-->
113
- <!-- </div>-->
114
- <!-- <div class="form-group col-sm-4" >-->
115
- <!-- <label class="font_normal_body">街&emsp;&emsp;道:</label>-->
116
- <!-- <v-select-->
117
- <!-- class="select select_list"-->
118
- <!-- :value.sync="model.f_street"-->
119
- <!-- v-model="model.f_street"-->
120
- <!-- :options='$parent.$parent.streets'-->
121
- <!-- placeholder='请选择'-->
122
- <!-- condition="ua.f_street_id='{}'"-->
123
- <!-- close-on-select-->
124
- <!-- value-single-->
125
- <!-- >-->
126
- <!-- </v-select>-->
127
- <!-- </div>-->
128
- <!--<div class="form-group col-sm-4" >
129
- <label class="font_normal_body">小区名称:</label>
130
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
131
- style="width: 60%" placeholder="请选择" condition="ua.f_residential_area = '{}'">
132
- </div>-->
133
- <!-- <div class="form-group col-sm-4" >-->
134
- <!-- <label class="font_normal_body">楼&ensp;栋&ensp;号:</label>-->
135
- <!-- <input type="text" class="input_search" v-model="model.f_building"-->
136
- <!-- style="width: 60%" placeholder="请选择" condition="ua.f_building='{}'">-->
137
- <!-- </div>-->
138
- <!-- <div class="form-group col-sm-4" >-->
139
- <!-- <label class="font_normal_body">单&ensp;元&ensp;号:</label>-->
140
- <!-- <input type="text" class="input_search" v-model="model.f_unit"-->
141
- <!-- style="width: 60%" placeholder="请选择" condition="ua.f_unit='{}'">-->
142
- <!-- </div>-->
143
- <!-- <div class="form-group col-sm-4" >-->
144
- <!-- <label class="font_normal_body">楼&ensp;层&ensp;号:</label>-->
145
- <!-- <input type="text" class="input_search" v-model="model.f_floor"-->
146
- <!-- style="width: 60%" placeholder="请选择" condition="ua.f_floor='{}'">-->
147
- <!-- </div>-->
148
- <div class="form-group col-sm-4" >
149
- <label class="font_normal_body">开户起始:</label>
150
- <datepicker
151
- placeholder='请选择'
152
- style="width:60%"
153
- :disabled-days-of-week="[]"
154
- :format="'yyyy-MM-dd'"
155
- :show-rest-button="reset"
156
- :value.sync="model.f_startfile_time"
157
- v-model="model.f_startfile_time"
158
- condition="ui.f_createfile_date >= '{} 00:00:00'">
159
- </datepicker>
160
- </div>
161
- <div class="form-group col-sm-4" >
162
- <label class="font_normal_body">开户截止:</label>
163
- <datepicker
164
- placeholder='请选择'
165
- :disabled-days-of-week="[]"
166
- style="width:60%"
167
- :format="'yyyy-MM-dd'"
168
- :show-rest-button="reset"
169
- :value.sync="model.f_endfile_time"
170
- v-model="model.f_endfile_time"
171
- condition="ui.f_createfile_date <= '{} 23:59:59'">
172
- </datepicker>
173
- </div>
174
- <!-- <div class="form-group col-sm-4" >-->
175
- <!-- <label class="font_normal_body">表&ensp;箱&ensp;号:</label>-->
176
- <!-- <input type="text" class="input_search" v-model="model.f_metertitles"-->
177
- <!-- style="width: 60%" placeholder="请输入" condition="uf.f_metertitles='{}'">-->
178
- <!-- </div>-->
179
- <!-- <div class="form-group col-sm-4" >-->
180
- <!-- <label class="font_normal_body">用户电话:</label>-->
181
- <!-- <input type="text" class="input_search" v-model="model.f_user_phone"-->
182
- <!-- style="width: 60%" placeholder="请输入" condition="ui.f_user_phone='{}'">-->
183
- <!-- </div>-->
184
- <div class="form-group col-sm-4" >
185
- <label class="font_normal_body">片&ensp;&ensp;&ensp;&ensp;区:</label>
186
- <v-select
187
- class="select select_list"
188
- :value.sync="model.f_book_slice_area"
189
- v-model="model.f_book_slice_area"
190
- :options='$parent.$parent.sliceArea'
191
- @change="$parent.$parent.slice_areaChange(model.f_book_slice_area)"
192
- placeholder='请选择'
193
- condition="ua.f_slice_area ='{}'"
194
- close-on-select
195
- value-single
196
- >
197
- </v-select>
198
- </div>
199
- <!-- <div class="form-group col-sm-4" >-->
200
- <!-- <label class="font_normal_body">抄&ensp;表&ensp;册:</label>-->
201
- <!-- <v-select-->
202
- <!-- class="select select_list"-->
203
- <!-- :value.sync="model.f_meter_book_num"-->
204
- <!-- v-model="model.f_meter_book_num"-->
205
- <!-- :options='$parent.$parent.cbc'-->
206
- <!-- placeholder='请选择'-->
207
- <!-- condition="uf.f_meter_book_num='{}'"-->
208
- <!-- close-on-select-->
209
- <!-- value-single-->
210
- <!-- >-->
211
- <!-- </v-select>-->
212
- <!-- </div>-->
213
- <div class="form-group col-sm-4" >
214
- <label class="font_normal_body">派发情况:</label>
215
- <v-select
216
- class="select select_list"
217
- :value.sync="model.yearCheck"
218
- v-model="model.yearCheck"
219
- :options='$parent.$parent.yearCheckList'
220
- placeholder='请选择'
221
- condition="{}"
222
- :search="false"
223
- close-on-select
224
- value-single
225
- >
226
- </v-select>
227
- </div>
228
- <div class="form-group col-sm-4" >
229
- <label class="font_normal_body">安检起始:</label>
230
- <datepicker
231
- placeholder='请选择'
232
- style="width:60%"
233
- :disabled-days-of-week="[]"
234
- :format="'yyyy-MM-dd'"
235
- :show-rest-button="reset"
236
- :value.sync="model.f_start_time"
237
- v-model="model.f_start_time"
238
- >
239
- </datepicker>
240
- </div>
241
- <div class="form-group col-sm-4" >
242
- <label class="font_normal_body">安检截止:</label>
243
- <datepicker
244
- placeholder='请选择'
245
- :disabled-days-of-week="[]"
246
- style="width:60%"
247
- :format="'yyyy-MM-dd'"
248
- :show-rest-button="reset"
249
- :value.sync="model.f_end_time"
250
- v-model="model.f_end_time"
251
- >
252
- </datepicker>
253
- </div>
254
- <div class="form-group col-sm-4">
255
- <label class="font_normal_body">安检状态:</label>
256
- <v-select
257
- class="select select_list"
258
- :value.sync="model.f_last_check_state"
259
- v-model="model.f_last_check_state"
260
- :options='$parent.$parent.entry_status'
261
- placeholder='请选择'
262
- :search="false"
263
- close-on-select
264
- value-single
265
- >
266
- </v-select>
267
- </div>
268
- <!-- <div class="form-group col-sm-4" >-->
269
- <!-- <label class="font_normal_body">通气起始:</label>-->
270
- <!-- <datepicker-->
271
- <!-- placeholder='通气开始时间'-->
272
- <!-- style="width:60%"-->
273
- <!-- :disabled-days-of-week="[]"-->
274
- <!-- :format="'yyyy-MM-dd'"-->
275
- <!-- :show-rest-button="reset"-->
276
- <!-- :value.sync="model.f_startgas_time"-->
277
- <!-- v-model="model.f_startgas_time"-->
278
- <!-- condition="ui.f_uservent_date >= '{} 00:00:00'">-->
279
- <!-- </datepicker>-->
280
- <!-- </div>-->
281
- <!-- <div class="form-group col-sm-4" >-->
282
- <!-- <label class="font_normal_body">通气截止:</label>-->
283
- <!-- <datepicker-->
284
- <!-- placeholder='通气结束时间'-->
285
- <!-- :disabled-days-of-week="[]"-->
286
- <!-- style="width:60%"-->
287
- <!-- :format="'yyyy-MM-dd'"-->
288
- <!-- :show-rest-button="reset"-->
289
- <!-- :value.sync="model.f_endgas_time"-->
290
- <!-- v-model="model.f_endgas_time"-->
291
- <!-- condition="ui.f_uservent_date <= '{} 23:59:59'">-->
292
- <!-- </datepicker>-->
293
- <!-- </div>-->
294
- <!-- <div class="form-group col-sm-4">-->
295
- <!-- <label class="font_normal_body">安检册:</label>-->
296
- <!-- <v-select-->
297
- <!-- class="select select_list"-->
298
- <!-- :value.sync="model.checkBook"-->
299
- <!-- v-model="model.checkBook"-->
300
- <!-- :options='$parent.$parent.checkBooks'-->
301
- <!-- placeholder='请选择'-->
302
- <!-- :search="false"-->
303
- <!-- close-on-select-->
304
- <!-- value-single-->
305
- <!-- >-->
306
- <!-- </v-select>-->
307
- <!-- </div>-->
308
- <div class="form-group col-sm-4">
309
- <label class="font_normal_body">安检时间:</label>
310
- <input type="number" class="input_search" v-model="model.month"
311
- style="width: 60%" placeholder="距上次安检时间(月)">
312
- </div>
313
- </div>
314
- </div>
315
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
316
- <button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
317
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
318
- </div>
319
- </modal>
320
- <modal :show.sync="$parent.$parent.excelUserCondtion" width="500px" v-ref:modal1 >
321
- <div slot="modal-header" class="modal-header">
322
- <h4 class="modal-title">
323
- 导入用户编号
324
- </h4>
325
- </div>
326
- <div slot="modal-body" class="modal-body">
327
- <div class="row">
328
- <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
329
- action="rs/file/uploadFile" tagname="档案信息导入" v-ref:file :headers="headers" multiple></file-upload>
330
- <img src="../../../assets/Excelformat.png" style="width: 100%"/>
331
- </div>
332
- </div>
333
- <footer slot="modal-footer" class="modal-footer">
334
- </footer>
335
- </modal>
336
- <!--<div class="form-group col-sm-4 button-range" >
337
-
338
- <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
339
- <export-excel-safe :data="$parent.$parent.exportParameter"
340
- :field="$parent.$parent.excelHeaders"
341
- sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
342
- template-name='安检计划明细' :choose-col="true">
343
- </export-excel-safe>
344
-
345
- </div>-->
346
- </div>
347
- </div>
348
- </criteria>
349
- <data-grid :model="model" partial='list' class="table_sy">
350
-
351
- <template partial='head'>
352
- <tr>
353
- <th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
354
- <th><nobr>用户编号</nobr></th>
355
- <th><nobr>用户名称</nobr></th>
356
- <th><nobr>用户类型</nobr></th>
357
- <th><nobr>用户电话</nobr></th>
358
- <th><nobr>表具类型</nobr></th>
359
- <th><nobr>小区名称</nobr></th>
360
- <th><nobr>片区</nobr></th>
361
- <th><nobr>抄表册</nobr></th>
362
- <th title="当前所在的安检计划名称"><nobr>所属计划</nobr></th>
363
- <th title="最后一次安检日期"><nobr>安检日期</nobr></th>
364
- <th><nobr>详细地址</nobr></th>
365
- </tr>
366
- </template>
367
- <template partial='body'>
368
- <td style="text-align: center;white-space:nowrap;"><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)" /></td>
369
- <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
370
- <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
371
- <td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
372
- <td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
373
- <td style="text-align: center"><nobr>{{row.f_meter_classify}}</nobr></td>
374
- <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
375
- <td style="text-align: center"><nobr>{{row.f_book_slice_area}}</nobr></td>
376
- <td style="text-align: center"><nobr>{{row.f_book_name}}</nobr></td>
377
- <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
378
- <td style="text-align: center"><nobr>{{row.f_last_check_date}}</nobr></td>
379
- <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
380
- </template>
381
- </data-grid>
382
- </criteria-paged>
383
- </div>
384
- </template>
385
-
386
- <script>
387
- import {HttpResetClass, PagedList} from "vue-client";
388
- import Vue from "vue";
389
-
390
- export default {
391
- name: "PlanManage",
392
- title: '计划管理',
393
- data() {
394
- return {
395
- model:new PagedList('/rs/sql/FetchUserFileByOrgNoRuHuSXQ', 100, {
396
- "orderitem": "'f_residential_area,f_building,f_unit,f_floor,f_room'",
397
- "f_usertype": "''",
398
- "month": "''",
399
- "SafeCheckSX": {"f_check_start": '', "f_check_end": ''},
400
- "SafeCheckCQ": "''",
401
- "startday":"''",
402
- "endday":"''"}),
403
- a:'1',
404
- opt:[{label:"测试",value:"测试"}],
405
- showCondtion:false,
406
- userTypes:[],//用户类型
407
- userStates:[],//用户状态
408
- gasproperties:[],//用气性质
409
- meter_classifys:[],//气表类型
410
- hasHousehold:[{label:"全部",value:""},{label:"已入户",value:"已入户"},{label:"未入户",value:"未入户"}],
411
- yearCheckList:[{label:"全部",value:""},{label:"已在计划中",value:"ua.f_plan_id is not null"},{label:"未在计划中",value:"ua.f_plan_id is null"}],
412
- entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
413
- sliceArea:[],
414
- meterbooks:[],
415
- checkBooks:[],
416
- cbc:[],
417
- areaList:[],
418
- checkAll:false,
419
- checkes:[],
420
- excelUserCondtion:false,
421
- uploadCodeCondition:'',
422
- streets:[]
423
- }
424
- },
425
- props:["selectplan","userlogin"],
426
- ready(){
427
- this.$refs.paged.$refs.criteria.model.f_user_state='正常'
428
- this.getCheckBook()
429
- this.setConList()
430
- this.loadpage()
431
-
432
- },
433
- methods: {
434
- getCheckBook(){
435
- this.checkBooks=[]
436
- new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
437
- data: {
438
- items: 'id,f_check_book_name,f_check_book_type',
439
- tablename: 't_check_book',
440
- condition: `f_orgid = '${this.userlogin.orgid}'`,
441
- orderitem: 'id desc'
442
- }
443
- }, {resolveMsg: null, rejectMsg: null}).then(res => {
444
- this.checkBooks.push({label: '全部', value: ''})
445
- res.data.forEach(ress => {
446
- this.checkBooks.push({
447
- label: ress.f_check_book_name,
448
- value: `${ress.id}-${ress.f_check_book_type}`
449
- })
450
- })
451
- })
452
- },
453
- loadpage(){
454
- this.select_search()
455
- this.select_street()
456
- this.Mreadibook()
457
- this.getSliceArea()
458
- },
459
- cancel(){
460
- this.showCondtion=false
461
- this.excelUserCondtion=false
462
- },
463
- //清空用户编号
464
- clearUserInfoId(){
465
- this.uploadCodeCondition=''
466
- Vue.showMessage("已清空用户编号")
467
- },
468
- showUploadCodeCondition(){
469
- this.excelUserCondtion=true
470
- },
471
- selfSearch (args) {
472
- //tag)
473
- args.condition += ` and ui.f_filialeid='${this.userlogin.orgid}'`
474
- /*if(args.model.f_hasHousehold=='已入户'){
475
- args.condition +=` and Extract(year from TO_DATE(ua.f_last_check_date,'yyyy-mm-dd hh24:mi:ss'))=2021 and ua.F_LAST_CHECK_STATE='入户'`
476
- }else if(args.model.f_hasHousehold=='未入户'){
477
- args.condition +=` and (Extract(year from nvl(TO_DATE(ua.f_last_check_date,'yyyy-mm-dd hh24:mi:ss'),'1990-01-01 00:00:00'))!=2021 or nvl(ua.F_LAST_CHECK_STATE,'未入户')!='入户')`
478
- }*/
479
-
480
- if (args.model.f_last_check_state == '未检') {
481
- let nocheckcon = 'and ( ui.f_last_check_date is null '
482
- if(args.model.f_start_time){
483
- nocheckcon += ` or ui.f_last_check_date <='${args.model.f_start_time} 00:00:00' `
484
- }
485
- if(args.model.f_end_time){
486
- nocheckcon += ` or ui.f_last_check_date >='${args.model.f_end_time} 23:59:59' `
487
- }
488
- nocheckcon += ')'
489
- args.condition += nocheckcon
490
- }else{
491
- if(args.model.f_last_check_state){
492
- args.condition += ` and ui.f_last_check_state = '${args.model.f_last_check_state}'`
493
- }
494
- if(args.model.f_start_time){
495
- args.condition += ` and ui.f_last_check_date >='${args.model.f_start_time} 00:00:00' `
496
- }
497
- if(args.model.f_end_time){
498
- args.condition += ` and ui.f_last_check_date <='${args.model.f_end_time} 23:59:59' `
499
- }
500
- }
501
- //数据库f_idnumber有数据问题 先注掉
502
- // if (args.model.f_yearstart_time){
503
- // args.condition += ` and DATEDIFF(YEAR, CONVERT(DATE, SUBSTRING(f_idnumber, 7, 8), 112), GETDATE()) >=${args.model.f_yearstart_time} and f_idnumber is not null`
504
- // }
505
- // if (args.model.f_yearend_time){
506
- // args.condition += ` and DATEDIFF(YEAR, CONVERT(DATE, SUBSTRING(f_idnumber, 7, 8), 112), GETDATE()) <=${args.model.f_yearend_time} and f_idnumber is not null`
507
- // }
508
- if(args.model.checkBook){
509
- let arr=args.model.checkBook.split('-')
510
- if(arr[1] == '用户'){
511
- args.condition +=` and ua.f_check_book_id='${arr[0]}'`
512
- }else{
513
- args.condition +=` and area.f_check_book_id=${arr[0]} and ua.f_check_book_id is null`
514
- }
515
- }
516
- if(this.uploadCodeCondition){
517
- args.condition +=` and ${this.uploadCodeCondition}`
518
- }
519
- if (args.model.month){
520
- args.condition += ` and DATEDIFF(MONTH, ui.f_last_check_date, GETDATE()) = '${args.model.month}'`
521
- }
522
- this.cancel()
523
- this.checkes=[]
524
- this.checkAll=false
525
- this.model.search(args.condition, args.model, args.condValue)
526
- },
527
- showUserCondition(){
528
- this.showCondtion=true
529
- },
530
- setConList(){
531
- this.userTypes=this.$appdata.getParam('用户类型') ? [{
532
- label: '全部',
533
- value: ''
534
- }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
535
-
536
- this.userStates=this.$appdata.getParam('安检用户状态') ? [{
537
- label: '全部',
538
- value: ''
539
- },...this.$appdata.getParam('安检用户状态')] : [{label: '全部', value: ''}]
540
- this.gasproperties=this.$appdata.getParam('用气性质') ? [{
541
- label: '全部',
542
- value: ''
543
- }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}]
544
- this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
545
- label: '全部',
546
- value: ''
547
- }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
548
- },
549
- select_search(text){
550
- //tag
551
- let pcdText=text?` and f_residential_area like '%${text}%'`:''
552
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {data:{items:"*",tablename:"t_area",orderitem:"id",condition:`f_orgid = '${this.userlogin.orgid}' ${pcdText} `}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
553
- //tag)
554
- if(res.data.length>0){
555
- this.areaList=[]
556
- this.areaList.push({label:"全部",value:""})
557
- res.data.forEach((result)=>{
558
- this.areaList.push({label:result.f_residential_area,value:result.f_residential_area})
559
- })
560
- }
561
- //tag)
562
- })
563
- },
564
- select_street(){
565
- //tag
566
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {data:{items:"id,f_street",tablename:"t_street",orderitem:"id",condition:`f_orgid = '${this.userlogin.orgid}'`}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
567
- //tag)
568
- if(res.data.length>0){
569
- this.streets=[]
570
- this.streets.push({label:"全部",value:""})
571
- res.data.forEach((result)=>{
572
- this.streets.push({label:result.f_street,value:result.id})
573
- })
574
- }
575
- })
576
- },
577
- //获取抄表册
578
- async Mreadibook(){
579
- this.cbc=[]
580
- this.sliceArea=[]
581
- let http = new HttpResetClass()
582
- let getMeterReadingBooks = await http.load('POST','rs/logic/getMeterBooksData',
583
- {data: {f_orgid: "('"+this.userlogin.orgid+"')"}},
584
- {resolveMsg: null, rejectMsg: '获取失败!!!'})
585
- this.cbc = [{label: '全部', value: ''}]
586
- //tag
587
- //tag)
588
- //tag
589
- this.meterbooks=[]
590
- this.meterbooks=getMeterReadingBooks.data.meterbooks
591
- this.meterbooks.forEach((res) => {
592
- this.cbc.push({label: res.f_book_name, value: res.id})
593
- /*if(res.f_book_slice_area){
594
- if(this.sliceArea.indexOf(res.f_book_slice_area)<0){
595
- this.sliceArea.push(res.f_book_slice_area)
596
- }
597
- }*/
598
- })
599
-
600
- },
601
- //片区获取
602
- async getSliceArea() {
603
- let http = new HttpResetClass()
604
- let getAllArea = await http.load('POST', '/rs/search', {
605
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
606
- userid: this.userlogin.id
607
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
608
- this.sliceArea = [{label: '全部', value: ''}]
609
- //tag
610
- //tag
611
- //tag
612
- getAllArea.data.forEach((res) => {
613
- if(res.parentid==this.userlogin.orgid){
614
- this.sliceArea.push({label:res.name,value:res.name})
615
- }
616
- })
617
- //tag
618
- },
619
- //片区改变-对应抄表册下拉重新赋值
620
- slice_areaChange(value) {
621
- //tag
622
- if(!value){
623
- this.cbc=[]
624
- this.meterbooks.forEach((res) => {
625
- this.cbc.push({label: res.f_book_name, value: res.id})
626
- })
627
- }else{
628
- this.cbc=[]
629
- this.meterbooks.forEach((res) => {
630
- if(res.f_book_slice_area==value){
631
- this.cbc.push({label: res.f_book_name, value: res.id})
632
- }
633
- })
634
- }
635
- },
636
- isChecked(v) {
637
- // 如果全选,不在的按选中算,否则,在的按选中算
638
- if (this.checkAll) {
639
- return this.checkes.indexOf(v) == -1
640
- } else {
641
- return this.checkes.indexOf(v) != -1
642
- }
643
- },
644
- setCheckAll() {
645
- this.checkAll=this.checkAll?false:true;
646
- // 全选改变后,清空选中数据
647
- this.checkes = []
648
- },
649
- setCheckes(id) {
650
- let index=this.checkes.indexOf(id)
651
- if(index<0){
652
- this.checkes.push(id)
653
- }else{
654
- this.checkes.splice(index,1)
655
- }
656
- },
657
- //将客户信息拖至计划中
658
- async dragtoPlanItem() {
659
- if(this.model.rows.length==0){
660
- Vue.showMessage("未检测到列表中有用户!")
661
- return
662
- }
663
- if(!this.checkAll && this.checkes.length==0){
664
- Vue.showMessage("请先勾选你要添入到上方计划中的用户!")
665
- return
666
- }
667
- if(this.selectplan && this.selectplan.id){
668
- this.$parent.isSend=true
669
- try{
670
- let res=await new HttpResetClass().load("POST", "/rs/logic/AddCheckPlanItem", {
671
- data:{
672
- f_operator:this.userlogin.name,
673
- f_plan_id:this.selectplan.id,
674
- f_safecheck_type:this.selectplan.f_safecheck_type,
675
- f_filialeid:this.userlogin.orgid,
676
- f_subscribe_date:'',
677
- condition:this.model.condition,
678
- switchCheckAll:true,
679
- checkAll:this.checkAll,
680
- param:this.checkes,
681
- columnName: "ua.id"
682
- }
683
- }, {resolveMsg: null, rejectMsg: null})
684
- //tag+"---"+res.data.result.length)
685
- this.$parent.isSend=false
686
- if(res.data.code==200){
687
- //alert("添加成功!有"+res.data.result.length+"条用户地址已经存在于其他计划中: \n"+res.data.result.reduce((c,v)=>{c += v.f_user_name+":"+v.f_address+"\n"}),0)
688
- this.$showMessage("添加成功!"+(res.data.result.length>0?"有"+res.data.result.length+"条用户地址已经存在于其他计划中":""))
689
- this.$parent.refresh()
690
- }else{
691
- this.$showMessage("添加失败!")
692
- }
693
- }catch (e) {
694
- this.$showMessage("添加失败!")
695
- }
696
- }else{
697
- this.$parent.isSend=false
698
- this.$showMessage("请先打开一个计划再进行操作")
699
- }
700
- }
701
- },
702
- events: {
703
- onFileUpload: function (file, res) {
704
- //tag)
705
- //tag)
706
- let data = {
707
- filepath: res.f_downloadpath
708
- }
709
- new HttpResetClass().load('POST','/rs/logic/safe_GetUserInfoFromExcel', {data: data}, {
710
- resolveMsg: '导入成功!已生成条件,若要去除导入条件请点击旁边 ‘清空用户编号’ 按钮。',
711
- rejectMsg: '导入失败'
712
- }).then((res) => {
713
- this.uploadCodeCondition=res.data.condition
714
- this.excelUserCondtion = false
715
- })
716
- },
717
-
718
- }
719
- }
720
- </script>
721
-
722
- <style scoped>
723
- .safe-planfont{
724
- font-family: MicrosoftYaHei;
725
- font-size: 15px;
726
- font-weight: normal;
727
- font-stretch: normal;
728
- letter-spacing: 2px;
729
- color: #333333;
730
- line-height: 25px;
731
- }
732
- .safe-bodyfont{
733
- font-family: MicrosoftYaHei;
734
- font-size: 14px;
735
- font-weight: normal;
736
- font-stretch: normal;
737
- letter-spacing: 0px;
738
- color: #999999;
739
- line-height: 30px;
740
- }
741
- .safe-leftplan{
742
- height:auto;
743
- border-bottom:1px solid #ececec;
744
- padding: 10px 5px
745
- }
746
- .leftplan-center{
747
- border-top:1px solid #ececec;
748
- border-bottom:1px solid #ececec;
749
- }
750
- .safe_p{
751
- white-space: nowrap;
752
- overflow: hidden;
753
- text-overflow: ellipsis;
754
- }
755
- .safe-div-p{
756
- color: #4792de;
757
- text-align: end;
758
- padding: 8px 15px;
759
- }
760
- </style>
761
- <style lang="less">
762
- .upuserinfo_sel ul{
763
- width: 150% !important;
764
- }
765
- </style>
1
+ <template>
2
+ <div>
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div partial>
6
+ <div class="row " >
7
+ <label class="form-group font_normal_body"><b>用户信息</b></label>
8
+
9
+ <div class="form-group col-sm-1" >
10
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
+ style="width: 95%" placeholder="客户编号" condition="ui.f_userinfo_code='{}'">
12
+ </div>
13
+ <div class="form-group col-sm-1" >
14
+ <input type="text" class="input_search" v-model="model.f_user_name"
15
+ style="width: 95%" placeholder="客户名称" condition="ui.f_user_name like '%{}%'">
16
+ </div>
17
+ <div class="form-group col-sm-1" >
18
+ <input type="text" class="input_search" v-model="model.f_address"
19
+ style="width: 95%" placeholder="客户地址" condition="ua.f_address like '%{}%'">
20
+ </div>
21
+ <div class="form-group col-sm-1 upuserinfo_sel" >
22
+ <v-select
23
+ class="select select_list"
24
+ :width="'95%'"
25
+ :value.sync="model.f_area"
26
+ v-model="model.f_area"
27
+ :options='$parent.$parent.areaList'
28
+ :timeout="500"
29
+ @select-search="$parent.$parent.select_search"
30
+ placeholder='小区选择'
31
+ condition="ua.f_residential_area = '{}'"
32
+ close-on-select
33
+ value-single
34
+ >
35
+ </v-select>
36
+ </div>
37
+ <div class="form-group col-sm-4" >
38
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUserCondition()">更多条件</button>
39
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUploadCodeCondition()">导入编号</button>
40
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.clearUserInfoId()">清空编号</button>
41
+ <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
42
+ </div>
43
+ <div class="form-group col-sm-1" style="float: right">
44
+ <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.dragtoPlanItem()">添入计划</button>
45
+ </div>
46
+ <modal :show.sync="$parent.$parent.showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
47
+ <div slot="modal-header" class="modal-header">
48
+ <h4 class="modal-title">
49
+ 用户查询条件
50
+ </h4>
51
+ </div>
52
+ <div slot="modal-body" class="modal-body">
53
+ <div class="row">
54
+ <div class="form-group col-sm-4" >
55
+ <label class="font_normal_body">用户类型:</label>
56
+ <v-select
57
+ class="select select_list"
58
+ :value.sync="model.f_user_type"
59
+ v-model="model.f_user_type"
60
+ :options='$parent.$parent.userTypes'
61
+ placeholder='请选择'
62
+ condition="uf.f_user_type='{}'"
63
+ :search="false"
64
+ close-on-select
65
+ value-single
66
+ >
67
+ </v-select>
68
+ </div>
69
+ <div class="form-group col-sm-4" >
70
+ <label class="font_normal_body">用户状态:</label>
71
+ <v-select
72
+ class="select select_list"
73
+ :value.sync="model.f_user_state"
74
+ v-model="model.f_user_state"
75
+ :options='$parent.$parent.userStates'
76
+ placeholder='请选择'
77
+ condition="ui.f_user_state='{}'"
78
+ :search="false"
79
+ close-on-select
80
+ value-single
81
+ >
82
+ </v-select>
83
+ </div>
84
+ <div class="form-group col-sm-4" >
85
+ <label class="font_normal_body">用气性质:</label>
86
+ <v-select
87
+ class="select select_list"
88
+ :value.sync="model.f_gasproperties"
89
+ v-model="model.f_gasproperties"
90
+ :options='$parent.$parent.gasproperties'
91
+ placeholder='请选择'
92
+ condition="uf.f_gasproperties='{}'"
93
+ :search="false"
94
+ close-on-select
95
+ value-single
96
+ >
97
+ </v-select>
98
+ </div>
99
+ <!-- <div class="form-group col-sm-4" >-->
100
+ <!-- <label class="font_normal_body">气表类型:</label>-->
101
+ <!-- <v-select-->
102
+ <!-- class="select select_list"-->
103
+ <!-- :value.sync="model.meter_classify"-->
104
+ <!-- v-model="model.meter_classify"-->
105
+ <!-- :options='$parent.$parent.meter_classifys'-->
106
+ <!-- placeholder='请选择'-->
107
+ <!-- condition="uf.F_METER_CLASSIFY='{}'"-->
108
+ <!-- :search="false"-->
109
+ <!-- close-on-select-->
110
+ <!-- value-single-->
111
+ <!-- >-->
112
+ <!-- </v-select>-->
113
+ <!-- </div>-->
114
+ <!-- <div class="form-group col-sm-4" >-->
115
+ <!-- <label class="font_normal_body">街&emsp;&emsp;道:</label>-->
116
+ <!-- <v-select-->
117
+ <!-- class="select select_list"-->
118
+ <!-- :value.sync="model.f_street"-->
119
+ <!-- v-model="model.f_street"-->
120
+ <!-- :options='$parent.$parent.streets'-->
121
+ <!-- placeholder='请选择'-->
122
+ <!-- condition="ua.f_street_id='{}'"-->
123
+ <!-- close-on-select-->
124
+ <!-- value-single-->
125
+ <!-- >-->
126
+ <!-- </v-select>-->
127
+ <!-- </div>-->
128
+ <!--<div class="form-group col-sm-4" >
129
+ <label class="font_normal_body">小区名称:</label>
130
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
131
+ style="width: 60%" placeholder="请选择" condition="ua.f_residential_area = '{}'">
132
+ </div>-->
133
+ <!-- <div class="form-group col-sm-4" >-->
134
+ <!-- <label class="font_normal_body">楼&ensp;栋&ensp;号:</label>-->
135
+ <!-- <input type="text" class="input_search" v-model="model.f_building"-->
136
+ <!-- style="width: 60%" placeholder="请选择" condition="ua.f_building='{}'">-->
137
+ <!-- </div>-->
138
+ <!-- <div class="form-group col-sm-4" >-->
139
+ <!-- <label class="font_normal_body">单&ensp;元&ensp;号:</label>-->
140
+ <!-- <input type="text" class="input_search" v-model="model.f_unit"-->
141
+ <!-- style="width: 60%" placeholder="请选择" condition="ua.f_unit='{}'">-->
142
+ <!-- </div>-->
143
+ <!-- <div class="form-group col-sm-4" >-->
144
+ <!-- <label class="font_normal_body">楼&ensp;层&ensp;号:</label>-->
145
+ <!-- <input type="text" class="input_search" v-model="model.f_floor"-->
146
+ <!-- style="width: 60%" placeholder="请选择" condition="ua.f_floor='{}'">-->
147
+ <!-- </div>-->
148
+ <div class="form-group col-sm-4" >
149
+ <label class="font_normal_body">开户起始:</label>
150
+ <datepicker
151
+ placeholder='请选择'
152
+ style="width:60%"
153
+ :disabled-days-of-week="[]"
154
+ :format="'yyyy-MM-dd'"
155
+ :show-rest-button="reset"
156
+ :value.sync="model.f_startfile_time"
157
+ v-model="model.f_startfile_time"
158
+ condition="ui.f_createfile_date >= '{} 00:00:00'">
159
+ </datepicker>
160
+ </div>
161
+ <div class="form-group col-sm-4" >
162
+ <label class="font_normal_body">开户截止:</label>
163
+ <datepicker
164
+ placeholder='请选择'
165
+ :disabled-days-of-week="[]"
166
+ style="width:60%"
167
+ :format="'yyyy-MM-dd'"
168
+ :show-rest-button="reset"
169
+ :value.sync="model.f_endfile_time"
170
+ v-model="model.f_endfile_time"
171
+ condition="ui.f_createfile_date <= '{} 23:59:59'">
172
+ </datepicker>
173
+ </div>
174
+ <!-- <div class="form-group col-sm-4" >-->
175
+ <!-- <label class="font_normal_body">表&ensp;箱&ensp;号:</label>-->
176
+ <!-- <input type="text" class="input_search" v-model="model.f_metertitles"-->
177
+ <!-- style="width: 60%" placeholder="请输入" condition="uf.f_metertitles='{}'">-->
178
+ <!-- </div>-->
179
+ <!-- <div class="form-group col-sm-4" >-->
180
+ <!-- <label class="font_normal_body">用户电话:</label>-->
181
+ <!-- <input type="text" class="input_search" v-model="model.f_user_phone"-->
182
+ <!-- style="width: 60%" placeholder="请输入" condition="ui.f_user_phone='{}'">-->
183
+ <!-- </div>-->
184
+ <!-- <div class="form-group col-sm-4" >-->
185
+ <!-- <label class="font_normal_body">片&ensp;&ensp;&ensp;&ensp;区:</label>-->
186
+ <!-- <v-select-->
187
+ <!-- class="select select_list"-->
188
+ <!-- :value.sync="model.f_book_slice_area"-->
189
+ <!-- v-model="model.f_book_slice_area"-->
190
+ <!-- :options='$parent.$parent.sliceArea'-->
191
+ <!-- @change="$parent.$parent.slice_areaChange(model.f_book_slice_area)"-->
192
+ <!-- placeholder='请选择'-->
193
+ <!-- condition="ua.f_slice_area ='{}'"-->
194
+ <!-- close-on-select-->
195
+ <!-- value-single-->
196
+ <!-- >-->
197
+ <!-- </v-select>-->
198
+ <!-- </div>-->
199
+ <!-- <div class="form-group col-sm-4" >-->
200
+ <!-- <label class="font_normal_body">抄&ensp;表&ensp;册:</label>-->
201
+ <!-- <v-select-->
202
+ <!-- class="select select_list"-->
203
+ <!-- :value.sync="model.f_meter_book_num"-->
204
+ <!-- v-model="model.f_meter_book_num"-->
205
+ <!-- :options='$parent.$parent.cbc'-->
206
+ <!-- placeholder='请选择'-->
207
+ <!-- condition="uf.f_meter_book_num='{}'"-->
208
+ <!-- close-on-select-->
209
+ <!-- value-single-->
210
+ <!-- >-->
211
+ <!-- </v-select>-->
212
+ <!-- </div>-->
213
+ <div class="form-group col-sm-4" >
214
+ <label class="font_normal_body">派发情况:</label>
215
+ <v-select
216
+ class="select select_list"
217
+ :value.sync="model.yearCheck"
218
+ v-model="model.yearCheck"
219
+ :options='$parent.$parent.yearCheckList'
220
+ placeholder='请选择'
221
+ condition="{}"
222
+ :search="false"
223
+ close-on-select
224
+ value-single
225
+ >
226
+ </v-select>
227
+ </div>
228
+ <div class="form-group col-sm-4" >
229
+ <label class="font_normal_body">安检起始:</label>
230
+ <datepicker
231
+ placeholder='请选择'
232
+ style="width:60%"
233
+ :disabled-days-of-week="[]"
234
+ :format="'yyyy-MM-dd'"
235
+ :show-rest-button="reset"
236
+ :value.sync="model.f_start_time"
237
+ v-model="model.f_start_time"
238
+ >
239
+ </datepicker>
240
+ </div>
241
+ <div class="form-group col-sm-4" >
242
+ <label class="font_normal_body">安检截止:</label>
243
+ <datepicker
244
+ placeholder='请选择'
245
+ :disabled-days-of-week="[]"
246
+ style="width:60%"
247
+ :format="'yyyy-MM-dd'"
248
+ :show-rest-button="reset"
249
+ :value.sync="model.f_end_time"
250
+ v-model="model.f_end_time"
251
+ >
252
+ </datepicker>
253
+ </div>
254
+ <div class="form-group col-sm-4">
255
+ <label class="font_normal_body">安检状态:</label>
256
+ <v-select
257
+ class="select select_list"
258
+ :value.sync="model.f_last_check_state"
259
+ v-model="model.f_last_check_state"
260
+ :options='$parent.$parent.entry_status'
261
+ placeholder='请选择'
262
+ :search="false"
263
+ close-on-select
264
+ value-single
265
+ >
266
+ </v-select>
267
+ </div>
268
+ <!-- <div class="form-group col-sm-4" >-->
269
+ <!-- <label class="font_normal_body">通气起始:</label>-->
270
+ <!-- <datepicker-->
271
+ <!-- placeholder='通气开始时间'-->
272
+ <!-- style="width:60%"-->
273
+ <!-- :disabled-days-of-week="[]"-->
274
+ <!-- :format="'yyyy-MM-dd'"-->
275
+ <!-- :show-rest-button="reset"-->
276
+ <!-- :value.sync="model.f_startgas_time"-->
277
+ <!-- v-model="model.f_startgas_time"-->
278
+ <!-- condition="ui.f_uservent_date >= '{} 00:00:00'">-->
279
+ <!-- </datepicker>-->
280
+ <!-- </div>-->
281
+ <!-- <div class="form-group col-sm-4" >-->
282
+ <!-- <label class="font_normal_body">通气截止:</label>-->
283
+ <!-- <datepicker-->
284
+ <!-- placeholder='通气结束时间'-->
285
+ <!-- :disabled-days-of-week="[]"-->
286
+ <!-- style="width:60%"-->
287
+ <!-- :format="'yyyy-MM-dd'"-->
288
+ <!-- :show-rest-button="reset"-->
289
+ <!-- :value.sync="model.f_endgas_time"-->
290
+ <!-- v-model="model.f_endgas_time"-->
291
+ <!-- condition="ui.f_uservent_date <= '{} 23:59:59'">-->
292
+ <!-- </datepicker>-->
293
+ <!-- </div>-->
294
+ <!-- <div class="form-group col-sm-4">-->
295
+ <!-- <label class="font_normal_body">安检册:</label>-->
296
+ <!-- <v-select-->
297
+ <!-- class="select select_list"-->
298
+ <!-- :value.sync="model.checkBook"-->
299
+ <!-- v-model="model.checkBook"-->
300
+ <!-- :options='$parent.$parent.checkBooks'-->
301
+ <!-- placeholder='请选择'-->
302
+ <!-- :search="false"-->
303
+ <!-- close-on-select-->
304
+ <!-- value-single-->
305
+ <!-- >-->
306
+ <!-- </v-select>-->
307
+ <!-- </div>-->
308
+ <div class="form-group col-sm-4">
309
+ <label class="font_normal_body">安检时间:</label>
310
+ <input type="number" class="input_search" v-model="model.month"
311
+ style="width: 60%" placeholder="距上次安检时间(月)">
312
+ </div>
313
+ </div>
314
+ </div>
315
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
316
+ <button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
317
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
318
+ </div>
319
+ </modal>
320
+ <modal :show.sync="$parent.$parent.excelUserCondtion" width="500px" v-ref:modal1 >
321
+ <div slot="modal-header" class="modal-header">
322
+ <h4 class="modal-title">
323
+ 导入用户编号
324
+ </h4>
325
+ </div>
326
+ <div slot="modal-body" class="modal-body">
327
+ <div class="row">
328
+ <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
329
+ action="rs/file/uploadFile" tagname="档案信息导入" v-ref:file :headers="headers" multiple></file-upload>
330
+ <img src="../../../assets/Excelformat.png" style="width: 100%"/>
331
+ </div>
332
+ </div>
333
+ <footer slot="modal-footer" class="modal-footer">
334
+ </footer>
335
+ </modal>
336
+ <!--<div class="form-group col-sm-4 button-range" >
337
+
338
+ <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
339
+ <export-excel-safe :data="$parent.$parent.exportParameter"
340
+ :field="$parent.$parent.excelHeaders"
341
+ sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
342
+ template-name='安检计划明细' :choose-col="true">
343
+ </export-excel-safe>
344
+
345
+ </div>-->
346
+ </div>
347
+ </div>
348
+ </criteria>
349
+ <data-grid :model="model" partial='list' class="table_sy">
350
+
351
+ <template partial='head'>
352
+ <tr>
353
+ <th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
354
+ <th><nobr>用户编号</nobr></th>
355
+ <th><nobr>用户名称</nobr></th>
356
+ <th><nobr>用户类型</nobr></th>
357
+ <th><nobr>用户电话</nobr></th>
358
+ <th><nobr>表具类型</nobr></th>
359
+ <th><nobr>小区名称</nobr></th>
360
+ <th><nobr>片区</nobr></th>
361
+ <th><nobr>抄表册</nobr></th>
362
+ <th title="当前所在的安检计划名称"><nobr>所属计划</nobr></th>
363
+ <th title="最后一次安检日期"><nobr>安检日期</nobr></th>
364
+ <th><nobr>详细地址</nobr></th>
365
+ </tr>
366
+ </template>
367
+ <template partial='body'>
368
+ <td style="text-align: center;white-space:nowrap;"><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)" /></td>
369
+ <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
370
+ <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
371
+ <td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
372
+ <td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
373
+ <td style="text-align: center"><nobr>{{row.f_meter_classify}}</nobr></td>
374
+ <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
375
+ <td style="text-align: center"><nobr>{{row.f_book_slice_area}}</nobr></td>
376
+ <td style="text-align: center"><nobr>{{row.f_book_name}}</nobr></td>
377
+ <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
378
+ <td style="text-align: center"><nobr>{{row.f_last_check_date}}</nobr></td>
379
+ <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
380
+ </template>
381
+ </data-grid>
382
+ </criteria-paged>
383
+ </div>
384
+ </template>
385
+
386
+ <script>
387
+ import {HttpResetClass, PagedList} from "vue-client";
388
+ import Vue from "vue";
389
+
390
+ export default {
391
+ name: "PlanManage",
392
+ title: '计划管理',
393
+ data() {
394
+ return {
395
+ model:new PagedList('/rs/sql/FetchUserFileByOrgNoRuHuSXQ', 100, {
396
+ "orderitem": "'f_residential_area,f_building,f_unit,f_floor,f_room'",
397
+ "f_usertype": "''",
398
+ "month": "''",
399
+ "SafeCheckSX": {"f_check_start": '', "f_check_end": ''},
400
+ "SafeCheckCQ": "''",
401
+ "startday":"''",
402
+ "endday":"''"}),
403
+ a:'1',
404
+ opt:[{label:"测试",value:"测试"}],
405
+ showCondtion:false,
406
+ userTypes:[],//用户类型
407
+ userStates:[],//用户状态
408
+ gasproperties:[],//用气性质
409
+ meter_classifys:[],//气表类型
410
+ hasHousehold:[{label:"全部",value:""},{label:"已入户",value:"已入户"},{label:"未入户",value:"未入户"}],
411
+ yearCheckList:[{label:"全部",value:""},{label:"已在计划中",value:"ua.f_plan_id is not null"},{label:"未在计划中",value:"ua.f_plan_id is null"}],
412
+ entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
413
+ sliceArea:[],
414
+ meterbooks:[],
415
+ checkBooks:[],
416
+ cbc:[],
417
+ areaList:[],
418
+ checkAll:false,
419
+ checkes:[],
420
+ excelUserCondtion:false,
421
+ uploadCodeCondition:'',
422
+ streets:[]
423
+ }
424
+ },
425
+ props:["selectplan","userlogin"],
426
+ ready(){
427
+ this.$refs.paged.$refs.criteria.model.f_user_state='正常'
428
+ this.getCheckBook()
429
+ this.setConList()
430
+ this.loadpage()
431
+
432
+ },
433
+ methods: {
434
+ getCheckBook(){
435
+ this.checkBooks=[]
436
+ new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
437
+ data: {
438
+ items: 'id,f_check_book_name,f_check_book_type',
439
+ tablename: 't_check_book',
440
+ condition: `f_orgid = '${this.userlogin.orgid}'`,
441
+ orderitem: 'id desc'
442
+ }
443
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
444
+ this.checkBooks.push({label: '全部', value: ''})
445
+ res.data.forEach(ress => {
446
+ this.checkBooks.push({
447
+ label: ress.f_check_book_name,
448
+ value: `${ress.id}-${ress.f_check_book_type}`
449
+ })
450
+ })
451
+ })
452
+ },
453
+ loadpage(){
454
+ this.select_search()
455
+ this.select_street()
456
+ this.Mreadibook()
457
+ this.getSliceArea()
458
+ },
459
+ cancel(){
460
+ this.showCondtion=false
461
+ this.excelUserCondtion=false
462
+ },
463
+ //清空用户编号
464
+ clearUserInfoId(){
465
+ this.uploadCodeCondition=''
466
+ Vue.showMessage("已清空用户编号")
467
+ },
468
+ showUploadCodeCondition(){
469
+ this.excelUserCondtion=true
470
+ },
471
+ selfSearch (args) {
472
+ //tag)
473
+ args.condition += ` and ui.f_filialeid='${this.userlogin.orgid}'`
474
+ /*if(args.model.f_hasHousehold=='已入户'){
475
+ args.condition +=` and Extract(year from TO_DATE(ua.f_last_check_date,'yyyy-mm-dd hh24:mi:ss'))=2021 and ua.F_LAST_CHECK_STATE='入户'`
476
+ }else if(args.model.f_hasHousehold=='未入户'){
477
+ args.condition +=` and (Extract(year from nvl(TO_DATE(ua.f_last_check_date,'yyyy-mm-dd hh24:mi:ss'),'1990-01-01 00:00:00'))!=2021 or nvl(ua.F_LAST_CHECK_STATE,'未入户')!='入户')`
478
+ }*/
479
+
480
+ if (args.model.f_last_check_state == '未检') {
481
+ let nocheckcon = 'and ( ui.f_last_check_date is null '
482
+ if(args.model.f_start_time){
483
+ nocheckcon += ` or ui.f_last_check_date <='${args.model.f_start_time} 00:00:00' `
484
+ }
485
+ if(args.model.f_end_time){
486
+ nocheckcon += ` or ui.f_last_check_date >='${args.model.f_end_time} 23:59:59' `
487
+ }
488
+ nocheckcon += ')'
489
+ args.condition += nocheckcon
490
+ }else{
491
+ if(args.model.f_last_check_state){
492
+ args.condition += ` and ui.f_last_check_state = '${args.model.f_last_check_state}'`
493
+ }
494
+ if(args.model.f_start_time){
495
+ args.condition += ` and ui.f_last_check_date >='${args.model.f_start_time} 00:00:00' `
496
+ }
497
+ if(args.model.f_end_time){
498
+ args.condition += ` and ui.f_last_check_date <='${args.model.f_end_time} 23:59:59' `
499
+ }
500
+ }
501
+ //数据库f_idnumber有数据问题 先注掉
502
+ // if (args.model.f_yearstart_time){
503
+ // args.condition += ` and DATEDIFF(YEAR, CONVERT(DATE, SUBSTRING(f_idnumber, 7, 8), 112), GETDATE()) >=${args.model.f_yearstart_time} and f_idnumber is not null`
504
+ // }
505
+ // if (args.model.f_yearend_time){
506
+ // args.condition += ` and DATEDIFF(YEAR, CONVERT(DATE, SUBSTRING(f_idnumber, 7, 8), 112), GETDATE()) <=${args.model.f_yearend_time} and f_idnumber is not null`
507
+ // }
508
+ if(args.model.checkBook){
509
+ let arr=args.model.checkBook.split('-')
510
+ if(arr[1] == '用户'){
511
+ args.condition +=` and ua.f_check_book_id='${arr[0]}'`
512
+ }else{
513
+ args.condition +=` and area.f_check_book_id=${arr[0]} and ua.f_check_book_id is null`
514
+ }
515
+ }
516
+ if(this.uploadCodeCondition){
517
+ args.condition +=` and ${this.uploadCodeCondition}`
518
+ }
519
+ if (args.model.month){
520
+ args.condition += ` and DATEDIFF(MONTH, ui.f_last_check_date, GETDATE()) = '${args.model.month}'`
521
+ }
522
+ this.cancel()
523
+ this.checkes=[]
524
+ this.checkAll=false
525
+ this.model.search(args.condition, args.model, args.condValue)
526
+ },
527
+ showUserCondition(){
528
+ this.showCondtion=true
529
+ },
530
+ setConList(){
531
+ this.userTypes=this.$appdata.getParam('用户类型') ? [{
532
+ label: '全部',
533
+ value: ''
534
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
535
+
536
+ this.userStates=this.$appdata.getParam('安检用户状态') ? [{
537
+ label: '全部',
538
+ value: ''
539
+ },...this.$appdata.getParam('安检用户状态')] : [{label: '全部', value: ''}]
540
+ this.gasproperties=this.$appdata.getParam('用气性质') ? [{
541
+ label: '全部',
542
+ value: ''
543
+ }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}]
544
+ this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
545
+ label: '全部',
546
+ value: ''
547
+ }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
548
+ },
549
+ select_search(text){
550
+ //tag
551
+ let pcdText=text?` and f_residential_area like '%${text}%'`:''
552
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {data:{items:"*",tablename:"t_area",orderitem:"id",condition:`f_orgid = '${this.userlogin.orgid}' ${pcdText} `}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
553
+ //tag)
554
+ if(res.data.length>0){
555
+ this.areaList=[]
556
+ this.areaList.push({label:"全部",value:""})
557
+ res.data.forEach((result)=>{
558
+ this.areaList.push({label:result.f_residential_area,value:result.f_residential_area})
559
+ })
560
+ }
561
+ //tag)
562
+ })
563
+ },
564
+ select_street(){
565
+ //tag
566
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {data:{items:"id,f_street",tablename:"t_street",orderitem:"id",condition:`f_orgid = '${this.userlogin.orgid}'`}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
567
+ //tag)
568
+ if(res.data.length>0){
569
+ this.streets=[]
570
+ this.streets.push({label:"全部",value:""})
571
+ res.data.forEach((result)=>{
572
+ this.streets.push({label:result.f_street,value:result.id})
573
+ })
574
+ }
575
+ })
576
+ },
577
+ //获取抄表册
578
+ async Mreadibook(){
579
+ this.cbc=[]
580
+ this.sliceArea=[]
581
+ let http = new HttpResetClass()
582
+ let getMeterReadingBooks = await http.load('POST','rs/logic/getMeterBooksData',
583
+ {data: {f_orgid: "('"+this.userlogin.orgid+"')"}},
584
+ {resolveMsg: null, rejectMsg: '获取失败!!!'})
585
+ this.cbc = [{label: '全部', value: ''}]
586
+ //tag
587
+ //tag)
588
+ //tag
589
+ this.meterbooks=[]
590
+ this.meterbooks=getMeterReadingBooks.data.meterbooks
591
+ this.meterbooks.forEach((res) => {
592
+ this.cbc.push({label: res.f_book_name, value: res.id})
593
+ /*if(res.f_book_slice_area){
594
+ if(this.sliceArea.indexOf(res.f_book_slice_area)<0){
595
+ this.sliceArea.push(res.f_book_slice_area)
596
+ }
597
+ }*/
598
+ })
599
+
600
+ },
601
+ //片区获取
602
+ async getSliceArea() {
603
+ let http = new HttpResetClass()
604
+ let getAllArea = await http.load('POST', '/rs/search', {
605
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
606
+ userid: this.userlogin.id
607
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
608
+ this.sliceArea = [{label: '全部', value: ''}]
609
+ //tag
610
+ //tag
611
+ //tag
612
+ getAllArea.data.forEach((res) => {
613
+ if(res.parentid==this.userlogin.orgid){
614
+ this.sliceArea.push({label:res.name,value:res.name})
615
+ }
616
+ })
617
+ //tag
618
+ },
619
+ //片区改变-对应抄表册下拉重新赋值
620
+ slice_areaChange(value) {
621
+ //tag
622
+ if(!value){
623
+ this.cbc=[]
624
+ this.meterbooks.forEach((res) => {
625
+ this.cbc.push({label: res.f_book_name, value: res.id})
626
+ })
627
+ }else{
628
+ this.cbc=[]
629
+ this.meterbooks.forEach((res) => {
630
+ if(res.f_book_slice_area==value){
631
+ this.cbc.push({label: res.f_book_name, value: res.id})
632
+ }
633
+ })
634
+ }
635
+ },
636
+ isChecked(v) {
637
+ // 如果全选,不在的按选中算,否则,在的按选中算
638
+ if (this.checkAll) {
639
+ return this.checkes.indexOf(v) == -1
640
+ } else {
641
+ return this.checkes.indexOf(v) != -1
642
+ }
643
+ },
644
+ setCheckAll() {
645
+ this.checkAll=this.checkAll?false:true;
646
+ // 全选改变后,清空选中数据
647
+ this.checkes = []
648
+ },
649
+ setCheckes(id) {
650
+ let index=this.checkes.indexOf(id)
651
+ if(index<0){
652
+ this.checkes.push(id)
653
+ }else{
654
+ this.checkes.splice(index,1)
655
+ }
656
+ },
657
+ //将客户信息拖至计划中
658
+ async dragtoPlanItem() {
659
+ if(this.model.rows.length==0){
660
+ Vue.showMessage("未检测到列表中有用户!")
661
+ return
662
+ }
663
+ if(!this.checkAll && this.checkes.length==0){
664
+ Vue.showMessage("请先勾选你要添入到上方计划中的用户!")
665
+ return
666
+ }
667
+ if(this.selectplan && this.selectplan.id){
668
+ this.$parent.isSend=true
669
+ try{
670
+ let res=await new HttpResetClass().load("POST", "/rs/logic/AddCheckPlanItem", {
671
+ data:{
672
+ f_operator:this.userlogin.name,
673
+ f_plan_id:this.selectplan.id,
674
+ f_safecheck_type:this.selectplan.f_safecheck_type,
675
+ f_filialeid:this.userlogin.orgid,
676
+ f_subscribe_date:'',
677
+ condition:this.model.condition,
678
+ switchCheckAll:true,
679
+ checkAll:this.checkAll,
680
+ param:this.checkes,
681
+ columnName: "ua.id"
682
+ }
683
+ }, {resolveMsg: null, rejectMsg: null})
684
+ //tag+"---"+res.data.result.length)
685
+ this.$parent.isSend=false
686
+ if(res.data.code==200){
687
+ //alert("添加成功!有"+res.data.result.length+"条用户地址已经存在于其他计划中: \n"+res.data.result.reduce((c,v)=>{c += v.f_user_name+":"+v.f_address+"\n"}),0)
688
+ this.$showMessage("添加成功!"+(res.data.result.length>0?"有"+res.data.result.length+"条用户地址已经存在于其他计划中":""))
689
+ this.$parent.refresh()
690
+ }else{
691
+ this.$showMessage("添加失败!")
692
+ }
693
+ }catch (e) {
694
+ this.$showMessage("添加失败!")
695
+ }
696
+ }else{
697
+ this.$parent.isSend=false
698
+ this.$showMessage("请先打开一个计划再进行操作")
699
+ }
700
+ }
701
+ },
702
+ events: {
703
+ onFileUpload: function (file, res) {
704
+ //tag)
705
+ //tag)
706
+ let data = {
707
+ filepath: res.f_downloadpath
708
+ }
709
+ new HttpResetClass().load('POST','/rs/logic/safe_GetUserInfoFromExcel', {data: data}, {
710
+ resolveMsg: '导入成功!已生成条件,若要去除导入条件请点击旁边 ‘清空用户编号’ 按钮。',
711
+ rejectMsg: '导入失败'
712
+ }).then((res) => {
713
+ this.uploadCodeCondition=res.data.condition
714
+ this.excelUserCondtion = false
715
+ })
716
+ },
717
+
718
+ }
719
+ }
720
+ </script>
721
+
722
+ <style scoped>
723
+ .safe-planfont{
724
+ font-family: MicrosoftYaHei;
725
+ font-size: 15px;
726
+ font-weight: normal;
727
+ font-stretch: normal;
728
+ letter-spacing: 2px;
729
+ color: #333333;
730
+ line-height: 25px;
731
+ }
732
+ .safe-bodyfont{
733
+ font-family: MicrosoftYaHei;
734
+ font-size: 14px;
735
+ font-weight: normal;
736
+ font-stretch: normal;
737
+ letter-spacing: 0px;
738
+ color: #999999;
739
+ line-height: 30px;
740
+ }
741
+ .safe-leftplan{
742
+ height:auto;
743
+ border-bottom:1px solid #ececec;
744
+ padding: 10px 5px
745
+ }
746
+ .leftplan-center{
747
+ border-top:1px solid #ececec;
748
+ border-bottom:1px solid #ececec;
749
+ }
750
+ .safe_p{
751
+ white-space: nowrap;
752
+ overflow: hidden;
753
+ text-overflow: ellipsis;
754
+ }
755
+ .safe-div-p{
756
+ color: #4792de;
757
+ text-align: end;
758
+ padding: 8px 15px;
759
+ }
760
+ </style>
761
+ <style lang="less">
762
+ .upuserinfo_sel ul{
763
+ width: 150% !important;
764
+ }
765
+ </style>