address-client 3.0.24-78 → 3.0.24-aode
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/.gradle/{5.2.1 → 5.5}/fileChanges/last-build.bin +0 -0
- package/.gradle/5.5/fileHashes/fileHashes.lock +0 -0
- package/.gradle/{5.2.1 → 5.5}/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/built.bin +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/.gradle/buildOutputCleanup/cache.properties.lock +1 -0
- package/CHANGELOG.md +0 -3
- package/build/dev-server.js +2 -2
- package/build/webpack.base.conf.js +2 -6
- package/examples/showAdd/App.vue +2 -2
- package/index.html +0 -4
- package/package.json +5 -6
- package/src/address.js +5 -11
- package/src/components/AddAreaMsg.vue +78 -148
- package/src/components/AddStreetOrPcd.vue +2 -79
- package/src/components/AddressList.vue +108 -182
- package/src/components/AddressManage.vue +1 -1
- package/src/components/AddressTree.vue +1 -1
- package/src/components/AreaList.vue +247 -317
- package/src/components/AreaManage.vue +18 -17
- package/src/components/CityManage.vue +1 -1
- package/src/components/NewAddressInfo.vue +1 -1
- package/src/components/StreetList.vue +26 -50
- package/src/components/UserAddress.vue +383 -509
- package/src/components/areauser/AreaUser.vue +233 -0
- package/.gradle/5.2.1/executionHistory/executionHistory.bin +0 -0
- package/.gradle/5.2.1/executionHistory/executionHistory.lock +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.bin +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/gradlew +0 -172
- package/gradlew.bat +0 -84
- package/src/components/CityList.vue +0 -133
- package/src/filiale/WEINAN/AddAreaMsg.vue +0 -656
- package/src/filiale/WEINAN/AddressList.vue +0 -351
- package/src/filiale/WEINAN/AddressManage.vue +0 -122
- package/src/filiale/WEINAN/AreaList.vue +0 -275
- package/src/filiale/WEINAN/UserAddress.vue +0 -783
- package/src/filiale/WEINAN/sale.js +0 -16
- package/src/filiale/gaomi/AddressList.vue +0 -430
- package/src/filiale/gaomi/UserAddress.vue +0 -832
- package/src/filiale/gaomi/sale.js +0 -14
- package/src/filiale/gongyi/AddAreaMsg.vue +0 -640
- package/src/filiale/gongyi/AreaManage.vue +0 -100
- package/src/filiale/gongyi/UserAddress.vue +0 -751
- package/src/filiale/gongyi/sale.js +0 -14
- package/src/filiale/jingwei/UserAddress.vue +0 -764
- package/src/filiale/jingwei/sale.js +0 -12
- package/src/filiale/macheng/AddAreaMsg.vue +0 -635
- package/src/filiale/macheng/AddStreetOrPcd.vue +0 -231
- package/src/filiale/macheng/AddressList.vue +0 -306
- package/src/filiale/macheng/AreaList.vue +0 -279
- package/src/filiale/macheng/CityManage.vue +0 -76
- package/src/filiale/macheng/StreetList.vue +0 -186
- package/src/filiale/macheng/UserAddress.vue +0 -743
- package/src/filiale/macheng/sale.js +0 -17
- package/src/filiale/rongcheng/AddressList.vue +0 -363
- package/src/filiale/rongcheng/UserAddress.vue +0 -799
- package/src/filiale/rongcheng/sale.js +0 -11
- package/src/filiale/shaoguan/AddAreaMsg.vue +0 -631
- package/src/filiale/shaoguan/UserAddress.vue +0 -764
- package/src/filiale/shaoguan/sale.js +0 -11
- package/src/filiale/tongchuan/AddAreaMsg.vue +0 -635
- package/src/filiale/tongchuan/AddStreetOrPcd.vue +0 -308
- package/src/filiale/tongchuan/AddressList.vue +0 -379
- package/src/filiale/tongchuan/AreaList.vue +0 -315
- package/src/filiale/tongchuan/AreaManage.vue +0 -100
- package/src/filiale/tongchuan/CityList.vue +0 -133
- package/src/filiale/tongchuan/StreetList.vue +0 -208
- package/src/filiale/tongchuan/UserAddress.vue +0 -795
- package/src/filiale/tongchuan/sale.js +0 -19
- package/src/filiale/wuhai/UserAddress.vue +0 -795
- package/src/filiale/wuhai/sale.js +0 -12
- package/src/filiale/zhoukou/AddressList.vue +0 -391
- package/src/filiale/zhoukou/UserAddress.vue +0 -833
- package/src/filiale/zhoukou/sale.js +0 -13
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="auto"
|
|
2
|
+
<div class="auto" style="height:80%">
|
|
3
3
|
<validator name='v'>
|
|
4
4
|
<p class="bg-info text-center" style="padding: 8px;">{{usertype ? '特殊地址管理' : '民用地址管理'}}</p>
|
|
5
5
|
<div class="auto select-overspread form-horizontal">
|
|
6
|
-
<div class="form-group" v-if="!usertype&&!model.id
|
|
6
|
+
<div class="form-group" v-if="!usertype&&!model.id">
|
|
7
7
|
<input type="radio" id="true" value="one" v-model="onedata">
|
|
8
|
-
<label for="
|
|
8
|
+
<label for="one">单户</label>
|
|
9
9
|
<input type="radio" id="false" value="more" v-model="onedata">
|
|
10
|
-
<label for="
|
|
10
|
+
<label for="more">多户</label>
|
|
11
11
|
</div>
|
|
12
12
|
<!--单个录入-->
|
|
13
13
|
<div v-if="onedata=='one'" class="row">
|
|
14
14
|
<div class="col-sm-6 form-group "
|
|
15
|
-
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']"
|
|
15
|
+
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
|
|
16
16
|
<label class="font_normal_body">省 市 区</label>
|
|
17
17
|
<input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"
|
|
18
18
|
>
|
|
@@ -21,16 +21,6 @@
|
|
|
21
21
|
close-on-select search="true" @change="pcdChange" :disabled="!usertype">
|
|
22
22
|
</v-select>
|
|
23
23
|
</div>
|
|
24
|
-
<div class="col-sm-6 form-group "
|
|
25
|
-
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']" v-if="usertype">
|
|
26
|
-
<label class="font_normal_body">省 市 区</label>
|
|
27
|
-
<input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id" v-validate:f_pcd_id='{required: true }'
|
|
28
|
-
>
|
|
29
|
-
<v-select :value.sync="model.f_pcd_id" :value-single="true"
|
|
30
|
-
:options='pcdslist' placeholder='请选择'
|
|
31
|
-
close-on-select search="true" @change="pcdChange" :disabled="!usertype">
|
|
32
|
-
</v-select>
|
|
33
|
-
</div>
|
|
34
24
|
|
|
35
25
|
<div class="col-sm-6 form-group " v-if="!usertype"
|
|
36
26
|
:class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
|
|
@@ -45,7 +35,7 @@
|
|
|
45
35
|
<div class="col-sm-6 form-group " v-if="usertype"
|
|
46
36
|
:class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
|
|
47
37
|
<label class="font_normal_body">街道名称</label>
|
|
48
|
-
<input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"
|
|
38
|
+
<input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"
|
|
49
39
|
>
|
|
50
40
|
<v-select :value.sync="model.f_street_id" :value-single="true"
|
|
51
41
|
:options='streetslist' placeholder='请选择'
|
|
@@ -54,10 +44,10 @@
|
|
|
54
44
|
</v-select>
|
|
55
45
|
</div>
|
|
56
46
|
<div class="col-sm-6 form-group " v-if="!usertype"
|
|
57
|
-
:class="[$v.
|
|
47
|
+
:class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
|
|
58
48
|
<label class="font_normal_body">小区名称</label>
|
|
59
49
|
<input type="text" style="width:41%" v-show="false" v-model="model.f_residential_area_id"
|
|
60
|
-
v-validate:
|
|
50
|
+
v-validate:f_residential_area_id='{required: true }'>
|
|
61
51
|
<v-select :value.sync="model.f_residential_area_id" :value-single="true"
|
|
62
52
|
:options='areaslist' placeholder='请选择'
|
|
63
53
|
@change="areaChange"
|
|
@@ -65,20 +55,13 @@
|
|
|
65
55
|
</v-select>
|
|
66
56
|
</div>
|
|
67
57
|
|
|
68
|
-
<div class="col-sm-6 form-group " v-if="usertype">
|
|
69
|
-
<label class="font_normal_body">小区名称</label>
|
|
70
|
-
<v-select :value.sync="model.f_residential_area_id" :value-single="true"
|
|
71
|
-
:options='areaslist' placeholder='请选择'
|
|
72
|
-
@change="areaChange"
|
|
73
|
-
close-on-select search="true">
|
|
74
|
-
</v-select>
|
|
75
|
-
</div>
|
|
76
58
|
|
|
77
|
-
|
|
59
|
+
|
|
60
|
+
<div class="col-sm-6 form-group " :class="[$v.slice.required ? 'has-error' : 'has-success']">
|
|
78
61
|
<label class="font_normal_body">片  区</label>
|
|
79
62
|
<input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"
|
|
80
|
-
v-validate:
|
|
81
|
-
<v-select :value.sync="model.slice_area" v-model="model.slice_area"
|
|
63
|
+
v-validate:slice='{required: true }'>
|
|
64
|
+
<v-select :value.sync="model.slice_area" v-model="model.slice_area"
|
|
82
65
|
:options='sliceArea' placeholder='片区/管理站' filer-key="name"
|
|
83
66
|
close-on-select v-ref:slice>
|
|
84
67
|
</v-select>
|
|
@@ -121,41 +104,12 @@
|
|
|
121
104
|
close-on-select>
|
|
122
105
|
</v-select>
|
|
123
106
|
</div>
|
|
124
|
-
<div v-if="!usertype" class="col-sm-8 form-group ">
|
|
125
|
-
<label class="font_normal_body">经 纬 度</label>
|
|
126
|
-
<input type="text" style="width:30%" v-model="model.f_lng" class="input_search" placeholder="经度"/>
|
|
127
|
-
<input type="text" style="width:30%" v-model="model.f_lat" class="input_search" placeholder="纬度"/>
|
|
128
|
-
 <span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
