address-client 1.6.75 → 1.6.78

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "1.6.75",
3
+ "version": "1.6.78",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
@@ -31,6 +31,14 @@
31
31
  close-on-select search="true" @change="streetChange">
32
32
  </v-select>
33
33
  </div>
34
+ <div class="col-sm-6 form-group form-input-group ">
35
+ <label class="font_normal_body _zoom4">所属街办</label>
36
+ <v-select
37
+ :value.sync="areamodel.f_block" :value-single="true"
38
+ :options='blockslist' placeholder='请选择'
39
+ close-on-select search="true">
40
+ </v-select>
41
+ </div>
34
42
  <div class="col-sm-6 form-group form-input-group "
35
43
  >
36
44
  <label class="font_normal_body _zoom4">片区</label>
@@ -47,6 +55,7 @@
47
55
  <label class="font_normal_body _zoom4">小区ID</label>
48
56
  <input type="text"
49
57
  style="width: 60%"
58
+ @blur="areaidCheck"
50
59
  v-model="areamodel.oldid" :disabled="operation=='modify'"
51
60
  class="form-control" placeholder="小区ID"
52
61
  v-validate:oldid='{required: true }'>
@@ -136,6 +145,7 @@
136
145
  <label class="font_normal_body _zoom4">单位ID</label>
137
146
  <input type="text"
138
147
  style="width: 60%"
148
+ @blur="areaidCheck"
139
149
  v-model="areamodel.oldid"
140
150
  class="form-control" placeholder="单位ID"
141
151
  v-validate:oldid='{required: true }'>
@@ -389,7 +399,7 @@
389
399
  :value.sync="areamodel.is_close_one"
390
400
  v-model="areamodel.is_close_one" placeholder='第一次关阀天数'
391
401
  v-validate:is_close_one='{required: true }'
392
- ></input>
402
+ />
393
403
  </div>
394
404
  <div class="col-sm-6 form-group form-input-group "
395
405
  :class="[$v.is_close_two.required ? 'has-error' : '']">
@@ -400,7 +410,7 @@
400
410
  :value.sync="areamodel.is_close_two"
401
411
  v-validate:is_close_two='{required: true }'
402
412
  v-model="areamodel.is_close_two" placeholder='第二次关阀天数'
403
- ></input>
413
+ />
404
414
  </div>
405
415
  <div class="col-sm-6 form-group form-input-group "
406
416
  :class="[$v.is_tablelimit.required ? 'has-error' : '']">
@@ -426,7 +436,7 @@
426
436
  :value.sync="areamodel.is_tablelimit_gas"
427
437
  v-validate:is_tablelimit_gas='{required: true }'
428
438
  v-model="areamodel.is_tablelimit_gas" placeholder='上限金额'
429
- ></input>
439
+ />
430
440
  </div>
431
441
  <div class="col-sm-6 form-group form-input-group "
432
442
  :class="[$v.price_type.required ? 'has-error' : '']">
@@ -450,7 +460,7 @@
450
460
  v-validate:anjianyear='{required: true }'
451
461
  style="width: 60%"
452
462
  v-model="areamodel.anjianyear" placeholder='安检年数'
453
- ></input>
463
+ />
454
464
  </div>
455
465
  <div class="col-sm-6 form-group form-input-group "
456
466
  :class="[$v.baofeiyear.required ? 'has-error' : '']">
@@ -459,7 +469,7 @@
459
469
  v-validate:baofeiyear='{required: true }'
460
470
  style="width: 60%"
461
471
  v-model="areamodel.baofeiyear" placeholder='报废年数'
462
- ></input>
472
+ />
463
473
  </div>
464
474
  <div class="col-sm-6 form-group form-input-group "
465
475
  :class="[$v.onealarm.required ? 'has-error' : '']">
@@ -470,7 +480,7 @@
470
480
  :value.sync="areamodel.onealarm"
471
481
  v-validate:onealarm='{required: true }'
472
482
  v-model="areamodel.onealarm" placeholder='第一档报警气量'
473
- ></input>
483
+ />
474
484
  </div>
475
485
  <div class="col-sm-6 form-group form-input-group "
476
486
  :class="[$v.twoalarm.required ? 'has-error' : '']">
@@ -481,7 +491,7 @@
481
491
  :value.sync="areamodel.twoalarm"
482
492
  v-validate:twoalarm='{required: true }'
483
493
  v-model="areamodel.twoalarm" placeholder='第二档报警气量'
484
- ></input>
494
+ />
485
495
  </div>
486
496
  </div>
487
497
  <div v-if="f_special" class="col-sm-6">
