apply-clients 4.1.73 → 4.1.76

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,8 +357,199 @@ 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
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
+ }
356
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) {
545
+ if (model.defname === '报建登记' && model.button.button_name === '提交') {
546
+
547
+ if (model.f_is_user === '是') {
548
+ if (isEmpty(model.f_user_name) || isEmpty(model.f_phone) || isEmpty(model.f_address)) {
549
+ throw '用户信息未填写完整,无法提交!!!'
550
+ }
551
+ }
552
+ }
358
553
  if (
359
554
  model.button.button_name === '提交' &&
360
555
  model.defname === '收费' &&
@@ -383,6 +578,7 @@ export default {
383
578
  addressType() {
384
579
  for (const item of this.show_data.fields) {
385
580
  if (item.label === '小区' && this.show_data.f_address_type === '民用地址') {
581
+ item.hidden = false
386
582
  item.required = true
387
583
  }
388
584
  if (item.label === '小区' && this.show_data.f_address_type === '特殊地址') {
@@ -390,9 +586,6 @@ export default {
390
586
  }
391
587
  if (
392
588
  (
393
- item.label === '楼号' ||
394
- item.label === '单元' ||
395
- item.label === '楼层' ||
396
589
  item.label === '门牌号'
397
590
  ) && this.show_data.f_address_type === '民用地址'
398
591
  ) {
@@ -400,6 +593,17 @@ export default {
400
593
  item.hidden = false
401
594
  item.value = null
402
595
  }
596
+ if (
597
+ (
598
+ item.label === '楼号' ||
599
+ item.label === '单元' ||
600
+ item.label === '楼层'
601
+ ) && this.show_data.f_address_type === '民用地址'
602
+ ) {
603
+ item.required = false
604
+ item.hidden = false
605
+ item.value = null
606
+ }
403
607
  if (
404
608
  (
405
609
  item.label === '楼号' ||
@@ -413,6 +617,7 @@ export default {
413
617
  item.value = null
414
618
  }
415
619
  }
620
+ this.getPcd()
416
621
  }
417
622
  // ========================= 武安 =================================
418
623
  },
@@ -468,7 +673,7 @@ export default {
468
673
  async 'onchange'(index) {
469
674
  console.log('失去焦点')
470
675
  // ========================= 武安 =================================
471
- if (this.show_data.defname === '报建登记'){
676
+ if (this.show_data.defname === '报建登记' || this.show_data.defname === '业务申请'){
472
677
  if (this.show_data.fields[index].label === '是否具备安装条件') {
473
678
  for (const button of this.show_data.buttons) {
474
679
  if (this.show_data.fields[index].value === '否'&& button.button_name === '退回') {
@@ -607,6 +812,7 @@ export default {
607
812
  // }
608
813
  // 地址拼接
609
814
  if (
815
+ this.show_data.fields[index].label === '区域' ||
610
816
  this.show_data.fields[index].label === '街道' ||
611
817
  this.show_data.fields[index].label === '小区' ||
612
818
  this.show_data.fields[index].label === '楼号' ||
@@ -616,9 +822,9 @@ export default {
616
822
  ) {
617
823
  let f_address = null
618
824
  if (this.show_data.f_address_type !== '民用地址') {
619
- f_address = this.getLableValue('街道') + this.getLableValue('小区')
825
+ f_address = this.getLableValue('区域') + this.getLableValue('街道') + this.getLableValue('小区')
620
826
  } else {
621
- f_address = this.getLableValue('街道') +
827
+ f_address = this.getLableValue('区域') + this.getLableValue('街道') +
622
828
  this.getLableValue('小区') +
623
829
  this.getLableValue('楼号') +
624
830
  (isEmpty(this.getLableValue('楼号')) ? '' : '号楼') +
@@ -878,6 +1084,119 @@ export default {
878
1084
 
879
1085
  this.$dispatch('breakControl', this.show_data)
880
1086
  },
1087
+ // 选择用户档案信息
1088
+ 'selectUserinfo'(row) {
1089
+ console.log("当前选择数据",row)
1090
+ if (this.selectdata.f_apply_type === '拆改装报建'){
1091
+ this.showLabels('用户编号')
1092
+ this.hideLabels('地址类型','区域','街道','小区','楼号','单元','楼层','门牌号')
1093
+ this.electiveLabels('地址类型','区域','街道','小区','楼号','单元','楼层','门牌号')
1094
+ this.show_data.f_address_type = '民用地址'
1095
+ this.show_data.f_pcd = row.f_pcd
1096
+ this.show_data.f_street = row.f_street
1097
+ this.show_data.f_residential_area = row.f_residential_area
1098
+ this.show_data.f_building = row.f_building
1099
+ this.show_data.f_unit = row.f_unit
1100
+ this.show_data.f_floor = row.f_floor
1101
+ this.show_data.f_room = row.f_room
1102
+ this.selectdata.flag = '旧用户'
1103
+ }
1104
+ this.setLabelValue('用户编号', row.f_userinfo_code)
1105
+ this.setLabelValue('用户名称', row.f_user_name)
1106
+ this.setLabelValue('用户电话', row.f_user_phone)
1107
+ this.setLabelValue('证件类型', row.f_credentials)
1108
+ this.setLabelValue('证件号码', row.f_idnumber)
1109
+ this.setLabelValue('地址', row.f_address)
1110
+
1111
+ this.selectdata.f_userinfo_id = row.f_userinfo_id
1112
+ this.selectdata.f_userinfo_code = row.f_userinfo_code
1113
+ console.log("当前选择数据",this.show_data)
1114
+ },
1115
+ async 'streetChange'(index) {
1116
+ if (isEmpty(this.show_data.f_street)) {
1117
+ return
1118
+ }
1119
+
1120
+ this.setLabelValue('小区', null)
1121
+
1122
+ let data = {
1123
+ tablename: 't_area',
1124
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
1125
+ }
1126
+ let http = new HttpResetClass()
1127
+ let res = await http.load(
1128
+ 'POST',
1129
+ `rs/sql/singleTable`,
1130
+ {data: data},
1131
+ {resolveMsg: null, rejectMsg: '小区!!!'}
1132
+ )
1133
+
1134
+ this.setLabelOptions('小区', res.data.map(item => {
1135
+ return {
1136
+ label: item.f_residential_area,
1137
+ value: item.f_residential_area
1138
+ }
1139
+ }))
1140
+ },
1141
+ // 区县失去焦点
1142
+ async 'pcdChange'(index) {
1143
+ if (isEmpty(this.show_data.f_pcd)) {
1144
+ return
1145
+ }
1146
+
1147
+ this.setLabelValue('街道', null)
1148
+ this.setLabelValue('小区', null)
1149
+
1150
+
1151
+ let data = {
1152
+ tablename: 't_street',
1153
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1154
+ }
1155
+ let f_address_type = this.getLableValue('地址类型')
1156
+
1157
+ if (f_address_type === '民用地址') {
1158
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1159
+ }
1160
+
1161
+ let http = new HttpResetClass()
1162
+ let res = await http.load(
1163
+ 'POST',
1164
+ `rs/sql/singleTable`,
1165
+ {data: data},
1166
+ {resolveMsg: null, rejectMsg: '街道查询失败!!!'}
1167
+ )
1168
+
1169
+ this.setLabelOptions('街道', res.data.map(item => {
1170
+ return {
1171
+ label: item.f_street,
1172
+ value: item.f_street
1173
+ }
1174
+ }))
1175
+ },
1176
+ 'buttonChange' (index) {
1177
+ if (this.show_data.fields[index].value === '否') {
1178
+ console.log("测试")
1179
+ this.hideButtons('下发','提交')
1180
+ this.showButtons('退回','终止')
1181
+ } else {
1182
+ this.hideButtons('退回','终止')
1183
+ this.showButtons('下发','提交')
1184
+ }
1185
+ },
1186
+ async 'stopApply'() {
1187
+ this.stope_view = true
1188
+ this.showview = false
1189
+ },
1190
+ async 'signUserInfo' (index) {
1191
+ if (this.show_data.fields[index].value === '是') {
1192
+ console.log("测试")
1193
+ this.showLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
1194
+ this.requiredLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '门牌号', '地址')
1195
+ } else {
1196
+ this.hideLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
1197
+ this.electiveLabels("用户名称", "用户电话", "证件类型", "证件号码", '地址类型', '区域', '街道', '小区', '楼号', '单元', '楼层', '门牌号', '地址')
1198
+ }
1199
+ },
881
1200
  // onetomany模态框监听事件
882
1201
  async 'onchange_modal'(index, i) {
883
1202
  },