107
|
<div v-if="usertype" class="col-sm-12 form-group "
|
|
132
108
|
:class="[$v.f_address.required ? 'has-error' : 'has-success']">
|
|
133
109
|
<label for="f_address" class="font_normal_body">详细地址</label>
|
|
134
110
|
<input type="text" style="width:80%" v-model="model.f_address" class="input_search" placeholder="详细地址"
|
|
135
111
|
v-validate:f_address='{required: true }'/>
|
|
136
112
|
</div>
|
|
137
|
-
<div v-if="usertype" class="col-sm-8 form-group ">
|
|
138
|
-
<label class="font_normal_body">经 纬 度</label>
|
|
139
|
-
<input type="text" style="width:30%" v-model="model.f_lng" class="input_search" placeholder="经度"/>
|
|
140
|
-
<input type="text" style="width:30%" v-model="model.f_lat" class="input_search" placeholder="纬度"/>
|
|
141
|
-
 <span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
|
|
142
|
-
</div>
|
|
143
|
-
<div class="col-sm-6 form-group " v-if="config.hasnumber"
|
|
144
|
-
:class="[$v.f_standard_number.required ? 'has-error' : 'has-success']">
|
|
145
|
-
<label class="font_normal_body"> 规范号</label>
|
|
146
|
-
<input type="text" v-model="model.f_standard_number"
|
|
147
|
-
@change="standardyanzheng"
|
|
148
|
-
class="input_search" style="width:60%" placeholder="地址规范号"
|
|
149
|
-
v-validate:f_standard_number='{required: true }'>
|
|
150
|
-
</div>
|
|
151
|
-
<div class="col-sm-6 form-group " v-if="config.hasnumber"
|
|
152
|
-
:class="[$v.f_contracts_number.required ? 'has-error' : 'has-success']">
|
|
153
|
-
<label class="font_normal_body"> 合同号</label>
|
|
154
|
-
<input type="text" v-model="model.f_contracts_number"
|
|
155
|
-
@change="contractsyanzheng"
|
|
156
|
-
class="input_search" style="width:60%" placeholder="合同顺序号"
|
|
157
|
-
v-validate:f_contracts_number='{required: true }'>
|
|
158
|
-
</div>
|
|
159
113
|
<div class="col-sm-12 form-group">
|
|
160
114
|
<label class="font_normal_body " >备  注</label>
|
|
161
115
|
<textarea class="input_textarea" rows="3" style="margin-top: 25px; width:80%;height: auto;" v-model="model.f_comments"></textarea>
|
|
@@ -203,7 +157,7 @@
|
|
|
203
157
|
<label class="font_normal_body">片  区</label>
|
|
204
158
|
<input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"
|
|
205
159
|
v-validate:slice='{required: true }'>
|
|
206
|
-
<v-select :value.sync="model.slice_area" v-model="model.slice_area"
|
|
160
|
+
<v-select :value.sync="model.slice_area" v-model="model.slice_area"
|
|
207
161
|
:options='sliceArea' placeholder='片区/管理站' filer-key="name"
|
|
208
162
|
close-on-select v-ref:slice>
|
|
209
163
|
</v-select>
|
|
@@ -282,15 +236,6 @@
|
|
|
282
236
|
v-validate:f_room_end='{integernum: true ,dctest: [model.f_room_start, ">=" ]}'/>
|
|
283
237
|
<input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
|
|
284
238
|
</div>
|
|
285
|
-
<div class="col-sm-6 form-group">
|
|
286
|
-
<label class="font_normal_body">地址状态</label>
|
|
287
|
-
<v-select :value.sync="model.f_address_state" :value-single="true"
|
|
288
|
-
class="select_list select"
|
|
289
|
-
condition="f_address_state = '{}'"
|
|
290
|
-
:options='addresstate' placeholder='地址状态'
|
|
291
|
-
close-on-select>
|
|
292
|
-
</v-select>
|
|
293
|
-
</div>
|
|
294
239
|
<div class="col-sm-10 form-group ">
|
|
295
240
|
<p class="navbar-text" style="margin-left: 10%">说明: 层数输入1,门牌号输入001。产生的最终门牌号显示1001</p>
|
|
296
241
|
</div>
|
|
@@ -307,19 +252,6 @@
|
|
|
307
252
|
</div>
|
|
308
253
|
</div>
|
|
309
254
|
</validator>
|
|
310
|
-
|
|
311
|
-
<modal :show.sync="isshow" large backdrop="false" :width="900">
|
|
312
|
-
<header slot="modal-header" class="modal-header">
|
|
313
|
-
</header>
|
|
314
|
-
<article slot="modal-body" class="modal-body">
|
|
315
|
-
<amap-location :islocationclearmark="false" dom="addboxmap" v-ref:positionInfo @getmylocation="getmylocation"></amap-location>
|
|
316
|
-
</article>
|
|
317
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
318
|
-
<button v-show="isshow" type="button" class="button_clear btn-gn" @click='closeModal'>取消</button>
|
|
319
|
-
<button v-show="isshow" type="button" class="button_clear btn-gn" @click='confirmLocation'>确认</button>
|
|
320
|
-
</footer>
|
|
321
|
-
</modal>
|
|
322
|
-
|
|
323
255
|
</div>
|
|
324
256
|
</template>
|
|
325
257
|
|
|
@@ -339,12 +271,6 @@
|
|
|
339
271
|
title: '用户地址添加',
|
|
340
272
|
data () {
|
|
341
273
|
return {
|
|
342
|
-
//模态框是否显示
|
|
343
|
-
isshow: false,
|
|
344
|
-
//接收位置
|
|
345
|
-
templng: '', //临时经度
|
|
346
|
-
templat: '' , //临时纬度
|
|
347
|
-
|
|
348
274
|
//初始化省市区数据
|
|
349
275
|
pcdslist:[],
|
|
350
276
|
//初始化街道数据
|
|
@@ -352,7 +278,6 @@
|
|
|
352
278
|
//初始化街道数据
|
|
353
279
|
areaslist:[],
|
|
354
280
|
config:{
|
|
355
|
-
hasnumber:false,
|
|
356
281
|
f_building_suffix: '号楼',
|
|
357
282
|
f_unit_suffix: '单元',
|
|
358
283
|
f_floor_suffix: '层',
|
|
@@ -367,7 +292,6 @@
|
|
|
367
292
|
f_street: '',
|
|
368
293
|
f_residential_area: '',
|
|
369
294
|
f_slice_area: '',
|
|
370
|
-
slice_area:'',
|
|
371
295
|
f_building: '',
|
|
372
296
|
f_building_start: '',
|
|
373
297
|
f_building_end: '',
|
|
@@ -390,8 +314,6 @@
|
|
|
390
314
|
f_company: '',
|
|
391
315
|
//单位地址
|
|
392
316
|
f_company_address: '',
|
|
393
|
-
f_lng: '', //经度
|
|
394
|
-
f_lat: '' //纬度
|
|
395
317
|
},
|
|
396
318
|
//判读是否为单个数据录入
|
|
397
319
|
onedata: 'one',
|
|
@@ -411,209 +333,140 @@
|
|
|
411
333
|
ready(){
|
|
412
334
|
this.initdata()
|
|
413
335
|
getAreaConfig(this)
|
|
414
|
-
this.model.f_building_suffix=this.config.f_building_suffix
|
|
415
|
-
this.model.f_unit_suffix=this.config.f_unit_suffix
|
|
416
|
-
this.model.f_floor_suffix=this.config.f_floor_suffix
|
|
417
|
-
this.model.f_room_suffix=this.config.f_room_suffix
|
|
418
336
|
},
|
|
419
337
|
methods: {
|
|
420
|
-
standardyanzheng() {
|
|
421
|
-
console.log(this.model.f_standard_number.length)
|
|
422
|
-
if (this.model.f_standard_number.length != 2){
|
|
423
|
-
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
424
|
-
this.model.f_standard_number = ''
|
|
425
|
-
}
|
|
426
|
-
},
|
|
427
|
-
contractsyanzheng(){
|
|
428
|
-
console.log(this.model.f_contracts_number.length)
|
|
429
|
-
if (this.model.f_contracts_number.length != 5){
|
|
430
|
-
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
431
|
-
this.model.f_contracts_number = ''
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
338
|
async initdata(){
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
})
|
|
456
|
-
console.log('过滤之后的片区', arr)
|
|
457
|
-
this.sliceArea = []
|
|
458
|
-
arr.forEach((res) => {
|
|
459
|
-
this.sliceArea.push({label: res.name, value: res.name})
|
|
460
|
-
})
|
|
339
|
+
this.model.f_address_state = ['已通气']
|
|
340
|
+
this.initAreas(this.f_filialeids)
|
|
341
|
+
// 添加特殊地址选省市区
|
|
342
|
+
|
|
343
|
+
this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
|
|
344
|
+
this.initstreets(` f_filialeid = '${this.f_filialeids}' `)
|
|
345
|
+
this.initareas(` f_filialeid = '${this.f_filialeids}'`)
|
|
346
|
+
|
|
347
|
+
},
|
|
348
|
+
|
|
349
|
+
// 初始化片区
|
|
350
|
+
async initAreas (val) {
|
|
351
|
+
if (val) {
|
|
352
|
+
this.sliceArea = [];
|
|
353
|
+
let getAllArea = await this.$resetpost('/rs/sql/address_singleTableOrderBy', {
|
|
354
|
+
data:{
|
|
355
|
+
items: '*',
|
|
356
|
+
tablename: 't_zone',
|
|
357
|
+
orderitem: 'id',
|
|
358
|
+
condition: ` parentid = ${val}`
|
|
461
359
|
}
|
|
462
|
-
},
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
468
|
-
data: {
|
|
469
|
-
items: '*',
|
|
470
|
-
tablename: 't_pcd',
|
|
471
|
-
orderitem: 'id',
|
|
472
|
-
condition: pconditon
|
|
473
|
-
}
|
|
474
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
475
|
-
let redata = []
|
|
476
|
-
req.data.forEach((row, n) => {
|
|
477
|
-
redata[n] = {
|
|
478
|
-
label: row.f_pcd,
|
|
479
|
-
value: row.id,
|
|
480
|
-
data:row,
|
|
481
|
-
id:row.id
|
|
482
|
-
}
|
|
483
|
-
})
|
|
484
|
-
this.pcdslist=redata
|
|
485
|
-
},
|
|
486
|
-
//初始化街道 添加小区
|
|
487
|
-
async initstreets(pconditon){
|
|
488
|
-
this.streetslist = []
|
|
489
|
-
let HttpReset = new HttpResetClass()
|
|
490
|
-
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
491
|
-
data: {
|
|
492
|
-
items: '*',
|
|
493
|
-
tablename: 't_street',
|
|
494
|
-
orderitem: 'id',
|
|
495
|
-
condition: pconditon
|
|
496
|
-
}
|
|
497
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
498
|
-
let redata = []
|
|
499
|
-
req.data.forEach((row, n) => {
|
|
500
|
-
redata[n] = {
|
|
501
|
-
label: row.f_street,
|
|
502
|
-
value: row.id,
|
|
503
|
-
data:row,
|
|
504
|
-
id:row.id
|
|
505
|
-
}
|
|
360
|
+
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
|
361
|
+
|
|
362
|
+
if(getAllArea.data){
|
|
363
|
+
getAllArea.data.forEach((res) => {
|
|
364
|
+
this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
|
|
506
365
|
})
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
//初始化省市区,添加街道
|
|
370
|
+
async initpcds(pconditon){
|
|
371
|
+
this.pcdslist = []
|
|
372
|
+
let HttpReset = new HttpResetClass()
|
|
373
|
+
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
374
|
+
data: {
|
|
375
|
+
items: '*',
|
|
376
|
+
tablename: 't_pcd',
|
|
377
|
+
orderitem: 'id',
|
|
378
|
+
condition: pconditon
|
|
379
|
+
}
|
|
380
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
381
|
+
let redata = []
|
|
382
|
+
req.data.forEach((row, n) => {
|
|
383
|
+
redata[n] = {
|
|
384
|
+
label: row.f_pcd,
|
|
385
|
+
value: row.id,
|
|
386
|
+
data:row,
|
|
387
|
+
id:row.id
|
|
388
|
+
}
|
|
389
|
+
})
|
|
390
|
+
this.pcdslist=redata
|
|
391
|
+
},
|
|
392
|
+
//初始化街道 添加小区
|
|
393
|
+
async initstreets(pconditon){
|
|
394
|
+
this.streetslist = []
|
|
395
|
+
let HttpReset = new HttpResetClass()
|
|
396
|
+
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
397
|
+
data: {
|
|
398
|
+
items: '*',
|
|
399
|
+
tablename: 't_street',
|
|
400
|
+
orderitem: 'id',
|
|
401
|
+
condition: pconditon
|
|
402
|
+
}
|
|
403
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
404
|
+
let redata = []
|
|
405
|
+
req.data.forEach((row, n) => {
|
|
406
|
+
redata[n] = {
|
|
407
|
+
label: row.f_street,
|
|
408
|
+
value: row.id,
|
|
409
|
+
data:row,
|
|
410
|
+
id:row.id
|
|
411
|
+
}
|
|
412
|
+
})
|
|
413
|
+
this.streetslist=redata
|
|
414
|
+
},
|
|
415
|
+
//初始化小区添加小区
|
|
416
|
+
async initareas(pconditon){
|
|
417
|
+
// if(this.usertype){
|
|
418
|
+
// pconditon=pconditon+` and f_special='1' `
|
|
419
|
+
// }
|
|
420
|
+
this.areaslist = []
|
|
421
|
+
let HttpReset = new HttpResetClass()
|
|
422
|
+
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
423
|
+
data: {
|
|
424
|
+
items: '*',
|
|
425
|
+
tablename: 't_area',
|
|
426
|
+
orderitem: 'id',
|
|
427
|
+
condition: pconditon
|
|
428
|
+
}
|
|
429
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
430
|
+
let redata = []
|
|
431
|
+
req.data.forEach((row) => {
|
|
432
|
+
redata.push({
|
|
433
|
+
label: row.f_residential_area,
|
|
434
|
+
value: row.id,
|
|
435
|
+
data: row,
|
|
436
|
+
id: row.id
|
|
437
|
+
})
|
|
438
|
+
})
|
|
439
|
+
this.areaslist=redata
|
|
440
|
+
},
|
|
441
|
+
//省/市/区变化
|
|
442
|
+
async pcdChange(val){
|
|
443
|
+
// 只有添加特殊地址时才级联
|
|
444
|
+
if (!this.usertype) {
|
|
445
|
+
return
|
|
446
|
+
}else{
|
|
447
|
+
this.model.f_address=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
448
|
+
}
|
|
449
|
+
console.log("省/市/区变化",val)
|
|
450
|
+
if(val){
|
|
451
|
+
//那就把[小区,街道]重新组织一下
|
|
452
|
+
await this.initstreets(` f_pcd_id ='${val}' `)
|
|
453
|
+
if(this.model.f_street_id){
|
|
454
|
+
if (this.findbyid(this.streetslist,this.model.f_street_id)) {
|
|
455
|
+
let pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
|
|
456
|
+
if(pcd_id!=val){
|
|
457
|
+
this.model.f_street_id=''
|
|
522
458
|
}
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
req.data.forEach((row) => {
|
|
526
|
-
redata.push({
|
|
527
|
-
label: row.f_residential_area,
|
|
528
|
-
value: row.id,
|
|
529
|
-
data: row,
|
|
530
|
-
id: row.id
|
|
531
|
-
})
|
|
532
|
-
})
|
|
533
|
-
this.areaslist=redata
|
|
534
|
-
},
|
|
535
|
-
//省/市/区变化
|
|
536
|
-
async pcdChange(val){
|
|
537
|
-
// 只有添加特殊地址时才级联
|
|
538
|
-
if (!this.usertype) {
|
|
539
|
-
return
|
|
459
|
+
} else {
|
|
460
|
+
this.model.f_street_id=''
|
|
540
461
|
}
|
|
541
|
-
console.log("省/市/区变化",val)
|
|
542
|
-
if(val){
|
|
543
|
-
//那就把[小区,街道]重新组织一下
|
|
544
|
-
await this.initstreets(` f_pcd_id ='${val}' `)
|
|
545
|
-
if(this.model.f_street_id){
|
|
546
|
-
if (this.findbyid(this.streetslist,this.model.f_street_id)) {
|
|
547
|
-
let pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
|
|
548
|
-
if(pcd_id!=val){
|
|
549
|
-
this.model.f_street_id=''
|
|
550
|
-
}
|
|
551
|
-
} else {
|
|
552
|
-
this.model.f_street_id=''
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
//那就把[小区,街道]重新组织一下
|
|
556
|
-
if (this.model.f_street_id) {
|
|
557
|
-
await this.initareas(` f_street_id ='${this.model.f_street_id}' `)
|
|
558
|
-
if(this.model.f_residential_area_id){
|
|
559
|
-
if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
|
|
560
|
-
let pcd_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_pcd_id
|
|
561
|
-
if(pcd_id!=val){
|
|
562
|
-
this.model.f_residential_area_id=''
|
|
563
|
-
}
|
|
564
|
-
} else {
|
|
565
|
-
this.model.f_residential_area_id=''
|
|
566
|
-
}
|
|
567
462
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
this.$resetValidation()
|
|
573
|
-
},
|
|
574
|
-
//小区变化
|
|
575
|
-
areaChange(val){
|
|
576
|
-
console.log("小区变化",val)
|
|
577
|
-
// 选择小区后级联出省市区和街道
|
|
578
|
-
let selectArea // 选中的小区数据
|
|
579
|
-
for (let row of this.areaslist) {
|
|
580
|
-
if (val == row.value) {
|
|
581
|
-
selectArea = row.data
|
|
582
|
-
break
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
if (selectArea) {
|
|
586
|
-
this.model.f_street_id = selectArea.f_street_id
|
|
587
|
-
this.model.f_pcd_id = selectArea.f_pcd_id
|
|
588
|
-
this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
|
|
589
|
-
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
|
|
590
|
-
this.model.slice_area = selectArea.f_slice_area
|
|
591
|
-
// 拼接地址
|
|
592
|
-
this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
|
|
593
|
-
}
|
|
594
|
-
this.$nextTick(() => {
|
|
595
|
-
this.$resetValidation()
|
|
596
|
-
})
|
|
597
|
-
},
|
|
598
|
-
//街道变化
|
|
599
|
-
async streetChange(val){
|
|
600
|
-
console.log("街道变化",val)
|
|
601
|
-
if(this.streetslist[0]) {
|
|
602
|
-
var street=''
|
|
603
|
-
this.streetslist.forEach((item)=>{
|
|
604
|
-
if(item.id===val){
|
|
605
|
-
street=item.label
|
|
606
|
-
}
|
|
607
|
-
})
|
|
608
|
-
this.model.f_address = street
|
|
609
|
-
}
|
|
610
|
-
if(val){
|
|
611
|
-
//那就把[小区]重新组织一下
|
|
612
|
-
await this.initareas(` f_street_id ='${val}' `)
|
|
463
|
+
//那就把[小区,街道]重新组织一下
|
|
464
|
+
if (this.model.f_street_id) {
|
|
465
|
+
await this.initareas(` f_street_id ='${this.model.f_street_id}' `)
|
|
613
466
|
if(this.model.f_residential_area_id){
|
|
614
467
|
if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
|
|
615
|
-
let
|
|
616
|
-
if(
|
|
468
|
+
let pcd_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_pcd_id
|
|
469
|
+
if(pcd_id!=val){
|
|
617
470
|
this.model.f_residential_area_id=''
|
|
618
471
|
}
|
|
619
472
|
} else {
|
|
@@ -622,243 +475,264 @@
|
|
|
622
475
|
|
|
623
476
|
}
|
|
624
477
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
+ data.f_room + data.f_room_suffix
|
|
669
|
-
if (this.model.slice_area) {
|
|
670
|
-
data.f_slice_area = this.model.slice_area
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
this.$resetValidation()
|
|
481
|
+
},
|
|
482
|
+
//小区变化
|
|
483
|
+
areaChange(val){
|
|
484
|
+
console.log("小区变化",val)
|
|
485
|
+
|
|
486
|
+
// 选择小区后级联出省市区和街道
|
|
487
|
+
let selectArea // 选中的小区数据
|
|
488
|
+
for (let row of this.areaslist) {
|
|
489
|
+
if (val == row.value) {
|
|
490
|
+
selectArea = row.data
|
|
491
|
+
|
|
492
|
+
break
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
if (selectArea) {
|
|
496
|
+
this.model.f_street_id = selectArea.f_street_id
|
|
497
|
+
this.model.f_pcd_id = selectArea.f_pcd_id
|
|
498
|
+
this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
|
|
499
|
+
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
|
|
500
|
+
this.model.slice_area = [{name: selectArea.f_slice_area, code: selectArea.f_area_code}]
|
|
501
|
+
}
|
|
502
|
+
this.$nextTick(() => {
|
|
503
|
+
this.$resetValidation()
|
|
504
|
+
})
|
|
505
|
+
},
|
|
506
|
+
//街道变化
|
|
507
|
+
async streetChange(val){
|
|
508
|
+
console.log("街道变化",val)
|
|
509
|
+
if(this.streetslist[0]) {
|
|
510
|
+
var street=''
|
|
511
|
+
this.streetslist.forEach((item)=>{
|
|
512
|
+
if(item.id===val){
|
|
513
|
+
street=item.label
|
|
514
|
+
}
|
|
515
|
+
})
|
|
516
|
+
if(this.usertype && this.findbyid(this.pcdslist,this.model.f_pcd_id)!= null){
|
|
517
|
+
this.model.f_address =this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd+street
|
|
518
|
+
}else{
|
|
519
|
+
this.model.f_address = street
|
|
520
|
+
}
|
|
671
521
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
this.
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
this.$showAlert('输出数据有误,请检查', 'warning', 2000)
|
|
682
|
-
}
|
|
683
|
-
},
|
|
684
|
-
//保存多个
|
|
685
|
-
async confirmall(){
|
|
686
|
-
this.dealaddlist()
|
|
687
|
-
if(this.addresslist.length>0){
|
|
688
|
-
let msg = {
|
|
689
|
-
resolveMsg: '地址保存成功',
|
|
690
|
-
rejectMsg: '地址保存失败'
|
|
691
|
-
}
|
|
692
|
-
this.$showMessage('确定要批量添加'+this.addresslist.length+'户地址吗?,如有已经存在的,将会重复添加!!!', ['confirm', 'cancel']).then((res) => {
|
|
693
|
-
if (res === 'confirm') {
|
|
694
|
-
this.$resetpost('rs/logic/address_adduserlist',{data: {addlist:this.addresslist}},msg).then((req) => {
|
|
695
|
-
this.cleardara()
|
|
696
|
-
this.$dispatch('confirm')
|
|
697
|
-
})
|
|
698
|
-
}
|
|
699
|
-
})
|
|
700
|
-
}
|
|
701
|
-
},
|
|
702
|
-
//保存
|
|
703
|
-
async confirm(){
|
|
704
|
-
if(this.onedata=='one'){
|
|
705
|
-
await this.saveonedata()
|
|
706
|
-
}
|
|
707
|
-
this.cleardara()
|
|
708
|
-
this.$dispatch('confirm')
|
|
709
|
-
},
|
|
710
|
-
//保存一户信息
|
|
711
|
-
async saveonedata(){
|
|
712
|
-
this.model.f_create_person= this.$login.f.name
|
|
713
|
-
this.model.f_filialeid = this.f_filialeids
|
|
714
|
-
this.model.f_operator = this.$login.f.name
|
|
715
|
-
this.model.f_operatorid = this.$login.f.id
|
|
716
|
-
this.model.f_orgid = this.$login.f.orgid
|
|
717
|
-
this.model.f_orgname = this.$login.f.orgs
|
|
718
|
-
this.model.f_depid = this.$login.f.depids
|
|
719
|
-
this.model.f_depname = this.$login.f.deps
|
|
720
|
-
console.log("片区:",this.model.slice_area)
|
|
721
|
-
if (this.model.slice_area ) {
|
|
722
|
-
if (this.model.slice_area instanceof Array) {
|
|
723
|
-
console.log("修改",this.model.slice_area)
|
|
724
|
-
this.model.f_slice_area = this.model.slice_area[0].name
|
|
725
|
-
}else{
|
|
726
|
-
console.log("保存",this.model.slice_area)
|
|
727
|
-
this.model.f_slice_area = this.model.slice_area
|
|
522
|
+
}
|
|
523
|
+
if(val){
|
|
524
|
+
//那就把[小区]重新组织一下
|
|
525
|
+
await this.initareas(` f_street_id ='${val}' `)
|
|
526
|
+
if(this.model.f_residential_area_id){
|
|
527
|
+
if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
|
|
528
|
+
let street_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_street_id
|
|
529
|
+
if(street_id!=val){
|
|
530
|
+
this.model.f_residential_area_id=''
|
|
728
531
|
}
|
|
729
|
-
}
|
|
730
|
-
if (this.usertype) {
|
|
731
|
-
//非民用
|
|
732
|
-
this.model.f_special='1'
|
|
733
|
-
this.model.f_building_suffix=''
|
|
734
|
-
this.model.f_unit_suffix=''
|
|
735
|
-
this.model.f_floor_suffix=''
|
|
736
|
-
this.model.f_room_suffix=''
|
|
737
|
-
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
738
|
-
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
739
|
-
this.model.f_residential_area = this.findbyid(this.areaslist,this.model.f_residential_area_id) ? this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area : ''
|
|
740
532
|
} else {
|
|
741
|
-
|
|
742
|
-
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
743
|
-
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
744
|
-
this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
745
|
-
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
|
|
746
|
-
}
|
|
747
|
-
await this.$resetpost('rs/logic/address_updateuseraddress', this.model)
|
|
748
|
-
},
|
|
749
|
-
cancel(){
|
|
750
|
-
this.cleardara()
|
|
751
|
-
this.$dispatch('cancel')
|
|
752
|
-
},
|
|
753
|
-
cleardara(){
|
|
754
|
-
this.model= {
|
|
755
|
-
f_pcd_id: '',
|
|
756
|
-
f_street_id: '',
|
|
757
|
-
f_residential_area_id: '',
|
|
758
|
-
f_pcd: '',
|
|
759
|
-
f_comments:'',
|
|
760
|
-
f_street: '',
|
|
761
|
-
f_residential_area: '',
|
|
762
|
-
f_slice_area: '',
|
|
763
|
-
slice_area: '',
|
|
764
|
-
f_building: '',
|
|
765
|
-
f_building_start: '',
|
|
766
|
-
f_building_end: '',
|
|
767
|
-
f_building_prefix: '',
|
|
768
|
-
f_building_suffix: this.config.f_building_suffix,
|
|
769
|
-
f_unit: '',
|
|
770
|
-
f_unit_start: '',
|
|
771
|
-
f_unit_end: '',
|
|
772
|
-
f_unit_prefix: '',
|
|
773
|
-
f_unit_suffix: this.config.f_unit_suffix,
|
|
774
|
-
f_floor: '',
|
|
775
|
-
f_floor_start: '',
|
|
776
|
-
f_floor_end: '',
|
|
777
|
-
f_floor_prefix: '',
|
|
778
|
-
f_floor_suffix: this.config.f_floor_suffix,
|
|
779
|
-
f_room: '',
|
|
780
|
-
f_room_start: '',
|
|
781
|
-
f_room_end: '',
|
|
782
|
-
f_room_prefix: '',
|
|
783
|
-
f_room_suffix: this.config.f_room_suffix,
|
|
784
|
-
//详细地址
|
|
785
|
-
f_address: '',
|
|
786
|
-
//单位名称
|
|
787
|
-
f_company: '',
|
|
788
|
-
//单位地址
|
|
789
|
-
f_company_address: '',
|
|
790
|
-
f_lng: '',
|
|
791
|
-
f_lat: ''
|
|
533
|
+
this.model.f_residential_area_id=''
|
|
792
534
|
}
|
|
793
|
-
// this.pcdslist = []
|
|
794
|
-
// this.streetslist = []
|
|
795
|
-
// this.areaslist = []
|
|
796
|
-
},
|
|
797
535
|
|
|
798
|
-
//根据名字找数据
|
|
799
|
-
findbyid(list,name){
|
|
800
|
-
var result
|
|
801
|
-
list.forEach((row, n) => {
|
|
802
|
-
if(name==row.value){
|
|
803
|
-
result= row.data
|
|
804
|
-
}
|
|
805
|
-
})
|
|
806
|
-
return result
|
|
807
|
-
},
|
|
808
|
-
openModal () {
|
|
809
|
-
this.isshow = true
|
|
810
|
-
},
|
|
811
|
-
closeModal () {
|
|
812
|
-
this.isshow = false;
|
|
813
|
-
},
|
|
814
|
-
getmylocation (res) {
|
|
815
|
-
this.templng = res.position.lng
|
|
816
|
-
this.templat = res.position.lat
|
|
817
|
-
},
|
|
818
|
-
confirmLocation () {
|
|
819
|
-
this.model.f_lat = this.templat
|
|
820
|
-
this.model.f_lng = this.templng
|
|
821
|
-
this.isshow = false
|
|
822
536
|
}
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
537
|
+
}
|
|
538
|
+
this.$resetValidation()
|
|
539
|
+
},
|
|
540
|
+
|
|
541
|
+
getorg (val) {
|
|
542
|
+
this.f_orgid = val[0]
|
|
543
|
+
},
|
|
544
|
+
|
|
545
|
+
//处理批量地址信息
|
|
546
|
+
dealaddlist(){
|
|
547
|
+
try {
|
|
548
|
+
var resultlist=[]
|
|
549
|
+
for (var i = parseInt(this.model.f_building_start); i <= parseInt(this.model.f_building_end); i++) {
|
|
550
|
+
for (var j = parseInt(this.model.f_unit_start); j <= parseInt(this.model.f_unit_end); j++) {
|
|
551
|
+
for (var m = parseInt(this.model.f_floor_start); m <= parseInt(this.model.f_floor_end); m++) {
|
|
552
|
+
for (var n = parseInt(this.model.f_room_start); n <= parseInt(this.model.f_room_end); n++) {
|
|
553
|
+
//预备一个空的json
|
|
554
|
+
console.log('批量', this.model)
|
|
555
|
+
let data=Object.assign({},this.model)
|
|
556
|
+
data.f_create_person= this.$login.f.name
|
|
557
|
+
data.f_building= data.f_building_prefix + i
|
|
558
|
+
data.f_unit= data.f_unit_prefix + j
|
|
559
|
+
data.f_floor= data.f_floor_prefix + m
|
|
560
|
+
// 目前房号都按两位处理 如: 101室 201室 110室
|
|
561
|
+
if ((n+'').length == 1) {
|
|
562
|
+
data.f_room = data.f_room_prefix + m + '0' + n
|
|
563
|
+
} else {
|
|
564
|
+
data.f_room = data.f_room_prefix + m + '' + n
|
|
565
|
+
}
|
|
566
|
+
data.f_filialeid = this.f_filialeids
|
|
567
|
+
data.f_operator = this.$login.f.name
|
|
568
|
+
data.f_operatorid = this.$login.f.id
|
|
569
|
+
data.f_orgid = this.$login.f.orgid
|
|
570
|
+
data.f_orgname = this.$login.f.orgs
|
|
571
|
+
data.f_depid = this.$login.f.depids
|
|
572
|
+
data.f_depname = this.$login.f.deps
|
|
573
|
+
data.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
574
|
+
data.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
575
|
+
data.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
576
|
+
data.f_address = data.f_street
|
|
577
|
+
+ data.f_residential_area +
|
|
578
|
+
data.f_building + data.f_building_suffix
|
|
579
|
+
+ data.f_unit + data.f_unit_suffix
|
|
580
|
+
+ data.f_floor + data.f_floor_suffix
|
|
581
|
+
+ data.f_room + data.f_room_suffix
|
|
582
|
+
if (this.model.slice_area) {
|
|
583
|
+
if (this.model.slice_area.length > 0) {
|
|
584
|
+
data.f_slice_area = this.model.slice_area[0].name
|
|
585
|
+
data.f_area_code = this.model.slice_area[0].code
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
resultlist.push(data)
|
|
589
|
+
}
|
|
830
590
|
}
|
|
831
591
|
}
|
|
832
|
-
this.cleardara()
|
|
833
|
-
this.initdata()
|
|
834
|
-
},
|
|
835
|
-
'row'(){
|
|
836
|
-
this.onedata='one'
|
|
837
592
|
}
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
593
|
+
this.addresslist=resultlist
|
|
594
|
+
} catch (e) {
|
|
595
|
+
console.log(e)
|
|
596
|
+
this.$showAlert('输出数据有误,请检查', 'warning', 2000)
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
//保存多个
|
|
600
|
+
async confirmall(){
|
|
601
|
+
this.dealaddlist()
|
|
602
|
+
if(this.addresslist.length>0){
|
|
603
|
+
let msg = {
|
|
604
|
+
resolveMsg: '地址保存成功',
|
|
605
|
+
rejectMsg: '地址保存失败'
|
|
843
606
|
}
|
|
607
|
+
this.$showMessage('确定要批量添加'+this.addresslist.length+'户地址吗?,如有已经存在的,将会重复添加!!!', ['confirm', 'cancel']).then((res) => {
|
|
608
|
+
if (res === 'confirm') {
|
|
609
|
+
this.$resetpost('rs/logic/address_adduserlist',{data: {addlist:this.addresslist}},msg).then((req) => {
|
|
610
|
+
this.cleardara()
|
|
611
|
+
this.$dispatch('confirm')
|
|
612
|
+
})
|
|
613
|
+
}
|
|
614
|
+
})
|
|
844
615
|
}
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
616
|
+
},
|
|
617
|
+
//保存
|
|
618
|
+
async confirm(){
|
|
619
|
+
if(this.onedata=='one'){
|
|
620
|
+
await this.saveonedata()
|
|
621
|
+
}
|
|
622
|
+
this.cleardara()
|
|
623
|
+
this.$dispatch('confirm')
|
|
624
|
+
},
|
|
625
|
+
//保存一户信息
|
|
626
|
+
async saveonedata(){
|
|
627
|
+
this.model.f_create_person= this.$login.f.name
|
|
628
|
+
this.model.f_filialeid = this.f_filialeids
|
|
629
|
+
this.model.f_operator = this.$login.f.name
|
|
630
|
+
this.model.f_operatorid = this.$login.f.id
|
|
631
|
+
this.model.f_orgid = this.$login.f.orgid
|
|
632
|
+
this.model.f_orgname = this.$login.f.orgs
|
|
633
|
+
this.model.f_depid = this.$login.f.depids
|
|
634
|
+
this.model.f_depname = this.$login.f.deps
|
|
635
|
+
if (this.model.slice_area) {
|
|
636
|
+
if (this.model.slice_area.length > 0) {
|
|
637
|
+
this.model.f_slice_area = this.model.slice_area[0].name
|
|
638
|
+
this.model.f_area_code = this.model.slice_area[0].code
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
if (this.usertype) {
|
|
642
|
+
//非民用
|
|
643
|
+
this.model.f_special='1'
|
|
644
|
+
this.model.f_building_suffix=''
|
|
645
|
+
this.model.f_unit_suffix=''
|
|
646
|
+
this.model.f_floor_suffix=''
|
|
647
|
+
this.model.f_room_suffix=''
|
|
648
|
+
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
649
|
+
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
650
|
+
} else {
|
|
651
|
+
//民用
|
|
652
|
+
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
653
|
+
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
654
|
+
this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
655
|
+
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
|
|
851
656
|
}
|
|
852
|
-
.
|
|
853
|
-
|
|
657
|
+
await this.$resetpost('rs/logic/address_updateuseraddress', this.model)
|
|
658
|
+
},
|
|
659
|
+
cancel(){
|
|
660
|
+
this.cleardara()
|
|
661
|
+
this.$dispatch('cancel')
|
|
662
|
+
},
|
|
663
|
+
cleardara(){
|
|
664
|
+
this.model= {
|
|
665
|
+
f_pcd_id: '',
|
|
666
|
+
f_street_id: '',
|
|
667
|
+
f_residential_area_id: '',
|
|
668
|
+
f_pcd: '',
|
|
669
|
+
f_comments:'',
|
|
670
|
+
f_street: '',
|
|
671
|
+
f_residential_area: '',
|
|
672
|
+
f_slice_area: '',
|
|
673
|
+
f_building: '',
|
|
674
|
+
f_building_start: '',
|
|
675
|
+
f_building_end: '',
|
|
676
|
+
f_building_prefix: '',
|
|
677
|
+
f_building_suffix: this.config.f_building_suffix,
|
|
678
|
+
f_unit: '',
|
|
679
|
+
f_unit_start: '',
|
|
680
|
+
f_unit_end: '',
|
|
681
|
+
f_unit_prefix: '',
|
|
682
|
+
f_unit_suffix: this.config.f_unit_suffix,
|
|
683
|
+
f_floor: '',
|
|
684
|
+
f_floor_start: '',
|
|
685
|
+
f_floor_end: '',
|
|
686
|
+
f_floor_prefix: '',
|
|
687
|
+
f_floor_suffix: this.config.f_floor_suffix,
|
|
688
|
+
f_room: '',
|
|
689
|
+
f_room_start: '',
|
|
690
|
+
f_room_end: '',
|
|
691
|
+
f_room_prefix: '',
|
|
692
|
+
f_room_suffix: this.config.f_room_suffix,
|
|
693
|
+
//详细地址
|
|
694
|
+
f_address: '',
|
|
695
|
+
//单位名称
|
|
696
|
+
f_company: '',
|
|
697
|
+
//单位地址
|
|
698
|
+
f_company_address: '',
|
|
854
699
|
}
|
|
855
|
-
.
|
|
856
|
-
|
|
857
|
-
|
|
700
|
+
// this.pcdslist = []
|
|
701
|
+
// this.streetslist = []
|
|
702
|
+
// this.areaslist = []
|
|
703
|
+
},
|
|
704
|
+
|
|
705
|
+
//根据名字找数据
|
|
706
|
+
findbyid(list,name){
|
|
707
|
+
var result
|
|
708
|
+
list.forEach((row, n) => {
|
|
709
|
+
if(name==row.value){
|
|
710
|
+
result= row.data
|
|
711
|
+
}
|
|
712
|
+
})
|
|
713
|
+
return result
|
|
714
|
+
},
|
|
715
|
+
},
|
|
716
|
+
watch: {
|
|
717
|
+
//分公司变化
|
|
718
|
+
'f_filialeids'(){
|
|
719
|
+
if (this.model.f_filialeid) {
|
|
720
|
+
if (this.model.f_filialeid != this.f_filialeids) {
|
|
721
|
+
this.$dispatch('cancel')
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
this.cleardara()
|
|
725
|
+
this.initdata()
|
|
726
|
+
},
|
|
727
|
+
'row'(){
|
|
728
|
+
this.onedata='one'
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
computed: {
|
|
732
|
+
//地址状态下拉框
|
|
733
|
+
addresstate() {
|
|
734
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
|
|
858
735
|
}
|
|
859
736
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
737
|
+
}
|
|
738
|
+
</script>
|