safecheck-client 3.0.33-8 → 3.0.33-81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/index.html +6 -2
  2. package/package.json +3 -3
  3. package/src/App.vue +31 -31
  4. package/src/components/Util/ImgSelfSafePlus.vue +12 -10
  5. package/src/components/android/CurrentCreate.vue +1 -1
  6. package/src/components/android/SafecheckOrderV.vue +3 -3
  7. package/src/components/paper/PaperList.vue +5 -4
  8. package/src/components/planmanage/PlanManage.vue +3 -2
  9. package/src/components/planmanage/checkPlanList.vue +2 -1
  10. package/src/components/planmanage/checkUserList.vue +34 -2
  11. package/src/components/report/CheckPlanCountChartArea.vue +5 -0
  12. package/src/components/report/HiddenSituation.vue +3 -3
  13. package/src/components/rongcheng/AspiratedPaperFeedbackm.vue +28 -1
  14. package/src/components/rongcheng/AspiratedPaperMessage.vue +1 -1
  15. package/src/components/rongcheng/DefectPaper.vue +1 -1
  16. package/src/components/rongcheng/PaperListNPSQ.vue +35 -1
  17. package/src/components/rongcheng/PaperListSQ.vue +32 -11
  18. package/src/components/rongcheng/PhoneUpUserinfo.vue +939 -802
  19. package/src/components/rongcheng/SafecheckOrderV.vue +1 -1
  20. package/src/components/rongcheng/report/CheckPlanAreaList.vue +1 -3
  21. package/src/filiale/Util.js +5 -0
  22. package/src/filiale/bayan/android/AddPlanItem.vue +12 -3
  23. package/src/filiale/bayan/android/SafecheckOrderV.vue +9 -5
  24. package/src/filiale/bayan/android/SafecheckUserInfo.vue +532 -508
  25. package/src/filiale/dexin/android/SafecheckDevices.vue +1 -1
  26. package/src/filiale/dexin/android/WebMeterOpen.vue +1 -1
  27. package/src/filiale/dexin/android/WebMeterOpenEdit.vue +25 -37
  28. package/src/filiale/fugou/android/SafecheckOrderV.vue +2796 -0
  29. package/src/filiale/fugou/android.js +2 -1
  30. package/src/filiale/fugou/pc/AddToCheckBook.vue +56 -119
  31. package/src/filiale/fugou/pc/CheckBook.vue +2 -0
  32. package/src/filiale/fugou/pc/CheckBookEntry.vue +47 -19
  33. package/src/filiale/fugou/pc/CheckBookList.vue +2 -2
  34. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +733 -574
  35. package/src/filiale/fugou/pc/CheckBookUser.vue +102 -45
  36. package/src/filiale/fugou/pc/DefectPaperNew.vue +10 -6
  37. package/src/filiale/fugou/pc/PaperDefectMain.vue +12 -6
  38. package/src/filiale/fugou/pc/PaperList.vue +14 -6
  39. package/src/filiale/fugou/pc/PlanManage.vue +62 -8
  40. package/src/filiale/fugou/pc/checkUserList.vue +222 -42
  41. package/src/filiale/hanzhong/pc/CheckHiddenDanger.vue +15 -5
  42. package/src/filiale/hanzhong/pc/CheckSafeDetail.vue +12 -2
  43. package/src/filiale/hanzhong/pc/CheckSafeStatus.vue +12 -3
  44. package/src/filiale/hanzhong/pc/CheckSearchUser.vue +13 -0
  45. package/src/filiale/hanzhong/pc/CheckUserList.vue +30 -11
  46. package/src/filiale/hanzhong/pc/CheckerSafeDetail.vue +11 -2
  47. package/src/filiale/jingyang/pc/ReportCheckItemList.vue +543 -0
  48. package/src/filiale/jingyang/pc.js +1 -0
  49. package/src/filiale/rongchuang/android/SafecheckDevices.vue +468 -748
  50. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +984 -1234
  51. package/src/filiale/rongchuang/android.js +1 -0
  52. package/src/filiale/rongchuang/pc/NewCheckpaper.vue +294 -305
  53. package/src/filiale/rongchuang/pc/PaperList.vue +812 -0
  54. package/src/filiale/rongchuang/pc.js +1 -0
  55. package/src/filiale/tongchuan/pc/checkUserList.vue +2 -2
  56. package/src/filiale/weinan/android/PaperFeedback.vue +8 -8
  57. package/src/filiale/weinan/android/SafecheckDevices.vue +1 -1
  58. package/src/filiale/weinan/android/SafecheckOrderV.vue +75 -26
  59. package/src/filiale/weinan/pc/CheckSearchUser.vue +1078 -0
  60. package/src/filiale/weinan/pc/DefectPaperNew.vue +7 -1
  61. package/src/filiale/weinan/pc.js +1 -0
  62. package/src/filiale/wensu/pc/CheckSearchUser.vue +2 -0
  63. package/src/filiale/wensu/pc/PrintMaterialBill.vue +172 -172
  64. package/src/filiale/wensu/pc/SelectCheckPlan.vue +342 -342
  65. package/src/filiale/wenxi/android/SafecheckUserInfo.vue +651 -651
  66. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1 -1
  67. package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1230 -0
  68. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2832 -2832
  69. package/src/filiale/yangchunboneng/android.js +1 -0
  70. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +28 -1
  71. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1168 -1018
  72. package/src/filiale/yongzhou/android/SafecheckOrderV.vue +221 -256
  73. package/src/filiale/yongzhou/pc/CheckPlan.vue +59 -0
  74. package/src/filiale/yongzhou/pc/CheckSearchUser.vue +1 -1
  75. package/src/filiale/yongzhou/pc/DefectPaperNew.vue +1105 -0
  76. package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +412 -107
  77. package/src/filiale/yongzhou/pc/PaperDefectMain.vue +872 -0
  78. package/src/filiale/yongzhou/pc/PaperList.vue +1 -1
  79. package/src/filiale/yongzhou/pc/SelectCheckPlan.vue +364 -0
  80. package/src/filiale/yongzhou/pc/communityTypeDetailG.vue +55 -125
  81. package/src/filiale/yongzhou/pc/communityTypeDetailM.vue +94 -187
  82. package/src/filiale/yongzhou/pc/safeDetail.vue +311 -20
  83. package/src/filiale/yongzhou/pc/safeStatistics.vue +74 -24
  84. package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +2 -2
  85. package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +2 -2
  86. package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +47 -23
  87. package/src/filiale/yongzhou/pc/safeTable.vue +3 -3
  88. package/src/filiale/yongzhou/pc.js +4 -0
  89. package/src/filiale/yunchengminsheng/pc/checkUserList.vue +753 -753
  90. package/src/main.js +2 -2
  91. package/src/rongcheng.js +3 -1
@@ -216,11 +216,11 @@
216
216
  </div>
217
217
  </div>
218
218
  <div class="panel auto">
219
- <div class="panel-heading" @click="selectVal('设备信息')" style="background-color: #ffffff">
220
- <span class="spanboder"><img src="../../assets/list.png" style="width: 22px;margin-right: 8px;">设备信息<img
221
- class="butt3" :src="imgback('设备信息')"></span>
219
+ <div class="panel-heading" @click="selectVal('用气设备信息')" style="background-color: #ffffff">
220
+ <span class="spanboder"><img src="../../assets/list.png" style="width: 22px;margin-right: 8px;">用气设备信息<img
221
+ class="butt3" :src="imgback('用气设备信息')"></span>
222
222
  </div>
223
- <div class="panel-body" v-show="headername == '设备信息'">
223
+ <div class="panel-body" v-show="headername == '用气设备信息'">
224
224
  <div class="row" v-for="(idx, row) in model"
225
225
  style="border:2px solid #A2C2EB; border-top:10px solid #A2C2EB; box-shadow: #00b3ee;margin-bottom: 10px">
226
226
  <div class="row auto" style="margin: 5px 0">
@@ -300,6 +300,98 @@
300
300
  </div>
301
301
  </div>
302
302
  </div>
303
+ <div class="panel auto">
304
+ <div class="panel-heading" @click="selectVal('设备信息')" style="background-color: #ffffff">
305
+ <span class="spanboder"><img src="../../assets/list.png" style="width: 22px;margin-right: 8px;">设备信息<img
306
+ class="butt3" :src="imgback('设备信息')"></span>
307
+ </div>
308
+ <div class="panel-body" v-show="headername == '设备信息'">
309
+ <div class="row" v-for="(idx, row) in devicemodel"
310
+ style="border:2px solid #A2C2EB; border-top:10px solid #A2C2EB; box-shadow: #00b3ee;margin-bottom: 10px">
311
+ <div class="row auto" style="margin: 5px 0">
312
+ <label class="righttxt">设备类型:</label>
313
+ <v-select class="rightipt" :value.sync="row.f_devices_type" v-model="row.f_devices_type" placeholder='请选择'
314
+ :width='wid' readonly :options="device_type"
315
+ close-on-select value-single></v-select>
316
+ </div>
317
+ <div class="row auto" style="margin: 5px 0">
318
+ <label class="righttxt">厂家:</label>
319
+ <input type="text" class="form-control rightipt" v-model="row.f_manufactor" />
320
+ </div>
321
+ <div class="row auto" style="margin: 5px 0">
322
+ <label class="righttxt">设备编号:</label><input type="text" class="form-control rightipt"
323
+ v-model="row.f_devices_model" />
324
+ </div>
325
+ <div class="row auto" style="margin: 5px 0">
326
+ <label class="righttxt">设备型号:</label><input type="text" class="form-control rightipt"
327
+ v-model="row.f_devices_model" />
328
+ </div>
329
+ <div class="row auto" style="margin: 5px 0">
330
+ <label class="righttxt">安&ensp;装&ensp;人:</label><input type="text" class="form-control rightipt"
331
+ v-model="row.f_instaler_person" />
332
+ </div>
333
+ <div class="row auto" style="margin: 5px 0">
334
+ <label class="righttxt">安装日期:</label>
335
+ <datepicker class="rightipt" :value.sync="row.f_input_date"
336
+ v-model="row.f_input_date" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset"
337
+ readonly="readonly">
338
+ </datepicker>
339
+ </div>
340
+ <div class="row auto" style="margin: 5px 0" >
341
+ <label class="righttxt">生产日期:</label>
342
+ <datepicker class="rightipt" :value.sync="row.f_make_date" v-model="row.f_make_date"
343
+ :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
344
+ </datepicker>
345
+ </div>
346
+ <div class="row auto" style="margin: 5px 0">
347
+ <label class="righttxt">设备数量:</label>
348
+ <input type="number" class="form-control rightipt" v-model="row.f_devices_num" />
349
+ </div>
350
+ <div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
351
+ <label class="righttxt">首校日期:</label>
352
+ <datepicker class="rightipt" :value.sync="row.f_firstcheck_date" v-model="row.f_firstcheck_date"
353
+ :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
354
+ </datepicker>
355
+ </div>
356
+ <div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
357
+ <label class="righttxt">报废日期:</label>
358
+ <datepicker class="rightipt" :value.sync="row.f_expire_date" v-model="row.f_expire_date"
359
+ :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
360
+ </datepicker>
361
+ </div>
362
+ <div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '报警器'">
363
+ <label class="righttxt">下次校验:</label>
364
+ <datepicker class="rightipt" :value.sync="row.f_nextcheck_date" v-model="row.f_nextcheck_date"
365
+ :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
366
+ </datepicker>
367
+ </div>
368
+ <div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '切断阀'">
369
+ <label class="righttxt">报废日期:</label>
370
+ <datepicker class="rightipt" :value.sync="row.f_expire_date" v-model="row.f_expire_date"
371
+ :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset" >
372
+ </datepicker>
373
+ </div>
374
+ <div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
375
+ <label class="righttxt">流量:</label>
376
+ <input type="number" class="form-control rightipt" v-model="row.f_rate_flow" />
377
+ </div>
378
+ <div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
379
+ <label class="righttxt">出口压力:</label>
380
+ <input type="text" class="form-control rightipt" v-model="row.f_pressure_range" />
381
+ </div>
382
+ <div class="row auto" style="margin: 5px 0" v-show="row.f_devices_type == '调压器'">
383
+ <label class="righttxt">进口压力:</label>
384
+ <input type="text" class="form-control rightipt" v-model="row.f_import_pressure" />
385
+ </div>
386
+ <div style="display: flex;justify-content: center;margin-bottom: 3px">
387
+ <button class="btn btn-warning" @click="deleteDevice($index)">删除设备</button>
388
+ </div>
389
+ </div>
390
+ <div style="display: flex;justify-content: space-around;">
391
+ <button class="col-sm-3 btn btn-primary" @click="pushDevices($index)">新增设备</button>
392
+ </div>
393
+ </div>
394
+ </div>
303
395
  <div class="panel auto">
