address-client 3.2.32 → 3.2.34

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.
@@ -11,35 +11,66 @@ var proxy = httpProxy.createProxyServer()
11
11
  // Define HTTP proxies to your custom API backend
12
12
  // https://github.com/chimurai/http-proxy-middleware
13
13
  var str = 'http://127.0.0.1:8078', str2= 'http://192.168.50.4:8400/'
14
+ var str3= 'https://qnjtkf.cn:7400'
14
15
  var proxyTable = {
15
-
16
+ '/rs/sql':{
17
+ target: str3,
18
+ secure:true,
19
+ changeOrigin:true
20
+ // target: 'http://127.0.0.1:8080'
21
+ },
16
22
  '/rs/logic/getLogin': {
17
- target: str2
23
+ target: str3,
24
+ secure:true,
25
+ changeOrigin:true
26
+ },
27
+ '/rs/logic/getInitData': {
28
+ target: str3,
29
+ secure:true,
30
+ changeOrigin:true,
31
+ },
32
+ '/rs/logic/getSaleInitData': {
33
+ target: str3,
34
+ secure:true,
35
+ changeOrigin:true
36
+ },
37
+ '/rs/logic':{
38
+ target: str3,
39
+ secure:true,
40
+ changeOrigin:true
41
+ // target: 'http://127.0.0.1:8080'
18
42
  },
19
43
  '/rs/vue': {
20
- target: str2
44
+ target: str3,
45
+ secure:true,
46
+ changeOrigin:true
21
47
  },
22
48
  '/rs/user': {
23
- target: str2
49
+ target: str3,
50
+ secure:true,
51
+ changeOrigin:true
24
52
  },
25
53
  '/rs/db': {
26
- target: str2
54
+ target: str3,
55
+ secure:true,
56
+ changeOrigin:true
27
57
  },
28
58
  '/rs/search': {
29
- target: str2
59
+ target: str3,
60
+ secure:true,
61
+ changeOrigin:true
62
+ // target: 'http://127.0.0.1:8080'
30
63
  },
31
64
  '/rs/data': {
32
- target: str2
33
- },
34
- '/rs/logic/getInitData': {
35
- target: str2
36
- },
37
- '/rs/logic/getSaleInitData': {
38
- target: str2
65
+ target: str3,
66
+ secure:true,
67
+ changeOrigin:true
39
68
  },
40
69
  '/rs': {
41
70
  // target: 'http://192.168.50.199:8300'
42
- target: str
71
+ target: str3,
72
+ secure:true,
73
+ changeOrigin:true
43
74
  }
44
75
  }
45
76
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "3.2.32",
3
+ "version": "3.2.34",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
@@ -245,7 +245,7 @@
245
245
  tablename: 'divisions_of_china',
246
246
  condition: 'areaCode is null'
247
247
  }
248
- }).then(res => {
248
+ },{resolveMsg: null,rejectMsg: null}).then(res => {
249
249
  this.provinceOptions = this.handleTree(res.data, 'code', 'parentcode')
250
250
  })
251
251
  },
@@ -364,7 +364,7 @@
364
364
  this.pcdmodel.f_depid = this.$login.f.depids
365
365
  this.pcdmodel.f_depname = this.$login.f.deps
366
366
  this.pcdmodel.f_pcd = this.pcdmodel.f_province+this.pcdmodel.f_city+this.pcdmodel.f_district
367
- await this.$resetpost('rs/logic/address_updatepcd', this.pcdmodel)
367
+ await this.$resetpost('rs/logic/address_updatepcd', this.pcdmodel,{resolveMsg: null,rejectMsg: null})
368
368
  },
369
369
  //保存街道
370
370
  async savestreet(){
@@ -377,7 +377,7 @@
377
377
  this.streetmodel.f_depname = this.$login.f.deps
378
378
  this.streetmodel.f_pcd=this.findbyid(this.pcdslist,this.streetmodel.f_pcd_id).f_pcd
379
379
  console.log('获取街道model', this.streetmodel)
380
- await this.$resetpost('rs/logic/address_updatestreet', this.streetmodel)
380
+ await this.$resetpost('rs/logic/address_updatestreet', this.streetmodel,{resolveMsg: null,rejectMsg: null})
381
381
  },