@@ -511,12 +521,14 @@ export default {
511
521
  devicetypes: this.$appdata.getParam('设备类型'),
512
522
  distinct: this.$appdata.getParam('行政区域'),
513
523
  opera_area: this.$appdata.getParam('运营区域'),
524
+ repair_point: this.$appdata.getParam('维修站点'),
514
525
  residential_properties: this.$appdata.getParam('小区性质'),
515
526
  heating_style: this.$appdata.getParam('供暖方式'),
516
- repair_point: [{label: '航天站', value: '航天站'},
517
- {label: '韦曲站', value: '韦曲站'}, {label: '郭杜站', value: '郭杜站'},
518
- {label: '沣东站', value: '沣东站'},
519
- {label: '中心站', value: '中心站'}],
527
+ blockslist: this.$appdata.getParam('所属街办'),
528
+ // repair_point: [{label: '航天站', value: '航天站'},
529
+ // {label: '韦曲站', value: '韦曲站'}, {label: '郭杜站', value: '郭杜站'},
530
+ // {label: '沣东站', value: '沣东站'},
531
+ // {label: '中心站', value: '中心站'}],
520
532
  is_order: [{label: '开户', value: '开户'},
521
533
  {label: '未开户', value: '未开户'}],
522
534
  //初始化省市区数据
@@ -533,6 +545,7 @@ export default {
533
545
  default_devices: [],
534
546
  f_repair_point: '',
535
547
  f_pcd_id: '',
548
+ f_block: '',
536
549
  f_is_order: '',
537
550
  oldid: '',
538
551
  f_linkname: '',
@@ -740,7 +753,6 @@ export default {
740
753
  } else {
741
754
  this.areamodel.f_street = ''
742
755
  }
743
- console.log(JSON.stringify(this.areamodel))
744
756
  let result = this.$resetpost('rs/logic/address_updatearea', this.areamodel)
745
757
  },
746
758
  cleardara() {
@@ -748,6 +760,7 @@ export default {
748
760
  default_devices: [],
749
761
  f_pcd_id: '',
750
762
  oldid: '',
763
+ f_block: '',
751
764
  f_linkname: '',
752
765
  f_linkphone: '',
753
766
  f_street_id: '',
@@ -787,6 +800,22 @@ export default {
787
800
  card_size: null,
788
801
  }
789
802
  },
803
+ areaidCheck(){
804
+ let HttpReset = new HttpResetClass()
805
+ HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
806
+ data: {
807
+ items: 'id',
808
+ tablename: 't_area',
809
+ orderitem: 'id desc',
810
+ condition: ` oldid = '${this.areamodel.oldid}' `
811
+ }
812
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
813
+ if (req.data.length > 0) {
814
+ this.areamodel.oldid = ''
815
+ this.$showAlert('ID重复,请检查ID是否正确!','warning',1000)
816
+ }
817
+ })
818
+ },
790
819
  cancel() {
791
820
  this.cleardara()
792
821
  this.$dispatch('cancel')
@@ -1,110 +1,110 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
5
- <div novalidate class="form-inline auto" partial>
6
- <div class="form-group form-input-group">
7
- <button class="btn btn-success width-80" @click="search()" >查询</button>
8
- <button class="btn btn-success width-80" @click="$parent.$parent.add('民用')">添加用气区域</button>
9
- <button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
10
- </div>
11
- </div>
12
- </criteria>
13
- <data-grid :model="model" partial='list' v-ref:grid>
14
- <template partial='head'>
15
- <tr>
16
- <th><nobr>id</nobr></th>
17
- <th><nobr>区/县</nobr></th>
18
- <th><nobr>片区</nobr></th>
19
- <th><nobr>街道</nobr></th>
20
- <th><nobr>用气区域</nobr></th>
21
- <th><nobr>时间</nobr></th>
22
- <th><nobr>操作人</nobr></th>
23
- <th><nobr>操作</nobr></th>
24
- </tr>
25
- </template>
26
- <template partial='body'>
27
- <tr>
28
- <td style="text-align:center"><nobr>{{row.id}}</nobr></td>
29
- <td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
30
- <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
31
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
32
- <td style="text-align:center"><nobr>{{row.f_usegas_area}}</nobr></td>
33
- <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
34
- <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
35
- <td style="text-align:center">
36
- <!-- <button type="button" name="button" class="btn btn-link"
37
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
38
- <button type="button" name="button" class="btn btn-link"
39
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
40
- </td>
41
- </tr>
42
- </template>
43
- <template partial='foot'></template>
44
- </data-grid>
45
- </criteria-paged>
46
- </div>
47
- </template>
48
-
49
- <script>
50
- import { PagedList } from 'vue-client'
51
-
52
- export default {
53
- data () {
54
- return {
55
- model: new PagedList('rs/sql/address_getusegasarealist',20), userid: this.$login.f.id,
56
- source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
57
- }
58
- },
59
- title: '用气区域列表',
60
- props:{
61
- },
62
- ready(){
63
-
64
- },
65
- methods: {
66
- //添加方法
67
- add(val){
68
- this.$refs.paged.$refs.grid.selectStore.selected = null
69
- this.$dispatch('add',val)
70
- },
71
- //修改
72
- modify(val){
73
- this.$refs.paged.$refs.grid.selectStore.selected = null
74
- this.$dispatch('modify',val)
75
- },
76
- async delete(row){
77
- if(row.id){
78
- var id = row.id
79
- let useraredss = await this.$resetpost('rs/sql/address_singleTable',
80
- {data: {
81
- items: 'f_usegas_area_id',
82
- tablename: 't_user_address',
83
- condition: `f_usegas_area_id='${id}'`}
84
- },
85
- {resolveMsg: null, rejectMsg: null})
86
- if(useraredss.data.length>0){
87
- this.$showAlert('该用气区域下已有地址信息,无法删除!','warning',1000)
88
- }else{
89
- this.$resetdelete('rs/entity/t_usegas_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
90
- this.$dispatch('cancel')
91
- })
92
- }
93
- }
94
- },
95
- search (args) {
96
- this.model.search(args.condition, args.model)
97
- },
98
- //清空
99
- clear(){
100
- this.$refs.paged.$refs.cri.model = {}
101
- },
102
- },
103
- watch:{
104
-
105
- },
106
- events: {
107
- }
108
-
109
- }
110
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
5
+ <div novalidate class="form-inline auto" partial>
6
+ <div class="form-group form-input-group">
7
+ <button class="btn btn-success width-80" @click="search()" >查询</button>
8
+ <button class="btn btn-success width-80" @click="$parent.$parent.add('民用')">添加用气区域</button>
9
+ <button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
10
+ </div>
11
+ </div>
12
+ </criteria>
13
+ <data-grid :model="model" partial='list' v-ref:grid>
14
+ <template partial='head'>
15
+ <tr>
16
+ <th><nobr>id</nobr></th>
17
+ <th><nobr>区/县</nobr></th>
18
+ <th><nobr>片区</nobr></th>
19
+ <th><nobr>街道</nobr></th>
20
+ <th><nobr>用气区域</nobr></th>
21
+ <th><nobr>时间</nobr></th>
22
+ <th><nobr>操作人</nobr></th>
23
+ <th><nobr>操作</nobr></th>
24
+ </tr>
25
+ </template>
26
+ <template partial='body'>
27
+ <tr>
28
+ <td style="text-align:center"><nobr>{{row.id}}</nobr></td>
29
+ <td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
30
+ <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
31
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
32
+ <td style="text-align:center"><nobr>{{row.f_usegas_area}}</nobr></td>
33
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
34
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
35
+ <td style="text-align:center">
36
+ <!-- <button type="button" name="button" class="btn btn-link"
37
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
38
+ <button type="button" name="button" class="btn btn-link"
39
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
40
+ </td>
41
+ </tr>
42
+ </template>
43
+ <template partial='foot'></template>
44
+ </data-grid>
45
+ </criteria-paged>
46
+ </div>
47
+ </template>
48
+
49
+ <script>
50
+ import { PagedList } from 'vue-client'
51
+
52
+ export default {
53
+ data () {
54
+ return {
55
+ model: new PagedList('rs/sql/address_getusegasarealist',20), userid: this.$login.f.id,
56
+ source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
57
+ }
58
+ },
59
+ title: '用气区域列表',
60
+ props:{
61
+ },
62
+ ready(){
63
+
64
+ },
65
+ methods: {
66
+ //添加方法
67
+ add(val){
68
+ this.$refs.paged.$refs.grid.selectStore.selected = null
69
+ this.$dispatch('add',val)
70
+ },
71
+ //修改
72
+ modify(val){
73
+ this.$refs.paged.$refs.grid.selectStore.selected = null
74
+ this.$dispatch('modify',val)
75
+ },
76
+ async delete(row){
77
+ if(row.id){
78
+ var id = row.id
79
+ let useraredss = await this.$resetpost('rs/sql/address_singleTable',
80
+ {data: {
81
+ items: 'f_usegas_area_id',
82
+ tablename: 't_user_address',
83
+ condition: `f_usegas_area_id='${id}'`}
84
+ },
85
+ {resolveMsg: null, rejectMsg: null})
86
+ if(useraredss.data.length>0){
87
+ ` this.$showAlert('该用气区域下已有地址信息,无法删除!','warning',1000)
88
+ ` }else{
89
+ this.$resetdelete('rs/entity/t_usegas_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
90
+ this.$dispatch('cancel')
91
+ })
92
+ }
93
+ }
94
+ },
95
+ search (args) {
96
+ this.model.search(args.condition, args.model)
97
+ },
98
+ //清空
99
+ clear(){
100
+ this.$refs.paged.$refs.cri.model = {}
101
+ },
102
+ },
103
+ watch:{
104
+
105
+ },
106
+ events: {
107
+ }
108
+
109
+ }
110
+ </script>