address-client 4.0.4 → 4.0.5-yc
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/8.5/checksums/checksums.lock +0 -0
- package/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/8.5/executionHistory/executionHistory.bin +0 -0
- package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
- package/.gradle/8.5/fileHashes/fileHashes.bin +0 -0
- package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/.gradle/file-system.probe +0 -0
- package/package.json +1 -1
- package/src/components/AddressList.vue +2 -2
- package/src/filiale/huaran/components/AddAreaMsg.vue +2 -2
- package/src/filiale/huaran/components/AddStreetOrPcd.vue +2 -2
- package/src/filiale/huaran/components/UserAddress.vue +2 -2
- package/src/filiale/tongchuan/AddressList.vue +13 -0
- package/src/filiale/zhongsheng/UserAddress.vue +907 -0
- package/src/filiale/zhongsheng/sale.js +3 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
</header>
|
|
198
198
|
<article slot="modal-body" class="modal-body">
|
|
199
199
|
<div class="form-group">
|
|
200
|
-
<file-upload class="my-file-uploader col-sm-9" name="useraddressUploadFile" action="
|
|
200
|
+
<file-upload class="my-file-uploader col-sm-9" name="useraddressUploadFile" action="api/af-revenue/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
|
|
201
201
|
<button class="button_clear btn-gn" style="margin-top: 10px;background-color: #6aa6e2;" @click="downloadFiles()">模板下载
|
|
202
202
|
</button>
|
|
203
203
|
</div>
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
},
|
|
338
338
|
methods: {
|
|
339
339
|
downloadFiles(){
|
|
340
|
-
let downurl='
|
|
340
|
+
let downurl='api/af-revenue/downloadfile/file?filename=地址导入Excel模板';
|
|
341
341
|
this.$resetget(downurl,{}).then(res=>{
|
|
342
342
|
var link = document.createElement('a');
|
|
343
343
|
link.target="_blank"
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
</div>
|
|
268
268
|
</div>
|
|
269
269
|
<div class="row auto" style="text-align:right;">
|
|
270
|
-
<button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid|| !this.validateCanSave()'>保存</button>
|
|
270
|
+
<button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid|| !this.validateCanSave()' v-if="canSave">保存</button>
|
|
271
271
|
<button class="button_clear button_spacing" @click="cancel()">取消</button>
|
|
272
272
|
</div>
|
|
273
273
|
<div v-if="areatype == '楼栋'" class="row" style="margin-top:40px;height: 580px;">
|
|
@@ -295,7 +295,7 @@ export default {
|
|
|
295
295
|
title: '小区添加',
|
|
296
296
|
data() {
|
|
297
297
|
return {
|
|
298
|
-
canSave:
|
|
298
|
+
canSave: this.$login.r.includes('小区修改权限'),
|
|
299
299
|
config: {
|
|
300
300
|
hasnumber: false,
|
|
301
301
|
},
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
|
|
90
90
|
<div class="row">
|
|
91
91
|
<div style="margin-top:40px;text-align:right;">
|
|
92
|
-
<button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid || !this.validateCanSave()' >保存</button>
|
|
92
|
+
<button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid || !this.validateCanSave()' v-if="canSave">保存</button>
|
|
93
93
|
<button class="button_clear button_spacing" @click="cancel()">取消</button>
|
|
94
94
|
</div>
|
|
95
95
|
<div v-if="areatype=='省市区'" class="row" style="margin-top:40px;height: 580px;">
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
title: '区域地址添加',
|
|
116
116
|
data () {
|
|
117
117
|
return {
|
|
118
|
-
canSave:
|
|
118
|
+
canSave: this.$login.r.includes('区域地址修改权限'),
|
|
119
119
|
//初始化省市区数据
|
|
120
120
|
config:{
|
|
121
121
|
hasnumber: false
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
</div>
|
|
312
312
|
<div class="row">
|
|
313
313
|
<div style="text-align:right;margin-top:20px;margin-right:50px;" class="col-sm-12">
|
|
314
|
-
<button class="button_search button_spacing" @click="confirmall()" :disabled='!$v.valid || !this.validateCanSave()'>保存</button>
|
|
314
|
+
<button class="button_search button_spacing" @click="confirmall()" :disabled='!$v.valid || !this.validateCanSave()' v-if="canSave">保存</button>
|
|
315
315
|
<button class="button_clear button_spacing" @click="cancel()">取消</button>
|
|
316
316
|
</div>
|
|
317
317
|
</div>
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
title: '用户地址添加',
|
|
350
350
|
data () {
|
|
351
351
|
return {
|
|
352
|
-
canSave:
|
|
352
|
+
canSave: this.$login.r.includes('详细地址修改权限'),
|
|
353
353
|
//模态框是否显示
|
|
354
354
|
isshow: false,
|
|
355
355
|
//接收位置
|
|
@@ -131,6 +131,16 @@
|
|
|
131
131
|
close-on-select>
|
|
132
132
|
</v-select>
|
|
133
133
|
</div>
|
|
134
|
+
<div :class="$parent.$parent.style">
|
|
135
|
+
<label class="font_normal_body">客户状态</label>
|
|
136
|
+
<v-select :options='$parent.$parent.userstates'
|
|
137
|
+
:value.sync="model.f_user_state"
|
|
138
|
+
close-on-select
|
|
139
|
+
condition="u.f_user_state='{}'"
|
|
140
|
+
placeholder='客户状态'
|
|
141
|
+
v-model="model.f_user_state">
|
|
142
|
+
</v-select>
|
|
143
|
+
</div>
|
|
134
144
|
</div>
|
|
135
145
|
</div>
|
|
136
146
|
</criteria>
|
|
@@ -372,6 +382,9 @@
|
|
|
372
382
|
getCondition() {
|
|
373
383
|
return {
|
|
374
384
|
condition: `${this.$refs.paged.$refs.cri.condition}` + `and a.f_filialeid = '${this.f_filialeids}'`}
|
|
385
|
+
},
|
|
386
|
+
userstates () {
|
|
387
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('客户状态')]
|
|
375
388
|
}
|
|
376
389
|
}
|
|
377
390
|
|
|
@@ -0,0 +1,907 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto" id="userAddress" style="height:80%">
|
|
3
|
+
<validator name='v'>
|
|
4
|
+
<p class="bg-info text-center" style="padding: 8px;">{{usertype ? '特殊地址管理' : '民用地址管理'}}</p>
|
|
5
|
+
<div class="auto select-overspread form-horizontal">
|
|
6
|
+
<div class="form-group" v-if="!usertype&&!model.id&&!config.hasnumber">
|
|
7
|
+
<input type="radio" id="true" value="one" v-model="onedata">
|
|
8
|
+
<label for="true">单户</label>
|
|
9
|
+
<input type="radio" id="false" value="more" v-model="onedata">
|
|
10
|
+
<label for="false">多户</label>
|
|
11
|
+
</div>
|
|
12
|
+
<!--单个录入-->
|
|
13
|
+
<div v-if="onedata=='one'" class="row">
|
|
14
|
+
<div class="col-sm-6 form-group "
|
|
15
|
+
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']" v-if="!usertype">
|
|
16
|
+
<label class="font_normal_body">省 市 区</label>
|
|
17
|
+
<input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"
|
|
18
|
+
>
|
|
19
|
+
<v-select :value.sync="model.f_pcd_id" :value-single="true"
|
|
20
|
+
:options='pcdslist' placeholder='请选择'
|
|
21
|
+
close-on-select search="true" @change="pcdChange" :disabled="!usertype">
|
|
22
|
+
</v-select>
|
|
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
|
+
|
|
35
|
+
<div class="col-sm-6 form-group " v-if="!usertype"
|
|
36
|
+
:class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
|
|
37
|
+
<label class="font_normal_body">街道/乡镇</label>
|
|
38
|
+
<input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"
|
|
39
|
+
>
|
|
40
|
+
<v-select :value.sync="model.f_street_id" :value-single="true"
|
|
41
|
+
:options='streetslist' placeholder='请选择'
|
|
42
|
+
close-on-select search="true" :disabled="!usertype">
|
|
43
|
+
</v-select>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="col-sm-6 form-group " v-if="usertype"
|
|
46
|
+
:class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
|
|
47
|
+
<label class="font_normal_body">街道/乡镇</label>
|
|
48
|
+
<input type="text" style="width:41%" v-show="false" v-model="model.f_street_id" v-validate:f_street_id='{required: true }'
|
|
49
|
+
>
|
|
50
|
+
<v-select :value.sync="model.f_street_id" :value-single="true"
|
|
51
|
+
:options='streetslist' placeholder='请选择'
|
|
52
|
+
@change="streetChange"
|
|
53
|
+
close-on-select search="true" :disabled="!usertype">
|
|
54
|
+
</v-select>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="col-sm-6 form-group " v-if="!usertype"
|
|
57
|
+
:class="[$v.f_residential_area_id1.required ? 'has-error' : 'has-success']">
|
|
58
|
+
<label class="font_normal_body">小区名称</label>
|
|
59
|
+
<input type="text" style="width:41%" v-show="false" v-model="model.f_residential_area_id"
|
|
60
|
+
v-validate:f_residential_area_id1='{required: true }'>
|
|
61
|
+
<v-select :value.sync="model.f_residential_area_id" :value-single="true"
|
|
62
|
+
:options='areaslist' placeholder='请选择'
|
|
63
|
+
@change="areaChange"
|
|
64
|
+
close-on-select search="true">
|
|
65
|
+
</v-select>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
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
|
+
|
|
77
|
+
<div class="col-sm-6 form-group ">
|
|
78
|
+
<label class="font_normal_body">片  区</label>
|
|
79
|
+
<v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"
|
|
80
|
+
:options='sliceArea' placeholder='片区/管理站' filer-key="name"
|
|
81
|
+
close-on-select v-ref:slice>
|
|
82
|
+
</v-select>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="col-sm-6 form-group " v-if="!usertype">
|
|
85
|
+
<label class="font_normal_body">地区类型</label>
|
|
86
|
+
<v-select
|
|
87
|
+
:value.sync="model.f_iscity" :value-single="true"
|
|
88
|
+
:options='iscity' placeholder='请选择'
|
|
89
|
+
@change="changecity"
|
|
90
|
+
close-on-select>
|
|
91
|
+
</v-select>
|
|
92
|
+
</div>
|
|
93
|
+
<div v-if="!usertype" class="col-sm-6 form-group ">
|
|
94
|
+
<label for="f_address" class="font_normal_body">楼  号</label>
|
|
95
|
+
<input type="text" style="width:40%" v-model="model.f_building" class="input_search"
|
|
96
|
+
placeholder="楼号"/>
|
|
97
|
+
<input type="text" style="width:20%" v-model="model.f_building_suffix" class="input_search"
|
|
98
|
+
/>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
<div v-if="!usertype" class="col-sm-6 form-group ">
|
|
102
|
+
<label for="f_address" class="font_normal_body">单  元</label>
|
|
103
|
+
<input type="text" style="width:40%" v-model="model.f_unit" class="input_search" placeholder="单元"/>
|
|
104
|
+
<input type="text" style="width:20%" v-model="model.f_unit_suffix" class="input_search"
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
<div v-if="!usertype" class="col-sm-6 form-group ">
|
|
108
|
+
<label for="f_address" class="font_normal_body">楼  层</label>
|
|
109
|
+
<input type="text" style="width:40%" v-model="model.f_floor" class="input_search"
|
|
110
|
+
placeholder="楼层" disabled/>
|
|
111
|
+
<input type="text" style="width:20%" v-model="model.f_floor_suffix" class="input_search" disabled
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
<div v-if="!usertype" class="col-sm-6 form-group "
|
|
115
|
+
:class="[$v.f_room.required ? 'has-error' : 'has-success']">
|
|
116
|
+
<label for="f_address" class="font_normal_body">门 牌 号</label>
|
|
117
|
+
<input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"
|
|
118
|
+
v-validate:f_room='{required: true }'/>
|
|
119
|
+
<input type="text" style="width:20%" v-model="model.f_room_suffix" class="input_search"
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="col-sm-6 form-group">
|
|
123
|
+
<label class="font_normal_body">地址状态</label>
|
|
124
|
+
<v-select :value.sync="model.f_address_state" :value-single="true"
|
|
125
|
+
class="select_list select"
|
|
126
|
+
condition="f_address_state = '{}'"
|
|
127
|
+
:options='addresstate' placeholder='地址状态'
|
|
128
|
+
close-on-select>
|
|
129
|
+
</v-select>
|
|
130
|
+
</div>
|
|
131
|
+
<div v-if="!usertype" class="col-sm-8 form-group ">
|
|
132
|
+
<label class="font_normal_body">经 纬 度</label>
|
|
133
|
+
<input type="text" style="width:30%" v-model="model.f_lng" class="input_search" placeholder="经度"/>
|
|
134
|
+
<input type="text" style="width:30%" v-model="model.f_lat" class="input_search" placeholder="纬度"/>
|
|
135
|
+
 <span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div v-if="usertype" class="col-sm-12 form-group "
|
|
139
|
+
:class="[$v.f_address.required ? 'has-error' : 'has-success']">
|
|
140
|
+
<label for="f_address" class="font_normal_body">详细地址</label>
|
|
141
|
+
<input type="text" style="width:80%" v-model="model.f_address" class="input_search" placeholder="详细地址"
|
|
142
|
+
v-validate:f_address='{required: true }'/>
|
|
143
|
+
</div>
|
|
144
|
+
<div v-if="usertype" class="col-sm-8 form-group ">
|
|
145
|
+
<label class="font_normal_body">经 纬 度</label>
|
|
146
|
+
<input type="text" style="width:30%" v-model="model.f_lng" class="input_search" placeholder="经度"/>
|
|
147
|
+
<input type="text" style="width:30%" v-model="model.f_lat" class="input_search" placeholder="纬度"/>
|
|
148
|
+
 <span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
|
|
149
|
+
</div>
|
|
150
|
+
<div class="col-sm-6 form-group " v-if="config.hasnumber"
|
|
151
|
+
:class="[$v.f_standard_number.required ? 'has-error' : 'has-success']">
|
|
152
|
+
<label class="font_normal_body"> 规范号</label>
|
|
153
|
+
<input type="text" v-model="model.f_standard_number"
|
|
154
|
+
@change="standardyanzheng"
|
|
155
|
+
class="input_search" style="width:60%" placeholder="地址规范号"
|
|
156
|
+
v-validate:f_standard_number='{required: true }'>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="col-sm-6 form-group " v-if="config.hasnumber"
|
|
159
|
+
:class="[$v.f_contracts_number.required ? 'has-error' : 'has-success']">
|
|
160
|
+
<label class="font_normal_body"> 合同号</label>
|
|
161
|
+
<input type="text" v-model="model.f_contracts_number"
|
|
162
|
+
@change="contractsyanzheng"
|
|
163
|
+
class="input_search" style="width:60%" placeholder="合同顺序号"
|
|
164
|
+
v-validate:f_contracts_number='{required: true }'>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="col-sm-12 form-group" style="margin-bottom: 12px;margin-top: 12px;">
|
|
167
|
+
<label class="font_normal_body">小区备注</label>
|
|
168
|
+
<textarea class="input_textarea" rows="3" style="width:80%; height:auto;" v-model="model.f_comments1"></textarea>
|
|
169
|
+
</div>
|
|
170
|
+
<div class="col-sm-12 form-group" style="margin-top: 12px; margin-bottom: 12px;">
|
|
171
|
+
<label class="font_normal_body">备  注</label>
|
|
172
|
+
<textarea class="input_textarea" rows="3" style="margin-top: 25px; width:80%; height:auto;" v-model="model.f_comments"></textarea>
|
|
173
|
+
</div>
|
|
174
|
+
<div style="text-align:right;margin-top:40px;margin-right:50px;" class="col-sm-12">
|
|
175
|
+
<button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
|
|
176
|
+
<button class="button_clear button_spacing" @click="cancel()">取消</button>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
</div>
|
|
180
|
+
<!--批量录入-->
|
|
181
|
+
<div v-if="onedata=='more'" class="row">
|
|
182
|
+
<div class="col-sm-6 form-group "
|
|
183
|
+
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
|
|
184
|
+
<label class="font_normal_body">省 市 区</label>
|
|
185
|
+
<input type="text" style="width:60%" v-show="false" v-model="model.f_pcd_id"
|
|
186
|
+
>
|
|
187
|
+
<v-select :value.sync="model.f_pcd_id" :value-single="true"
|
|
188
|
+
:options='pcdslist' placeholder='请选择'
|
|
189
|
+
close-on-select search="true" @change="pcdChange" :disabled="!usertype">
|
|
190
|
+
</v-select>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="col-sm-6 form-group "
|
|
193
|
+
:class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
|
|
194
|
+
<label class="font_normal_body">街  道</label>
|
|
195
|
+
<input type="text" style="width:60%" v-show="false" v-model="model.f_street_id"
|
|
196
|
+
>
|
|
197
|
+
<v-select :value.sync="model.f_street_id" :value-single="true"
|
|
198
|
+
:options='streetslist' placeholder='请选择'
|
|
199
|
+
close-on-select search="true" :disabled="!usertype">
|
|
200
|
+
</v-select>
|
|
201
|
+
</div>
|
|
202
|
+
<div class="col-sm-6 form-group "
|
|
203
|
+
:class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
|
|
204
|
+
<label class="font_normal_body">小区名称</label>
|
|
205
|
+
<input type="text" style="width:60%" v-show="false" v-model="model.f_residential_area_id"
|
|
206
|
+
v-validate:f_residential_area_id='{required: true }'>
|
|
207
|
+
<v-select :value.sync="model.f_residential_area_id" :value-single="true"
|
|
208
|
+
@change="areaChange"
|
|
209
|
+
:options='areaslist' placeholder='请选择'
|
|
210
|
+
close-on-select search="true">
|
|
211
|
+
</v-select>
|
|
212
|
+
</div>
|
|
213
|
+
<!-- <div class="col-sm-6 form-group " :class="[$v.slice.required ? 'has-error' : 'has-success']">-->
|
|
214
|
+
<!-- <label class="font_normal_body">片  区</label>-->
|
|
215
|
+
<!-- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"-->
|
|
216
|
+
<!-- >-->
|
|
217
|
+
<!-- <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"-->
|
|
218
|
+
<!-- :options='sliceArea' placeholder='片区/管理站' filer-key="name"-->
|
|
219
|
+
<!-- close-on-select v-ref:slice>-->
|
|
220
|
+
<!-- </v-select>-->
|
|
221
|
+
<!-- </div>-->
|
|
222
|
+
|
|
223
|
+
<div class="col-sm-6 form-group "
|
|
224
|
+
:class="[$v.f_building_start.integernum || $v.f_building_start.dctest ?'has-error' : 'has-success']">
|
|
225
|
+
<label for="f_address" class="font_normal_body">起始楼号</label>
|
|
226
|
+
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
|
|
227
|
+
<input type="text" style="width:25%"
|
|
228
|
+
v-validate:f_building_start='{integernum: true ,dctest: [model.f_building_end, "<=" ]}'
|
|
229
|
+
v-model="model.f_building_start" class="input_search" placeholder="楼号"/>
|
|
230
|
+
<input type="text" style="width:17%" v-model="model.f_building_suffix" class="input_search"/>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="col-sm-6 form-group "
|
|
233
|
+
:class="[$v.f_building_end.integernum ||$v.f_building_end.dctest ? 'has-error' : 'has-success']">
|
|
234
|
+
<label for="f_address" class="font_normal_body">截止楼号</label>
|
|
235
|
+
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
|
|
236
|
+
<input type="text" style="width:25%"
|
|
237
|
+
v-validate:f_building_end='{integernum: true ,dctest: [model.f_building_start, ">=" ]}'
|
|
238
|
+
v-model="model.f_building_end" class="input_search" placeholder="楼号"/>
|
|
239
|
+
<input type="text" style="width:17%" v-model="model.f_building_suffix" class="input_search"
|
|
240
|
+
/>
|
|
241
|
+
</div>
|
|
242
|
+
<div class="col-sm-6 form-group "
|
|
243
|
+
:class="[$v.f_unit_start.integernum || $v.f_unit_start.dctest ? 'has-error' : 'has-success']">
|
|
244
|
+
<label for="f_address" class="font_normal_body">起始单元</label>
|
|
245
|
+
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
|
|
246
|
+
<input type="text" style="width:25%"
|
|
247
|
+
v-validate:f_unit_start='{integernum: true ,dctest: [model.f_unit_end, "<=" ]}'
|
|
248
|
+
v-model="model.f_unit_start" class="input_search" placeholder="单元"/>
|
|
249
|
+
<input type="text" style="width:17%" v-model="model.f_unit_suffix" class="input_search" />
|
|
250
|
+
</div>
|
|
251
|
+
<div class="col-sm-6 form-group "
|
|
252
|
+
:class="[$v.f_unit_end.integernum ||$v.f_unit_end.dctest ? 'has-error' : 'has-success']">
|
|
253
|
+
<label for="f_address" class="font_normal_body">截止单元</label>
|
|
254
|
+
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
|
|
255
|
+
<input type="text" style="width:25%"
|
|
256
|
+
v-validate:f_unit_end='{integernum: true ,dctest: [model.f_unit_start, ">="]}'
|
|
257
|
+
v-model="model.f_unit_end" class="input_search" placeholder="单元"/>
|
|
258
|
+
<input type="text" style="width:17%" v-model="model.f_unit_suffix" class="input_search"/>
|
|
259
|
+
</div>
|
|
260
|
+
<div class="col-sm-6 form-group "
|
|
261
|
+
:class="[$v.f_floor_start.integernum || $v.f_floor_start.dctest ? 'has-error' : 'has-success']">
|
|
262
|
+
<label for="f_address" class="font_normal_body">起始楼层</label>
|
|
263
|
+
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
|
|
264
|
+
<input type="text" style="width:25%"
|
|
265
|
+
v-validate:f_floor_start='{integernum: true,dctest: [model.f_floor_end, "<=" ] }'
|
|
266
|
+
v-model="model.f_floor_start" class="input_search" placeholder="楼层"/>
|
|
267
|
+
<input type="text" style="width:17%" v-model="model.f_floor_suffix" class="input_search"/>
|
|
268
|
+
</div>
|
|
269
|
+
<div class="col-sm-6 form-group "
|
|
270
|
+
:class="[$v.f_floor_end.integernum ||$v.f_floor_end.dctest ? 'has-error' : 'has-success']">
|
|
271
|
+
<label for="f_address" class="font_normal_body">截止楼层</label>
|
|
272
|
+
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
|
|
273
|
+
<input type="text" style="width:25%" v-model="model.f_floor_end"
|
|
274
|
+
v-validate:f_floor_end='{integernum: true,dctest: [model.f_floor_start, ">=" ] }'
|
|
275
|
+
class="input_search" placeholder="楼层"/>
|
|
276
|
+
<input type="text" style="width:17%" v-model="model.f_floor_suffix" class="input_search"/>
|
|
277
|
+
</div>
|
|
278
|
+
<div class="col-sm-6 form-group "
|
|
279
|
+
:class="[$v.f_room_start.integernum || $v.f_room_start.dctest ? 'has-error' : 'has-success']">
|
|
280
|
+
<label for="f_address" class="font_normal_body">起始门牌</label>
|
|
281
|
+
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
|
|
282
|
+
<input type="text" style="width:25%" v-model="model.f_room_start"
|
|
283
|
+
class="input_search" placeholder="门牌号"
|
|
284
|
+
v-validate:f_room_start='{integernum: true ,dctest: [model.f_room_end, "<=" ]}'
|
|
285
|
+
/>
|
|
286
|
+
<input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
|
|
287
|
+
</div>
|
|
288
|
+
<div class="col-sm-6 form-group "
|
|
289
|
+
:class="[$v.f_room_end.integernum ||$v.f_room_end.dctest ? 'has-error' : 'has-success']">
|
|
290
|
+
<label for="f_address" class="font_normal_body">截止门牌</label>
|
|
291
|
+
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
|
|
292
|
+
<input type="text" style="width:25%" v-model="model.f_room_end" class="input_search" placeholder="门牌号"
|
|
293
|
+
v-validate:f_room_end='{integernum: true ,dctest: [model.f_room_start, ">=" ]}'/>
|
|
294
|
+
<input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
|
|
295
|
+
</div>
|
|
296
|
+
<div class="col-sm-6 form-group">
|
|
297
|
+
<label class="font_normal_body">地址状态</label>
|
|
298
|
+
<v-select :value.sync="model.f_address_state" :value-single="true"
|
|
299
|
+
class="select_list select"
|
|
300
|
+
condition="f_address_state = '{}'"
|
|
301
|
+
:options='addresstate' placeholder='地址状态'
|
|
302
|
+
close-on-select>
|
|
303
|
+
</v-select>
|
|
304
|
+
</div>
|
|
305
|
+
<div class="col-sm-10 form-group ">
|
|
306
|
+
<p class="navbar-text" style="margin-left: 10%">说明: 层数输入1,门牌号输入001。产生的最终门牌号显示1001</p>
|
|
307
|
+
</div>
|
|
308
|
+
<div class="col-sm-12 form-group">
|
|
309
|
+
<label class="font_normal_body " style="margin-top:-20px">备  注</label>
|
|
310
|
+
<textarea class="input_textarea" rows="3" style="width:80%;height: auto;" v-model="model.f_comments"></textarea>
|
|
311
|
+
</div>
|
|
312
|
+
<div class="row">
|
|
313
|
+
<div style="text-align:right;margin-top:20px;margin-right:50px;" class="col-sm-12">
|
|
314
|
+
<button class="button_search button_spacing" @click="confirmall()" :disabled='!$v.valid'>保存</button>
|
|
315
|
+
<button class="button_clear button_spacing" @click="cancel()">取消</button>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</validator>
|
|
321
|
+
|
|
322
|
+
<!-- <modal v-if="isshow" :show.sync="isshow" large backdrop="false" :width="900">-->
|
|
323
|
+
<!-- <header slot="modal-header" class="modal-header">-->
|
|
324
|
+
<!-- </header>-->
|
|
325
|
+
<!-- <article slot="modal-body" class="modal-body">-->
|
|
326
|
+
<!-- <amap-location :islocationclearmark="false" dom="addboxmap" v-ref:positionInfo @getmylocation="getmylocation"></amap-location>-->
|
|
327
|
+
<!-- </article>-->
|
|
328
|
+
<!-- <footer slot="modal-footer" class="modal-footer">-->
|
|
329
|
+
<!-- <button v-show="isshow" type="button" class="button_search button_spacing" @click='confirmLocation'>确认</button>-->
|
|
330
|
+
<!-- <button v-show="isshow" type="button" class="button_clear button_spacing" @click='closeModal'>取消</button>-->
|
|
331
|
+
<!-- </footer>-->
|
|
332
|
+
<!-- </modal>-->
|
|
333
|
+
|
|
334
|
+
</div>
|
|
335
|
+
</template>
|
|
336
|
+
|
|
337
|
+
<script>
|
|
338
|
+
import {HttpResetClass} from 'vue-client'
|
|
339
|
+
|
|
340
|
+
let getAreaConfig = async function (self) {
|
|
341
|
+
// 获取气价里面的配置
|
|
342
|
+
await self.$getConfig(self, 'UserAddress')
|
|
343
|
+
console.log('原地址配置',self.config)
|
|
344
|
+
console.log('获取地址配置',self.config)
|
|
345
|
+
Object.assign(self.model, self.config)
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export default {
|
|
349
|
+
title: '用户地址添加',
|
|
350
|
+
data () {
|
|
351
|
+
return {
|
|
352
|
+
//模态框是否显示
|
|
353
|
+
isshow: false,
|
|
354
|
+
//接收位置
|
|
355
|
+
templng: '', //临时经度
|
|
356
|
+
templat: '' , //临时纬度
|
|
357
|
+
|
|
358
|
+
//初始化省市区数据
|
|
359
|
+
pcdslist:[],
|
|
360
|
+
//初始化街道数据
|
|
361
|
+
streetslist:[],
|
|
362
|
+
//初始化街道数据
|
|
363
|
+
areaslist:[],
|
|
364
|
+
iscity:[{label:'市区',value:'市区'},{label:'乡镇',value:'乡镇'},{label:'全部',value:''}],
|
|
365
|
+
config:{
|
|
366
|
+
hasnumber:false,
|
|
367
|
+
f_building_suffix: '号楼',
|
|
368
|
+
f_unit_suffix: '单元',
|
|
369
|
+
f_floor_suffix: '层',
|
|
370
|
+
f_room_suffix: '室'
|
|
371
|
+
},
|
|
372
|
+
model: {
|
|
373
|
+
f_pcd_id: '',
|
|
374
|
+
f_street_id: '',
|
|
375
|
+
f_comments1:'',
|
|
376
|
+
f_comments:'',
|
|
377
|
+
f_residential_area_id: '',
|
|
378
|
+
f_pcd: '',
|
|
379
|
+
f_street: '',
|
|
380
|
+
f_residential_area: '',
|
|
381
|
+
f_slice_area: '',
|
|
382
|
+
slice_area:'',
|
|
383
|
+
f_building: '',
|
|
384
|
+
f_building_start: '',
|
|
385
|
+
f_building_end: '',
|
|
386
|
+
f_building_suffix: '',
|
|
387
|
+
f_unit: '',
|
|
388
|
+
f_unit_start: '',
|
|
389
|
+
f_unit_end: '',
|
|
390
|
+
f_unit_suffix: '',
|
|
391
|
+
f_floor: '',
|
|
392
|
+
f_floor_start: '',
|
|
393
|
+
f_floor_end: '',
|
|
394
|
+
f_floor_suffix: '',
|
|
395
|
+
f_room: '',
|
|
396
|
+
f_room_start: '',
|
|
397
|
+
f_room_end: '',
|
|
398
|
+
f_room_suffix: '',
|
|
399
|
+
//详细地址
|
|
400
|
+
f_address: '',
|
|
401
|
+
//单位名称
|
|
402
|
+
f_company: '',
|
|
403
|
+
//单位地址
|
|
404
|
+
f_company_address: '',
|
|
405
|
+
f_lng: '', //经度
|
|
406
|
+
f_lat: '' //纬度
|
|
407
|
+
},
|
|
408
|
+
//判读是否为单个数据录入
|
|
409
|
+
onedata: 'one',
|
|
410
|
+
//选中所有地址
|
|
411
|
+
addresslist: [],
|
|
412
|
+
usertype:false,
|
|
413
|
+
|
|
414
|
+
// 公司信息
|
|
415
|
+
curorgid: [this.$login.f.orgid],
|
|
416
|
+
|
|
417
|
+
f_orgid: '',
|
|
418
|
+
|
|
419
|
+
sliceArea: []
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
props: ['f_filialeids', 'row','operation','usertype'],
|
|
423
|
+
ready(){
|
|
424
|
+
this.initdata()
|
|
425
|
+
getAreaConfig(this)
|
|
426
|
+
this.model.f_building_suffix=this.config.f_building_suffix
|
|
427
|
+
this.model.f_unit_suffix=this.config.f_unit_suffix
|
|
428
|
+
this.model.f_floor_suffix=this.config.f_floor_suffix
|
|
429
|
+
this.model.f_room_suffix=this.config.f_room_suffix
|
|
430
|
+
},
|
|
431
|
+
methods: {
|
|
432
|
+
async changecity(){
|
|
433
|
+
this.areaslist = []
|
|
434
|
+
// this.model.f_residential_area_id = null
|
|
435
|
+
// this.model.f_residential_area = null
|
|
436
|
+
let condition = `a.f_orgid = '${this.$login.f.orgid}'`
|
|
437
|
+
if(this.model.f_iscity) {
|
|
438
|
+
condition = condition + ` and f_iscity = '${this.model.f_iscity}'`
|
|
439
|
+
}
|
|
440
|
+
let req = await this.$resetpost('api/af-revenue/sql/address_getresidential', {
|
|
441
|
+
data: {
|
|
442
|
+
condition: condition
|
|
443
|
+
}
|
|
444
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
445
|
+
let redata = []
|
|
446
|
+
req.data.forEach((row) => {
|
|
447
|
+
redata.push({
|
|
448
|
+
label: row.f_residential_area,
|
|
449
|
+
value: row.id,
|
|
450
|
+
data: row,
|
|
451
|
+
id: row.id
|
|
452
|
+
})
|
|
453
|
+
})
|
|
454
|
+
this.areaslist=redata
|
|
455
|
+
},
|
|
456
|
+
standardyanzheng() {
|
|
457
|
+
console.log(this.model.f_standard_number.length)
|
|
458
|
+
if (this.model.f_standard_number.length != 2){
|
|
459
|
+
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
460
|
+
this.model.f_standard_number = ''
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
contractsyanzheng(){
|
|
464
|
+
console.log(this.model.f_contracts_number.length)
|
|
465
|
+
if (this.model.f_contracts_number.length != 5){
|
|
466
|
+
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
467
|
+
this.model.f_contracts_number = ''
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
async initdata(){
|
|
471
|
+
this.model.f_address_state = '已通气'
|
|
472
|
+
this.initAreas(this.f_filialeids)
|
|
473
|
+
// 添加特殊地址选省市区
|
|
474
|
+
this.initpcds(` f_orgid = '${this.$login.f.orgid}'`)
|
|
475
|
+
this.initstreets(` f_orgid = '${this.$login.f.orgid}' `)
|
|
476
|
+
this.initareas(` f_orgid = '${this.$login.f.orgid}'`)
|
|
477
|
+
|
|
478
|
+
},
|
|
479
|
+
|
|
480
|
+
// 初始化片区
|
|
481
|
+
async initAreas (val) {
|
|
482
|
+
if (val) {
|
|
483
|
+
let getAllArea = await this.$resetpost('/rs/search', {
|
|
484
|
+
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
|
485
|
+
userid: this.$login.f.id
|
|
486
|
+
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
|
487
|
+
let arr = getAllArea.data.filter((res) => {
|
|
488
|
+
return res.parentid == val
|
|
489
|
+
})
|
|
490
|
+
console.log('过滤之后的片区', arr)
|
|
491
|
+
this.sliceArea = []
|
|
492
|
+
arr.forEach((res) => {
|
|
493
|
+
this.sliceArea.push({label: res.name, value: res.name})
|
|
494
|
+
})
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
//初始化省市区,添加街道
|
|
498
|
+
async initpcds(pconditon){
|
|
499
|
+
this.pcdslist = []
|
|
500
|
+
let HttpReset = new HttpResetClass()
|
|
501
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
502
|
+
data: {
|
|
503
|
+
items: '*',
|
|
504
|
+
tablename: 't_pcd',
|
|
505
|
+
orderitem: 'id',
|
|
506
|
+
condition: pconditon
|
|
507
|
+
}
|
|
508
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
509
|
+
let redata = []
|
|
510
|
+
req.data.forEach((row, n) => {
|
|
511
|
+
redata[n] = {
|
|
512
|
+
label: row.f_pcd,
|
|
513
|
+
value: row.id,
|
|
514
|
+
data:row,
|
|
515
|
+
id:row.id
|
|
516
|
+
}
|
|
517
|
+
})
|
|
518
|
+
this.pcdslist=redata
|
|
519
|
+
},
|
|
520
|
+
//初始化街道 添加小区
|
|
521
|
+
async initstreets(pconditon){
|
|
522
|
+
this.streetslist = []
|
|
523
|
+
let HttpReset = new HttpResetClass()
|
|
524
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
|
525
|
+
data: {
|
|
526
|
+
items: '*',
|
|
527
|
+
tablename: 't_street',
|
|
528
|
+
orderitem: 'id',
|
|
529
|
+
condition: pconditon
|
|
530
|
+
}
|
|
531
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
532
|
+
let redata = []
|
|
533
|
+
req.data.forEach((row, n) => {
|
|
534
|
+
redata[n] = {
|
|
535
|
+
label: row.f_street,
|
|
536
|
+
value: row.id,
|
|
537
|
+
data:row,
|
|
538
|
+
id:row.id
|
|
539
|
+
}
|
|
540
|
+
})
|
|
541
|
+
this.streetslist=redata
|
|
542
|
+
},
|
|
543
|
+
//初始化小区添加小区
|
|
544
|
+
async initareas(pconditon){
|
|
545
|
+
// if(this.usertype){
|
|
546
|
+
// pconditon=pconditon+` and f_special='1' `
|
|
547
|
+
// }
|
|
548
|
+
this.areaslist = []
|
|
549
|
+
let HttpReset = new HttpResetClass()
|
|
550
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
551
|
+
data: {
|
|
552
|
+
items: '*',
|
|
553
|
+
tablename: 't_area',
|
|
554
|
+
orderitem: 'id',
|
|
555
|
+
condition: pconditon
|
|
556
|
+
}
|
|
557
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
558
|
+
let redata = []
|
|
559
|
+
req.data.forEach((row) => {
|
|
560
|
+
redata.push({
|
|
561
|
+
label: row.f_residential_area,
|
|
562
|
+
value: row.id,
|
|
563
|
+
data: row,
|
|
564
|
+
id: row.id
|
|
565
|
+
})
|
|
566
|
+
})
|
|
567
|
+
this.areaslist=redata
|
|
568
|
+
this.areaChange(this.model.f_residential_area_id)
|
|
569
|
+
},
|
|
570
|
+
//省/市/区变化
|
|
571
|
+
async pcdChange(val){
|
|
572
|
+
// 只有添加特殊地址时才级联
|
|
573
|
+
if (!this.usertype) {
|
|
574
|
+
return
|
|
575
|
+
}
|
|
576
|
+
console.log("省/市/区变化",val)
|
|
577
|
+
if(val){
|
|
578
|
+
//那就把[小区,街道]重新组织一下
|
|
579
|
+
await this.initstreets(` f_pcd_id ='${val}' `)
|
|
580
|
+
if(this.model.f_street_id){
|
|
581
|
+
if (this.findbyid(this.streetslist,this.model.f_street_id)) {
|
|
582
|
+
let pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
|
|
583
|
+
if(pcd_id!=val){
|
|
584
|
+
this.model.f_street_id=''
|
|
585
|
+
}
|
|
586
|
+
} else {
|
|
587
|
+
this.model.f_street_id=''
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
//那就把[小区,街道]重新组织一下
|
|
591
|
+
if (this.model.f_street_id) {
|
|
592
|
+
await this.initareas(` f_street_id ='${this.model.f_street_id}' `)
|
|
593
|
+
if(this.model.f_residential_area_id){
|
|
594
|
+
if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
|
|
595
|
+
let pcd_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_pcd_id
|
|
596
|
+
if(pcd_id!=val){
|
|
597
|
+
this.model.f_residential_area_id=''
|
|
598
|
+
}
|
|
599
|
+
} else {
|
|
600
|
+
this.model.f_residential_area_id=''
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
this.$resetValidation()
|
|
608
|
+
},
|
|
609
|
+
//小区变化
|
|
610
|
+
areaChange(val){
|
|
611
|
+
console.log("小区变化",val)
|
|
612
|
+
// 选择小区后级联出省市区和街道
|
|
613
|
+
let selectArea // 选中的小区数据
|
|
614
|
+
for (let row of this.areaslist) {
|
|
615
|
+
if (val == row.value) {
|
|
616
|
+
selectArea = row.data
|
|
617
|
+
break
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
if (selectArea) {
|
|
621
|
+
this.model.f_street_id = selectArea.f_street_id
|
|
622
|
+
this.model.f_pcd_id = selectArea.f_pcd_id
|
|
623
|
+
this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
|
|
624
|
+
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
|
|
625
|
+
this.model.f_slice_area = selectArea.f_slice_area
|
|
626
|
+
// 拼接地址
|
|
627
|
+
this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
|
|
628
|
+
}
|
|
629
|
+
this.$nextTick(() => {
|
|
630
|
+
this.$resetValidation()
|
|
631
|
+
})
|
|
632
|
+
},
|
|
633
|
+
//街道变化
|
|
634
|
+
async streetChange(val){
|
|
635
|
+
console.log("街道变化",val)
|
|
636
|
+
if(this.streetslist[0]) {
|
|
637
|
+
var street=''
|
|
638
|
+
this.streetslist.forEach((item)=>{
|
|
639
|
+
if(item.id===val){
|
|
640
|
+
street=item.label
|
|
641
|
+
}
|
|
642
|
+
})
|
|
643
|
+
this.model.f_address = street
|
|
644
|
+
}
|
|
645
|
+
if(val){
|
|
646
|
+
//那就把[小区]重新组织一下
|
|
647
|
+
await this.initareas(` f_street_id ='${val}' `)
|
|
648
|
+
if(this.model.f_residential_area_id){
|
|
649
|
+
if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
|
|
650
|
+
let street_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_street_id
|
|
651
|
+
if(street_id!=val){
|
|
652
|
+
this.model.f_residential_area_id=''
|
|
653
|
+
}
|
|
654
|
+
} else {
|
|
655
|
+
this.model.f_residential_area_id=''
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
this.$resetValidation()
|
|
661
|
+
},
|
|
662
|
+
|
|
663
|
+
getorg (val) {
|
|
664
|
+
this.f_orgid = val[0]
|
|
665
|
+
},
|
|
666
|
+
|
|
667
|
+
//处理批量地址信息
|
|
668
|
+
dealaddlist(){
|
|
669
|
+
try {
|
|
670
|
+
var resultlist=[]
|
|
671
|
+
for (var i = parseInt(this.model.f_building_start); i <= parseInt(this.model.f_building_end); i++) {
|
|
672
|
+
for (var j = parseInt(this.model.f_unit_start); j <= parseInt(this.model.f_unit_end); j++) {
|
|
673
|
+
for (var m = parseInt(this.model.f_floor_start); m <= parseInt(this.model.f_floor_end); m++) {
|
|
674
|
+
for (var n = parseInt(this.model.f_room_start); n <= parseInt(this.model.f_room_end); n++) {
|
|
675
|
+
//预备一个空的json
|
|
676
|
+
console.log('批量', this.model)
|
|
677
|
+
let data=Object.assign({},this.model)
|
|
678
|
+
data.f_create_person= this.$login.f.name
|
|
679
|
+
data.f_building= data.f_building_prefix + i
|
|
680
|
+
data.f_unit= data.f_unit_prefix + j
|
|
681
|
+
data.f_floor= data.f_floor_prefix + m
|
|
682
|
+
// 目前房号都按两位处理 如: 101室 201室 110室
|
|
683
|
+
if ((n+'').length == 1) {
|
|
684
|
+
data.f_room = data.f_room_prefix + m + '0' + n
|
|
685
|
+
} else {
|
|
686
|
+
data.f_room = data.f_room_prefix + m + '' + n
|
|
687
|
+
}
|
|
688
|
+
data.f_filialeid = this.f_filialeids
|
|
689
|
+
data.f_operator = this.$login.f.name
|
|
690
|
+
data.f_operatorid = this.$login.f.id
|
|
691
|
+
data.f_orgid = this.$login.f.orgid
|
|
692
|
+
data.f_orgname = this.$login.f.orgs
|
|
693
|
+
data.f_depid = this.$login.f.depids
|
|
694
|
+
data.f_depname = this.$login.f.deps
|
|
695
|
+
data.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
696
|
+
data.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
697
|
+
data.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
698
|
+
data.f_address = data.f_street
|
|
699
|
+
+ data.f_residential_area +
|
|
700
|
+
data.f_building + data.f_building_suffix
|
|
701
|
+
+ data.f_unit + data.f_unit_suffix
|
|
702
|
+
+ data.f_floor + data.f_floor_suffix
|
|
703
|
+
+ data.f_room + data.f_room_suffix
|
|
704
|
+
if (this.model.slice_area) {
|
|
705
|
+
data.f_slice_area = this.model.slice_area
|
|
706
|
+
|
|
707
|
+
}
|
|
708
|
+
resultlist.push(data)
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
this.addresslist=resultlist
|
|
714
|
+
} catch (e) {
|
|
715
|
+
console.log(e)
|
|
716
|
+
this.$showAlert('输出数据有误,请检查', 'warning', 2000)
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
//保存多个
|
|
720
|
+
async confirmall(){
|
|
721
|
+
this.dealaddlist()
|
|
722
|
+
if(this.addresslist.length>0){
|
|
723
|
+
let msg = {
|
|
724
|
+
resolveMsg: '地址保存成功',
|
|
725
|
+
rejectMsg: '地址保存失败'
|
|
726
|
+
}
|
|
727
|
+
this.$showMessage('确定要批量添加'+this.addresslist.length+'户地址吗?,如有已经存在的,将会重复添加!!!', ['confirm', 'cancel']).then((res) => {
|
|
728
|
+
if (res === 'confirm') {
|
|
729
|
+
this.$resetpost('api/af-revenue/logic/address_adduserlist',{data: {addlist:this.addresslist}},msg).then((req) => {
|
|
730
|
+
this.cleardara()
|
|
731
|
+
this.$dispatch('confirm')
|
|
732
|
+
})
|
|
733
|
+
}
|
|
734
|
+
})
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
//保存
|
|
738
|
+
async confirm(){
|
|
739
|
+
if(this.onedata=='one'){
|
|
740
|
+
await this.saveonedata()
|
|
741
|
+
}
|
|
742
|
+
this.cleardara()
|
|
743
|
+
this.$dispatch('confirm')
|
|
744
|
+
},
|
|
745
|
+
//保存一户信息
|
|
746
|
+
async saveonedata(){
|
|
747
|
+
this.model.f_create_person= this.$login.f.name
|
|
748
|
+
this.model.f_filialeid = this.f_filialeids
|
|
749
|
+
this.model.f_operator = this.$login.f.name
|
|
750
|
+
this.model.f_operatorid = this.$login.f.id
|
|
751
|
+
this.model.f_orgid = this.$login.f.orgid
|
|
752
|
+
this.model.f_orgname = this.$login.f.orgs
|
|
753
|
+
this.model.f_depid = this.$login.f.depids
|
|
754
|
+
this.model.f_depname = this.$login.f.deps
|
|
755
|
+
console.log("片区:",this.model.f_slice_area)
|
|
756
|
+
if (this.usertype) {
|
|
757
|
+
//非民用
|
|
758
|
+
this.model.f_special='1'
|
|
759
|
+
this.model.f_building_suffix=''
|
|
760
|
+
this.model.f_unit_suffix=''
|
|
761
|
+
this.model.f_floor_suffix=''
|
|
762
|
+
this.model.f_room_suffix=''
|
|
763
|
+
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
764
|
+
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
765
|
+
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 : ''
|
|
766
|
+
} else {
|
|
767
|
+
//民用
|
|
768
|
+
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
769
|
+
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
770
|
+
this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
771
|
+
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
|
|
772
|
+
}
|
|
773
|
+
await this.$resetpost('api/af-revenue/logic/address_updateuseraddress', this.model)
|
|
774
|
+
},
|
|
775
|
+
cancel(){
|
|
776
|
+
this.cleardara()
|
|
777
|
+
this.$dispatch('cancel')
|
|
778
|
+
},
|
|
779
|
+
cleardara(){
|
|
780
|
+
this.model= {
|
|
781
|
+
f_pcd_id: '',
|
|
782
|
+
f_street_id: '',
|
|
783
|
+
f_iscity:'市区',
|
|
784
|
+
f_residential_area_id: '',
|
|
785
|
+
f_pcd: '',
|
|
786
|
+
f_comment1:'',
|
|
787
|
+
f_comments:'',
|
|
788
|
+
f_street: '',
|
|
789
|
+
f_residential_area: '',
|
|
790
|
+
f_slice_area: '',
|
|
791
|
+
slice_area: '',
|
|
792
|
+
f_building: '',
|
|
793
|
+
f_building_start: '',
|
|
794
|
+
f_building_end: '',
|
|
795
|
+
f_building_prefix: '',
|
|
796
|
+
f_building_suffix: this.config.f_building_suffix,
|
|
797
|
+
f_unit: '',
|
|
798
|
+
f_unit_start: '',
|
|
799
|
+
f_unit_end: '',
|
|
800
|
+
f_unit_prefix: '',
|
|
801
|
+
f_unit_suffix: this.config.f_unit_suffix,
|
|
802
|
+
f_floor: '',
|
|
803
|
+
f_floor_start: '',
|
|
804
|
+
f_floor_end: '',
|
|
805
|
+
f_floor_prefix: '',
|
|
806
|
+
f_floor_suffix: this.config.f_floor_suffix,
|
|
807
|
+
f_room: '',
|
|
808
|
+
f_room_start: '',
|
|
809
|
+
f_room_end: '',
|
|
810
|
+
f_room_prefix: '',
|
|
811
|
+
f_room_suffix: this.config.f_room_suffix,
|
|
812
|
+
//详细地址
|
|
813
|
+
f_address: '',
|
|
814
|
+
//单位名称
|
|
815
|
+
f_company: '',
|
|
816
|
+
//单位地址
|
|
817
|
+
f_company_address: '',
|
|
818
|
+
f_lng: '',
|
|
819
|
+
f_lat: ''
|
|
820
|
+
}
|
|
821
|
+
// this.pcdslist = []
|
|
822
|
+
// this.streetslist = []
|
|
823
|
+
// this.areaslist = []
|
|
824
|
+
},
|
|
825
|
+
|
|
826
|
+
//根据名字找数据
|
|
827
|
+
findbyid(list,name){
|
|
828
|
+
var result
|
|
829
|
+
list.forEach((row, n) => {
|
|
830
|
+
if(name==row.value){
|
|
831
|
+
result= row.data
|
|
832
|
+
}
|
|
833
|
+
})
|
|
834
|
+
return result
|
|
835
|
+
},
|
|
836
|
+
openModal () {
|
|
837
|
+
try{
|
|
838
|
+
let map = new AMap.Map('addboxmap', {
|
|
839
|
+
zoom: 12,
|
|
840
|
+
resizeEnable: true, // 如果center属性缺省,地图默认定位到用户所在城市的中心
|
|
841
|
+
viewMode: '2D', //设置地图模式
|
|
842
|
+
lang: 'zh_cn', //设置地图语言类型
|
|
843
|
+
zindex: 99999
|
|
844
|
+
})
|
|
845
|
+
console.log('map',map)
|
|
846
|
+
if (map) {
|
|
847
|
+
this.isshow = true
|
|
848
|
+
}
|
|
849
|
+
}catch (e) {
|
|
850
|
+
this.isshow = false
|
|
851
|
+
console.log('这里报错了。。。。。',e)
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
closeModal () {
|
|
855
|
+
this.isshow = false;
|
|
856
|
+
},
|
|
857
|
+
getmylocation (res) {
|
|
858
|
+
this.templng = res.position.lng
|
|
859
|
+
this.templat = res.position.lat
|
|
860
|
+
},
|
|
861
|
+
confirmLocation () {
|
|
862
|
+
this.model.f_lat = this.templat
|
|
863
|
+
this.model.f_lng = this.templng
|
|
864
|
+
this.isshow = false
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
watch: {
|
|
868
|
+
//分公司变化
|
|
869
|
+
'f_filialeids'(){
|
|
870
|
+
if (this.model.f_filialeid) {
|
|
871
|
+
if (this.model.f_filialeid != this.f_filialeids) {
|
|
872
|
+
this.$dispatch('cancel')
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
this.cleardara()
|
|
876
|
+
this.initdata()
|
|
877
|
+
},
|
|
878
|
+
'row'(){
|
|
879
|
+
this.onedata='one'
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
computed: {
|
|
883
|
+
//地址状态下拉框
|
|
884
|
+
addresstate() {
|
|
885
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
</script>
|
|
890
|
+
<style lang="less">
|
|
891
|
+
#userAddress{
|
|
892
|
+
#addboxmap {
|
|
893
|
+
height: 300px;
|
|
894
|
+
}
|
|
895
|
+
.glyphicon:hover {
|
|
896
|
+
color: red;
|
|
897
|
+
}
|
|
898
|
+
.glyphicon {
|
|
899
|
+
color: blue;
|
|
900
|
+
cursor: pointer;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
</style>
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
@@ -3,7 +3,9 @@ let specialComp = {
|
|
|
3
3
|
//地址列表
|
|
4
4
|
'address-list': (resolve) =>{ require(['./AddressList'], resolve) },
|
|
5
5
|
//小区列表
|
|
6
|
-
'area-list': (resolve) =>{ require(['./AreaList'], resolve) }
|
|
6
|
+
'area-list': (resolve) =>{ require(['./AreaList'], resolve) },
|
|
7
|
+
//地址管理
|
|
8
|
+
'user-address': (resolve) => { require(['./UserAddress'], resolve) },
|
|
7
9
|
}
|
|
8
10
|
exports.specialComp = specialComp
|
|
9
11
|
|