382
382
  cancel(){
383
383
  this.cleardara()
@@ -34,8 +34,8 @@
34
34
  </div>
35
35
  <div class="col-sm-4 form-group button-range" >
36
36
  <button class="button_search button_spacing" @click="search()" >查询</button>
37
- <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('民用')">添加民用</button>
38
- <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('非民用')">添加特殊地址</button>
37
+ <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('民用')">添加地址</button>
38
+ <!-- <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('非民用')">添加特殊地址</button>-->
39
39
  <button class="button_new button_spacing" style="width: max-content" v-show="this.$login.r.includes('批量修改')" @click="$parent.$parent.modifyBatch()">批量修改</button>
40
40
  <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
41
41
  <button class="button_export button_spacing" @click="$parent.$parent.importAddress('导入')">模板导入</button>
@@ -261,7 +261,9 @@
261
261
  data () {
262
262
  return {
263
263
  criteriaShow: false,
264
+ // rs/sql/address_singleTableOrderBy
264
265
  model: new PagedList('rs/sql/address_getAddress',20,{tablename: `'t_user_address'`,items: `'*'`,orderitem: `'id desc'`}),
266
+ //address_getAddress params:{tablename: `'t_user_address'`,items: `'*'`,orderitem: `'id desc'`}
265
267
  config: {
266
268
  // 导出列要和查询列相同
267
269
  excelHeaders: {
@@ -398,7 +400,7 @@
398
400
  if (!this.f_orgid) {
399
401
  this.getorg([this.$login.f.orgid])
400
402
  }
401
- args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
403
+ args.condition = `${args.condition} and f_filialeid = '${this.f_filialeids}'`
402
404
  this.model.search(args.condition, args.model)
403
405
  },
404
406
 
@@ -613,7 +615,7 @@
613
615
  },
614
616
  getCondition() {
615
617
  return {
616
- condition: `${this.$refs.paged.$refs.cri.condition}` + `and a.f_filialeid = '${this.f_filialeids}'`}
618
+ condition: `${this.$refs.paged.$refs.cri.condition}` + `and f_filialeid = '${this.f_filialeids}'`}
617
619
  }
618
620
  }
619
621
 
@@ -8,6 +8,10 @@
8
8
  <label for="true">单户</label>
9
9
  <input type="radio" id="false" value="more" v-model="onedata">
10
10
  <label for="false">多户</label>
11
+ <button class="button_new-1 button_spacing" v-if="false" v-show=" $login.f.f_role_name.includes('管理员') "style="width: max-content;position: fixed;right: 20px" @click="add('非民用')">添加特殊地址</button>
12
+ </div>
13
+ <div class="form-group" v-if="usertype&&!model.id&&!config.hasnumber" style="height: 30.5px">
14
+ <button class="button_new-1 button_spacing" style="width: max-content;position: fixed;right: 20px" @click="add('民用')">添加民用地址</button>
11
15
  </div>
12
16
  <!--单个录入-->
13
17
  <div v-if="onedata=='one'" class="row">
@@ -15,6 +19,7 @@
15
19
  :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']" v-if="!usertype">
16
20
  <label class="font_normal_body">&emsp;&emsp;&nbsp;省&ensp;市&ensp;区</label>
17
21
  <input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"
22
+ v-validate:f_pcd_id='{required: true }'
18
23
  >
19
24
  <v-select :value.sync="model.f_pcd_id" :value-single="true"
20
25
  :options='pcdslist' placeholder='请选择'
@@ -36,6 +41,7 @@
36
41
  :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
37
42
  <label class="font_normal_body">&emsp;&emsp;街道/乡镇</label>
38
43
  <input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"
44
+ v-validate:f_street_id='{required: true }'
39
45
  >
40
46
  <v-select :value.sync="model.f_street_id" :value-single="true"
41
47
  :options='streetslist' placeholder='请选择'
@@ -92,6 +98,7 @@
92
98
  @change="changecity"
93
99
  close-on-select>
94
100
  </v-select>
101
+
95
102
  </div>
96
103
  <div v-if="!usertype" class="col-sm-6 form-group" :class="[$v.f_building_id.required ? 'has-error' : 'has-success']">
97
104
  <label class="font_normal_body">&emsp;&emsp;&nbsp;楼&emsp;&emsp;号</label>
@@ -113,13 +120,12 @@
113
120
  <input type="text" style="width:20%" v-model="model.f_floor_suffix" class="input_search"
114
121
  />
115
122
  </div>
116
- <div v-if="!usertype" class="col-sm-6 form-group "
123
+ <div v-if="!usertype" class="col-sm-6"
117
124
  :class="[$v.f_room.required ? 'has-error' : 'has-success']">
118
125
  <label for="f_address" class="font_normal_body">&emsp;&emsp;&nbsp;门&ensp;牌&ensp;号</label>
119
126
  <input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"
120
127
  v-validate:f_room='{required: true }'/>
121
- <input type="text" style="width:20%" v-model="model.f_room_suffix" class="input_search"
122
- />
128
+ <input type="text" style="width:auto;margin-top: -9px;margin-left: 105px" v-model="model.f_room_suffix" placeholder="特殊信息" class="input_search"/>
123
129
  </div>
124
130
  <div class="col-sm-6 form-group">
125
131
  <label class="font_normal_body">&emsp;&emsp;&nbsp;地址状态</label>
@@ -137,6 +143,13 @@
137
143
  &ensp;<span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
138
144
  </div>
139
145
 
146
+ <div v-if="!usertype" class="col-sm-12 form-group "
147
+ :class="[$v.f_address.required ? 'has-error' : 'has-success']">
148
+ <label for="f_address" class="font_normal_body">&emsp;&emsp;&nbsp;详细地址</label>
149
+ <input type="text" style="width:80%" v-model="model.f_address" class="input_search" placeholder="详细地址"
150
+ v-validate:f_address='{required: true }'/>
151
+ </div>
152
+
140
153
  <div v-if="usertype" class="col-sm-12 form-group "
141
154
  :class="[$v.f_address.required ? 'has-error' : 'has-success']">
142
155
  <label for="f_address" class="font_normal_body">&emsp;&emsp;&nbsp;详细地址</label>
@@ -187,6 +200,7 @@
187
200
  :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
188
201
  <label class="font_normal_body">&emsp;&emsp;&nbsp;省&ensp;市&ensp;区</label>
189
202
  <input type="text" style="width:60%" v-show="false" v-model="model.f_pcd_id"
203
+ v-validate:f_pcd_id='{required: true }'
190
204
  >
191
205
  <v-select :value.sync="model.f_pcd_id" :value-single="true"
192
206
  :options='pcdslist' placeholder='请选择'
@@ -197,6 +211,7 @@
197
211
  :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
198
212
  <label class="font_normal_body">&emsp;&emsp;&nbsp;街&emsp;&emsp;道</label>
199
213
  <input type="text" style="width:60%" v-show="false" v-model="model.f_street_id"
214
+ v-validate:f_street_id='{required: true }'
200
215
  >
201
216
  <v-select :value.sync="model.f_street_id" :value-single="true"
202
217
  :options='streetslist' placeholder='请选择'
@@ -349,7 +364,7 @@
349
364
  await self.$getConfig(self, 'UserAddress')
350
365
  console.log('原地址配置',self.config)
351
366
  console.log('获取地址配置',self.config)
352
- Object.assign(self.model, self.config)
367
+ // Object.assign(self.model, self.config)
353
368
  }
