apply-clients 4.1.72 → 4.1.75

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')
356
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
+ }
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('楼号')) ? '' : '号楼') +
@@ -726,13 +924,13 @@ export default {
726
924
  this.$showAlert('合同编号已存在!!!', 'warning', 3000)
727
925
  }
728
926
  //拼写合同编号
729
- if (this.selectdata.f_apply_type == '工商户报建') {
730
- this.show_data.fields[index].value = "ZS-S-" + this.show_data.fields[index].value
731
- // this.show_data.fields[index].value = "ZS-S-" + this.show_data.fields[index].value + "-" + new Date().Format('yyyy-MM-dd')
732
- }else {
733
- this.show_data.fields[index].value = "ZS-M-" + this.show_data.fields[index].value
734
- // this.show_data.fields[index].value = "ZS-M-" + this.show_data.fields[index].value + "-" + new Date().Format('yyyy-MM-dd')
735
- }
927
+ // if (this.selectdata.f_apply_type == '工商户报建') {
928
+ // this.show_data.fields[index].value = "ZS-S-" + this.show_data.fields[index].value
929
+ // // this.show_data.fields[index].value = "ZS-S-" + this.show_data.fields[index].value + "-" + new Date().Format('yyyy-MM-dd')
930
+ // }else {
931
+ // this.show_data.fields[index].value = "ZS-M-" + this.show_data.fields[index].value
932
+ // // this.show_data.fields[index].value = "ZS-M-" + this.show_data.fields[index].value + "-" + new Date().Format('yyyy-MM-dd')
933
+ // }
736
934
  }
737
935
  }
738
936
  if (this.show_data.fields[index].label === '单价(户)') {
@@ -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
  },
@@ -468,6 +468,8 @@
468
468
  this.showbutmodal = true
469
469
  } else if (button.button_name === '验收') {
470
470
  this.showbutmodal = true
471
+ } else if (button.event) {
472
+ this.$dispatch(button.event)
471
473
  } else {
472
474
  this.$dispatch('button', this.model)
473
475
  }
@@ -553,7 +555,7 @@
553
555
  // 是否禁用按钮
554
556
  this.disableButton()
555
557
 
556
- this.data.fields[index].value = this.data.fields[index].value.trim()
558
+ // this.data.fields[index].value = this.data.fields[index].value.trim()
557
559
 
558
560
  if (this.data.fields[index].prefix && this.data.fields[index].value !== '') {
559
561
  this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
@@ -561,6 +563,9 @@
561
563
 
562
564
  this.data[this.data.fields[index].field] = this.data.fields[index].value
563
565
 
566
+ if (this.data.fields[index].onchange) {
567
+ this.$dispatch(this.data.fields[index].onchange, index)
568
+ }
564
569
  this.$dispatch('onchange', index)
565
570
 
566
571
  // 如果有错误信息提示走错误信息判断处理
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <stop-apply-list v-ref:query></stop-apply-list>
5
+ </div>
6
+
7
+ <modal v-if="showModal" :show.sync="showModal" backdrop="false" large>
8
+ <header slot="modal-header" class="modal-header">
9
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
10
+ <span class="modal-title"><font size="3">撤销</font></span>
11
+ </header>
12
+ <article slot="modal-body" class="modal-body clearfix">
13
+ <div :class="data.f_cancel_reason ? '' : 'has-error'" class="form-group">
14
+ <label class="control-label-justify control-label col-sm-1">撤销原因</label>
15
+ <div class="col-sm-9">
16
+ <textarea
17
+ class="form-control input_view" style="width: 100%" rows="5"
18
+ v-model="data.f_cancel_reason" :value="data.f_cancel_reason"
19
+ ></textarea>
20
+ </div>
21
+ </div>
22
+ </article>
23
+ <footer slot="modal-footer" class="modal-footer">
24
+ <button :class="!data.f_cancel_reason ? 'btn btn-default':'btn btn-primary'"
25
+ :disabled="!data.f_cancel_reason" type="button" @click="confirmModal()">
26
+ 确认
27
+ </button>
28
+ </footer>
29
+ </modal>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ export default {
35
+ title: '终止报建',
36
+ data () {
37
+ return {
38
+ showModal: false,
39
+ data: null
40
+ }
41
+ },
42
+ ready () {
43
+ },
44
+ methods: {
45
+ closeModal () {
46
+ this.showModal = false
47
+ this.data = null
48
+
49
+ this.$refs.query.$refs.cp.$refs.cri.search()
50
+ },
51
+ async confirmModal () {
52
+ let data = {
53
+ data: this.data,
54
+ user: this.$login.f
55
+ }
56
+
57
+ let res = await this.$resetpost(
58
+ `rs/logic/cancelStopApply`,
59
+ {data: data},
60
+ {resolveMsg: null, rejectMsg: '撤销失败!!!'}
61
+ )
62
+
63
+ this.closeModal()
64
+ }
65
+ },
66
+ events: {
67
+ 'search' () {
68
+ this.$refs.query.$refs.cp.$refs.cri.search()
69
+ },
70
+ 'cancelStopApply' (row) {
71
+ this.data = row
72
+
73
+ this.showModal = true
74
+ }
75
+ }
76
+ }
77
+ </script>
78
+
79
+ <style scoped>
80
+ .control-label-justify {
81
+ display: inline-block;
82
+ vertical-align: top;
83
+ width: 110px;
84
+ text-align: justify;
85
+ font-family: PingFang-SC-Bold;
86
+ }
87
+
88
+ .control-label-justify::after {
89
+ content: "";
90
+ display: inline-block;
91
+ width: 100%;
92
+ overflow: hidden;
93
+ height: 0;
94
+ }
95
+ .clearfix:after,.clearfix:before{
96
+ display: table;
97
+ }
98
+ .clearfix:after{
99
+ clear: both;
100
+ }
101
+ </style>