safecheck-client 3.0.35-7 → 3.0.35-8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +31 -31
  3. package/src/components/android/AddPlanItemYy.vue +451 -451
  4. package/src/components/android/CivilCurrentCreate.vue +1031 -1031
  5. package/src/components/android/examples/SafeListExamples.vue +296 -296
  6. package/src/components/android/examples/UserExamples.vue +136 -136
  7. package/src/components/rongcheng/AspiratedAreaPlan.vue +574 -574
  8. package/src/components/rongcheng/PhoneUpUserinfo.vue +1236 -1236
  9. package/src/filiale/bayan/android/AddPlanItem.vue +441 -441
  10. package/src/filiale/bayan/android/PaperFeedback.vue +1669 -1669
  11. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +1380 -1380
  12. package/src/filiale/bayan/android/SafecheckOrderV.vue +2922 -2922
  13. package/src/filiale/bayan/android/SafecheckUserInfo.vue +872 -872
  14. package/src/filiale/bayan/pc/CheckPlanAreaList.vue +607 -607
  15. package/src/filiale/bayan/pc/HiddenSituation.vue +295 -295
  16. package/src/filiale/bayan/pc/NewCheckpaper.vue +1992 -1992
  17. package/src/filiale/bayan/pc/PaperList.vue +900 -900
  18. package/src/filiale/bayan/pc/SelectCheckPlan.vue +391 -391
  19. package/src/filiale/siyang/android/AddPlanItem.vue +450 -450
  20. package/src/filiale/tongchuan/android/SafecheckDevices.vue +1207 -1207
  21. package/src/filiale/tongchuan/android/SafecheckOrderV.vue +3035 -3035
  22. package/src/filiale/tongchuan/pc/CheckSearchUser.vue +1053 -1053
  23. package/src/filiale/tongchuan/pc/checkUserList.vue +639 -639
  24. package/src/filiale/xilan/android.js +11 -11
  25. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +642 -642
  26. package/src/safecheck-android.js +307 -307