354
369
 
355
370
  export default {
@@ -392,19 +407,19 @@
392
407
  f_building: '',
393
408
  f_building_start: '',
394
409
  f_building_end: '',
395
- f_building_suffix: '',
410
+ f_building_suffix: '号楼',
396
411
  f_unit: '',
397
412
  f_unit_start: '',
398
413
  f_unit_end: '',
399
- f_unit_suffix: '',
414
+ f_unit_suffix: '单元',
400
415
  f_floor: '',
401
416
  f_floor_start: '',
402
417
  f_floor_end: '',
403
- f_floor_suffix: '',
418
+ f_floor_suffix: '',
404
419
  f_room: '',
405
420
  f_room_start: '',
406
421
  f_room_end: '',
407
- f_room_suffix: '',
422
+ f_room_suffix: '',
408
423
  //详细地址
409
424
  f_address: '',
410
425
  //单位名称
@@ -432,13 +447,24 @@
432
447
  props: ['f_filialeids', 'row','operation','usertype'],
433
448
  async ready(){
434
449
  this.initdata()
435
- getAreaConfig(this)
450
+ // getAreaConfig(this)
451
+ //打印config
452
+ console.log(this.config)
436
453
  this.model.f_building_suffix=this.config.f_building_suffix
437
454
  this.model.f_unit_suffix=this.config.f_unit_suffix
438
455
  this.model.f_floor_suffix=this.config.f_floor_suffix
439
456
  this.model.f_room_suffix=this.config.f_room_suffix
440
457
  },
441
458
  methods: {
459
+ //添加方法
460
+ add(val){
461
+ if (this.f_filialeids) {
462
+ // this.$refs.paged.$refs.grid.selectStore.selected = null
463
+ this.$dispatch('add',val)
464
+ } else {
465
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
466
+ }
467
+ },
442
468
  async sliceChange(slice){
443
469
  this.areaschoice=[]
444
470
  if(slice){
@@ -457,7 +483,8 @@
457
483
  this.areaslist = []
458
484
  // this.model.f_residential_area_id = null
459
485
  // this.model.f_residential_area = null
460
- let condition = `isnull(f_iscity,'') = isnull('${this.model.f_iscity}','') and a.f_orgid = '${this.f_filialeids}'`
486
+ // isnull(f_iscity,'') = isnull('${this.model.f_iscity}','') and
487
+ let condition = `a.f_orgid = '${this.f_filialeids}'`
461
488
  let req = await this.$resetpost('rs/sql/address_getresidential', {
462
489
  data: {
463
490
  condition: condition
@@ -472,6 +499,7 @@
472
499
  id: row.id
473
500
  })
474
501
  })
502
+ console.log("获取到的redata",redata)
475
503
  this.areaslist=redata
476
504
  },
477
505
  standardyanzheng() {
@@ -581,6 +609,14 @@
581
609
  }
582
610
  }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
583
611
  let redata = []
612
+ if (req.data.length === 0){
613
+ redata.push({
614
+ label: '['+row.f_street+']'+'无',
615
+ value: '',
616
+ data: '',
617
+ id: ''
618
+ })
619
+ }
584
620
  req.data.forEach((row) => {
585
621
  redata.push({
586
622
  label: '['+row.f_street+']'+row.f_residential_area,
@@ -604,6 +640,12 @@
604
640
  }
605
641
  }, {resolveMsg: null, rejectMsg: '获取楼栋失败!'})
606
642
  let redata = []
643
+ if(req.data.length === 0){
644
+ redata.push({
645
+ label: '无',
646
+ value: ' ',
647
+ })
648
+ }
607
649
  req.data.forEach((row) => {
608
650
  redata.push({
609
651
  label: row.f_building,
@@ -671,7 +713,9 @@
671
713
  this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
672
714
  this.model.slice_area = selectArea.f_slice_area
673
715
  // 拼接地址
674
- this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
716
+ if(selectArea.f_residential_area !== '无'){
717
+ this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
718
+ }
675
719
  this.getbuildingList(`f_filialeid = '${this.f_filialeids}' and f_residential_area_id ='${selectArea.id}'`)
676
720
  }
677
721
  this.$nextTick(() => {
@@ -724,10 +768,14 @@
724
768
  console.log('批量', this.model)
725
769
  let data=Object.assign({},this.model)
726
770
  data.f_create_person= this.$login.f.name
727
- if ((i+'').length == 1) {
728
- data.f_building= data.f_building_prefix + '0' +i
729
- } else {
730
- data.f_building= data.f_building_prefix + '' +i
771
+ if ( i != ''){
772
+ if ((i+'').length == 1) {
773
+ data.f_building= data.f_building_prefix + '0' +i
774
+ } else {
775
+ data.f_building= data.f_building_prefix + '' +i
776
+ }
777
+ }else {
778
+ data.f_building = data.f_building_prefix + ''
731
779
  }
732
780
  if ((j+'').length == 1) {
733
781
  data.f_unit= data.f_unit_prefix + '0'+j
@@ -823,6 +871,7 @@
823
871
  this.model.f_slice_area = this.model.slice_area
824
872
  }
825
873
  }
874
+
826
875
  if (( this.model.f_unit+'').length == 1) {
827
876
  this.model.f_unit= '0'+ this.model.f_unit
828
877
  }
@@ -847,7 +896,7 @@
847
896
  this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
848
897
  this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
849
898
  this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
850
- if (( this.$refs.f_building_id.selectedItems+'').length == 1) {
899
+ if (( this.$refs.f_building_id.selectedItems+'').length == 1 && this.$refs.f_building_id.selectedItems!= '无') {
851
900
  this.model.f_building= '0'+ this.$refs.f_building_id.selectedItems
852
901
  }else{
853
902
  this.model.f_building = this.$refs.f_building_id.selectedItems
@@ -857,7 +906,7 @@
857
906
  this.$showMessage('请选择楼栋数据!!!')
858
907
  return
859
908
  }
860
- this.model.f_address = this.model.f_street + this.model.f_residential_area + (this.model.f_building?this.model.f_building +this.model.f_building_suffix:'') + (this.model.f_unit?this.model.f_unit +this.model.f_unit_suffix:'') + (this.model.f_floor?this.model.f_floor +this.model.f_floor_suffix:'') + this.model.f_room + this.model.f_room_suffix
909
+ this.model.f_address = this.model.f_street + (this.model.f_residential_area!='无'?this.model.f_residential_area:'') + (this.model.f_building&&this.model.f_building!='无'?this.model.f_building +this.model.f_building_suffix:'') + (this.model.f_unit?this.model.f_unit +this.model.f_unit_suffix:'') + (this.model.f_floor?this.model.f_floor +this.model.f_floor_suffix:'') + this.model.f_room + this.model.f_room_suffix
861
910
  }
862
911
  await this.$resetpost('rs/logic/address_updateuseraddress', this.model)
863
912
  },