304
396
  <div class="panel-body">
305
397
  <div style="display: flex;justify-content: center;">
@@ -312,880 +404,925 @@
312
404
  </template>
313
405
 
314
406
  <script>
315
- import { HttpResetClass } from 'vue-client'
316
- import * as Util from "../Util";
317
- import Vue from 'vue'
318
- import { toStandardDateString } from "../Util";
407
+ import { HttpResetClass } from 'vue-client'
408
+ import * as Util from "../Util";
409
+ import Vue from 'vue'
410
+ import { toStandardDateString } from "../Util";
319
411
 
320
- export default {
321
- title: '设备查看',
322
- data() {
323
- return {
324
- model: [],
325
- show: false,
326
- row: Object,
327
- userinfo: Object,
328
- userinfo_old: Object,
329
- wid: "60%",
330
- aroundmeters: [],
331
- devices_types: [],
332
- pipe_types: [{ label: '包覆管', value: '包覆管' }, { label: '波纹管', value: '波纹管' }],
333
- wz_types: [],
334
- cityTypes: [{ label: '市区', value: '市区' }, { label: '城镇', value: '城镇' }],
335
- bqf_states: [{ label: '开阀', value: '开阀' }, { label: '关阀', value: '关阀' }],
336
- pcds: [],
337
- streets: [],
338
- update: false,
339
- headername: '设备信息',
340
- excessive: false,
341
- area: [],
342
- enable: false,
343
- f_meterno_path: Vue.nopic,
344
- selectArea: { id: '' },
345
- selectPcd: { id: '' },
346
- selectStreet: { id: '' },
347
- changemeterno: false,//是否修改了机表表号
348
- approveChange: false,//是否需要进行信息变更审核
349
- newAddress: '',
350
- addressType: '',
351
- //需要审核的字段
352
- checkField: {
353
- checkUserinfoField: [
354
- 'f_user_name'
355
- ],
356
- checkUserFilesField: [
357
- 'f_meternumber'
358
- ],
359
- checkAddressField: [
360
- 'f_pcd_id',
361
- 'f_street_id',
362
- 'f_residential_area_id',
363
- 'f_building',
364
- 'f_unit',
365
- 'f_floor',
366
- 'f_room',
367
- 'f_slice_area',
368
- 'f_special',
369
- 'f_address'
370
- ],
371
- },
372
- boxOptions: [],
373
- showBox: false,
374
- directOptions: [{ label: '是', value: '是' }, { label: '否', value: '否' }],
375
- deviceBrandOption: {},
376
- isNeedAudit: this.$appdata.getSingleValue('信息变更是否需要审核') == 'false' ? false : true
377
- }
378
- },
379
- props: {
380
- user: {
381
- type: Object
412
+ export default {
413
+ title: '设备查看',
414
+ data() {
415
+ return {
416
+ model: [],
417
+ devicemodel:[],
418
+ show: false,
419
+ row: Object,
420
+ userinfo: Object,
421
+ userinfo_old: Object,
422
+ wid: "60%",
423
+ aroundmeters: [],
424
+ devices_types: [],
425
+ device_type: [{label: '调压器', value: '调压器'}, {label: '报警器', value: '报警器'}, {label: '切断阀', value: '切断阀'}],
426
+ pipe_types: [{label: '包覆管', value: '包覆管'}, {label: '波纹管', value: '波纹管'}],
427
+ wz_types: [],
428
+ cityTypes: [{ label: '市区', value: '市区' }, { label: '城镇', value: '城镇' }],
429
+ bqf_states: [{ label: '开阀', value: '开阀' }, { label: '关阀', value: '关阀' }],
430
+ pcds: [],
431
+ streets: [],
432
+ update: false,
433
+ headername: '用气设备信息',
434
+ excessive: false,
435
+ area: [],
436
+ enable: false,
437
+ f_meterno_path: Vue.nopic,
438
+ selectArea: { id: '' },
439
+ selectPcd: { id: '' },
440
+ selectStreet: { id: '' },
441
+ changemeterno: false,//是否修改了机表表号
442
+ approveChange: false,//是否需要进行信息变更审核
443
+ newAddress: '',
444
+ addressType: '',
445
+ //需要审核的字段
446
+ checkField: {
447
+ checkUserinfoField: [
448
+ 'f_user_name'
449
+ ],
450
+ checkUserFilesField: [
451
+ 'f_meternumber'
452
+ ],
453
+ checkAddressField: [
454
+ 'f_pcd_id',
455
+ 'f_street_id',
456
+ 'f_residential_area_id',
457
+ 'f_building',
458
+ 'f_unit',
459
+ 'f_floor',
460
+ 'f_room',
461
+ 'f_slice_area',
462
+ 'f_special',
463
+ 'f_address'
464
+ ],
382
465
  },
383
- f_userinfo_id: '',
384
- f_source: ''
466
+ boxOptions: [],
467
+ showBox: false,
468
+ directOptions: [{ label: '是', value: '是' }, { label: '否', value: '否' }],
469
+ deviceBrandOption: {},
470
+ isNeedAudit: this.$appdata.getSingleValue('信息变更是否需要审核') == 'false' ? false : true
471
+ }
472
+ },
473
+ props: {
474
+ user: {
475
+ type: Object
385
476
  },
386
- methods: {
387
- countExpireFate_pipe(index, dateTime, type) {
388
- let old = new Date(dateTime)
389
- let newYear = old.getFullYear() + Number(this.$appdata.getSingleValue(type + '-年限') || 0)
390
- let month = old.getMonth() + 1
391
- let date = old.getDate()
392
- this.model[index].f_pipeexpire_date = newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
393
- },
394
- countExpireFate(index, dateTime) {
395
- let old = new Date(dateTime)
396
- let newYear = old.getFullYear() + Number(this.model[index].f_service_life)
397
- let month = old.getMonth() + 1
398
- let date = old.getDate()
399
- this.model[index].f_expire_date = newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
400
- },
401
- getServiceLife(index, type) {
402
- const year = this.$appdata.getSingleValue(type + '-' + this.userinfo.meterinfo[0].f_user_type + '-年限') || 0
403
- this.model[index].f_service_life = year
404
- },
405
- dateAddYear(dateTime, year) {
406
- let old = new Date(dateTime)
407
- let newYear = old.getFullYear() + Number(year)
408
- let month = old.getMonth() + 1
409
- let date = old.getDate()
410
- return newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
411
- },
412
- scan() {
413
- HostApp.__this__ = this,
414
- HostApp.scanCode({ callback: "javascript:HostApp.__this__.getCode();" })
415
- },
416
- getCode() {
417
- var datapa = HostApp.getCode().data;
418
- //tag
419
- this.userinfo.meterinfo[0].f_meternumber = datapa
420
- },
421
- //数据检查
422
- checkVal() {
423
- //检查一些必要信息是否未填
424
- this.approveChange = false
425
- this.changemeterno = false
426
- let checked = { ischeck: true, msg: '' }
427
- //tag
428
- //tag
429
- //tag
430
- if (!this.userinfo.baseinfo.base.f_user_name) {
431
- checked = { ischeck: false, msg: '请输入用户名称!' }
432
- }
433
- if (!this.selectPcd.id) {
434
- checked = { ischeck: false, msg: '请选择省市区!' }
435
- }
436
- if (!this.selectStreet.id) {
437
- checked = { ischeck: false, msg: '请选择街道!' }
477
+ f_userinfo_id: '',
478
+ f_source: ''
479
+ },
480
+ methods: {
481
+ deleteDevice(idx) {
482
+ this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
483
+ if (res === 'confirm') {
484
+ this.devicemodel.splice(idx, 1)
438
485
  }
439
- if (!this.userinfo.addressinfo.f_address) {
440
- checked = { ischeck: false, msg: '新地址不能为空!' }
486
+ })
487
+ },
488
+ pushDevices() {
489
+ let obj = {
490
+ "f_operator": Vue.user.name,
491
+ "f_operate_date": Util.toStandardTimeString(),
492
+ "f_operatorid": Vue.user.id,
493
+ "f_devices_type":null,
494
+ "f_manufactor":null,
495
+ "f_devices_no":null,
496
+ "f_devices_model":null,
497
+ "f_instaler_person":null,
498
+ "f_make_date":null,
499
+ "f_input_date":null,
500
+ "f_devices_num":null,
501
+ "f_firstcheck_date":null,
502
+ "f_rate_flow":null,
503
+ "f_expire_date":null,
504
+ "f_nextcheck_date":null,
505
+ "f_pressure_range":null,
506
+ "f_import_pressure":null
507
+ }
508
+ this.devicemodel.push(obj)
509
+ },
510
+ countExpireFate_pipe(index, dateTime, type) {
511
+ let old = new Date(dateTime)
512
+ let newYear = old.getFullYear() + Number(this.$appdata.getSingleValue(type + '-年限') || 0)
513
+ let month = old.getMonth() + 1
514
+ let date = old.getDate()
515
+ this.model[index].f_pipeexpire_date = newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
516
+ },
517
+ countExpireFate(index, dateTime) {
518
+ let old = new Date(dateTime)
519
+ let newYear = old.getFullYear() + Number(this.model[index].f_service_life)
520
+ let month = old.getMonth() + 1
521
+ let date = old.getDate()
522
+ this.model[index].f_expire_date = newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
523
+ },
524
+ getServiceLife(index, type) {
525
+ const year = this.$appdata.getSingleValue(type + '-' + this.userinfo.meterinfo[0].f_user_type + '-年限') || 0
526
+ this.model[index].f_service_life = year
527
+ },
528
+ dateAddYear(dateTime, year) {
529
+ let old = new Date(dateTime)
530
+ let newYear = old.getFullYear() + Number(year)
531
+ let month = old.getMonth() + 1
532
+ let date = old.getDate()
533
+ return newYear + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
534
+ },
535
+ scan() {
536
+ HostApp.__this__ = this,
537
+ HostApp.scanCode({ callback: "javascript:HostApp.__this__.getCode();" })
538
+ },
539
+ getCode() {
540
+ var datapa = HostApp.getCode().data;
541
+ //tag
542
+ this.userinfo.meterinfo[0].f_meternumber = datapa
543
+ },
544
+ //数据检查
545
+ checkVal() {
546
+ //检查一些必要信息是否未填
547
+ this.approveChange = false
548
+ this.changemeterno = false
549
+ let checked = { ischeck: true, msg: '' }
550
+ //tag
551
+ //tag
552
+ //tag
553
+ if (!this.userinfo.baseinfo.base.f_user_name) {
554
+ checked = { ischeck: false, msg: '请输入用户名称!' }
555
+ }
556
+ if (!this.selectPcd.id) {
557
+ checked = { ischeck: false, msg: '请选择省市区!' }
558
+ }
559
+ if (!this.selectStreet.id) {
560
+ checked = { ischeck: false, msg: '请选择街道!' }
561
+ }
562
+ if (!this.userinfo.addressinfo.f_address) {
563
+ checked = { ischeck: false, msg: '新地址不能为空!' }
564
+ }
565
+ if (this.addressType == '普通地址') {
566
+ if (!this.selectArea.id) {
567
+ checked = { ischeck: false, msg: '请选择集收单位!' }
441
568
  }
442
- if (this.addressType == '普通地址') {
443
- if (!this.selectArea.id) {
444
- checked = { ischeck: false, msg: '请选择集收单位!' }
445
- }
446
- if (!this.userinfo.addressinfo.f_room) {
447
- checked = { ischeck: false, msg: '新输入门牌号!' }
448
- }
569
+ if (!this.userinfo.addressinfo.f_room) {
570
+ checked = { ischeck: false, msg: '新输入门牌号!' }
449
571
  }
450
- if (this.userinfo.meterinfo[0].f_meter_classify == '机表' && this.userinfo_old.meterinfo[0].f_meternumber) {
572
+ }
573
+ if (this.userinfo.meterinfo[0].f_meter_classify == '机表' && this.userinfo_old.meterinfo[0].f_meternumber) {
451
574
 
452
- //tag
453
- //tag
454
- if (this.userinfo.meterinfo[0].f_meternumber) {
455
- if (this.userinfo.meterinfo[0].f_meternumber != this.userinfo_old.meterinfo[0].f_meternumber) {
456
- if (!this.f_meterno_path || this.f_meterno_path == Vue.nopic) {
457
- checked = { ischeck: false, msg: '请拍摄表号照片!' }
458
- } else {
459
- //用来标识当前有修改机表表号,后台需要进行照片上传
460
- this.changemeterno = true
461
- }
575
+ //tag
576
+ //tag
577
+ if (this.userinfo.meterinfo[0].f_meternumber) {
578
+ if (this.userinfo.meterinfo[0].f_meternumber != this.userinfo_old.meterinfo[0].f_meternumber) {
579
+ if (!this.f_meterno_path || this.f_meterno_path == Vue.nopic) {
580
+ checked = { ischeck: false, msg: '请拍摄表号照片!' }
581
+ } else {
582
+ //用来标识当前有修改机表表号,后台需要进行照片上传
583
+ this.changemeterno = true
462
584
  }
463
- } else {
464
- checked = { ischeck: false, msg: '请输入表号!' }
465
585
  }
586
+ } else {
587
+ checked = { ischeck: false, msg: '请输入表号!' }
466
588
  }
467
- //检查本次修改信息中是否包含需要审核的内容
468
- for (let check in this.checkField) {
469
- //tag
470
- if (typeof check != 'function') {
471
- for (let i = 0; i < this.checkField[check].length; i++) {
589
+ }
590
+ //检查本次修改信息中是否包含需要审核的内容
591
+ for (let check in this.checkField) {
592
+ //tag
593
+ if (typeof check != 'function') {
594
+ for (let i = 0; i < this.checkField[check].length; i++) {
595
+ //tag
596
+ if (check == 'checkUserinfoField') {
472
597
  //tag
473
- if (check == 'checkUserinfoField') {
474
- //tag
475
- //tag
476
- if (this.userinfo.baseinfo.base[this.checkField[check][i]] != this.userinfo_old.baseinfo.base[this.checkField[check][i]]) {
477
- //tag
478
- this.approveChange = true
479
- }
480
- } else if (check == 'checkUserFilesField') {
481
- //tag
598
+ //tag
599
+ if (this.userinfo.baseinfo.base[this.checkField[check][i]] != this.userinfo_old.baseinfo.base[this.checkField[check][i]]) {
482
600
  //tag
483
- if (this.userinfo.meterinfo[0][this.checkField[check][i]] != this.userinfo_old.meterinfo[0][this.checkField[check][i]]) {
484
- //tag
485
- this.approveChange = true
486
- }
487
- } else if (check == 'checkAddressField') {
601
+ this.approveChange = true
602
+ }
603
+ } else if (check == 'checkUserFilesField') {
604
+ //tag
605
+ //tag
606
+ if (this.userinfo.meterinfo[0][this.checkField[check][i]] != this.userinfo_old.meterinfo[0][this.checkField[check][i]]) {
488
607
  //tag
608
+ this.approveChange = true
609
+ }
610
+ } else if (check == 'checkAddressField') {
611
+ //tag
612
+ //tag
613
+ if (this.userinfo.addressinfo[this.checkField[check][i]] != this.userinfo_old.addressinfo[this.checkField[check][i]]) {
489
614
  //tag
490
- if (this.userinfo.addressinfo[this.checkField[check][i]] != this.userinfo_old.addressinfo[this.checkField[check][i]]) {
491
- //tag
492
- this.approveChange = true
493
- }
615
+ this.approveChange = true
494
616
  }
495
617
  }
496
618
  }
497
619
  }
498
- //tag
499
- return checked
500
- },
501
- select_search(text) {
502
- //tag
503
- if (this.selectStreet.id) {
504
- let pcdText = text ? `and f_street_id=${this.selectStreet.id} and f_residential_area like '%${text}%'` : `and f_street_id=${this.selectStreet.id}`
505
- new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
506
- data: {
507
- items: "*",
508
- tablename: "t_area",
509
- orderitem: "id",
510
- condition: `f_orgid = '${Vue.user.orgid}' ${pcdText} `
511
- }
512
- }, { resolveMsg: null, rejectMsg: null }).then((res) => {
513
- //tag)
514
- if (res.data.length > 0) {
515
- this.area = []
516
- res.data.forEach((result) => {
517
- this.area.push({ label: result.f_residential_area, value: result })
518
- })
519
- }
520
- })
521
- } else {
522
- this.area = []
523
- }
524
- },
525
- cameraCallBack(prop, fileName) {
526
- HostApp.__this__.$set(prop, fileName + '?' + Math.random())
527
- //tag
528
- HostApp.__callback__ = null
529
- HostApp.__this__ = null
530
- },
531
- takePic(prop, title) {
532
- HostApp.__callback__ = this.cameraCallBack
533
- HostApp.__this__ = this
534
- //tag
535
- let fileName
536
- if (!this[prop] || this[prop].includes("nopic.png")) {
537
- fileName = Util.guid() + '-' + prop + '.jpg'
538
- } else {
539
- fileName = Util.getFileName(this[prop])
540
- }
541
- HostApp._open_a_page({
542
- type: 'boomerang',
543
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
544
- param: {
545
- file: fileName,
546
- requestCode: 111,
547
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
548
- watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
549
- }
550
- })
551
- },
552
- delfile(prop, fileName) {
553
- if (fileName == Vue.nopic)
554
- return
555
- else {
556
- HostApp.delfile(fileName)
557
- this[prop] = Vue.nopic
558
- }
559
- },
560
- editUserInfoNoAudit() {
561
- let checked = this.checkVal()
562
- if (!checked.ischeck) {
563
- this.$showMessage(checked.msg)
564
- return
565
- }
566
- for (let i = 0; i < this.model.length; i++) {
567
- this.model[i].f_user_id = this.userinfo.meterinfo[0].f_user_id
568
- }
569
- this.$showMessage('确定是否修改上传用户信息?', ['confirm', 'cancel']).then((res) => {
570
- if (res === 'confirm') {
571
- this.excessive = true
572
- let userinfoms = Object.assign({}, this.userinfo_old.baseinfo.base)
573
- // userinfoms.f_user_name=row.f_user_name
574
- userinfoms.f_user_phone = this.userinfo.baseinfo.base.f_user_phone
575
- userinfoms.f_rent_name = this.userinfo.baseinfo.base.f_rent_name
576
- userinfoms.f_zuhu_phone = this.userinfo.baseinfo.base.f_zuhu_phone
577
- userinfoms.f_operator_record = Vue.user.name
578
- userinfoms.f_operatorid_record = Vue.user.id
579
- userinfoms.f_remark = this.userinfo.baseinfo.base.f_remark
580
- userinfoms.f_orgid_record = Vue.user.orgid
581
- userinfoms.f_orgname_record = Vue.user.orgs
582
- userinfoms.f_depid_record = Vue.user.depids
583
- userinfoms.f_depname_record = Vue.user.deps
584
- this.userinfo_old.meterinfo[0].f_gas_person = this.userinfo.meterinfo[0].f_gas_person
585
- this.userinfo_old.meterinfo[0].f_gas_date = this.userinfo.meterinfo[0].f_gas_date
586
- this.userinfo_old.meterinfo[0].f_adjustable_id = this.userinfo.meterinfo[0].f_adjustable_id
587
- this.userinfo_old.meterinfo[0].f_metertitles = this.userinfo.meterinfo[0].f_metertitles
588
- this.userinfo_old.meterinfo[0].f_position = this.userinfo.meterinfo[0].f_position
589
- this.userinfo_old.meterinfo[0].f_aroundmeter = this.userinfo.meterinfo[0].f_aroundmeter
590
- this.userinfo_old.meterinfo[0].f_bqf_state = this.userinfo.meterinfo[0].f_bqf_state
591
- this.userinfo_old.meterinfo[0].f_if_direct = this.userinfo.meterinfo[0].f_if_direct
592
- userinfoms.userfiles = []
593
- this.userinfo_old.meterinfo[0].devicesinfo = this.model
594
- userinfoms.userfiles.push(this.userinfo_old.meterinfo[0])
595
- new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_fileSave`, {
596
- data: {
597
- userinfo: userinfoms,
598
- modifyReason: this.f_source ? `${this.f_source}维护档案信息` : '',
599
- address: {
600
- id: this.userinfo_old.addressinfo.id,
601
- oldid: this.userinfo_old.addressinfo.id,
602
- f_address: this.userinfo_old.addressinfo.f_address ? this.userinfo_old.addressinfo.f_address : this.userinfo.addressinfo.f_address
603
- }
604
- }
605
- }, { resolveMsg: null, rejectMsg: null }).then((res1) => {
606
- if (res1.data.status == 200) {
607
- let data = this.userinfo.addressinfo
608
- data.f_address = this.userinfo_old.addressinfo.f_address ? this.userinfo_old.addressinfo.f_address : this.userinfo.addressinfo.f_address
609
- //
610
- data.f_operator = Vue.user.name
611
- new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/address_updateuseraddress`, { data: data }).then((res2) => {
612
- this.$showMessage("修改用户地址信息成功!")
613
- }).catch(error => {
614
- this.$showMessage("修改用户地址信息!")
615
- })
616
- this.$showMessage("修改用户信息成功!")
617
- this.enable = true
618
- this.excessive = false
619
- }
620
- }).catch((msg) => {
621
- this.$showMessage("修改用户信息失败,请检查手机网络状况!")
622
- this.excessive = false
623
- })
620
+ }
621
+ //tag
622
+ return checked
623
+ },
624
+ select_search(text) {
625
+ //tag
626
+ if (this.selectStreet.id) {
627
+ let pcdText = text ? `and f_street_id=${this.selectStreet.id} and f_residential_area like '%${text}%'` : `and f_street_id=${this.selectStreet.id}`
628
+ new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
629
+ data: {
630
+ items: "*",
631
+ tablename: "t_area",
632
+ orderitem: "id",
633
+ condition: `f_orgid = '${Vue.user.orgid}' ${pcdText} `
624
634
  }
625
- })
626
- },
627
- editUserInfo() {
628
- this.$showMessage('确定是否修改上传审核用户信息?', ['confirm', 'cancel']).then((res) => {
629
- if (res === 'confirm') {
630
- for (let i = 0; i < this.model.length; i++) {
631
- this.model[i].f_user_id = this.userinfo.meterinfo[0].f_user_id
632
- }
633
- this.excessive = true
634
- let userinfoms = Object.assign({}, this.userinfo_old.baseinfo.base)
635
- //userinfoms.f_user_name=row.f_user_name
636
- userinfoms.f_user_phone = this.userinfo.baseinfo.base.f_user_phone
637
- userinfoms.f_rent_name = this.userinfo.baseinfo.base.f_rent_name
638
- userinfoms.f_zuhu_phone = this.userinfo.baseinfo.base.f_zuhu_phone
639
- userinfoms.f_operator_record = Vue.user.name
640
- userinfoms.f_operatorid_record = Vue.user.id
641
- userinfoms.f_remark = this.userinfo.baseinfo.base.f_remark
642
- userinfoms.f_orgid_record = Vue.user.orgid
643
- userinfoms.f_orgname_record = Vue.user.orgs
644
- userinfoms.f_depid_record = Vue.user.depids
645
- userinfoms.f_depname_record = Vue.user.deps
646
- this.userinfo_old.meterinfo[0].f_gas_person = this.userinfo.meterinfo[0].f_gas_person
647
- this.userinfo_old.meterinfo[0].f_gas_date = this.userinfo.meterinfo[0].f_gas_date
648
- this.userinfo_old.meterinfo[0].f_adjustable_id = this.userinfo.meterinfo[0].f_adjustable_id
649
- this.userinfo_old.meterinfo[0].f_metertitles = this.userinfo.meterinfo[0].f_metertitles
650
- this.userinfo_old.meterinfo[0].f_position = this.userinfo.meterinfo[0].f_position
651
- this.userinfo_old.meterinfo[0].f_aroundmeter = this.userinfo.meterinfo[0].f_aroundmeter
652
- this.userinfo_old.meterinfo[0].f_bqf_state = this.userinfo.meterinfo[0].f_bqf_state
653
- this.userinfo_old.meterinfo[0].f_if_direct = this.userinfo.meterinfo[0].f_if_direct
654
- userinfoms.userfiles = []
655
- this.userinfo_old.meterinfo[0].devicesinfo = this.model
656
- userinfoms.userfiles.push(this.userinfo_old.meterinfo[0])
657
- //tag)
658
- new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_fileSave`, {
659
- data: {
660
- userinfo: userinfoms,
661
- modifyReason: this.f_source ? `${this.f_source}维护档案信息` : '',
662
- address: { id: this.userinfo_old.addressinfo.id, oldid: this.userinfo_old.addressinfo.id }
663
- }
664
- }, { resolveMsg: null, rejectMsg: null }).then((res1) => {
665
- if (res1.data.status == 200) {
666
- //本次修改信息包含需要审核信息
667
- // if (this.approveChange) {
668
- // //tag
669
- // let res2 = this.$androidUtil.bzLogic('safe_upUserinfoApprove', {
670
- // row: {
671
- // f_time: Util.toStandardTimeString(),
672
- // f_modifier: Vue.user.name,//Vue.user.name
673
- // f_modifier_id: Vue.user.id,//Vue.user.id
674
- // f_modify_type: '用户档案',
675
- // f_userinfoid: this.userinfo.baseinfo.base.f_userinfo_id,
676
- // f_userinfo_code: this.userinfo.baseinfo.base.f_userinfo_code,
677
- // f_approved: '未审核',
678
- // filialestr: Vue.user.orgid,//Vue.user.orgid
679
- // version: 1,
680
- // f_user_name: this.userinfo.baseinfo.base.f_user_name,
681
- // f_user_phone: this.userinfo.baseinfo.base.f_user_phone,
682
- // f_street: this.userinfo.addressinfo.f_street,
683
- // f_building: this.userinfo.addressinfo.f_building,
684
- // f_unit: this.userinfo.addressinfo.f_unit,
685
- // f_floor: this.userinfo.addressinfo.f_floor,
686
- // f_room: this.userinfo.addressinfo.f_room,
687
- // f_building_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_building_suffix,
688
- // f_unit_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_unit_suffix,
689
- // f_floor_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_floor_suffix,
690
- // f_room_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_room_suffix,
691
- // f_residential_area: this.userinfo.addressinfo.f_residential_area,
692
- // f_address: this.userinfo.addressinfo.f_address,
693
- // f_pcd: this.userinfo.addressinfo.f_pcd,
694
- // f_pcd_id: this.userinfo.addressinfo.f_pcd_id,
695
- // f_street_id: this.userinfo.addressinfo.f_street_id,
696
- // f_residential_area_id: this.userinfo.addressinfo.f_residential_area_id,
697
- // f_used_name: this.userinfo.baseinfo.base.f_used_name,
698
- // f_rent_phone: this.userinfo.baseinfo.base.f_rent_phone,
699
- // f_slice_area: this.userinfo.addressinfo.f_slice_area,
700
- // f_remark: this.userinfo.baseinfo.base.f_remark,
701
- // f_source: this.f_source,
702
- // f_meterno_path: this.f_meterno_path,
703
- // f_iscity: this.userinfo.addressinfo.f_iscity,
704
- // f_special: this.userinfo.addressinfo.f_special,
705
- // f_meternumber: this.userinfo.meterinfo[0].f_meternumber,
706
- // changemeterno: this.changemeterno
707
- // },
708
- // tablename: 't_modify_userinfo'
709
- // })
710
- // //tag)
711
- // if (res2.code == 200) {
712
- // this.$showMessage("变更用户信息成功,需要审核的信息已提交审核,等待管理员处理!")
713
- // this.enable = true
714
- // this.excessive = false
715
- // } else {
716
- // this.$showMessage("上传审核信息失败,请检查图片和网络状况是否正常!")
717
- // this.excessive = false
718
- // }
719
- // } else {
720
- // this.$showMessage("修改用户信息成功!")
721
- // this.enable = true
722
- // this.excessive = false
723
- // }
724
- this.$showMessage("修改用户信息成功!")
725
- this.enable = true
726
- this.excessive = false
727
- }
728
- }).catch((msg) => {
729
- this.$showMessage("修改用户信息失败,请检查手机网络状况!")
730
- this.excessive = false
635
+ }, { resolveMsg: null, rejectMsg: null }).then((res) => {
636
+ //tag)
637
+ if (res.data.length > 0) {
638
+ this.area = []
639
+ res.data.forEach((result) => {
640
+ this.area.push({ label: result.f_residential_area, value: result })
731
641
  })
732
-
733
642
  }
734
643
  })
735
- },
736
- imgback(header) {
737
- if (this.headername == header) {
738
- return require('../../assets/xiangxia1.png')
739
- } else {
740
- return require('../../assets/xiangyou1.png')
741
- }
742
- this.headername = header
743
- },
744
- selectVal(header) {
745
- if (this.headername == header) {
746
- this.headername = ''
747
- } else {
748
- this.headername = header
644
+ } else {
645
+ this.area = []
646
+ }
647
+ },
648
+ cameraCallBack(prop, fileName) {
649
+ HostApp.__this__.$set(prop, fileName + '?' + Math.random())
650
+ //tag
651
+ HostApp.__callback__ = null
652
+ HostApp.__this__ = null
653
+ },
654
+ takePic(prop, title) {
655
+ HostApp.__callback__ = this.cameraCallBack
656
+ HostApp.__this__ = this
657
+ //tag
658
+ let fileName
659
+ if (!this[prop] || this[prop].includes("nopic.png")) {
660
+ fileName = Util.guid() + '-' + prop + '.jpg'
661
+ } else {
662
+ fileName = Util.getFileName(this[prop])
663
+ }
664
+ HostApp._open_a_page({
665
+ type: 'boomerang',
666
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
667
+ param: {
668
+ file: fileName,
669
+ requestCode: 111,
670
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
671
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
749
672
  }
750
-
751
- },
752
- changeNewAddress() {
753
- this.userinfo.addressinfo.f_address = this.addressType == '普通地址' ? this.getAddress : this.getAddressTS
754
- },
755
- area_change() {
756
- //tag
757
- this.userinfo.addressinfo.f_residential_area = this.selectArea.f_residential_area
758
- this.userinfo.addressinfo.f_residential_area_id = this.selectArea.id
759
- this.userinfo.addressinfo.f_slice_area = this.selectArea.f_slice_area
760
- this.changeNewAddress()
761
- //this.userinfo.addressinfo.f_residential_area=this.f_residential_area.f_residential_area
762
- },
763
- async street_change() {
764
- //tag
765
- if (this.selectStreet.id) {
766
- //如果街道改变--给街道赋值!
767
- this.userinfo.addressinfo.f_street = this.selectStreet.f_street
768
- this.userinfo.addressinfo.f_street_id = this.selectStreet.id
769
- this.userinfo.addressinfo.f_iscity = this.selectStreet.f_iscity
770
- //清空当前选中小区的值
771
- this.userinfo.addressinfo.f_residential_area = ''
772
- this.userinfo.addressinfo.f_residential_area_id = ''
773
- this.userinfo.addressinfo.f_slice_area = ''
774
- this.selectArea = { id: '' }
775
- this.area = []
776
- let pcdText = ` and f_street_id=${this.selectStreet.id}`
777
- let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
673
+ })
674
+ },
675
+ delfile(prop, fileName) {
676
+ if (fileName == Vue.nopic)
677
+ return
678
+ else {
679
+ HostApp.delfile(fileName)
680
+ this[prop] = Vue.nopic
681
+ }
682
+ },
683
+ editUserInfoNoAudit() {
684
+ let checked = this.checkVal()
685
+ if (!checked.ischeck) {
686
+ this.$showMessage(checked.msg)
687
+ return
688
+ }
689
+ for (let i = 0; i < this.model.length; i++) {
690
+ this.model[i].f_user_id = this.userinfo.meterinfo[0].f_user_id
691
+ }
692
+ this.$showMessage('确定是否修改上传用户信息?', ['confirm', 'cancel']).then((res) => {
693
+ if (res === 'confirm') {
694
+ this.excessive = true
695
+ let userinfoms = Object.assign({}, this.userinfo_old.baseinfo.base)
696
+ // userinfoms.f_user_name=row.f_user_name
697
+ userinfoms.f_user_phone = this.userinfo.baseinfo.base.f_user_phone
698
+ userinfoms.f_rent_name = this.userinfo.baseinfo.base.f_rent_name
699
+ userinfoms.f_zuhu_phone = this.userinfo.baseinfo.base.f_zuhu_phone
700
+ userinfoms.f_operator_record = Vue.user.name
701
+ userinfoms.f_operatorid_record = Vue.user.id
702
+ userinfoms.f_remark = this.userinfo.baseinfo.base.f_remark
703
+ userinfoms.f_orgid_record = Vue.user.orgid
704
+ userinfoms.f_orgname_record = Vue.user.orgs
705
+ userinfoms.f_depid_record = Vue.user.depids
706
+ userinfoms.f_depname_record = Vue.user.deps
707
+ this.userinfo_old.meterinfo[0].f_gas_person = this.userinfo.meterinfo[0].f_gas_person
708
+ this.userinfo_old.meterinfo[0].f_gas_date = this.userinfo.meterinfo[0].f_gas_date
709
+ this.userinfo_old.meterinfo[0].f_adjustable_id = this.userinfo.meterinfo[0].f_adjustable_id
710
+ this.userinfo_old.meterinfo[0].f_metertitles = this.userinfo.meterinfo[0].f_metertitles
711
+ this.userinfo_old.meterinfo[0].f_position = this.userinfo.meterinfo[0].f_position
712
+ this.userinfo_old.meterinfo[0].f_aroundmeter = this.userinfo.meterinfo[0].f_aroundmeter
713
+ this.userinfo_old.meterinfo[0].f_bqf_state = this.userinfo.meterinfo[0].f_bqf_state
714
+ this.userinfo_old.meterinfo[0].f_if_direct = this.userinfo.meterinfo[0].f_if_direct
715
+ userinfoms.userfiles = []
716
+ this.userinfo_old.meterinfo[0].devicesinfo = this.model
717
+ userinfoms.userfiles.push(this.userinfo_old.meterinfo[0])
718
+ new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_fileSave`, {
778
719
  data: {
779
- items: "*",
780
- tablename: "t_area",
781
- orderitem: "id",
782
- condition: `f_orgid = '${Vue.user.orgid}' ${pcdText} `
720
+ userinfo: userinfoms,
721
+ modifyReason: this.f_source ? `${this.f_source}维护档案信息` : '',
722
+ address: {
723
+ id: this.userinfo_old.addressinfo.id,
724
+ oldid: this.userinfo_old.addressinfo.id,
725
+ f_address: this.userinfo_old.addressinfo.f_address ? this.userinfo_old.addressinfo.f_address : this.userinfo.addressinfo.f_address
726
+ }
783
727
  }
784
- }, { resolveMsg: null, rejectMsg: null })
785
- ////tag)
786
- res.data.forEach((result) => {
787
- this.area.push({ label: result.f_residential_area, value: result })
788
- })
789
- } else {
790
- this.area = []
791
- }
792
-
793
- this.changeNewAddress()
794
- },
795
- async pcd_change() {
796
- //tag
797
- if (this.selectPcd.id) {
798
- //tag
799
- //如果省市区改变-重新赋值
800
- this.userinfo.addressinfo.f_pcd = this.selectPcd.f_pcd
801
- this.userinfo.addressinfo.f_pcd_id = this.selectPcd.id
802
- //清空 选中的街道和集收单位
803
- this.selectStreet = { id: '' }
804
- this.userinfo.addressinfo.f_street = ''
805
- this.userinfo.addressinfo.f_street_id = ''
806
- this.userinfo.addressinfo.f_iscity = ''
807
- this.selectArea = { id: '' }
808
- this.userinfo.addressinfo.f_residential_area = ''
809
- this.userinfo.addressinfo.f_residential_area_id = ''
810
- this.userinfo.addressinfo.f_slice_area = ''
811
- this.streets = []
812
- let pcdText = `and f_pcd_id=${this.selectPcd.id}`
813
- let streetlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
814
- data: {
815
- items: "*",
816
- tablename: "t_street",
817
- orderitem: "id",
818
- condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
728
+ }, { resolveMsg: null, rejectMsg: null }).then((res1) => {
729
+ if (res1.data.status == 200) {
730
+ let data = this.userinfo.addressinfo
731
+ data.f_address = this.userinfo_old.addressinfo.f_address ? this.userinfo_old.addressinfo.f_address : this.userinfo.addressinfo.f_address
732
+ //
733
+ data.f_operator = Vue.user.name
734
+ new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/address_updateuseraddress`, { data: data }).then((res2) => {
735
+ this.$showMessage("修改用户地址信息成功!")
736
+ }).catch(error => {
737
+ this.$showMessage("修改用户地址信息!")
738
+ })
739
+ this.$showMessage("修改用户信息成功!")
740
+ this.enable = true
741
+ this.excessive = false
819
742
  }
820
- }, { resolveMsg: null, rejectMsg: null })
821
- streetlist.data.forEach((result) => {
822
- this.streets.push({ label: result.f_street, value: result })
743
+ }).catch((msg) => {
744
+ this.$showMessage("修改用户信息失败,请检查手机网络状况!")
745
+ this.excessive = false
823
746
  })
824
- } else {
825
- this.streets = []
826
747
  }
827
- this.changeNewAddress()
828
- },
829
- upUserState() {
830
- //tag)
831
- if (this.userinfo.meterinfo[0].f_table_state == '正常') {
832
- let data = {
833
- f_userfiles_id: {
834
- f_userfiles_id: this.userinfo.meterinfo[0].f_userfiles_id,
835
- f_table_state: '停用',
836
- version: this.userinfo.meterinfo[0].version
837
- },
838
- f_userfile_id: this.userinfo.meterinfo[0].f_userfiles_id,
839
- f_user_id: this.userinfo.meterinfo[0].f_user_id,
840
- f_userinfo_id: this.userinfo.meterinfo[0].f_userinfo_id,
841
- f_user_name: this.userinfo.baseinfo.base.f_user_name,
842
- f_comments: '安检时发现问题关闭阀门',
843
- f_othereason: '',
844
- f_operat_type: '停用',
845
- f_describe: `${Vue.user.name}对客户${this.userinfo.baseinfo.base.f_user_name}进行表具停用操作`,
846
- f_state: '有效',
847
- f_operator: Vue.user.name,//${Vue.$login.f.name}
848
- f_operatorid: Vue.user.id,
849
- f_orgid: Vue.user.orgid,
850
- f_orgname: Vue.user.orgs,
851
- f_depid: Vue.user.depids,
852
- f_depname: Vue.user.deps,
853
- f_zoneid: Vue.user.zoneid,
854
- f_zones: Vue.user.zones
748
+ })
749
+ },
750
+ editUserInfo() {
751
+ this.$showMessage('确定是否修改上传审核用户信息?', ['confirm', 'cancel']).then((res) => {
752
+ if (res === 'confirm') {
753
+ for (let i = 0; i < this.model.length; i++) {
754
+ this.model[i].f_user_id = this.userinfo.meterinfo[0].f_user_id
855
755
  }
856
- new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/entity/t_disable`,
857
- data, { resolveMsg: null, rejectMsg: null }).then((row) => {
858
- this.$showMessage('已成功关阀停气!')
859
- this.userinfo.meterinfo[0].f_table_state = '停用'
860
- })
861
- } else {
862
- this.$showMessage('该用户已被关阀停用,请勿重复操作!')
863
- }
864
-
865
- },
866
- addDevices() {
867
- //Vue.user.name
868
- let obj = {
869
- "f_operator": Vue.user.name,
870
- "f_picture": null,
871
- "f_pipe_type": null,
872
- "f_pipeinstall_date": null,
873
- "f_pipe_connection": null,
874
- "f_expire_date": null,
875
- "f_pipeexpire_date": null,
876
- "f_comments": null,
877
- "f_operate_date": Util.toStandardTimeString(),
878
- "f_operatorid": Vue.user.id,
879
- "f_service_life": '',
880
- "f_devices_num": null,
881
- "f_process_id": null,
882
- "f_devices_type": null,
883
- "f_make_date": null,
884
- "f_input_date": null,
885
- "f_state": "有效",
886
- "f_brand": null,
887
- "f_devices_model": null,
888
- "f_devices_no": null,
889
- "img": { "content": null, "filename": null }
890
- }
891
- this.model.push(obj)
892
- },
893
- delDevices(idx) {
894
- //tag
895
- this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
896
- if (res === 'confirm') {
897
- this.model.splice(idx, 1)
756
+ this.excessive = true
757
+ let userinfoms = Object.assign({}, this.userinfo_old.baseinfo.base)
758
+ //userinfoms.f_user_name=row.f_user_name
759
+ userinfoms.f_user_phone = this.userinfo.baseinfo.base.f_user_phone
760
+ userinfoms.f_rent_name = this.userinfo.baseinfo.base.f_rent_name
761
+ userinfoms.f_zuhu_phone = this.userinfo.baseinfo.base.f_zuhu_phone
762
+ userinfoms.f_operator_record = Vue.user.name
763
+ userinfoms.f_operatorid_record = Vue.user.id
764
+ userinfoms.f_remark = this.userinfo.baseinfo.base.f_remark
765
+ userinfoms.f_orgid_record = Vue.user.orgid
766
+ userinfoms.f_orgname_record = Vue.user.orgs
767
+ userinfoms.f_depid_record = Vue.user.depids
768
+ userinfoms.f_depname_record = Vue.user.deps
769
+ this.userinfo_old.meterinfo[0].f_gas_person = this.userinfo.meterinfo[0].f_gas_person
770
+ this.userinfo_old.meterinfo[0].f_gas_date = this.userinfo.meterinfo[0].f_gas_date
771
+ this.userinfo_old.meterinfo[0].f_adjustable_id = this.userinfo.meterinfo[0].f_adjustable_id
772
+ this.userinfo_old.meterinfo[0].f_metertitles = this.userinfo.meterinfo[0].f_metertitles
773
+ this.userinfo_old.meterinfo[0].f_position = this.userinfo.meterinfo[0].f_position
774
+ this.userinfo_old.meterinfo[0].f_aroundmeter = this.userinfo.meterinfo[0].f_aroundmeter
775
+ this.userinfo_old.meterinfo[0].f_bqf_state = this.userinfo.meterinfo[0].f_bqf_state
776
+ this.userinfo_old.meterinfo[0].f_if_direct = this.userinfo.meterinfo[0].f_if_direct
777
+ userinfoms.userfiles = []
778
+ this.userinfo_old.meterinfo[0].devicesinfo = this.model
779
+ for (let i = 0; i < this.devicemodel.length; i++){
780
+ this.userinfo_old.meterinfo[0].devicesinfo.push(this.devicemodel[i])
898
781
  }
899
- })
900
- },
901
- async getAreaList(text) {
902
- if (this.selectStreet.id) {
903
- this.area = []
904
- let pcdText = text ? `and f_street_id=${this.selectStreet.id} and f_residential_area like '%${text}%'` : `and f_street_id=${this.selectStreet.id}`
905
- let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
782
+ userinfoms.userfiles.push(this.userinfo_old.meterinfo[0])
783
+ //tag)
784
+ new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_fileSave`, {
906
785
  data: {
907
- items: "*",
908
- tablename: "t_area",
909
- orderitem: "id",
910
- condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
786
+ userinfo: userinfoms,
787
+ modifyReason: this.f_source ? `${this.f_source}维护档案信息` : '',
788
+ address: { id: this.userinfo_old.addressinfo.id, oldid: this.userinfo_old.addressinfo.id }
911
789
  }
912
- }, { resolveMsg: null, rejectMsg: null })
913
- ////tag)
914
- res.data.forEach((result) => {
915
- this.area.push({ label: result.f_residential_area, value: result })
916
- })
917
- //tag
918
- this.area.push({
919
- label: this.userinfo.addressinfo.f_residential_area,
920
- value: {
921
- id: this.userinfo.addressinfo.f_residential_area_id,
922
- f_residential_area: this.userinfo.addressinfo.f_residential_area
790
+ }, { resolveMsg: null, rejectMsg: null }).then((res1) => {
791
+ if (res1.data.status == 200) {
792
+ //本次修改信息包含需要审核信息
793
+ // if (this.approveChange) {
794
+ // //tag
795
+ // let res2 = this.$androidUtil.bzLogic('safe_upUserinfoApprove', {
796
+ // row: {
797
+ // f_time: Util.toStandardTimeString(),
798
+ // f_modifier: Vue.user.name,//Vue.user.name
799
+ // f_modifier_id: Vue.user.id,//Vue.user.id
800
+ // f_modify_type: '用户档案',
801
+ // f_userinfoid: this.userinfo.baseinfo.base.f_userinfo_id,
802
+ // f_userinfo_code: this.userinfo.baseinfo.base.f_userinfo_code,
803
+ // f_approved: '未审核',
804
+ // filialestr: Vue.user.orgid,//Vue.user.orgid
805
+ // version: 1,
806
+ // f_user_name: this.userinfo.baseinfo.base.f_user_name,
807
+ // f_user_phone: this.userinfo.baseinfo.base.f_user_phone,
808
+ // f_street: this.userinfo.addressinfo.f_street,
809
+ // f_building: this.userinfo.addressinfo.f_building,
810
+ // f_unit: this.userinfo.addressinfo.f_unit,
811
+ // f_floor: this.userinfo.addressinfo.f_floor,
812
+ // f_room: this.userinfo.addressinfo.f_room,
813
+ // f_building_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_building_suffix,
814
+ // f_unit_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_unit_suffix,
815
+ // f_floor_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_floor_suffix,
816
+ // f_room_suffix: this.userinfo.addressinfo.f_special == 1 ? null : this.userinfo.addressinfo.f_room_suffix,
817
+ // f_residential_area: this.userinfo.addressinfo.f_residential_area,
818
+ // f_address: this.userinfo.addressinfo.f_address,
819
+ // f_pcd: this.userinfo.addressinfo.f_pcd,
820
+ // f_pcd_id: this.userinfo.addressinfo.f_pcd_id,
821
+ // f_street_id: this.userinfo.addressinfo.f_street_id,
822
+ // f_residential_area_id: this.userinfo.addressinfo.f_residential_area_id,
823
+ // f_used_name: this.userinfo.baseinfo.base.f_used_name,
824
+ // f_rent_phone: this.userinfo.baseinfo.base.f_rent_phone,
825
+ // f_slice_area: this.userinfo.addressinfo.f_slice_area,
826
+ // f_remark: this.userinfo.baseinfo.base.f_remark,
827
+ // f_source: this.f_source,
828
+ // f_meterno_path: this.f_meterno_path,
829
+ // f_iscity: this.userinfo.addressinfo.f_iscity,
830
+ // f_special: this.userinfo.addressinfo.f_special,
831
+ // f_meternumber: this.userinfo.meterinfo[0].f_meternumber,
832
+ // changemeterno: this.changemeterno
833
+ // },
834
+ // tablename: 't_modify_userinfo'
835
+ // })
836
+ // //tag)
837
+ // if (res2.code == 200) {
838
+ // this.$showMessage("变更用户信息成功,需要审核的信息已提交审核,等待管理员处理!")
839
+ // this.enable = true
840
+ // this.excessive = false
841
+ // } else {
842
+ // this.$showMessage("上传审核信息失败,请检查图片和网络状况是否正常!")
843
+ // this.excessive = false
844
+ // }
845
+ // } else {
846
+ // this.$showMessage("修改用户信息成功!")
847
+ // this.enable = true
848
+ // this.excessive = false
849
+ // }
850
+ this.$showMessage("修改用户信息成功!")
851
+ this.enable = true
852
+ this.excessive = false
923
853
  }
854
+ }).catch((msg) => {
855
+ this.$showMessage("修改用户信息失败,请检查手机网络状况!")
856
+ this.excessive = false
924
857
  })
925
- } else {
926
- this.area = []
927
- }
928
858
 
929
- },
930
- async getStreetList() {
931
- if (this.selectPcd.id) {
932
- //tag
933
- this.streets = []
934
- let pcdText = `and f_pcd_id=${this.selectPcd.id}`
935
- let streetlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
936
- data: {
937
- items: "*",
938
- tablename: "t_street",
939
- orderitem: "id",
940
- condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
941
- }
942
- }, { resolveMsg: null, rejectMsg: null })
943
- streetlist.data.forEach((result) => {
944
- //如果第一次进来有地址id 就拿下地址区域
945
- if (this.selectStreet.id && this.selectStreet.id == result.id) {
946
- //tag)
947
- this.userinfo.addressinfo.f_iscity = result.f_iscity
948
- }
949
- this.streets.push({ label: result.f_street, value: result })
950
- })
951
- } else {
952
- this.streets = []
953
- }
954
- },
955
- changeAddressType(val) {
956
- //tag
957
- if (this.addressType == '普通地址') {
958
- this.userinfo.addressinfo.f_special = null
959
- } else if (this.addressType == '特殊地址') {
960
- this.userinfo.addressinfo.f_special = 1
961
- this.userinfo.addressinfo.f_building = null
962
- this.userinfo.addressinfo.f_unit = null
963
- this.userinfo.addressinfo.f_floor = null
964
- this.userinfo.addressinfo.f_room = null
965
859
  }
966
- this.changeNewAddress()
860
+ })
861
+ },
862
+ imgback(header) {
863
+ if (this.headername == header) {
864
+ return require('../../assets/xiangxia1.png')
865
+ } else {
866
+ return require('../../assets/xiangyou1.png')
967
867
  }
968
-
868
+ this.headername = header
969
869
  },
970
- computed: {
971
- getAddress() {
972
- return (this.userinfo.addressinfo.f_pcd ? this.userinfo.addressinfo.f_pcd : '') +
973
- (this.userinfo.addressinfo.f_street ? this.userinfo.addressinfo.f_street : '') +
974
- (this.userinfo.addressinfo.f_residential_area ? this.userinfo.addressinfo.f_residential_area : '') +
975
- (this.userinfo.addressinfo.f_building ? this.userinfo.addressinfo.f_building + (this.userinfo.addressinfo.f_building_suffix ? this.userinfo.addressinfo.f_building_suffix : '') : '') +
976
- (this.userinfo.addressinfo.f_unit ? this.userinfo.addressinfo.f_unit + (this.userinfo.addressinfo.f_unit_suffix ? this.userinfo.addressinfo.f_unit_suffix : '') : '') +
977
- (this.userinfo.addressinfo.f_floor ? this.userinfo.addressinfo.f_floor + (this.userinfo.addressinfo.f_floor_suffix ? this.userinfo.addressinfo.f_floor_suffix : '') : '') +
978
- (this.userinfo.addressinfo.f_room ? this.userinfo.addressinfo.f_room + (this.userinfo.addressinfo.f_room_suffix ? this.userinfo.addressinfo.f_room_suffix : '') : '')
979
- },
980
- getAddressTS() {
981
- return (this.userinfo.addressinfo.f_pcd ? this.userinfo.addressinfo.f_pcd : '') +
982
- (this.userinfo.addressinfo.f_street ? this.userinfo.addressinfo.f_street : '') +
983
- (this.userinfo.addressinfo.f_residential_area ? this.userinfo.addressinfo.f_residential_area : '')
870
+ selectVal(header) {
871
+ if (this.headername == header) {
872
+ this.headername = ''
873
+ } else {
874
+ this.headername = header
984
875
  }
876
+
877
+ },
878
+ changeNewAddress() {
879
+ this.userinfo.addressinfo.f_address = this.addressType == '普通地址' ? this.getAddress : this.getAddressTS
880
+ },
881
+ area_change() {
882
+ //tag
883
+ this.userinfo.addressinfo.f_residential_area = this.selectArea.f_residential_area
884
+ this.userinfo.addressinfo.f_residential_area_id = this.selectArea.id
885
+ this.userinfo.addressinfo.f_slice_area = this.selectArea.f_slice_area
886
+ this.changeNewAddress()
887
+ //this.userinfo.addressinfo.f_residential_area=this.f_residential_area.f_residential_area
985
888
  },
986
- watch: {
889
+ async street_change() {
890
+ //tag
891
+ if (this.selectStreet.id) {
892
+ //如果街道改变--给街道赋值!
893
+ this.userinfo.addressinfo.f_street = this.selectStreet.f_street
894
+ this.userinfo.addressinfo.f_street_id = this.selectStreet.id
895
+ this.userinfo.addressinfo.f_iscity = this.selectStreet.f_iscity
896
+ //清空当前选中小区的值
897
+ this.userinfo.addressinfo.f_residential_area = ''
898
+ this.userinfo.addressinfo.f_residential_area_id = ''
899
+ this.userinfo.addressinfo.f_slice_area = ''
900
+ this.selectArea = { id: '' }
901
+ this.area = []
902
+ let pcdText = ` and f_street_id=${this.selectStreet.id}`
903
+ let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
904
+ data: {
905
+ items: "*",
906
+ tablename: "t_area",
907
+ orderitem: "id",
908
+ condition: `f_orgid = '${Vue.user.orgid}' ${pcdText} `
909
+ }
910
+ }, { resolveMsg: null, rejectMsg: null })
911
+ ////tag)
912
+ res.data.forEach((result) => {
913
+ this.area.push({ label: result.f_residential_area, value: result })
914
+ })
915
+ } else {
916
+ this.area = []
917
+ }
987
918
 
988
- /*'selectPcd.id' (val) {
989
- //tag
990
- if(this.selectPcd.id){
991
- this.getStreetList()
992
- }
993
- },
994
- 'selectStreet.id' (val) {
919
+ this.changeNewAddress()
920
+ },
921
+ async pcd_change() {
922
+ //tag
923
+ if (this.selectPcd.id) {
995
924
  //tag
996
- if(this.selectStreet.id){
997
- this.getAreaList()
998
- }
999
- }*/
925
+ //如果省市区改变-重新赋值
926
+ this.userinfo.addressinfo.f_pcd = this.selectPcd.f_pcd
927
+ this.userinfo.addressinfo.f_pcd_id = this.selectPcd.id
928
+ //清空 选中的街道和集收单位
929
+ this.selectStreet = { id: '' }
930
+ this.userinfo.addressinfo.f_street = ''
931
+ this.userinfo.addressinfo.f_street_id = ''
932
+ this.userinfo.addressinfo.f_iscity = ''
933
+ this.selectArea = { id: '' }
934
+ this.userinfo.addressinfo.f_residential_area = ''
935
+ this.userinfo.addressinfo.f_residential_area_id = ''
936
+ this.userinfo.addressinfo.f_slice_area = ''
937
+ this.streets = []
938
+ let pcdText = `and f_pcd_id=${this.selectPcd.id}`
939
+ let streetlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
940
+ data: {
941
+ items: "*",
942
+ tablename: "t_street",
943
+ orderitem: "id",
944
+ condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
945
+ }
946
+ }, { resolveMsg: null, rejectMsg: null })
947
+ streetlist.data.forEach((result) => {
948
+ this.streets.push({ label: result.f_street, value: result })
949
+ })
950
+ } else {
951
+ this.streets = []
952
+ }
953
+ this.changeNewAddress()
1000
954
  },
1001
- async ready() {
1002
- /*//tag)
1003
-
955
+ upUserState() {
1004
956
  //tag)
1005
- //tag)*/
1006
- //this.f_userinfo_id=1102260
1007
- //this.f_userinfo_id=1997541
1008
- if (!this.f_userinfo_id) {
1009
- this.$showMessage("未检测到用户!")
1010
- this.enable = true
1011
- return
957
+ if (this.userinfo.meterinfo[0].f_table_state == '正常') {
958
+ let data = {
959
+ f_userfiles_id: {
960
+ f_userfiles_id: this.userinfo.meterinfo[0].f_userfiles_id,
961
+ f_table_state: '停用',
962
+ version: this.userinfo.meterinfo[0].version
963
+ },
964
+ f_userfile_id: this.userinfo.meterinfo[0].f_userfiles_id,
965
+ f_user_id: this.userinfo.meterinfo[0].f_user_id,
966
+ f_userinfo_id: this.userinfo.meterinfo[0].f_userinfo_id,
967
+ f_user_name: this.userinfo.baseinfo.base.f_user_name,
968
+ f_comments: '安检时发现问题关闭阀门',
969
+ f_othereason: '',
970
+ f_operat_type: '停用',
971
+ f_describe: `${Vue.user.name}对客户${this.userinfo.baseinfo.base.f_user_name}进行表具停用操作`,
972
+ f_state: '有效',
973
+ f_operator: Vue.user.name,//${Vue.$login.f.name}
974
+ f_operatorid: Vue.user.id,
975
+ f_orgid: Vue.user.orgid,
976
+ f_orgname: Vue.user.orgs,
977
+ f_depid: Vue.user.depids,
978
+ f_depname: Vue.user.deps,
979
+ f_zoneid: Vue.user.zoneid,
980
+ f_zones: Vue.user.zones
981
+ }
982
+ new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/entity/t_disable`,
983
+ data, { resolveMsg: null, rejectMsg: null }).then((row) => {
984
+ this.$showMessage('已成功关阀停气!')
985
+ this.userinfo.meterinfo[0].f_table_state = '停用'
986
+ })
987
+ } else {
988
+ this.$showMessage('该用户已被关阀停用,请勿重复操作!')
1012
989
  }
1013
- try {
1014
990
 
1015
- this.devices_types = Vue.$appdata.getParam('设备类型')
1016
- console.log('this.devices_types=', JSON.stringify(this.devices_types))
1017
- for (const devices_type of this.devices_types) {
1018
- console.log('Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`)=', JSON.stringify(Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`)))
1019
- this.deviceBrandOption[devices_type.label] = Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`) || []
991
+ },
992
+ addDevices() {
993
+ //Vue.user.name
994
+ let obj = {
995
+ "f_operator": Vue.user.name,
996
+ "f_picture": null,
997
+ "f_pipe_type": null,
998
+ "f_pipeinstall_date": null,
999
+ "f_pipe_connection": null,
1000
+ "f_expire_date": null,
1001
+ "f_pipeexpire_date": null,
1002
+ "f_comments": null,
1003
+ "f_operate_date": Util.toStandardTimeString(),
1004
+ "f_operatorid": Vue.user.id,
1005
+ "f_service_life": '',
1006
+ "f_devices_num": null,
1007
+ "f_process_id": null,
1008
+ "f_devices_type": null,
1009
+ "f_make_date": null,
1010
+ "f_input_date": null,
1011
+ "f_state": "有效",
1012
+ "f_brand": null,
1013
+ "f_devices_model": null,
1014
+ "f_devices_no": null,
1015
+ "img": { "content": null, "filename": null }
1016
+ }
1017
+ this.model.push(obj)
1018
+ },
1019
+ delDevices(idx) {
1020
+ //tag
1021
+ this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
1022
+ if (res === 'confirm') {
1023
+ this.model.splice(idx, 1)
1020
1024
  }
1021
- console.log('this.deviceBrandOption=', JSON.stringify(this.deviceBrandOption))
1022
- this.wz_types = Vue.$appdata.getParam('安装位置')
1023
- this.aroundmeters = Vue.$appdata.getParam('左右表')
1024
-
1025
- ////tag)
1026
- this.excessive = true
1027
- //Vue.user.orgid ${this.f_userinfo_id} 10101 ${Vue.user.orgid}
1028
-
1029
- let pcdlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1025
+ })
1026
+ },
1027
+ async getAreaList(text) {
1028
+ if (this.selectStreet.id) {
1029
+ this.area = []
1030
+ let pcdText = text ? `and f_street_id=${this.selectStreet.id} and f_residential_area like '%${text}%'` : `and f_street_id=${this.selectStreet.id}`
1031
+ let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1030
1032
  data: {
1031
1033
  items: "*",
1032
- tablename: "t_pcd",
1034
+ tablename: "t_area",
1033
1035
  orderitem: "id",
1034
- condition: `f_orgid = '${Vue.user.orgid}'`
1036
+ condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
1035
1037
  }
1036
1038
  }, { resolveMsg: null, rejectMsg: null })
1037
- //tag)
1038
- pcdlist.data.forEach((result) => {
1039
- this.pcds.push({ label: result.f_pcd, value: result })
1040
- })
1041
1039
  ////tag)
1042
- let res = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_getFilesDetail`, {
1043
- //f_userinfo_code:'12381344',
1044
- f_userinfo_id: this.f_userinfo_id
1045
- }, { resolveMsg: null, rejectMsg: null })
1040
+ res.data.forEach((result) => {
1041
+ this.area.push({ label: result.f_residential_area, value: result })
1042
+ })
1046
1043
  //tag
1044
+ this.area.push({
1045
+ label: this.userinfo.addressinfo.f_residential_area,
1046
+ value: {
1047
+ id: this.userinfo.addressinfo.f_residential_area_id,
1048
+ f_residential_area: this.userinfo.addressinfo.f_residential_area
1049
+ }
1050
+ })
1051
+ } else {
1052
+ this.area = []
1053
+ }
1054
+
1055
+ },
1056
+ async getStreetList() {
1057
+ if (this.selectPcd.id) {
1047
1058
  //tag
1048
- this.userinfo = res.data
1049
- this.userinfo_old = JSON.parse(JSON.stringify(res.data))
1050
- this.model = this.userinfo.meterinfo[0].devicesinfo.concat(this.userinfo.meterinfo[0].devicesinfonew)
1051
- //已经超期
1052
- let now = Util.toStandardDateString()
1053
- let overdue = this.model.filter(item => item.f_expire_date <= now).map(item => item.f_devices_type).join(',')
1054
- //临近超期
1059
+ this.streets = []
1060
+ let pcdText = `and f_pcd_id=${this.selectPcd.id}`
1061
+ let streetlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1062
+ data: {
1063
+ items: "*",
1064
+ tablename: "t_street",
1065
+ orderitem: "id",
1066
+ condition: `f_orgid = '${Vue.user.orgid}' ${pcdText}`
1067
+ }
1068
+ }, { resolveMsg: null, rejectMsg: null })
1069
+ streetlist.data.forEach((result) => {
1070
+ //如果第一次进来有地址id 就拿下地址区域
1071
+ if (this.selectStreet.id && this.selectStreet.id == result.id) {
1072
+ //tag)
1073
+ this.userinfo.addressinfo.f_iscity = result.f_iscity
1074
+ }
1075
+ this.streets.push({ label: result.f_street, value: result })
1076
+ })
1077
+ } else {
1078
+ this.streets = []
1079
+ }
1080
+ },
1081
+ changeAddressType(val) {
1082
+ //tag
1083
+ if (this.addressType == '普通地址') {
1084
+ this.userinfo.addressinfo.f_special = null
1085
+ } else if (this.addressType == '特殊地址') {
1086
+ this.userinfo.addressinfo.f_special = 1
1087
+ this.userinfo.addressinfo.f_building = null
1088
+ this.userinfo.addressinfo.f_unit = null
1089
+ this.userinfo.addressinfo.f_floor = null
1090
+ this.userinfo.addressinfo.f_room = null
1091
+ }
1092
+ this.changeNewAddress()
1093
+ }
1055
1094
 
1056
- const advent_time = (this.$appdata.getSingleValue('设备超期提醒') || 7) * 1000 * 60 * 60 * 24
1057
- let advent = this.model.filter(item => (new Date(item.f_expire_date).getTime() - new Date().getTime()) >=0 && (new Date(item.f_expire_date).getTime() - new Date().getTime()) <= advent_time ).map(item => item.f_devices_type).join(',')
1095
+ },
1096
+ computed: {
1097
+ getAddress() {
1098
+ return (this.userinfo.addressinfo.f_pcd ? this.userinfo.addressinfo.f_pcd : '') +
1099
+ (this.userinfo.addressinfo.f_street ? this.userinfo.addressinfo.f_street : '') +
1100
+ (this.userinfo.addressinfo.f_residential_area ? this.userinfo.addressinfo.f_residential_area : '') +
1101
+ (this.userinfo.addressinfo.f_building ? this.userinfo.addressinfo.f_building + (this.userinfo.addressinfo.f_building_suffix ? this.userinfo.addressinfo.f_building_suffix : '') : '') +
1102
+ (this.userinfo.addressinfo.f_unit ? this.userinfo.addressinfo.f_unit + (this.userinfo.addressinfo.f_unit_suffix ? this.userinfo.addressinfo.f_unit_suffix : '') : '') +
1103
+ (this.userinfo.addressinfo.f_floor ? this.userinfo.addressinfo.f_floor + (this.userinfo.addressinfo.f_floor_suffix ? this.userinfo.addressinfo.f_floor_suffix : '') : '') +
1104
+ (this.userinfo.addressinfo.f_room ? this.userinfo.addressinfo.f_room + (this.userinfo.addressinfo.f_room_suffix ? this.userinfo.addressinfo.f_room_suffix : '') : '')
1105
+ },
1106
+ getAddressTS() {
1107
+ return (this.userinfo.addressinfo.f_pcd ? this.userinfo.addressinfo.f_pcd : '') +
1108
+ (this.userinfo.addressinfo.f_street ? this.userinfo.addressinfo.f_street : '') +
1109
+ (this.userinfo.addressinfo.f_residential_area ? this.userinfo.addressinfo.f_residential_area : '')
1110
+ }
1111
+ },
1112
+ watch: {
1058
1113
 
1059
- if (overdue && advent) {
1060
- this.$showMessage(`${overdue}设备已过期,${advent}设备临近超期`)
1061
- } else if (advent) {
1062
- this.$showMessage(`${advent}设备临近超期`)
1063
- } else if (overdue) {
1064
- this.$showMessage(`${overdue}设备已过期`)
1114
+ /*'selectPcd.id' (val) {
1115
+ //tag
1116
+ if(this.selectPcd.id){
1117
+ this.getStreetList()
1118
+ }
1119
+ },
1120
+ 'selectStreet.id' (val) {
1121
+ //tag
1122
+ if(this.selectStreet.id){
1123
+ this.getAreaList()
1124
+ }
1125
+ }*/
1126
+ },
1127
+ async ready() {
1128
+ /*//tag)
1129
+
1130
+ //tag)
1131
+ //tag)*/
1132
+ //this.f_userinfo_id=1102260
1133
+ //this.f_userinfo_id=1997541
1134
+ if (!this.f_userinfo_id) {
1135
+ this.$showMessage("未检测到用户!")
1136
+ this.enable = true
1137
+ return
1138
+ }
1139
+ try {
1140
+
1141
+ this.devices_types = Vue.$appdata.getParam('设备类型')
1142
+ console.log('this.devices_types=', JSON.stringify(this.devices_types))
1143
+ for (const devices_type of this.devices_types) {
1144
+ console.log('Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`)=', JSON.stringify(Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`)))
1145
+ this.deviceBrandOption[devices_type.label] = Vue.$appdata.getParam(`档案设备信息-${devices_type.label}品牌`) || []
1146
+ }
1147
+ console.log('this.deviceBrandOption=', JSON.stringify(this.deviceBrandOption))
1148
+ this.wz_types = Vue.$appdata.getParam('安装位置')
1149
+ this.aroundmeters = Vue.$appdata.getParam('左右表')
1150
+
1151
+ ////tag)
1152
+ this.excessive = true
1153
+ //Vue.user.orgid ${this.f_userinfo_id} 10101 ${Vue.user.orgid}
1154
+
1155
+ let pcdlist = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1156
+ data: {
1157
+ items: "*",
1158
+ tablename: "t_pcd",
1159
+ orderitem: "id",
1160
+ condition: `f_orgid = '${Vue.user.orgid}'`
1065
1161
  }
1066
- this.selectArea.id = this.userinfo.addressinfo.f_residential_area_id
1067
- this.selectPcd.id = this.userinfo.addressinfo.f_pcd_id
1068
- this.selectPcd.f_pcd = this.userinfo.addressinfo.f_pcd
1069
- this.selectStreet.id = this.userinfo.addressinfo.f_street_id
1070
- this.selectStreet.f_street = this.userinfo.addressinfo.f_street
1071
- await this.getStreetList()
1072
- await this.getAreaList()
1073
- this.excessive = false
1074
- this.addressType = this.userinfo.addressinfo.f_special == 1 ? '特殊地址' : '普通地址'
1075
- //this.userinfo.addressinfo.f_special=1
1076
- //tag
1077
- } catch (e) {
1078
- this.excessive = false
1079
- this.enable = true
1080
- this.$showMessage('获取用户信息出错,请检查网络状况!')
1162
+ }, { resolveMsg: null, rejectMsg: null })
1163
+ //tag)
1164
+ pcdlist.data.forEach((result) => {
1165
+ this.pcds.push({ label: result.f_pcd, value: result })
1166
+ })
1167
+ ////tag)
1168
+ let res = await new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/logic/filemanage_getFilesDetail`, {
1169
+ //f_userinfo_code:'12381344',
1170
+ f_userinfo_id: this.f_userinfo_id
1171
+ }, { resolveMsg: null, rejectMsg: null })
1172
+ //tag
1173
+ //tag
1174
+ this.userinfo = res.data
1175
+ this.userinfo_old = JSON.parse(JSON.stringify(res.data))
1176
+ this.model = this.userinfo.meterinfo[0].devicesinfo.concat(this.userinfo.meterinfo[0].devicesinfonew)
1177
+ //已经超期
1178
+ let now = Util.toStandardDateString()
1179
+ let overdue = this.model.filter(item => item.f_expire_date <= now).map(item => item.f_devices_type).join(',')
1180
+ //临近超期
1181
+
1182
+ const advent_time = (this.$appdata.getSingleValue('设备超期提醒') || 7) * 1000 * 60 * 60 * 24
1183
+ const nowTime = new Date().getTime()
1184
+ const adventTimeLimit = nowTime + advent_time
1185
+ const advent = this.model
1186
+ .filter(item => {
1187
+ const expireTime = new Date(item.f_expire_date).getTime()
1188
+ return expireTime >= nowTime && expireTime <= adventTimeLimit
1189
+ })
1190
+ .map(item => {
1191
+ const expireTime = new Date(item.f_expire_date).getTime()
1192
+ const daysLeft = Math.round((expireTime - nowTime) / (1000 * 60 * 60 * 24))
1193
+ return `${item.f_devices_type}设备还有${daysLeft >= 0 ? daysLeft : 0}天超期`
1194
+ })
1195
+ .join(',')
1196
+ if (overdue && advent) {
1197
+ this.$showMessage(`${overdue}设备已过期,${advent}`)
1198
+ } else if (advent) {
1199
+ this.$showMessage(`${advent}`)
1200
+ } else if (overdue) {
1201
+ this.$showMessage(`${overdue}设备已过期`)
1081
1202
  }
1082
- new HttpResetClass().load('get', `${this.$androidUtil.getProxyUrl()}/rs/vue/UserAddress.json`, { data: {} }, {
1203
+ this.selectArea.id = this.userinfo.addressinfo.f_residential_area_id
1204
+ this.selectPcd.id = this.userinfo.addressinfo.f_pcd_id
1205
+ this.selectPcd.f_pcd = this.userinfo.addressinfo.f_pcd
1206
+ this.selectStreet.id = this.userinfo.addressinfo.f_street_id
1207
+ this.selectStreet.f_street = this.userinfo.addressinfo.f_street
1208
+ await this.getStreetList()
1209
+ await this.getAreaList()
1210
+ this.excessive = false
1211
+ this.addressType = this.userinfo.addressinfo.f_special == 1 ? '特殊地址' : '普通地址'
1212
+ //this.userinfo.addressinfo.f_special=1
1213
+ //tag
1214
+ } catch (e) {
1215
+ this.excessive = false
1216
+ this.enable = true
1217
+ this.$showMessage('获取用户信息出错,请检查网络状况!')
1218
+ }
1219
+ new HttpResetClass().load('get', `${this.$androidUtil.getProxyUrl()}/rs/vue/UserAddress.json`, { data: {} }, {
1220
+ resolveMsg: null,
1221
+ rejectMsg: null
1222
+ }).then((addressUnit) => {
1223
+ //tag
1224
+ //tag
1225
+ //tag
1226
+ //tag
1227
+ this.userinfo.addressinfo.f_building_suffix = addressUnit.data.f_building_suffix
1228
+ this.userinfo.addressinfo.f_unit_suffix = addressUnit.data.f_unit_suffix
1229
+ this.userinfo.addressinfo.f_floor_suffix = addressUnit.data.f_floor_suffix
1230
+ this.userinfo.addressinfo.f_room_suffix = addressUnit.data.f_room_suffix
1231
+ }).catch((msg) => {
1232
+ //tag)
1233
+ })
1234
+ this.showBox = this.$appdata.getSingleValue('档案审核是否显示调压箱') == '是' ? true : false
1235
+ console.log(this.showBox)
1236
+ if (this.showBox) {
1237
+ // 获取调压箱
1238
+ new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/adjustableboxQuery`, { data: { condition: '1 = 1' } }, {
1083
1239
  resolveMsg: null,
1084
1240
  rejectMsg: null
1085
- }).then((addressUnit) => {
1086
- //tag
1087
- //tag
1088
- //tag
1089
- //tag
1090
- this.userinfo.addressinfo.f_building_suffix = addressUnit.data.f_building_suffix
1091
- this.userinfo.addressinfo.f_unit_suffix = addressUnit.data.f_unit_suffix
1092
- this.userinfo.addressinfo.f_floor_suffix = addressUnit.data.f_floor_suffix
1093
- this.userinfo.addressinfo.f_room_suffix = addressUnit.data.f_room_suffix
1241
+ }).then((res) => {
1242
+ const boxOptions = []
1243
+ for (const data of res.data) {
1244
+ const one = {
1245
+ label: data.f_adjustable_id + data.f_adjustable_name,
1246
+ value: Number(data.f_adjustable_id)
1247
+ }
1248
+ boxOptions.push(one)
1249
+ }
1250
+ this.boxOptions = JSON.parse(JSON.stringify(boxOptions))
1251
+ console.log(this.boxOptions)
1094
1252
  }).catch((msg) => {
1095
1253
  //tag)
1096
1254
  })
1097
- this.showBox = this.$appdata.getSingleValue('档案审核是否显示调压箱') == '是' ? true : false
1098
- console.log(this.showBox)
1099
- if (this.showBox) {
1100
- // 获取调压箱
1101
- new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/rs/sql/adjustableboxQuery`, { data: { condition: '1 = 1' } }, {
1102
- resolveMsg: null,
1103
- rejectMsg: null
1104
- }).then((res) => {
1105
- const boxOptions = []
1106
- for (const data of res.data) {
1107
- const one = {
1108
- label: data.f_adjustable_id + data.f_adjustable_name,
1109
- value: Number(data.f_adjustable_id)
1110
- }
1111
- boxOptions.push(one)
1112
- }
1113
- this.boxOptions = JSON.parse(JSON.stringify(boxOptions))
1114
- console.log(this.boxOptions)
1115
- }).catch((msg) => {
1116
- //tag)
1117
- })
1118
- }
1119
1255
  }
1120
1256
  }
1257
+ }
1121
1258
  </script>
1122
1259
  <style lang="less" scoped>
1123
- .butt3 {
1124
- float: right;
1125
- width: 12px;
1126
- margin: 1% 2% 0 0;
1127
- }
1260
+ .butt3 {
1261
+ float: right;
1262
+ width: 12px;
1263
+ margin: 1% 2% 0 0;
1264
+ }
1128
1265
 
1129
- .rightipt {
1130
- width: 60%;
1131
- float: left;
1132
- margin-left: 5%;
1133
- }
1266
+ .rightipt {
1267
+ width: 60%;
1268
+ float: left;
1269
+ margin-left: 5%;
1270
+ }
1134
1271
 
1135
- .righttxt {
1136
- border: none;
1137
- margin-left: 5px;
1138
- /*border-left: 5px solid #A2C2EB;*/
1139
- float: left;
1140
- width: 25%;
1141
- margin-bottom: 3px;
1142
- text-align: left;
1143
- word-wrap: break-word;
1144
- white-space: normal;
1145
- }
1272
+ .righttxt {
1273
+ border: none;
1274
+ margin-left: 5px;
1275
+ /*border-left: 5px solid #A2C2EB;*/
1276
+ float: left;
1277
+ width: 25%;
1278
+ margin-bottom: 3px;
1279
+ text-align: left;
1280
+ word-wrap: break-word;
1281
+ white-space: normal;
1282
+ }
1146
1283
 
1147
- .tit1 {
1148
- background-image: url('../../assets/用户姓名.png');
1149
- background-repeat: no-repeat;
1150
- background-position: center;
1151
- }
1284
+ .tit1 {
1285
+ background-image: url('../../assets/用户姓名.png');
1286
+ background-repeat: no-repeat;
1287
+ background-position: center;
1288
+ }
1152
1289
 
1153
- .spanboder {
1154
- border-bottom: 2px solid #499edf;
1155
- padding-bottom: 8px
1156
- }
1290
+ .spanboder {
1291
+ border-bottom: 2px solid #499edf;
1292
+ padding-bottom: 8px
1293
+ }
1157
1294
 
1158
- #upuserinfo_sel /deep/ ul {
1159
- width: 100% !important;
1160
- left: 0 !important;
1161
- }
1295
+ #upuserinfo_sel /deep/ ul {
1296
+ width: 100% !important;
1297
+ left: 0 !important;
1298
+ }
1162
1299
 
1163
- .btn-photo {
1164
- border: 0;
1165
- border-radius: 7px;
1166
- background-color: #7dc1f4;
1167
- font: 15px PingFang-SC-Bold;
1168
- height: 20%;
1169
- }
1300
+ .btn-photo {
1301
+ border: 0;
1302
+ border-radius: 7px;
1303
+ background-color: #7dc1f4;
1304
+ font: 15px PingFang-SC-Bold;
1305
+ height: 20%;
1306
+ }
1170
1307
 
1171
- .panel-self {
1172
- border-radius: 10px;
1173
- border: 1px solid #499EDF;
1174
- background-color: #F8F8F8;
1175
- }
1308
+ .panel-self {
1309
+ border-radius: 10px;
1310
+ border: 1px solid #499EDF;
1311
+ background-color: #F8F8F8;
1312
+ }
1176
1313
 
1177
- .div-photo {
1178
- width: auto;
1179
- height: auto;
1180
- /* margin-top: 10px; */
1181
- position: absolute;
1182
- bottom: 10px;
1183
- right: 10px;
1184
- }
1314
+ .div-photo {
1315
+ width: auto;
1316
+ height: auto;
1317
+ /* margin-top: 10px; */
1318
+ position: absolute;
1319
+ bottom: 10px;
1320
+ right: 10px;
1321
+ }
1185
1322
  </style>
1186
1323
  <style lang="less">
1187
- #upuserinfo_sel ul {
1188
- width: 100% !important;
1189
- left: 0 !important;
1190
- }
1324
+ #upuserinfo_sel ul {
1325
+ width: 100% !important;
1326
+ left: 0 !important;
1327
+ }
1191
1328
  </style>