@@ -1,639 +1,639 @@
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_start"
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_userinfo_end"
15
- style="width: 95%" placeholder="编号结束" condition="ui.f_userinfo_code <= '{}'">
16
- </div>
17
- <div class="form-group col-sm-1" >
18
- <input type="text" class="input_search" v-model="model.f_user_name"
19
- style="width: 95%" placeholder="客户名称" condition="ui.f_user_name like '%{}%'">
20
- </div>
21
- <div class="form-group col-sm-1" >
22
- <input type="text" class="input_search" v-model="model.f_address"
23
- style="width: 95%" placeholder="客户地址" condition="ua.f_address like '%{}%'">
24
- </div>
25
- <div class="form-group col-sm-1 upuserinfo_sel" >
26
- <v-select
27
- class="select select_list"
28
- :width="'95%'"
29
- :value.sync="model.f_area"
30
- v-model="model.f_area"
31
- :options='$parent.$parent.areaList'
32
- :timeout="500"
33
- @select-search="$parent.$parent.select_search"
34
- placeholder='小区选择'
35
- condition="ua.f_residential_area = '{}'"
36
- close-on-select
37
- value-single
38
- >
39
- </v-select>
40
- </div>
41
- <div class="form-group col-sm-4" >
42
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUserCondition()">更多条件</button>
43
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUploadCodeCondition()">导入编号</button>
44
- <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.clearUserInfoId()">清空编号</button>
45
- <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
46
- </div>
47
- <div class="form-group col-sm-1" style="float: right">
48
- <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.dragtoPlanItem()">添入计划</button>
49
- </div>
50
- <modal :show.sync="$parent.$parent.showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
51
- <div slot="modal-header" class="modal-header">
52
- <h4 class="modal-title">
53
- 用户查询条件
54
- </h4>
55
- </div>
56
- <div slot="modal-body" class="modal-body">
57
- <div class="row">
58
- <div class="form-group col-sm-4" >
59
- <label class="font_normal_body">用户类型:</label>
60
- <v-select
61
- class="select select_list"
62
- :value.sync="model.f_user_type"
63
- v-model="model.f_user_type"
64
- :options='$parent.$parent.userTypes'
65
- placeholder='请选择'
66
- condition="uf.f_user_type='{}'"
67
- :search="false"
68
- close-on-select
69
- value-single
70
- >
71
- </v-select>
72
- </div>
73
- <div class="form-group col-sm-4" >
74
- <label class="font_normal_body">用户状态:</label>
75
- <v-select
76
- class="select select_list"
77
- :value.sync="model.f_user_state"
78
- v-model="model.f_user_state"
79
- :options='$parent.$parent.userStates'
80
- placeholder='请选择'
81
- condition="ui.f_user_state='{}'"
82
- :search="false"
83
- close-on-select
84
- value-single
85
- >
86
- </v-select>
87
- </div>
88
- <div class="form-group col-sm-4" >
89
- <label class="font_normal_body">用气性质:</label>
90
- <v-select
91
- class="select select_list"
92
- :value.sync="model.f_gasproperties"
93
- v-model="model.f_gasproperties"
94
- :options='$parent.$parent.gasproperties'
95
- placeholder='请选择'
96
- condition="uf.f_gasproperties='{}'"
97
- :search="false"
98
- close-on-select
99
- value-single
100
- >
101
- </v-select>
102
- </div>
103
- <div class="form-group col-sm-4" >
104
- <label class="font_normal_body">气表类型:</label>
105
- <v-select
106
- class="select select_list"
107
- :value.sync="model.meter_classify"
108
- v-model="model.meter_classify"
109
- :options='$parent.$parent.meter_classifys'
110
- placeholder='请选择'
111
- condition="uf.F_METER_CLASSIFY='{}'"
112
- :search="false"
113
- close-on-select
114
- value-single
115
- >
116
- </v-select>
117
- </div>
118
- <div class="form-group col-sm-4" >
119
- <label class="font_normal_body">街&ensp;&ensp;&ensp;&ensp;道:</label>
120
- <v-select
121
- class="select select_list"
122
- :value.sync="model.f_street"
123
- v-model="model.f_street"
124
- :options='$parent.$parent.streets'
125
- placeholder='请选择'
126
- condition="ua.f_street like '%{}%'"
127
- :search="false"
128
- close-on-select
129
- value-single
130
- >
131
- </v-select>
132
- </div>
133
- <!--<div class="form-group col-sm-4" >
134
- <label class="font_normal_body">小区名称:</label>
135
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
136
- style="width: 60%" placeholder="请选择" condition="ua.f_residential_area = '{}'">
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_building"
141
- style="width: 60%" placeholder="请选择" condition="ua.f_building='{}'">
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_unit"
146
- style="width: 60%" placeholder="请选择" condition="ua.f_unit='{}'">
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 <= '{} 00:00:00'">
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">片&ensp;&ensp;&ensp;&ensp;区:</label>
181
- <v-select
182
- class="select select_list"
183
- :value.sync="model.f_book_slice_area"
184
- v-model="model.f_book_slice_area"
185
- :options='$parent.$parent.sliceArea'
186
- @change="$parent.$parent.slice_areaChange(model.f_book_slice_area)"
187
- placeholder='请选择'
188
- condition="ua.f_slice_area ='{}'"
189
- close-on-select
190
- value-single
191
- >
192
- </v-select>
193
- </div>
194
- <div class="form-group col-sm-4" >
195
- <label class="font_normal_body">抄&ensp;表&ensp;册:</label>
196
- <v-select
197
- class="select select_list"
198
- :value.sync="model.f_meter_book_num"
199
- v-model="model.f_meter_book_num"
200
- :options='$parent.$parent.cbc'
201
- placeholder='请选择'
202
- condition="uf.f_meter_book_num='{}'"
203
- close-on-select
204
- value-single
205
- >
206
- </v-select>
207
- </div>
208
- <div class="form-group col-sm-4" >
209
- <label class="font_normal_body">派发情况:</label>
210
- <v-select
211
- class="select select_list"
212
- :value.sync="model.yearCheck"
213
- v-model="model.yearCheck"
214
- :options='$parent.$parent.yearCheckList'
215
- placeholder='请选择'
216
- condition="{}"
217
- :search="false"
218
- close-on-select
219
- value-single
220
- >
221
- </v-select>
222
- </div>
223
- <div class="form-group col-sm-4" >
224
- <label class="font_normal_body">安全等级:</label>
225
- <v-select
226
- class="select select_list"
227
- :value.sync="model.f_security_level"
228
- v-model="model.f_security_level"
229
- :options='$parent.$parent.security_level'
230
- placeholder='请选择'
231
- condition="ui.f_security_level = '{}'"
232
- :search="false"
233
- close-on-select
234
- value-single
235
- >
236
- </v-select>
237
- </div>
238
- <!--<div class="form-group col-sm-4" >
239
- <label class="font_normal_body">入户情况:</label>
240
- <v-select
241
- class="select select_list"
242
- :value.sync="model.f_hasHousehold"
243
- v-model="model.f_hasHousehold"
244
- :options='$parent.$parent.hasHousehold'
245
- placeholder='请选择'
246
- close-on-select
247
- :search="false"
248
- value-single
249
- >
250
- </v-select>
251
- </div>-->
252
-
253
- </div>
254
- </div>
255
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
256
- <button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
257
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
258
- </div>
259
- </modal>
260
- <modal :show.sync="$parent.$parent.excelUserCondtion" width="500px" v-ref:modal1 >
261
- <div slot="modal-header" class="modal-header">
262
- <h4 class="modal-title">
263
- 导入用户编号
264
- </h4>
265
- </div>
266
- <div slot="modal-body" class="modal-body">
267
- <div class="row">
268
- <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
269
- action="rs/file/uploadFile" tagname="档案信息导入" v-ref:file :headers="headers" multiple></file-upload>
270
- <img src="../../../assets/Excelformat.png" style="width: 100%"/>
271
- </div>
272
- </div>
273
- <footer slot="modal-footer" class="modal-footer">
274
- </footer>
275
- </modal>
276
- <!--<div class="form-group col-sm-4 button-range" >
277
-
278
- <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
279
- <export-excel-safe :data="$parent.$parent.exportParameter"
280
- :field="$parent.$parent.excelHeaders"
281
- sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
282
- template-name='安检计划明细' :choose-col="true">
283
- </export-excel-safe>
284
-
285
- </div>-->
286
- </div>
287
- </div>
288
- </criteria>
289
- <data-grid :model="model" partial='list' class="table_sy">
290
-
291
- <template partial='head'>
292
- <tr>
293
- <th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
294
- <th><nobr>用户编号</nobr></th>
295
- <th><nobr>用户名称</nobr></th>
296
- <th><nobr>用户类型</nobr></th>
297
- <th><nobr>小区名称</nobr></th>
298
- <th><nobr>片区</nobr></th>
299
- <th><nobr>抄表册</nobr></th>
300
- <th title="当前所在的安检计划名称"><nobr>所属计划</nobr></th>
301
- <th title="最后一次安检日期"><nobr>安检日期</nobr></th>
302
- <th><nobr>详细地址</nobr></th>
303
- </tr>
304
- </template>
305
- <template partial='body'>
306
- <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>
307
- <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
308
- <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
309
- <td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
310
- <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
311
- <td style="text-align: center"><nobr>{{row.f_book_slice_area}}</nobr></td>
312
- <td style="text-align: center"><nobr>{{row.f_book_name}}</nobr></td>
313
- <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
314
- <td style="text-align: center"><nobr>{{row.f_last_check_date}}</nobr></td>
315
- <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
316
- </template>
317
- </data-grid>
318
- </criteria-paged>
319
- </div>
320
- </template>
321
-
322
- <script>
323
- import {HttpResetClass, PagedList} from "vue-client";
324
- import * as Util from "../../../components/Util";
325
- import Vue from "vue";
326
-
327
- export default {
328
- name: "PlanManage",
329
- title: '计划管理',
330
- data() {
331
- return {
332
- model:new PagedList('/rs/sql/FetchUserFileByOrgNoRuHuSXQ', 100, {
333
- "orderitem": "'f_userinfo_code'",
334
- "f_usertype": "''",
335
- "month": "''",
336
- "SafeCheckSX": {"f_check_start": '', "f_check_end": ''},
337
- "SafeCheckCQ": "''",
338
- "startday":"''",
339
- "endday":"''"}),
340
- a:'1',
341
- opt:[{label:"测试",value:"测试"}],
342
- showCondtion:false,
343
- userTypes:[],//用户类型
344
- userStates:[],//用户状态
345
- gasproperties:[],//用气性质
346
- meter_classifys:[],//气表类型
347
- security_level:[{label:"全部",value:""},...this.$appdata.getParam('用户安全等级')],
348
- hasHousehold:[{label:"全部",value:""},{label:"已入户",value:"已入户"},{label:"未入户",value:"未入户"}],
349
- yearCheckList:[{label:"全部",value:""},{label:"已在计划中",value:"ua.f_plan_id is not null"},{label:"未在计划中",value:"ua.f_plan_id is null"}],
350
- sliceArea:[],
351
- meterbooks:[],
352
- cbc:[],
353
- areaList:[],
354
- streets:[],
355
- checkAll:false,
356
- checkes:[],
357
- excelUserCondtion:false,
358
- uploadCodeCondition:''
359
- }
360
- },
361
- props:["selectplan","userlogin"],
362
- ready(){
363
- // this.$refs.paged.$refs.criteria.model.f_user_state='正常'
364
- // this.$refs.paged.$refs.criteria.model.f_endfile_time=Util.toStartDateYearString()
365
- //this.$refs.paged.$refs.criteria.model.f_hasHousehold='未入户'
366
- this.setConList()
367
- this.loadpage()
368
- },
369
- methods: {
370
- loadpage(){
371
- this.select_search()
372
- this.Mreadibook()
373
- this.getSliceArea()
374
- this.getstreets()
375
- },
376
- cancel(){
377
- this.showCondtion=false
378
- this.excelUserCondtion=false
379
- },
380
- //清空用户编号
381
- clearUserInfoId(){
382
- this.uploadCodeCondition=''
383
- Vue.showMessage("已清空用户编号")
384
- },
385
- showUploadCodeCondition(){
386
- this.excelUserCondtion=true
387
- },
388
- selfSearch (args) {
389
- //tag)
390
- // args.condition += ` and ui.f_filialeid='${this.userlogin.orgid}'`
391
- /*if(args.model.f_hasHousehold=='已入户'){
392
- 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='入户'`
393
- }else if(args.model.f_hasHousehold=='未入户'){
394
- 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,'未入户')!='入户')`
395
- }*/
396
- if(this.uploadCodeCondition){
397
- args.condition +=` and ${this.uploadCodeCondition}`
398
- }
399
- this.cancel()
400
- this.checkes=[]
401
- this.checkAll=false
402
- this.model.search(args.condition, args.model, args.condValue)
403
- },
404
- showUserCondition(){
405
- this.showCondtion=true
406
- },
407
- setConList(){
408
- this.userTypes=this.$appdata.getParam('用户类型') ? [{
409
- label: '全部',
410
- value: ''
411
- }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
412
-
413
- this.userStates=this.$appdata.getParam('安检用户状态') ? [...this.$appdata.getParam('安检用户状态')] : []
414
- this.gasproperties=this.$appdata.getParam('用气性质') ? [{
415
- label: '全部',
416
- value: ''
417
- }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}]
418
- this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
419
- label: '全部',
420
- value: ''
421
- }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
422
- },
423
- select_search(text){
424
- //tag
425
- let pcdText=text?` and f_residential_area like '%${text}%'`:''
426
- 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)=>{
427
- ////tag)
428
- this.areaList=[]
429
- if(res.data.length>0){
430
- this.areaList.push({label:"全部",value:""})
431
- res.data.forEach((result)=>{
432
- this.areaList.push({label:result.f_residential_area,value:result.f_residential_area})
433
- })
434
- }
435
-
436
- })
437
- },
438
- getstreets(){
439
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {data:{items:"*",tablename:"t_street",orderitem:"id",condition:`f_orgid = '${this.userlogin.orgid}' `}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
440
- ////tag)
441
- this.streets=[]
442
- if(res.data.length>0){
443
- this.streets.push({label:"全部",value:""})
444
- res.data.forEach((result)=>{
445
- this.streets.push({label:result.f_street,value:result.f_street})
446
- })
447
- }
448
-
449
- })
450
- },
451
- //获取抄表册
452
- async Mreadibook(){
453
- this.cbc=[]
454
- this.sliceArea=[]
455
- let http = new HttpResetClass()
456
- let getMeterReadingBooks = await http.load('POST','rs/logic/getMeterBooksData',
457
- {data: {f_orgid: "('"+this.userlogin.orgid+"')"}},
458
- {resolveMsg: null, rejectMsg: '获取失败!!!'})
459
- this.cbc = [{label: '全部', value: ''}]
460
- //tag
461
- //tag)
462
- //tag
463
- this.meterbooks=[]
464
- this.meterbooks=getMeterReadingBooks.data.meterbooks
465
- this.meterbooks.forEach((res) => {
466
- this.cbc.push({label: res.f_book_name, value: res.id})
467
- /*if(res.f_book_slice_area){
468
- if(this.sliceArea.indexOf(res.f_book_slice_area)<0){
469
- this.sliceArea.push(res.f_book_slice_area)
470
- }
471
- }*/
472
- })
473
-
474
- },
475
- //片区获取
476
- async getSliceArea() {
477
- let http = new HttpResetClass()
478
- let getAllArea = await http.load('POST', '/rs/search', {
479
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
480
- userid: this.userlogin.id
481
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
482
- this.sliceArea = [{label: '全部', value: ''}]
483
- //tag
484
- //tag
485
- //tag
486
- getAllArea.data.forEach((res) => {
487
- if(res.parentid==this.userlogin.orgid){
488
- this.sliceArea.push({label:res.name,value:res.name})
489
- }
490
- })
491
- //tag
492
- },
493
- //片区改变-对应抄表册下拉重新赋值
494
- slice_areaChange(value) {
495
- //tag
496
- if(!value){
497
- this.cbc=[]
498
- this.meterbooks.forEach((res) => {
499
- this.cbc.push({label: res.f_book_name, value: res.id})
500
- })
501
- }else{
502
- this.cbc=[]
503
- this.meterbooks.forEach((res) => {
504
- if(res.f_book_slice_area==value){
505
- this.cbc.push({label: res.f_book_name, value: res.id})
506
- }
507
- })
508
- }
509
- },
510
- isChecked(v) {
511
- // 如果全选,不在的按选中算,否则,在的按选中算
512
- if (this.checkAll) {
513
- return this.checkes.indexOf(v) == -1
514
- } else {
515
- return this.checkes.indexOf(v) != -1
516
- }
517
- },
518
- setCheckAll() {
519
- this.checkAll=this.checkAll?false:true;
520
- // 全选改变后,清空选中数据
521
- this.checkes = []
522
- },
523
- setCheckes(id) {
524
- let index=this.checkes.indexOf(id)
525
- if(index<0){
526
- this.checkes.push(id)
527
- }else{
528
- this.checkes.splice(index,1)
529
- }
530
- },
531
- //将客户信息拖至计划中
532
- async dragtoPlanItem() {
533
- if(this.model.rows.length==0){
534
- Vue.showMessage("未检测到列表中有用户!")
535
- return
536
- }
537
- if(!this.checkAll && this.checkes.length==0){
538
- Vue.showMessage("请先勾选你要添入到上方计划中的用户!")
539
- return
540
- }
541
- if(this.selectplan && this.selectplan.id){
542
- this.$parent.isSend=true
543
- try{
544
- let res=await new HttpResetClass().load("POST", "/rs/logic/AddCheckPlanItem", {
545
- data:{
546
- f_operator:this.userlogin.name,
547
- f_plan_id:this.selectplan.id,
548
- f_safecheck_type:this.selectplan.f_safecheck_type,
549
- f_filialeid:this.userlogin.orgid,
550
- f_subscribe_date:'',
551
- condition:this.model.condition,
552
- switchCheckAll:true,
553
- checkAll:this.checkAll,
554
- param:this.checkes,
555
- columnName: "ua.id"
556
- }
557
- }, {resolveMsg: null, rejectMsg: null})
558
- //tag+"---"+res.data.result.length)
559
- this.$parent.isSend=false
560
- if(res.data.code==200){
561
- //alert("添加成功!有"+res.data.result.length+"条用户地址已经存在于其他计划中: \n"+res.data.result.reduce((c,v)=>{c += v.f_user_name+":"+v.f_address+"\n"}),0)
562
- this.$showMessage("添加成功!"+(res.data.result.length>0?"有"+res.data.result.length+"条用户地址已经存在于其他计划中":""))
563
- this.$parent.refresh()
564
- }else{
565
- this.$showMessage("添加失败!")
566
- }
567
- }catch (e) {
568
- this.$showMessage("添加失败!")
569
- }
570
- }else{
571
- this.$parent.isSend=false
572
- this.$showMessage("请先打开一个计划再进行操作")
573
- }
574
- }
575
- },
576
- events: {
577
- onFileUpload: function (file, res) {
578
- //tag)
579
- //tag)
580
- let data = {
581
- filepath: res.f_downloadpath
582
- }
583
- new HttpResetClass().load('POST','/rs/logic/safe_GetUserInfoFromExcel', {data: data}, {
584
- resolveMsg: '导入成功!已生成条件,若要去除导入条件请点击旁边 ‘清空用户编号’ 按钮。',
585
- rejectMsg: '导入失败'
586
- }).then((res) => {
587
- this.uploadCodeCondition=res.data.condition
588
- this.excelUserCondtion = false
589
- })
590
- },
591
-
592
- }
593
- }
594
- </script>
595
-
596
- <style scoped>
597
- .safe-planfont{
598
- font-family: MicrosoftYaHei;
599
- font-size: 15px;
600
- font-weight: normal;
601
- font-stretch: normal;
602
- letter-spacing: 2px;
603
- color: #333333;
604
- line-height: 25px;
605
- }
606
- .safe-bodyfont{
607
- font-family: MicrosoftYaHei;
608
- font-size: 14px;
609
- font-weight: normal;
610
- font-stretch: normal;
611
- letter-spacing: 0px;
612
- color: #999999;
613
- line-height: 30px;
614
- }
615
- .safe-leftplan{
616
- height:auto;
617
- border-bottom:1px solid #ececec;
618
- padding: 10px 5px
619
- }
620
- .leftplan-center{
621
- border-top:1px solid #ececec;
622
- border-bottom:1px solid #ececec;
623
- }
624
- .safe_p{
625
- white-space: nowrap;
626
- overflow: hidden;
627
- text-overflow: ellipsis;
628
- }
629
- .safe-div-p{
630
- color: #4792de;
631
- text-align: end;
632
- padding: 8px 15px;
633
- }
634
- </style>
635
- <style lang="less">
636
- .upuserinfo_sel ul{
637
- width: 150% !important;
638
- }
639
- </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_start"
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_userinfo_end"
15
+ style="width: 95%" placeholder="编号结束" condition="ui.f_userinfo_code <= '{}'">
16
+ </div>
17
+ <div class="form-group col-sm-1" >
18
+ <input type="text" class="input_search" v-model="model.f_user_name"
19
+ style="width: 95%" placeholder="客户名称" condition="ui.f_user_name like '%{}%'">
20
+ </div>
21
+ <div class="form-group col-sm-1" >
22
+ <input type="text" class="input_search" v-model="model.f_address"
23
+ style="width: 95%" placeholder="客户地址" condition="ua.f_address like '%{}%'">
24
+ </div>
25
+ <div class="form-group col-sm-1 upuserinfo_sel" >
26
+ <v-select
27
+ class="select select_list"
28
+ :width="'95%'"
29
+ :value.sync="model.f_area"
30
+ v-model="model.f_area"
31
+ :options='$parent.$parent.areaList'
32
+ :timeout="500"
33
+ @select-search="$parent.$parent.select_search"
34
+ placeholder='小区选择'
35
+ condition="ua.f_residential_area = '{}'"
36
+ close-on-select
37
+ value-single
38
+ >
39
+ </v-select>
40
+ </div>
41
+ <div class="form-group col-sm-4" >
42
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUserCondition()">更多条件</button>
43
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUploadCodeCondition()">导入编号</button>
44
+ <button class="button_new" style="margin-right: 10px" @click="$parent.$parent.clearUserInfoId()">清空编号</button>
45
+ <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
46
+ </div>
47
+ <div class="form-group col-sm-1" style="float: right">
48
+ <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.dragtoPlanItem()">添入计划</button>
49
+ </div>
50
+ <modal :show.sync="$parent.$parent.showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
51
+ <div slot="modal-header" class="modal-header">
52
+ <h4 class="modal-title">
53
+ 用户查询条件
54
+ </h4>
55
+ </div>
56
+ <div slot="modal-body" class="modal-body">
57
+ <div class="row">
58
+ <div class="form-group col-sm-4" >
59
+ <label class="font_normal_body">用户类型:</label>
60
+ <v-select
61
+ class="select select_list"
62
+ :value.sync="model.f_user_type"
63
+ v-model="model.f_user_type"
64
+ :options='$parent.$parent.userTypes'
65
+ placeholder='请选择'
66
+ condition="uf.f_user_type='{}'"
67
+ :search="false"
68
+ close-on-select
69
+ value-single
70
+ >
71
+ </v-select>
72
+ </div>
73
+ <div class="form-group col-sm-4" >
74
+ <label class="font_normal_body">用户状态:</label>
75
+ <v-select
76
+ class="select select_list"
77
+ :value.sync="model.f_user_state"
78
+ v-model="model.f_user_state"
79
+ :options='$parent.$parent.userStates'
80
+ placeholder='请选择'
81
+ condition="ui.f_user_state='{}'"
82
+ :search="false"
83
+ close-on-select
84
+ value-single
85
+ >
86
+ </v-select>
87
+ </div>
88
+ <div class="form-group col-sm-4" >
89
+ <label class="font_normal_body">用气性质:</label>
90
+ <v-select
91
+ class="select select_list"
92
+ :value.sync="model.f_gasproperties"
93
+ v-model="model.f_gasproperties"
94
+ :options='$parent.$parent.gasproperties'
95
+ placeholder='请选择'
96
+ condition="uf.f_gasproperties='{}'"
97
+ :search="false"
98
+ close-on-select
99
+ value-single
100
+ >
101
+ </v-select>
102
+ </div>
103
+ <div class="form-group col-sm-4" >
104
+ <label class="font_normal_body">气表类型:</label>
105
+ <v-select
106
+ class="select select_list"
107
+ :value.sync="model.meter_classify"
108
+ v-model="model.meter_classify"
109
+ :options='$parent.$parent.meter_classifys'
110
+ placeholder='请选择'
111
+ condition="uf.F_METER_CLASSIFY='{}'"
112
+ :search="false"
113
+ close-on-select
114
+ value-single
115
+ >
116
+ </v-select>
117
+ </div>
118
+ <div class="form-group col-sm-4" >
119
+ <label class="font_normal_body">街&ensp;&ensp;&ensp;&ensp;道:</label>
120
+ <v-select
121
+ class="select select_list"
122
+ :value.sync="model.f_street"
123
+ v-model="model.f_street"
124
+ :options='$parent.$parent.streets'
125
+ placeholder='请选择'
126
+ condition="ua.f_street like '%{}%'"
127
+ :search="false"
128
+ close-on-select
129
+ value-single
130
+ >
131
+ </v-select>
132
+ </div>
133
+ <!--<div class="form-group col-sm-4" >
134
+ <label class="font_normal_body">小区名称:</label>
135
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
136
+ style="width: 60%" placeholder="请选择" condition="ua.f_residential_area = '{}'">
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_building"
141
+ style="width: 60%" placeholder="请选择" condition="ua.f_building='{}'">
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_unit"
146
+ style="width: 60%" placeholder="请选择" condition="ua.f_unit='{}'">
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 <= '{} 00:00:00'">
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">片&ensp;&ensp;&ensp;&ensp;区:</label>
181
+ <v-select
182
+ class="select select_list"
183
+ :value.sync="model.f_book_slice_area"
184
+ v-model="model.f_book_slice_area"
185
+ :options='$parent.$parent.sliceArea'
186
+ @change="$parent.$parent.slice_areaChange(model.f_book_slice_area)"
187
+ placeholder='请选择'
188
+ condition="ua.f_slice_area ='{}'"
189
+ close-on-select
190
+ value-single
191
+ >
192
+ </v-select>
193
+ </div>
194
+ <div class="form-group col-sm-4" >
195
+ <label class="font_normal_body">抄&ensp;表&ensp;册:</label>
196
+ <v-select
197
+ class="select select_list"
198
+ :value.sync="model.f_meter_book_num"
199
+ v-model="model.f_meter_book_num"
200
+ :options='$parent.$parent.cbc'
201
+ placeholder='请选择'
202
+ condition="uf.f_meter_book_num='{}'"
203
+ close-on-select
204
+ value-single
205
+ >
206
+ </v-select>
207
+ </div>
208
+ <div class="form-group col-sm-4" >
209
+ <label class="font_normal_body">派发情况:</label>
210
+ <v-select
211
+ class="select select_list"
212
+ :value.sync="model.yearCheck"
213
+ v-model="model.yearCheck"
214
+ :options='$parent.$parent.yearCheckList'
215
+ placeholder='请选择'
216
+ condition="{}"
217
+ :search="false"
218
+ close-on-select
219
+ value-single
220
+ >
221
+ </v-select>
222
+ </div>
223
+ <div class="form-group col-sm-4" >
224
+ <label class="font_normal_body">安全等级:</label>
225
+ <v-select
226
+ class="select select_list"
227
+ :value.sync="model.f_security_level"
228
+ v-model="model.f_security_level"
229
+ :options='$parent.$parent.security_level'
230
+ placeholder='请选择'
231
+ condition="ui.f_security_level = '{}'"
232
+ :search="false"
233
+ close-on-select
234
+ value-single
235
+ >
236
+ </v-select>
237
+ </div>
238
+ <!--<div class="form-group col-sm-4" >
239
+ <label class="font_normal_body">入户情况:</label>
240
+ <v-select
241
+ class="select select_list"
242
+ :value.sync="model.f_hasHousehold"
243
+ v-model="model.f_hasHousehold"
244
+ :options='$parent.$parent.hasHousehold'
245
+ placeholder='请选择'
246
+ close-on-select
247
+ :search="false"
248
+ value-single
249
+ >
250
+ </v-select>
251
+ </div>-->
252
+
253
+ </div>
254
+ </div>
255
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
256
+ <button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
257
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
258
+ </div>
259
+ </modal>
260
+ <modal :show.sync="$parent.$parent.excelUserCondtion" width="500px" v-ref:modal1 >
261
+ <div slot="modal-header" class="modal-header">
262
+ <h4 class="modal-title">
263
+ 导入用户编号
264
+ </h4>
265
+ </div>
266
+ <div slot="modal-body" class="modal-body">
267
+ <div class="row">
268
+ <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
269
+ action="rs/file/uploadFile" tagname="档案信息导入" v-ref:file :headers="headers" multiple></file-upload>
270
+ <img src="../../../assets/Excelformat.png" style="width: 100%"/>
271
+ </div>
272
+ </div>
273
+ <footer slot="modal-footer" class="modal-footer">
274
+ </footer>
275
+ </modal>
276
+ <!--<div class="form-group col-sm-4 button-range" >
277
+
278
+ <button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
279
+ <export-excel-safe :data="$parent.$parent.exportParameter"
280
+ :field="$parent.$parent.excelHeaders"
281
+ sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
282
+ template-name='安检计划明细' :choose-col="true">
283
+ </export-excel-safe>
284
+
285
+ </div>-->
286
+ </div>
287
+ </div>
288
+ </criteria>
289
+ <data-grid :model="model" partial='list' class="table_sy">
290
+
291
+ <template partial='head'>
292
+ <tr>
293
+ <th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
294
+ <th><nobr>用户编号</nobr></th>
295
+ <th><nobr>用户名称</nobr></th>
296
+ <th><nobr>用户类型</nobr></th>
297
+ <th><nobr>小区名称</nobr></th>
298
+ <th><nobr>片区</nobr></th>
299
+ <th><nobr>抄表册</nobr></th>
300
+ <th title="当前所在的安检计划名称"><nobr>所属计划</nobr></th>
301
+ <th title="最后一次安检日期"><nobr>安检日期</nobr></th>
302
+ <th><nobr>详细地址</nobr></th>
303
+ </tr>
304
+ </template>
305
+ <template partial='body'>
306
+ <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>
307
+ <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
308
+ <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
309
+ <td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
310
+ <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
311
+ <td style="text-align: center"><nobr>{{row.f_book_slice_area}}</nobr></td>
312
+ <td style="text-align: center"><nobr>{{row.f_book_name}}</nobr></td>
313
+ <td style="text-align: center"><nobr>{{row.f_plan_name}}</nobr></td>
314
+ <td style="text-align: center"><nobr>{{row.f_last_check_date}}</nobr></td>
315
+ <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
316
+ </template>
317
+ </data-grid>
318
+ </criteria-paged>
319
+ </div>
320
+ </template>
321
+
322
+ <script>
323
+ import {HttpResetClass, PagedList} from "vue-client";
324
+ import * as Util from "../../../components/Util";
325
+ import Vue from "vue";
326
+
327
+ export default {
328
+ name: "PlanManage",
329
+ title: '计划管理',
330
+ data() {
331
+ return {
332
+ model:new PagedList('/rs/sql/FetchUserFileByOrgNoRuHuSXQ', 100, {
333
+ "orderitem": "'f_userinfo_code'",
334
+ "f_usertype": "''",
335
+ "month": "''",
336
+ "SafeCheckSX": {"f_check_start": '', "f_check_end": ''},
337
+ "SafeCheckCQ": "''",
338
+ "startday":"''",
339
+ "endday":"''"}),
340
+ a:'1',
341
+ opt:[{label:"测试",value:"测试"}],
342
+ showCondtion:false,
343
+ userTypes:[],//用户类型
344
+ userStates:[],//用户状态
345
+ gasproperties:[],//用气性质
346
+ meter_classifys:[],//气表类型
347
+ security_level:[{label:"全部",value:""},...this.$appdata.getParam('用户安全等级')],
348
+ hasHousehold:[{label:"全部",value:""},{label:"已入户",value:"已入户"},{label:"未入户",value:"未入户"}],
349
+ yearCheckList:[{label:"全部",value:""},{label:"已在计划中",value:"ua.f_plan_id is not null"},{label:"未在计划中",value:"ua.f_plan_id is null"}],
350
+ sliceArea:[],
351
+ meterbooks:[],
352
+ cbc:[],
353
+ areaList:[],
354
+ streets:[],
355
+ checkAll:false,
356
+ checkes:[],
357
+ excelUserCondtion:false,
358
+ uploadCodeCondition:''
359
+ }
360
+ },
361
+ props:["selectplan","userlogin"],
362
+ ready(){
363
+ // this.$refs.paged.$refs.criteria.model.f_user_state='正常'
364
+ // this.$refs.paged.$refs.criteria.model.f_endfile_time=Util.toStartDateYearString()
365
+ //this.$refs.paged.$refs.criteria.model.f_hasHousehold='未入户'
366
+ this.setConList()
367
+ this.loadpage()
368
+ },
369
+ methods: {
370
+ loadpage(){
371
+ this.select_search()
372
+ this.Mreadibook()
373
+ this.getSliceArea()
374
+ this.getstreets()
375
+ },
376
+ cancel(){
377
+ this.showCondtion=false
378
+ this.excelUserCondtion=false
379
+ },
380
+ //清空用户编号
381
+ clearUserInfoId(){
382
+ this.uploadCodeCondition=''
383
+ Vue.showMessage("已清空用户编号")
384
+ },
385
+ showUploadCodeCondition(){
386
+ this.excelUserCondtion=true
387
+ },
388
+ selfSearch (args) {
389
+ //tag)
390
+ // args.condition += ` and ui.f_filialeid='${this.userlogin.orgid}'`
391
+ /*if(args.model.f_hasHousehold=='已入户'){
392
+ 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='入户'`
393
+ }else if(args.model.f_hasHousehold=='未入户'){
394
+ 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,'未入户')!='入户')`
395
+ }*/
396
+ if(this.uploadCodeCondition){
397
+ args.condition +=` and ${this.uploadCodeCondition}`
398
+ }
399
+ this.cancel()
400
+ this.checkes=[]
401
+ this.checkAll=false
402
+ this.model.search(args.condition, args.model, args.condValue)
403
+ },
404
+ showUserCondition(){
405
+ this.showCondtion=true
406
+ },
407
+ setConList(){
408
+ this.userTypes=this.$appdata.getParam('用户类型') ? [{
409
+ label: '全部',
410
+ value: ''
411
+ }, ...this.$appdata.getParam('用户类型')] : [{label: '全部', value: ''}]
412
+
413
+ this.userStates=this.$appdata.getParam('安检用户状态') ? [...this.$appdata.getParam('安检用户状态')] : []
414
+ this.gasproperties=this.$appdata.getParam('用气性质') ? [{
415
+ label: '全部',
416
+ value: ''
417
+ }, ...this.$appdata.getParam('用气性质')] : [{label: '全部', value: ''}]
418
+ this.meter_classifys=this.$appdata.getParam('气表类型') ? [{
419
+ label: '全部',
420
+ value: ''
421
+ }, ...this.$appdata.getParam('气表类型')] : [{label: '全部', value: ''}]
422
+ },
423
+ select_search(text){
424
+ //tag
425
+ let pcdText=text?` and f_residential_area like '%${text}%'`:''
426
+ 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)=>{
427
+ ////tag)
428
+ this.areaList=[]
429
+ if(res.data.length>0){
430
+ this.areaList.push({label:"全部",value:""})
431
+ res.data.forEach((result)=>{
432
+ this.areaList.push({label:result.f_residential_area,value:result.f_residential_area})
433
+ })
434
+ }
435
+
436
+ })
437
+ },
438
+ getstreets(){
439
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {data:{items:"*",tablename:"t_street",orderitem:"id",condition:`f_orgid = '${this.userlogin.orgid}' `}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
440
+ ////tag)
441
+ this.streets=[]
442
+ if(res.data.length>0){
443
+ this.streets.push({label:"全部",value:""})
444
+ res.data.forEach((result)=>{
445
+ this.streets.push({label:result.f_street,value:result.f_street})
446
+ })
447
+ }
448
+
449
+ })
450
+ },
451
+ //获取抄表册
452
+ async Mreadibook(){
453
+ this.cbc=[]
454
+ this.sliceArea=[]
455
+ let http = new HttpResetClass()
456
+ let getMeterReadingBooks = await http.load('POST','rs/logic/getMeterBooksData',
457
+ {data: {f_orgid: "('"+this.userlogin.orgid+"')"}},
458
+ {resolveMsg: null, rejectMsg: '获取失败!!!'})
459
+ this.cbc = [{label: '全部', value: ''}]
460
+ //tag
461
+ //tag)
462
+ //tag
463
+ this.meterbooks=[]
464
+ this.meterbooks=getMeterReadingBooks.data.meterbooks
465
+ this.meterbooks.forEach((res) => {
466
+ this.cbc.push({label: res.f_book_name, value: res.id})
467
+ /*if(res.f_book_slice_area){
468
+ if(this.sliceArea.indexOf(res.f_book_slice_area)<0){
469
+ this.sliceArea.push(res.f_book_slice_area)
470
+ }
471
+ }*/
472
+ })
473
+
474
+ },
475
+ //片区获取
476
+ async getSliceArea() {
477
+ let http = new HttpResetClass()
478
+ let getAllArea = await http.load('POST', '/rs/search', {
479
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
480
+ userid: this.userlogin.id
481
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
482
+ this.sliceArea = [{label: '全部', value: ''}]
483
+ //tag
484
+ //tag
485
+ //tag
486
+ getAllArea.data.forEach((res) => {
487
+ if(res.parentid==this.userlogin.orgid){
488
+ this.sliceArea.push({label:res.name,value:res.name})
489
+ }
490
+ })
491
+ //tag
492
+ },
493
+ //片区改变-对应抄表册下拉重新赋值
494
+ slice_areaChange(value) {
495
+ //tag
496
+ if(!value){
497
+ this.cbc=[]
498
+ this.meterbooks.forEach((res) => {
499
+ this.cbc.push({label: res.f_book_name, value: res.id})
500
+ })
501
+ }else{
502
+ this.cbc=[]
503
+ this.meterbooks.forEach((res) => {
504
+ if(res.f_book_slice_area==value){
505
+ this.cbc.push({label: res.f_book_name, value: res.id})
506
+ }
507
+ })
508
+ }
509
+ },
510
+ isChecked(v) {
511
+ // 如果全选,不在的按选中算,否则,在的按选中算
512
+ if (this.checkAll) {
513
+ return this.checkes.indexOf(v) == -1
514
+ } else {
515
+ return this.checkes.indexOf(v) != -1
516
+ }
517
+ },
518
+ setCheckAll() {
519
+ this.checkAll=this.checkAll?false:true;
520
+ // 全选改变后,清空选中数据
521
+ this.checkes = []
522
+ },
523
+ setCheckes(id) {
524
+ let index=this.checkes.indexOf(id)
525
+ if(index<0){
526
+ this.checkes.push(id)
527
+ }else{
528
+ this.checkes.splice(index,1)
529
+ }
530
+ },
531
+ //将客户信息拖至计划中
532
+ async dragtoPlanItem() {
533
+ if(this.model.rows.length==0){
534
+ Vue.showMessage("未检测到列表中有用户!")
535
+ return
536
+ }
537
+ if(!this.checkAll && this.checkes.length==0){
538
+ Vue.showMessage("请先勾选你要添入到上方计划中的用户!")
539
+ return
540
+ }
541
+ if(this.selectplan && this.selectplan.id){
542
+ this.$parent.isSend=true
543
+ try{
544
+ let res=await new HttpResetClass().load("POST", "/rs/logic/AddCheckPlanItem", {
545
+ data:{
546
+ f_operator:this.userlogin.name,
547
+ f_plan_id:this.selectplan.id,
548
+ f_safecheck_type:this.selectplan.f_safecheck_type,
549
+ f_filialeid:this.userlogin.orgid,
550
+ f_subscribe_date:'',
551
+ condition:this.model.condition,
552
+ switchCheckAll:true,
553
+ checkAll:this.checkAll,
554
+ param:this.checkes,
555
+ columnName: "ua.id"
556
+ }
557
+ }, {resolveMsg: null, rejectMsg: null})
558
+ //tag+"---"+res.data.result.length)
559
+ this.$parent.isSend=false
560
+ if(res.data.code==200){
561
+ //alert("添加成功!有"+res.data.result.length+"条用户地址已经存在于其他计划中: \n"+res.data.result.reduce((c,v)=>{c += v.f_user_name+":"+v.f_address+"\n"}),0)
562
+ this.$showMessage("添加成功!"+(res.data.result.length>0?"有"+res.data.result.length+"条用户地址已经存在于其他计划中":""))
563
+ this.$parent.refresh()
564
+ }else{
565
+ this.$showMessage("添加失败!")
566
+ }
567
+ }catch (e) {
568
+ this.$showMessage("添加失败!")
569
+ }
570
+ }else{
571
+ this.$parent.isSend=false
572
+ this.$showMessage("请先打开一个计划再进行操作")
573
+ }
574
+ }
575
+ },
576
+ events: {
577
+ onFileUpload: function (file, res) {
578
+ //tag)
579
+ //tag)
580
+ let data = {
581
+ filepath: res.f_downloadpath
582
+ }
583
+ new HttpResetClass().load('POST','/rs/logic/safe_GetUserInfoFromExcel', {data: data}, {
584
+ resolveMsg: '导入成功!已生成条件,若要去除导入条件请点击旁边 ‘清空用户编号’ 按钮。',
585
+ rejectMsg: '导入失败'
586
+ }).then((res) => {
587
+ this.uploadCodeCondition=res.data.condition
588
+ this.excelUserCondtion = false
589
+ })
590
+ },
591
+
592
+ }
593
+ }
594
+ </script>
595
+
596
+ <style scoped>
597
+ .safe-planfont{
598
+ font-family: MicrosoftYaHei;
599
+ font-size: 15px;
600
+ font-weight: normal;
601
+ font-stretch: normal;
602
+ letter-spacing: 2px;
603
+ color: #333333;
604
+ line-height: 25px;
605
+ }
606
+ .safe-bodyfont{
607
+ font-family: MicrosoftYaHei;
608
+ font-size: 14px;
609
+ font-weight: normal;
610
+ font-stretch: normal;
611
+ letter-spacing: 0px;
612
+ color: #999999;
613
+ line-height: 30px;
614
+ }
615
+ .safe-leftplan{
616
+ height:auto;
617
+ border-bottom:1px solid #ececec;
618
+ padding: 10px 5px
619
+ }
620
+ .leftplan-center{
621
+ border-top:1px solid #ececec;
622
+ border-bottom:1px solid #ececec;
623
+ }
624
+ .safe_p{
625
+ white-space: nowrap;
626
+ overflow: hidden;
627
+ text-overflow: ellipsis;
628
+ }
629
+ .safe-div-p{
630
+ color: #4792de;
631
+ text-align: end;
632
+ padding: 8px 15px;
633
+ }
634
+ </style>
635
+ <style lang="less">
636
+ .upuserinfo_sel ul{
637
+ width: 150% !important;
638
+ }
639
+ </style>