apply-clients 4.1.73 → 4.1.74

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.
@@ -2,6 +2,7 @@
2
2
 
3
3
  <div class="auto clearfix">
4
4
  <show-back-reason :selectdata="show_data"></show-back-reason>
5
+ <stop-install :data="show_data" v-if="stope_view"></stop-install>
5
6
  </div>
6
7
 
7
8
  <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
@@ -37,6 +38,7 @@ export default {
37
38
  json_datas: null, // Json配置文件集合
38
39
  showview: false, // 控制显示service-view组件
39
40
  show_data: null, // 给view层显示的数据
41
+ stope_view: false
40
42
  }
41
43
 
42
44
  },
@@ -128,7 +130,9 @@ export default {
128
130
  // 控制组件
129
131
  if (this.data.components) {
130
132
  this.data.components.forEach(item => {
131
- item.mark = 0
133
+ if (!item.mark) {
134
+ item.mark = 0
135
+ }
132
136
  })
133
137
  }
134
138
 
@@ -353,7 +357,190 @@ export default {
353
357
  }
354
358
  }
355
359
  },
360
+ setLabelOptions(label, options) {
361
+ for (const item of this.show_data.fields) {
362
+ if (item.label === label) {
363
+ item.options = options
364
+ }
365
+ }
366
+ },
367
+ showLabels(...labels) {
368
+ for (const item of this.show_data.fields) {
369
+ if (labels.includes(item.label)) {
370
+ item.hidden = false
371
+ }
372
+ }
373
+ },
374
+ hideLabels(...labels) {
375
+ for (const item of this.show_data.fields) {
376
+ if (labels.includes(item.label)) {
377
+ item.hidden = true
378
+ }
379
+ }
380
+ },
381
+ requiredLabels(...labels) {
382
+ for (const item of this.show_data.fields) {
383
+ if (labels.includes(item.label)) {
384
+ item.required = true
385
+ }
386
+ }
387
+ },
388
+ electiveLabels(...labels) {
389
+ for (const item of this.show_data.fields) {
390
+ if (labels.includes(item.label)) {
391
+ item.required = false
392
+ }
393
+ }
394
+ },
395
+ readonlyLabels(...labels) {
396
+ for (const item of this.show_data.fields) {
397
+ if (labels.includes(item.label)) {
398
+ item.readonly = true
399
+ item.disabled = true
400
+ }
401
+ }
402
+ },
403
+ readwriteLabels(...labels) {
404
+ for (const item of this.show_data.fields) {
405
+ if (labels.includes(item.label)) {
406
+ item.readonly = false
407
+ item.disabled = false
408
+ }
409
+ }
410
+ },
411
+ showButtons(...buttons) {
412
+ for (const item of this.show_data.buttons) {
413
+ if (buttons.includes(item.button_name)) {
414
+ item.hidden = false
415
+ }
416
+ }
417
+ },
418
+ hideButtons(...buttons) {
419
+ for (const item of this.show_data.buttons) {
420
+ if (buttons.includes(item.button_name)) {
421
+ item.hidden = true
422
+ }
423
+ }
424
+ },
425
+ // 获取区县
426
+ async getPcd() {
427
+ let data = {
428
+ tablename: 't_pcd',
429
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
430
+ }
431
+ let http = new HttpResetClass()
432
+ let res = await http.load(
433
+ 'POST',
434
+ `rs/sql/singleTable`,
435
+ {data: data},
436
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
437
+ )
438
+
439
+ let pcd = res.data.map(item => {
440
+ return {
441
+ label: item.f_pcd,
442
+ value: item.f_pcd
443
+ }
444
+ })
445
+ this.setLabelOptions('区域',pcd)
446
+ },
447
+ // 地址关联
448
+ addressInitialization() {
449
+ this.$getConfig(this, 'UserAddress')
450
+
451
+ let f_address_type = this.show_data.f_address_type
356
452
 
453
+ for (const item of this.show_data.fields) {
454
+ if (f_address_type === '民用地址') {
455
+ if (item.label === '区域' || item.label === '街道' || item.label === '小区' || item.label === '门牌号') {
456
+ item.hidden = false
457
+ item.required = true
458
+ }
459
+ if (item.label === '楼号' || item.label === '单元' || item.label === '楼层') {
460
+ item.hidden = false
461
+ item.required = false
462
+ }
463
+ if (item.label === '地址') {
464
+ item.readonly = true
465
+ }
466
+ }
467
+ if (f_address_type === '特殊地址') {
468
+ if (item.label === '区域' || item.label === '街道') {
469
+ item.hidden = false
470
+ item.required = true
471
+ }
472
+ if (item.label === '小区') {
473
+ item.hidden = true
474
+ item.required = false
475
+ }
476
+ if (item.label === '楼号' || item.label === '单元' || item.label === '楼层' || item.label === '门牌号') {
477
+ item.hidden = true
478
+ item.required = false
479
+ }
480
+ if (item.label === '地址') {
481
+ item.readonly = false
482
+ }
483
+ }
484
+
485
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
486
+ item.hidden = true
487
+ }
488
+ }
489
+ },
490
+ async streetChange() {
491
+ if (isEmpty(this.show_data.f_street)) {
492
+ return
493
+ }
494
+
495
+ let data = {
496
+ tablename: 't_area',
497
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
498
+ }
499
+ let http = new HttpResetClass()
500
+ let res = await http.load(
501
+ 'POST',
502
+ `rs/sql/singleTable`,
503
+ {data: data},
504
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
505
+ )
506
+
507
+ this.setLabelOptions('小区', res.data.map(item => {
508
+ return {
509
+ label: item.f_residential_area,
510
+ value: item.f_residential_area
511
+ }
512
+ }))
513
+ },
514
+ async pcdChange() {
515
+ if (isEmpty(this.show_data.f_pcd)) {
516
+ return
517
+ }
518
+
519
+ let data = {
520
+ tablename: 't_street',
521
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
522
+ }
523
+ let f_address_type = this.getLableValue('地址类型')
524
+
525
+ if (f_address_type === '民用地址') {
526
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
527
+ }
528
+
529
+ let http = new HttpResetClass()
530
+ let res = await http.load(
531
+ 'POST',
532
+ `rs/sql/singleTable`,
533
+ {data: data},
534
+ {resolveMsg: null, rejectMsg: '街道查询失败!!!'}
535
+ )
536
+
537
+ this.setLabelOptions('街道', res.data.map(item => {
538
+ return {
539
+ label: item.f_street,
540
+ value: item.f_street
541
+ }
542
+ }))
543
+ },
357
544
  async buttonBefore(model) {
358
545
  if (
359
546
  model.button.button_name === '提交' &&
@@ -383,6 +570,7 @@ export default {
383
570
  addressType() {
384
571
  for (const item of this.show_data.fields) {
385
572
  if (item.label === '小区' && this.show_data.f_address_type === '民用地址') {
573
+ item.hidden = false
386
574
  item.required = true
387
575
  }
388
576
  if (item.label === '小区' && this.show_data.f_address_type === '特殊地址') {
@@ -390,9 +578,6 @@ export default {
390
578
  }
391
579
  if (
392
580
  (
393
- item.label === '楼号' ||
394
- item.label === '单元' ||
395
- item.label === '楼层' ||
396
581
  item.label === '门牌号'
397
582
  ) && this.show_data.f_address_type === '民用地址'
398
583
  ) {
@@ -400,6 +585,17 @@ export default {
400
585
  item.hidden = false
401
586
  item.value = null
402
587
  }
588
+ if (
589
+ (
590
+ item.label === '楼号' ||
591
+ item.label === '单元' ||
592
+ item.label === '楼层'
593
+ ) && this.show_data.f_address_type === '民用地址'
594
+ ) {
595
+ item.required = false
596
+ item.hidden = false
597
+ item.value = null
598
+ }
403
599
  if (
404
600
  (
405
601
  item.label === '楼号' ||
@@ -413,6 +609,7 @@ export default {
413
609
  item.value = null
414
610
  }
415
611
  }
612
+ this.getPcd()
416
613
  }
417
614
  // ========================= 武安 =================================
418
615
  },
@@ -468,7 +665,7 @@ export default {
468
665
  async 'onchange'(index) {
469
666
  console.log('失去焦点')
470
667
  // ========================= 武安 =================================
471
- if (this.show_data.defname === '报建登记'){
668
+ if (this.show_data.defname === '报建登记' || this.show_data.defname === '业务申请'){
472
669
  if (this.show_data.fields[index].label === '是否具备安装条件') {
473
670
  for (const button of this.show_data.buttons) {
474
671
  if (this.show_data.fields[index].value === '否'&& button.button_name === '退回') {
@@ -607,6 +804,7 @@ export default {
607
804
  // }
608
805
  // 地址拼接
609
806
  if (
807
+ this.show_data.fields[index].label === '区域' ||
610
808
  this.show_data.fields[index].label === '街道' ||
611
809
  this.show_data.fields[index].label === '小区' ||
612
810
  this.show_data.fields[index].label === '楼号' ||
@@ -616,9 +814,9 @@ export default {
616
814
  ) {
617
815
  let f_address = null
618
816
  if (this.show_data.f_address_type !== '民用地址') {
619
- f_address = this.getLableValue('街道') + this.getLableValue('小区')
817
+ f_address = this.getLableValue('区域') + this.getLableValue('街道') + this.getLableValue('小区')
620
818
  } else {
621
- f_address = this.getLableValue('街道') +
819
+ f_address = this.getLableValue('区域') + this.getLableValue('街道') +
622
820
  this.getLableValue('小区') +
623
821
  this.getLableValue('楼号') +
624
822
  (isEmpty(this.getLableValue('楼号')) ? '' : '号楼') +
@@ -878,6 +1076,119 @@ export default {
878
1076
 
879
1077
  this.$dispatch('breakControl', this.show_data)
880
1078
  },
1079
+ // 选择用户档案信息
1080
+ 'selectUserinfo'(row) {
1081
+ console.log("当前选择数据",row)
1082
+ if (this.selectdata.f_apply_type === '拆改装报建'){
1083
+ this.showLabels('用户编号')
1084
+ this.hideLabels('地址类型','区域','街道','小区','楼号','单元','楼层','门牌号')
1085
+ this.electiveLabels('地址类型','区域','街道','小区','楼号','单元','楼层','门牌号')
1086
+ this.show_data.f_address_type = '民用地址'
1087
+ this.show_data.f_pcd = row.f_pcd
1088
+ this.show_data.f_street = row.f_street
1089
+ this.show_data.f_residential_area = row.f_residential_area
1090
+ this.show_data.f_building = row.f_building
1091
+ this.show_data.f_unit = row.f_unit
1092
+ this.show_data.f_floor = row.f_floor
1093
+ this.show_data.f_room = row.f_room
1094
+ this.selectdata.flag = '旧用户'
1095
+ }
1096
+ this.setLabelValue('用户编号', row.f_userinfo_code)
1097
+ this.setLabelValue('用户名称', row.f_user_name)
1098
+ this.setLabelValue('用户电话', row.f_user_phone)
1099
+ this.setLabelValue('证件类型', row.f_credentials)
1100
+ this.setLabelValue('证件号码', row.f_idnumber)
1101
+ this.setLabelValue('地址', row.f_address)
1102
+
1103
+ this.selectdata.f_userinfo_id = row.f_userinfo_id
1104
+ this.selectdata.f_userinfo_code = row.f_userinfo_code
1105
+ console.log("当前选择数据",this.show_data)
1106
+ },
1107
+ async 'streetChange'(index) {
1108
+ if (isEmpty(this.show_data.f_street)) {
1109
+ return
1110
+ }
1111
+
1112
+ this.setLabelValue('小区', null)
1113
+
1114
+ let data = {
1115
+ tablename: 't_area',
1116
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
1117
+ }
1118
+ let http = new HttpResetClass()
1119
+ let res = await http.load(
1120
+ 'POST',
1121
+ `rs/sql/singleTable`,
1122
+ {data: data},
1123
+ {resolveMsg: null, rejectMsg: '小区!!!'}
1124
+ )
1125
+
1126
+ this.setLabelOptions('小区', res.data.map(item => {
1127
+ return {
1128
+ label: item.f_residential_area,
1129
+ value: item.f_residential_area
1130
+ }
1131
+ }))
1132
+ },
1133
+ // 区县失去焦点
1134
+ async 'pcdChange'(index) {
1135
+ if (isEmpty(this.show_data.f_pcd)) {
1136
+ return
1137
+ }
1138
+
1139
+ this.setLabelValue('街道', null)
1140
+ this.setLabelValue('小区', null)
1141
+
1142
+
1143
+ let data = {
1144
+ tablename: 't_street',
1145
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1146
+ }
1147
+ let f_address_type = this.getLableValue('地址类型')
1148
+
1149
+ if (f_address_type === '民用地址') {
1150
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1151
+ }
1152
+
1153
+ let http = new HttpResetClass()
1154
+ let res = await http.load(
1155
+ 'POST',
1156
+ `rs/sql/singleTable`,
1157
+ {data: data},
1158
+ {resolveMsg: null, rejectMsg: '街道查询失败!!!'}
1159
+ )
1160
+
1161
+ this.setLabelOptions('街道', res.data.map(item => {
1162
+ return {
1163
+ label: item.f_street,
1164
+ value: item.f_street
1165
+ }
1166
+ }))
1167
+ },
1168
+ 'buttonChange' (index) {
1169
+ if (this.show_data.fields[index].value === '否') {
1170
+ console.log("测试")
1171
+ this.hideButtons('下发','提交')
1172
+ this.showButtons('退回','终止')
1173
+ } else {
1174
+ this.hideButtons('退回','终止')
1175
+ this.showButtons('下发','提交')
1176
+ }
1177
+ },
1178
+ async 'stopApply'() {
1179
+ this.stope_view = true
1180
+ this.showview = false
1181
+ },
1182
+ async 'signUserInfo' (index) {
1183
+ if (this.show_data.fields[index].value === '是') {
1184
+ console.log("测试")
1185
+ this.showLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
1186
+ this.requiredLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '门牌号', '地址')
1187
+ } else {
1188
+ this.hideLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
1189
+ this.electiveLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
1190
+ }
1191
+ },
881
1192
  // onetomany模态框监听事件
882
1193
  async 'onchange_modal'(index, i) {
883
1194
  },