address-client 3.2.111-3 → 3.2.111-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/filiale/bayan/UserAddress.vue +546 -542
package/package.json
CHANGED
|
@@ -99,21 +99,21 @@
|
|
|
99
99
|
<label for="f_address" class="font_normal_body">楼  号</label>
|
|
100
100
|
<input type="text" style="width:40%" v-model="model.f_building" class="input_search"
|
|
101
101
|
placeholder="楼号"/>
|
|
102
|
-
<input type="text" style="width:20%"
|
|
102
|
+
<input type="text" style="width:20%" value="幢" class="input_search" disabled
|
|
103
103
|
/>
|
|
104
104
|
|
|
105
105
|
</div>
|
|
106
106
|
<div v-if="!usertype" class="col-sm-6 form-group ">
|
|
107
107
|
<label for="f_address" class="font_normal_body">单  元</label>
|
|
108
108
|
<input type="text" style="width:40%" v-model="model.f_unit" class="input_search" placeholder="单元"/>
|
|
109
|
-
<input type="text" style="width:20%"
|
|
109
|
+
<input type="text" style="width:20%" value="单元" class="input_search" disabled
|
|
110
110
|
/>
|
|
111
111
|
</div>
|
|
112
112
|
<div v-if="!usertype" class="col-sm-6 form-group ">
|
|
113
113
|
<label for="f_address" class="font_normal_body">楼  层</label>
|
|
114
114
|
<input type="text" style="width:40%" v-model="model.f_floor" class="input_search"
|
|
115
115
|
placeholder="楼层" />
|
|
116
|
-
<input type="text" style="width:20%"
|
|
116
|
+
<input type="text" style="width:20%" value="层" class="input_search" disabled
|
|
117
117
|
/>
|
|
118
118
|
</div>
|
|
119
119
|
<div v-if="!usertype" class="col-sm-6 form-group "
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
<label for="f_address" class="font_normal_body">门 牌 号</label>
|
|
122
122
|
<input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"
|
|
123
123
|
v-validate:f_room='{required: true }'/>
|
|
124
|
-
<input type="text" style="width:20%"
|
|
124
|
+
<input type="text" style="width:20%" value="室" class="input_search" disabled
|
|
125
125
|
/>
|
|
126
126
|
</div>
|
|
127
127
|
<div class="col-sm-6 form-group">
|
|
@@ -215,15 +215,15 @@
|
|
|
215
215
|
close-on-select search="true">
|
|
216
216
|
</v-select>
|
|
217
217
|
</div>
|
|
218
|
-
<!-- <div class="col-sm-6 form-group " :class="[$v.slice.required ? 'has-error' : 'has-success']">-->
|
|
219
|
-
<!-- <label class="font_normal_body">片  区</label>-->
|
|
220
|
-
<!-- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"-->
|
|
221
|
-
<!-- >-->
|
|
222
|
-
<!-- <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"-->
|
|
223
|
-
<!-- :options='sliceArea' placeholder='片区/管理站' filer-key="name"-->
|
|
224
|
-
<!-- close-on-select v-ref:slice>-->
|
|
225
|
-
<!-- </v-select>-->
|
|
226
|
-
<!-- </div>-->
|
|
218
|
+
<!-- <div class="col-sm-6 form-group " :class="[$v.slice.required ? 'has-error' : 'has-success']">-->
|
|
219
|
+
<!-- <label class="font_normal_body">片  区</label>-->
|
|
220
|
+
<!-- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"-->
|
|
221
|
+
<!-- >-->
|
|
222
|
+
<!-- <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"-->
|
|
223
|
+
<!-- :options='sliceArea' placeholder='片区/管理站' filer-key="name"-->
|
|
224
|
+
<!-- close-on-select v-ref:slice>-->
|
|
225
|
+
<!-- </v-select>-->
|
|
226
|
+
<!-- </div>-->
|
|
227
227
|
<div class="col-sm-6 form-group "
|
|
228
228
|
:class="[$v.f_area_period.integernum || $v.f_area_period.dctest ?'has-error' : 'has-success']">
|
|
229
229
|
<label for="f_address" class="font_normal_body">区(期)数</label>
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
<input type="text" style="width:25%"
|
|
238
238
|
v-validate:f_building_start='{integernum: true ,dctest: [model.f_building_end, "<=" ]}'
|
|
239
239
|
v-model="model.f_building_start" class="input_search" placeholder="楼号"/>
|
|
240
|
-
<input type="text" style="width:17%"
|
|
240
|
+
<input type="text" style="width:17%" value="幢" class="input_search" disabled/>
|
|
241
241
|
</div>
|
|
242
242
|
<div class="col-sm-6 form-group "
|
|
243
243
|
:class="[$v.f_building_end.integernum ||$v.f_building_end.dctest ? 'has-error' : 'has-success']">
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
<input type="text" style="width:25%"
|
|
247
247
|
v-validate:f_building_end='{integernum: true ,dctest: [model.f_building_start, ">=" ]}'
|
|
248
248
|
v-model="model.f_building_end" class="input_search" placeholder="楼号"/>
|
|
249
|
-
<input type="text" style="width:17%"
|
|
249
|
+
<input type="text" style="width:17%" value="幢" class="input_search" disabled
|
|
250
250
|
/>
|
|
251
251
|
</div>
|
|
252
252
|
<div class="col-sm-6 form-group "
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
<input type="text" style="width:25%"
|
|
257
257
|
v-validate:f_unit_start='{integernum: true ,dctest: [model.f_unit_end, "<=" ]}'
|
|
258
258
|
v-model="model.f_unit_start" class="input_search" placeholder="单元"/>
|
|
259
|
-
<input type="text" style="width:17%"
|
|
259
|
+
<input type="text" style="width:17%" value="单元" class="input_search" disabled/>
|
|
260
260
|
</div>
|
|
261
261
|
<div class="col-sm-6 form-group "
|
|
262
262
|
:class="[$v.f_unit_end.integernum ||$v.f_unit_end.dctest ? 'has-error' : 'has-success']">
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
<input type="text" style="width:25%"
|
|
266
266
|
v-validate:f_unit_end='{integernum: true ,dctest: [model.f_unit_start, ">="]}'
|
|
267
267
|
v-model="model.f_unit_end" class="input_search" placeholder="单元"/>
|
|
268
|
-
<input type="text" style="width:17%"
|
|
268
|
+
<input type="text" style="width:17%" value="单元" class="input_search" disabled/>
|
|
269
269
|
</div>
|
|
270
270
|
<div class="col-sm-6 form-group "
|
|
271
271
|
:class="[$v.f_floor_start.integernum || $v.f_floor_start.dctest ? 'has-error' : 'has-success']">
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
<input type="text" style="width:25%"
|
|
275
275
|
v-validate:f_floor_start='{integernum: true,dctest: [model.f_floor_end, "<=" ] }'
|
|
276
276
|
v-model="model.f_floor_start" class="input_search" placeholder="楼层"/>
|
|
277
|
-
<input type="text" style="width:17%"
|
|
277
|
+
<input type="text" style="width:17%" value="层" class="input_search"/>
|
|
278
278
|
</div>
|
|
279
279
|
<div class="col-sm-6 form-group "
|
|
280
280
|
:class="[$v.f_floor_end.integernum ||$v.f_floor_end.dctest ? 'has-error' : 'has-success']">
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
<input type="text" style="width:25%" v-model="model.f_floor_end"
|
|
284
284
|
v-validate:f_floor_end='{integernum: true,dctest: [model.f_floor_start, ">=" ] }'
|
|
285
285
|
class="input_search" placeholder="楼层"/>
|
|
286
|
-
<input type="text" style="width:17%"
|
|
286
|
+
<input type="text" style="width:17%" value="层" class="input_search"/>
|
|
287
287
|
</div>
|
|
288
288
|
<div class="col-sm-6 form-group "
|
|
289
289
|
:class="[$v.f_room_start.integernum || $v.f_room_start.dctest ? 'has-error' : 'has-success']">
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
class="input_search" placeholder="门牌号"
|
|
294
294
|
v-validate:f_room_start='{integernum: true ,dctest: [model.f_room_end, "<=" ]}'
|
|
295
295
|
/>
|
|
296
|
-
<input type="text" style="width:17%"
|
|
296
|
+
<input type="text" style="width:17%" value="室" class="input_search" disabled/>
|
|
297
297
|
</div>
|
|
298
298
|
<div class="col-sm-6 form-group "
|
|
299
299
|
:class="[$v.f_room_end.integernum ||$v.f_room_end.dctest ? 'has-error' : 'has-success']">
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
<input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
|
|
302
302
|
<input type="text" style="width:25%" v-model="model.f_room_end" class="input_search" placeholder="门牌号"
|
|
303
303
|
v-validate:f_room_end='{integernum: true ,dctest: [model.f_room_start, ">=" ]}'/>
|
|
304
|
-
<input type="text" style="width:17%"
|
|
304
|
+
<input type="text" style="width:17%" value="室" class="input_search" disabled/>
|
|
305
305
|
</div>
|
|
306
306
|
<div class="col-sm-6 form-group">
|
|
307
307
|
<label class="font_normal_body">地址状态</label>
|
|
@@ -329,590 +329,594 @@
|
|
|
329
329
|
</div>
|
|
330
330
|
</validator>
|
|
331
331
|
|
|
332
|
-
<!-- <modal v-if="isshow" :show.sync="isshow" large backdrop="false" :width="900">-->
|
|
333
|
-
<!-- <header slot="modal-header" class="modal-header">-->
|
|
334
|
-
<!-- </header>-->
|
|
335
|
-
<!-- <article slot="modal-body" class="modal-body">-->
|
|
336
|
-
<!-- <amap-location :islocationclearmark="false" dom="addboxmap" v-ref:positionInfo @getmylocation="getmylocation"></amap-location>-->
|
|
337
|
-
<!-- </article>-->
|
|
338
|
-
<!-- <footer slot="modal-footer" class="modal-footer">-->
|
|
339
|
-
<!-- <button v-show="isshow" type="button" class="button_search button_spacing" @click='confirmLocation'>确认</button>-->
|
|
340
|
-
<!-- <button v-show="isshow" type="button" class="button_clear button_spacing" @click='closeModal'>取消</button>-->
|
|
341
|
-
<!-- </footer>-->
|
|
342
|
-
<!-- </modal>-->
|
|
332
|
+
<!-- <modal v-if="isshow" :show.sync="isshow" large backdrop="false" :width="900">-->
|
|
333
|
+
<!-- <header slot="modal-header" class="modal-header">-->
|
|
334
|
+
<!-- </header>-->
|
|
335
|
+
<!-- <article slot="modal-body" class="modal-body">-->
|
|
336
|
+
<!-- <amap-location :islocationclearmark="false" dom="addboxmap" v-ref:positionInfo @getmylocation="getmylocation"></amap-location>-->
|
|
337
|
+
<!-- </article>-->
|
|
338
|
+
<!-- <footer slot="modal-footer" class="modal-footer">-->
|
|
339
|
+
<!-- <button v-show="isshow" type="button" class="button_search button_spacing" @click='confirmLocation'>确认</button>-->
|
|
340
|
+
<!-- <button v-show="isshow" type="button" class="button_clear button_spacing" @click='closeModal'>取消</button>-->
|
|
341
|
+
<!-- </footer>-->
|
|
342
|
+
<!-- </modal>-->
|
|
343
343
|
|
|
344
344
|
</div>
|
|
345
345
|
</template>
|
|
346
346
|
|
|
347
347
|
<script>
|
|
348
|
-
|
|
348
|
+
import {HttpResetClass} from 'vue-client'
|
|
349
349
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
350
|
+
let getAreaConfig = async function (self) {
|
|
351
|
+
// 获取气价里面的配置
|
|
352
|
+
await self.$getConfig(self, 'UserAddress')
|
|
353
|
+
console.log('原地址配置',self.config)
|
|
354
|
+
console.log('获取地址配置',self.config)
|
|
355
|
+
Object.assign(self.model, self.config)
|
|
356
|
+
}
|
|
357
357
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
358
|
+
export default {
|
|
359
|
+
title: '用户地址添加',
|
|
360
|
+
data () {
|
|
361
|
+
return {
|
|
362
|
+
//模态框是否显示
|
|
363
|
+
isshow: false,
|
|
364
|
+
//接收位置
|
|
365
|
+
templng: '', //临时经度
|
|
366
|
+
templat: '' , //临时纬度
|
|
367
367
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
368
|
+
//初始化省市区数据
|
|
369
|
+
pcdslist:[],
|
|
370
|
+
//初始化街道数据
|
|
371
|
+
streetslist:[],
|
|
372
|
+
//初始化街道数据
|
|
373
|
+
areaslist:[],
|
|
374
|
+
iscity:[{label:'市区',value:'市区'},{label:'乡镇',value:'乡镇'},{label:'全部',value:''}],
|
|
375
|
+
config:{
|
|
376
|
+
hasnumber:false,
|
|
377
|
+
f_building_suffix: '幢',
|
|
378
|
+
f_unit_suffix: '单元',
|
|
379
|
+
f_floor_suffix: '层',
|
|
380
|
+
f_room_suffix: '室'
|
|
381
|
+
},
|
|
382
|
+
model: {
|
|
383
|
+
f_pcd_id: '',
|
|
384
|
+
f_street_id: '',
|
|
385
|
+
f_comments1:'',
|
|
386
|
+
f_comments:'',
|
|
387
|
+
f_residential_area_id: '',
|
|
388
|
+
f_pcd: '',
|
|
389
|
+
f_street: '',
|
|
390
|
+
f_residential_area: '',
|
|
391
|
+
f_slice_area: '',
|
|
392
|
+
slice_area:'',
|
|
393
|
+
f_building: '',
|
|
394
|
+
f_area_period: '',
|
|
395
|
+
f_building_start: '',
|
|
396
|
+
f_building_end: '',
|
|
397
|
+
f_building_suffix: '幢',
|
|
398
|
+
f_unit: '',
|
|
399
|
+
f_unit_start: '',
|
|
400
|
+
f_unit_end: '',
|
|
401
|
+
f_unit_suffix: '单元',
|
|
402
|
+
f_floor: '',
|
|
403
|
+
f_floor_start: '',
|
|
404
|
+
f_floor_end: '',
|
|
405
|
+
f_floor_suffix: '',
|
|
406
|
+
f_room: '',
|
|
407
|
+
f_room_start: '',
|
|
408
|
+
f_room_end: '',
|
|
409
|
+
f_room_suffix: '室',
|
|
410
|
+
//详细地址
|
|
411
|
+
f_address: '',
|
|
412
|
+
//单位名称
|
|
413
|
+
f_company: '',
|
|
414
|
+
//单位地址
|
|
415
|
+
f_company_address: '',
|
|
416
|
+
f_lng: '', //经度
|
|
417
|
+
f_lat: '' //纬度
|
|
418
|
+
},
|
|
419
|
+
//判读是否为单个数据录入
|
|
420
|
+
onedata: 'one',
|
|
421
|
+
//选中所有地址
|
|
422
|
+
addresslist: [],
|
|
423
|
+
usertype:false,
|
|
424
424
|
|
|
425
|
-
|
|
426
|
-
|
|
425
|
+
// 公司信息
|
|
426
|
+
curorgid: [this.$login.f.orgid],
|
|
427
427
|
|
|
428
|
-
|
|
428
|
+
f_orgid: '',
|
|
429
429
|
|
|
430
|
-
|
|
430
|
+
sliceArea: []
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
props: ['f_filialeids', 'row','operation','usertype'],
|
|
434
|
+
ready(){
|
|
435
|
+
this.initdata()
|
|
436
|
+
getAreaConfig(this)
|
|
437
|
+
this.model.f_building_suffix=this.config.f_building_suffix
|
|
438
|
+
this.model.f_unit_suffix=this.config.f_unit_suffix
|
|
439
|
+
this.model.f_floor_suffix=this.config.f_floor_suffix
|
|
440
|
+
this.model.f_room_suffix=this.config.f_room_suffix
|
|
441
|
+
},
|
|
442
|
+
methods: {
|
|
443
|
+
async changecity(){
|
|
444
|
+
this.areaslist = []
|
|
445
|
+
// this.model.f_residential_area_id = null
|
|
446
|
+
// this.model.f_residential_area = null
|
|
447
|
+
let condition = `a.f_orgid = '${this.$login.f.orgid}'`
|
|
448
|
+
if(this.model.f_iscity) {
|
|
449
|
+
condition = condition + ` and f_iscity = '${this.model.f_iscity}'`
|
|
431
450
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
this.initdata()
|
|
436
|
-
getAreaConfig(this)
|
|
437
|
-
this.model.f_building_suffix=this.config.f_building_suffix
|
|
438
|
-
this.model.f_unit_suffix=this.config.f_unit_suffix
|
|
439
|
-
this.model.f_floor_suffix=this.config.f_floor_suffix
|
|
440
|
-
this.model.f_room_suffix=this.config.f_room_suffix
|
|
441
|
-
},
|
|
442
|
-
methods: {
|
|
443
|
-
async changecity(){
|
|
444
|
-
this.areaslist = []
|
|
445
|
-
// this.model.f_residential_area_id = null
|
|
446
|
-
// this.model.f_residential_area = null
|
|
447
|
-
let condition = `a.f_orgid = '${this.$login.f.orgid}'`
|
|
448
|
-
if(this.model.f_iscity) {
|
|
449
|
-
condition = condition + ` and f_iscity = '${this.model.f_iscity}'`
|
|
451
|
+
let req = await this.$resetpost('api/af-revenue/sql/address_getresidential', {
|
|
452
|
+
data: {
|
|
453
|
+
condition: condition
|
|
450
454
|
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
label: row.f_residential_area,
|
|
460
|
-
value: row.id,
|
|
461
|
-
data: row,
|
|
462
|
-
id: row.id
|
|
463
|
-
})
|
|
455
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
456
|
+
let redata = []
|
|
457
|
+
req.data.forEach((row) => {
|
|
458
|
+
redata.push({
|
|
459
|
+
label: row.f_residential_area,
|
|
460
|
+
value: row.id,
|
|
461
|
+
data: row,
|
|
462
|
+
id: row.id
|
|
464
463
|
})
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
464
|
+
})
|
|
465
|
+
this.areaslist=redata
|
|
466
|
+
},
|
|
467
|
+
standardyanzheng() {
|
|
468
|
+
console.log(this.model.f_standard_number.length)
|
|
469
|
+
if (this.model.f_standard_number.length != 2){
|
|
470
|
+
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
471
|
+
this.model.f_standard_number = ''
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
contractsyanzheng(){
|
|
475
|
+
console.log(this.model.f_contracts_number.length)
|
|
476
|
+
if (this.model.f_contracts_number.length != 5){
|
|
477
|
+
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
478
|
+
this.model.f_contracts_number = ''
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
async initdata(){
|
|
482
|
+
this.model.f_address_state = '已通气'
|
|
483
|
+
this.initAreas(this.f_filialeids)
|
|
484
|
+
// 添加特殊地址选省市区
|
|
485
|
+
this.initpcds(` f_orgid = '${this.$login.f.orgid}'`)
|
|
486
|
+
this.initstreets(` f_orgid = '${this.$login.f.orgid}' `)
|
|
487
|
+
this.initareas(` f_orgid = '${this.$login.f.orgid}'`)
|
|
488
488
|
|
|
489
|
-
|
|
489
|
+
},
|
|
490
490
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
})
|
|
501
|
-
console.log('过滤之后的片区', arr)
|
|
502
|
-
this.sliceArea = []
|
|
503
|
-
arr.forEach((res) => {
|
|
504
|
-
this.sliceArea.push({label: res.name, value: res.name})
|
|
505
|
-
})
|
|
506
|
-
}
|
|
507
|
-
},
|
|
508
|
-
//初始化省市区,添加街道
|
|
509
|
-
async initpcds(pconditon){
|
|
510
|
-
this.pcdslist = []
|
|
511
|
-
let HttpReset = new HttpResetClass()
|
|
512
|
-
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
513
|
-
data: {
|
|
514
|
-
items: '*',
|
|
515
|
-
tablename: 't_pcd',
|
|
516
|
-
orderitem: 'id',
|
|
517
|
-
condition: pconditon
|
|
518
|
-
}
|
|
519
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
520
|
-
let redata = []
|
|
521
|
-
req.data.forEach((row, n) => {
|
|
522
|
-
redata[n] = {
|
|
523
|
-
label: row.f_pcd,
|
|
524
|
-
value: row.id,
|
|
525
|
-
data:row,
|
|
526
|
-
id:row.id
|
|
527
|
-
}
|
|
491
|
+
// 初始化片区
|
|
492
|
+
async initAreas (val) {
|
|
493
|
+
if (val) {
|
|
494
|
+
let getAllArea = await this.$resetpost('/rs/search', {
|
|
495
|
+
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
|
496
|
+
userid: this.$login.f.id
|
|
497
|
+
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
|
498
|
+
let arr = getAllArea.data.filter((res) => {
|
|
499
|
+
return res.parentid == val
|
|
528
500
|
})
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
this.streetslist = []
|
|
534
|
-
let HttpReset = new HttpResetClass()
|
|
535
|
-
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
|
536
|
-
data: {
|
|
537
|
-
items: '*',
|
|
538
|
-
tablename: 't_street',
|
|
539
|
-
orderitem: 'id',
|
|
540
|
-
condition: pconditon
|
|
541
|
-
}
|
|
542
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
543
|
-
let redata = []
|
|
544
|
-
req.data.forEach((row, n) => {
|
|
545
|
-
redata[n] = {
|
|
546
|
-
label: row.f_street,
|
|
547
|
-
value: row.id,
|
|
548
|
-
data:row,
|
|
549
|
-
id:row.id
|
|
550
|
-
}
|
|
501
|
+
console.log('过滤之后的片区', arr)
|
|
502
|
+
this.sliceArea = []
|
|
503
|
+
arr.forEach((res) => {
|
|
504
|
+
this.sliceArea.push({label: res.name, value: res.name})
|
|
551
505
|
})
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
//初始化省市区,添加街道
|
|
509
|
+
async initpcds(pconditon){
|
|
510
|
+
this.pcdslist = []
|
|
511
|
+
let HttpReset = new HttpResetClass()
|
|
512
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
513
|
+
data: {
|
|
514
|
+
items: '*',
|
|
515
|
+
tablename: 't_pcd',
|
|
516
|
+
orderitem: 'id',
|
|
517
|
+
condition: pconditon
|
|
518
|
+
}
|
|
519
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
520
|
+
let redata = []
|
|
521
|
+
req.data.forEach((row, n) => {
|
|
522
|
+
redata[n] = {
|
|
523
|
+
label: row.f_pcd,
|
|
524
|
+
value: row.id,
|
|
525
|
+
data:row,
|
|
526
|
+
id:row.id
|
|
527
|
+
}
|
|
528
|
+
})
|
|
529
|
+
this.pcdslist=redata
|
|
530
|
+
},
|
|
531
|
+
//初始化街道 添加小区
|
|
532
|
+
async initstreets(pconditon){
|
|
533
|
+
this.streetslist = []
|
|
534
|
+
let HttpReset = new HttpResetClass()
|
|
535
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
|
536
|
+
data: {
|
|
537
|
+
items: '*',
|
|
538
|
+
tablename: 't_street',
|
|
539
|
+
orderitem: 'id',
|
|
540
|
+
condition: pconditon
|
|
541
|
+
}
|
|
542
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
543
|
+
let redata = []
|
|
544
|
+
req.data.forEach((row, n) => {
|
|
545
|
+
redata[n] = {
|
|
546
|
+
label: row.f_street,
|
|
547
|
+
value: row.id,
|
|
548
|
+
data:row,
|
|
549
|
+
id:row.id
|
|
550
|
+
}
|
|
551
|
+
})
|
|
552
|
+
this.streetslist=redata
|
|
553
|
+
},
|
|
554
|
+
//初始化小区添加小区
|
|
555
|
+
async initareas(pconditon){
|
|
556
|
+
// if(this.usertype){
|
|
557
|
+
// pconditon=pconditon+` and f_special='1' `
|
|
558
|
+
// }
|
|
559
|
+
this.areaslist = []
|
|
560
|
+
let HttpReset = new HttpResetClass()
|
|
561
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
562
|
+
data: {
|
|
563
|
+
items: '*',
|
|
564
|
+
tablename: 't_area',
|
|
565
|
+
orderitem: 'id',
|
|
566
|
+
condition: pconditon
|
|
567
|
+
}
|
|
568
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
569
|
+
let redata = []
|
|
570
|
+
req.data.forEach((row) => {
|
|
571
|
+
if(!row.f_residential_area.includes('L')) {
|
|
572
572
|
redata.push({
|
|
573
573
|
label: row.f_residential_area,
|
|
574
574
|
value: row.id,
|
|
575
575
|
data: row,
|
|
576
576
|
id: row.id
|
|
577
577
|
})}
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
this.model.f_street_id=''
|
|
597
|
-
}
|
|
598
|
-
} else {
|
|
578
|
+
})
|
|
579
|
+
this.areaslist=redata
|
|
580
|
+
this.areaChange(this.model.f_residential_area_id)
|
|
581
|
+
},
|
|
582
|
+
//省/市/区变化
|
|
583
|
+
async pcdChange(val){
|
|
584
|
+
// 只有添加特殊地址时才级联
|
|
585
|
+
if (!this.usertype) {
|
|
586
|
+
return
|
|
587
|
+
}
|
|
588
|
+
console.log("省/市/区变化",val)
|
|
589
|
+
if(val){
|
|
590
|
+
//那就把[小区,街道]重新组织一下
|
|
591
|
+
await this.initstreets(` f_pcd_id ='${val}' `)
|
|
592
|
+
if(this.model.f_street_id){
|
|
593
|
+
if (this.findbyid(this.streetslist,this.model.f_street_id)) {
|
|
594
|
+
let pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
|
|
595
|
+
if(pcd_id!=val){
|
|
599
596
|
this.model.f_street_id=''
|
|
600
597
|
}
|
|
598
|
+
} else {
|
|
599
|
+
this.model.f_street_id=''
|
|
600
|
+
}
|
|
601
601
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
this.model.f_residential_area_id=''
|
|
610
|
-
}
|
|
611
|
-
} else {
|
|
602
|
+
//那就把[小区,街道]重新组织一下
|
|
603
|
+
if (this.model.f_street_id) {
|
|
604
|
+
await this.initareas(` f_street_id ='${this.model.f_street_id}' `)
|
|
605
|
+
if(this.model.f_residential_area_id){
|
|
606
|
+
if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
|
|
607
|
+
let pcd_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_pcd_id
|
|
608
|
+
if(pcd_id!=val){
|
|
612
609
|
this.model.f_residential_area_id=''
|
|
613
610
|
}
|
|
614
|
-
|
|
611
|
+
} else {
|
|
612
|
+
this.model.f_residential_area_id=''
|
|
615
613
|
}
|
|
614
|
+
|
|
616
615
|
}
|
|
617
616
|
}
|
|
618
617
|
}
|
|
618
|
+
}
|
|
619
|
+
this.$resetValidation()
|
|
620
|
+
},
|
|
621
|
+
//小区变化
|
|
622
|
+
areaChange(val){
|
|
623
|
+
console.log("小区变化",val)
|
|
624
|
+
// 选择小区后级联出省市区和街道
|
|
625
|
+
let selectArea // 选中的小区数据
|
|
626
|
+
for (let row of this.areaslist) {
|
|
627
|
+
if (val == row.value) {
|
|
628
|
+
selectArea = row.data
|
|
629
|
+
break
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
if (selectArea) {
|
|
633
|
+
this.model.f_street_id = selectArea.f_street_id
|
|
634
|
+
this.model.f_pcd_id = selectArea.f_pcd_id
|
|
635
|
+
this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
|
|
636
|
+
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
|
|
637
|
+
this.model.f_slice_area = selectArea.f_slice_area
|
|
638
|
+
// 拼接地址
|
|
639
|
+
this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
|
|
640
|
+
}
|
|
641
|
+
this.$nextTick(() => {
|
|
619
642
|
this.$resetValidation()
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
643
|
+
})
|
|
644
|
+
},
|
|
645
|
+
//街道变化
|
|
646
|
+
async streetChange(val){
|
|
647
|
+
console.log("街道变化",val)
|
|
648
|
+
if(this.streetslist[0]) {
|
|
649
|
+
var street=''
|
|
650
|
+
this.streetslist.forEach((item)=>{
|
|
651
|
+
if(item.id===val){
|
|
652
|
+
street=item.label
|
|
630
653
|
}
|
|
631
|
-
}
|
|
632
|
-
if (selectArea) {
|
|
633
|
-
this.model.f_street_id = selectArea.f_street_id
|
|
634
|
-
this.model.f_pcd_id = selectArea.f_pcd_id
|
|
635
|
-
this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
|
|
636
|
-
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
|
|
637
|
-
this.model.f_slice_area = selectArea.f_slice_area
|
|
638
|
-
// 拼接地址
|
|
639
|
-
this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
|
|
640
|
-
}
|
|
641
|
-
this.$nextTick(() => {
|
|
642
|
-
this.$resetValidation()
|
|
643
654
|
})
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
this.
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
}
|
|
654
|
-
})
|
|
655
|
-
this.model.f_address = street
|
|
656
|
-
}
|
|
657
|
-
if(val){
|
|
658
|
-
//那就把[小区]重新组织一下
|
|
659
|
-
await this.initareas(` f_street_id ='${val}' `)
|
|
660
|
-
if(this.model.f_residential_area_id){
|
|
661
|
-
if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
|
|
662
|
-
let street_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_street_id
|
|
663
|
-
if(street_id!=val){
|
|
664
|
-
this.model.f_residential_area_id=''
|
|
665
|
-
}
|
|
666
|
-
} else {
|
|
655
|
+
this.model.f_address = street
|
|
656
|
+
}
|
|
657
|
+
if(val){
|
|
658
|
+
//那就把[小区]重新组织一下
|
|
659
|
+
await this.initareas(` f_street_id ='${val}' `)
|
|
660
|
+
if(this.model.f_residential_area_id){
|
|
661
|
+
if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
|
|
662
|
+
let street_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_street_id
|
|
663
|
+
if(street_id!=val){
|
|
667
664
|
this.model.f_residential_area_id=''
|
|
668
665
|
}
|
|
669
|
-
|
|
666
|
+
} else {
|
|
667
|
+
this.model.f_residential_area_id=''
|
|
670
668
|
}
|
|
669
|
+
|
|
671
670
|
}
|
|
672
|
-
|
|
673
|
-
|
|
671
|
+
}
|
|
672
|
+
this.$resetValidation()
|
|
673
|
+
},
|
|
674
674
|
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
675
|
+
getorg (val) {
|
|
676
|
+
this.f_orgid = val[0]
|
|
677
|
+
},
|
|
678
678
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
679
|
+
//处理批量地址信息
|
|
680
|
+
dealaddlist(){
|
|
681
|
+
try {
|
|
682
|
+
var resultlist=[]
|
|
683
|
+
for (var i = parseInt(this.model.f_building_start); i <= parseInt(this.model.f_building_end); i++) {
|
|
684
|
+
for (var j = parseInt(this.model.f_unit_start); j <= parseInt(this.model.f_unit_end); j++) {
|
|
685
|
+
for (var m = parseInt(this.model.f_floor_start); m <= parseInt(this.model.f_floor_end); m++) {
|
|
686
|
+
for (var n = parseInt(this.model.f_room_start); n <= parseInt(this.model.f_room_end); n++) {
|
|
687
|
+
//预备一个空的json
|
|
688
|
+
console.log('批量', this.model)
|
|
689
|
+
let data=Object.assign({},this.model)
|
|
690
|
+
data.f_create_person= this.$login.f.name
|
|
691
|
+
data.f_building= data.f_building_prefix + i
|
|
692
|
+
data.f_unit= data.f_unit_prefix + j
|
|
693
|
+
data.f_floor= data.f_floor_prefix + m
|
|
694
|
+
// 目前房号都按两位处理 如: 101室 201室 110室
|
|
695
|
+
if ((n+'').length == 1) {
|
|
696
|
+
data.f_room = data.f_room_prefix + m + '0' + n
|
|
697
|
+
} else {
|
|
698
|
+
data.f_room = data.f_room_prefix + m + '' + n
|
|
699
|
+
}
|
|
700
|
+
data.f_filialeid = this.f_filialeids
|
|
701
|
+
data.f_operator = this.$login.f.name
|
|
702
|
+
data.f_operatorid = this.$login.f.id
|
|
703
|
+
data.f_orgid = this.$login.f.orgid
|
|
704
|
+
data.f_orgname = this.$login.f.orgs
|
|
705
|
+
data.f_depid = this.$login.f.depids
|
|
706
|
+
data.f_depname = this.$login.f.deps
|
|
707
|
+
data.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
708
|
+
data.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
709
|
+
data.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
710
|
+
data.f_address = data.f_street
|
|
711
|
+
+ data.f_residential_area + data.f_area_period +
|
|
712
|
+
data.f_building + data.f_building_suffix
|
|
713
|
+
+ data.f_unit + data.f_unit_suffix
|
|
714
|
+
+ data.f_floor + data.f_floor_suffix
|
|
715
|
+
+ data.f_room + data.f_room_suffix
|
|
716
|
+
if (this.model.slice_area) {
|
|
717
|
+
data.f_slice_area = this.model.slice_area
|
|
718
718
|
|
|
719
|
-
}
|
|
720
|
-
resultlist.push(data)
|
|
721
719
|
}
|
|
720
|
+
resultlist.push(data)
|
|
722
721
|
}
|
|
723
722
|
}
|
|
724
723
|
}
|
|
725
|
-
this.addresslist=resultlist
|
|
726
|
-
} catch (e) {
|
|
727
|
-
console.log(e)
|
|
728
|
-
this.$showAlert('输出数据有误,请检查', 'warning', 2000)
|
|
729
724
|
}
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
this
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
this.$dispatch('confirm')
|
|
744
|
-
})
|
|
745
|
-
}
|
|
746
|
-
})
|
|
747
|
-
}
|
|
748
|
-
},
|
|
749
|
-
//保存
|
|
750
|
-
async confirm(){
|
|
751
|
-
if(this.onedata=='one'){
|
|
752
|
-
await this.saveonedata()
|
|
753
|
-
}
|
|
754
|
-
this.cleardara()
|
|
755
|
-
this.$dispatch('confirm')
|
|
756
|
-
},
|
|
757
|
-
//保存一户信息
|
|
758
|
-
async saveonedata(){
|
|
759
|
-
this.model.f_create_person= this.$login.f.name
|
|
760
|
-
this.model.f_filialeid = this.f_filialeids
|
|
761
|
-
this.model.f_operator = this.$login.f.name
|
|
762
|
-
this.model.f_operatorid = this.$login.f.id
|
|
763
|
-
this.model.f_orgid = this.$login.f.orgid
|
|
764
|
-
this.model.f_orgname = this.$login.f.orgs
|
|
765
|
-
this.model.f_depid = this.$login.f.depids
|
|
766
|
-
this.model.f_depname = this.$login.f.deps
|
|
767
|
-
console.log("片区:",this.model.f_slice_area)
|
|
768
|
-
if (this.usertype) {
|
|
769
|
-
//非民用
|
|
770
|
-
this.model.f_special='1'
|
|
771
|
-
this.model.f_building_suffix=''
|
|
772
|
-
this.model.f_unit_suffix=''
|
|
773
|
-
this.model.f_floor_suffix=''
|
|
774
|
-
this.model.f_room_suffix=''
|
|
775
|
-
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
776
|
-
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
777
|
-
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 : ''
|
|
778
|
-
} else {
|
|
779
|
-
//民用
|
|
780
|
-
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
781
|
-
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
782
|
-
this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
783
|
-
this.model.f_address = this.model.f_street + this.model.f_residential_area + this.model.f_area_period + (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
|
|
784
|
-
}
|
|
785
|
-
await this.$resetpost('api/af-revenue/logic/address_updateuseraddress', this.model)
|
|
786
|
-
},
|
|
787
|
-
cancel(){
|
|
788
|
-
this.cleardara()
|
|
789
|
-
this.$dispatch('cancel')
|
|
790
|
-
},
|
|
791
|
-
cleardara(){
|
|
792
|
-
this.model= {
|
|
793
|
-
f_pcd_id: '',
|
|
794
|
-
f_street_id: '',
|
|
795
|
-
f_iscity:'市区',
|
|
796
|
-
f_residential_area_id: '',
|
|
797
|
-
f_pcd: '',
|
|
798
|
-
f_comment1:'',
|
|
799
|
-
f_comments:'',
|
|
800
|
-
f_street: '',
|
|
801
|
-
f_residential_area: '',
|
|
802
|
-
f_slice_area: '',
|
|
803
|
-
slice_area: '',
|
|
804
|
-
f_building: '',
|
|
805
|
-
f_area_period: '',
|
|
806
|
-
f_building_start: '',
|
|
807
|
-
f_building_end: '',
|
|
808
|
-
f_building_prefix: '',
|
|
809
|
-
f_building_suffix: '幢',
|
|
810
|
-
f_unit: '',
|
|
811
|
-
f_unit_start: '',
|
|
812
|
-
f_unit_end: '',
|
|
813
|
-
f_unit_prefix: '',
|
|
814
|
-
f_unit_suffix: '单元',
|
|
815
|
-
f_floor: '',
|
|
816
|
-
f_floor_start: '',
|
|
817
|
-
f_floor_end: '',
|
|
818
|
-
f_floor_prefix: '',
|
|
819
|
-
f_floor_suffix: this.config.f_floor_suffix,
|
|
820
|
-
f_room: '',
|
|
821
|
-
f_room_start: '',
|
|
822
|
-
f_room_end: '',
|
|
823
|
-
f_room_prefix: '',
|
|
824
|
-
f_room_suffix: '室',
|
|
825
|
-
//详细地址
|
|
826
|
-
f_address: '',
|
|
827
|
-
//单位名称
|
|
828
|
-
f_company: '',
|
|
829
|
-
//单位地址
|
|
830
|
-
f_company_address: '',
|
|
831
|
-
f_lng: '',
|
|
832
|
-
f_lat: ''
|
|
725
|
+
this.addresslist=resultlist
|
|
726
|
+
} catch (e) {
|
|
727
|
+
console.log(e)
|
|
728
|
+
this.$showAlert('输出数据有误,请检查', 'warning', 2000)
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
//保存多个
|
|
732
|
+
async confirmall(){
|
|
733
|
+
this.dealaddlist()
|
|
734
|
+
if(this.addresslist.length>0){
|
|
735
|
+
let msg = {
|
|
736
|
+
resolveMsg: '地址保存成功',
|
|
737
|
+
rejectMsg: '地址保存失败'
|
|
833
738
|
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
findbyid(list,name){
|
|
841
|
-
var result
|
|
842
|
-
list.forEach((row, n) => {
|
|
843
|
-
if(name==row.value){
|
|
844
|
-
result= row.data
|
|
739
|
+
this.$showMessage('确定要批量添加'+this.addresslist.length+'户地址吗?,如有已经存在的,将会重复添加!!!', ['confirm', 'cancel']).then((res) => {
|
|
740
|
+
if (res === 'confirm') {
|
|
741
|
+
this.$resetpost('api/af-revenue/logic/address_adduserlist',{data: {addlist:this.addresslist}},msg).then((req) => {
|
|
742
|
+
this.cleardara()
|
|
743
|
+
this.$dispatch('confirm')
|
|
744
|
+
})
|
|
845
745
|
}
|
|
846
746
|
})
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
//保存
|
|
750
|
+
async confirm(){
|
|
751
|
+
if(this.onedata=='one'){
|
|
752
|
+
await this.saveonedata()
|
|
753
|
+
}
|
|
754
|
+
this.cleardara()
|
|
755
|
+
this.$dispatch('confirm')
|
|
756
|
+
},
|
|
757
|
+
//保存一户信息
|
|
758
|
+
async saveonedata(){
|
|
759
|
+
this.model.f_create_person= this.$login.f.name
|
|
760
|
+
this.model.f_filialeid = this.f_filialeids
|
|
761
|
+
this.model.f_operator = this.$login.f.name
|
|
762
|
+
this.model.f_operatorid = this.$login.f.id
|
|
763
|
+
this.model.f_orgid = this.$login.f.orgid
|
|
764
|
+
this.model.f_orgname = this.$login.f.orgs
|
|
765
|
+
this.model.f_depid = this.$login.f.depids
|
|
766
|
+
this.model.f_depname = this.$login.f.deps
|
|
767
|
+
console.log("片区:",this.model.f_slice_area)
|
|
768
|
+
this.model.f_building_suffix=this.config.f_building_suffix
|
|
769
|
+
this.model.f_unit_suffix=this.config.f_unit_suffix
|
|
770
|
+
this.model.f_floor_suffix=this.config.f_floor_suffix
|
|
771
|
+
this.model.f_room_suffix=this.config.f_room_suffix
|
|
772
|
+
if (this.usertype) {
|
|
773
|
+
//非民用
|
|
774
|
+
this.model.f_special='1'
|
|
775
|
+
this.model.f_building_suffix=''
|
|
776
|
+
this.model.f_unit_suffix=''
|
|
777
|
+
this.model.f_floor_suffix=''
|
|
778
|
+
this.model.f_room_suffix=''
|
|
779
|
+
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
780
|
+
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
781
|
+
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 : ''
|
|
782
|
+
} else {
|
|
783
|
+
//民用
|
|
784
|
+
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
785
|
+
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
786
|
+
this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
787
|
+
this.model.f_address = this.model.f_street + this.model.f_residential_area + (this.model.f_area_period?this.model.f_area_period :'') + (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
|
|
788
|
+
}
|
|
789
|
+
await this.$resetpost('api/af-revenue/logic/address_updateuseraddress', this.model)
|
|
790
|
+
},
|
|
791
|
+
cancel(){
|
|
792
|
+
this.cleardara()
|
|
793
|
+
this.$dispatch('cancel')
|
|
794
|
+
},
|
|
795
|
+
cleardara(){
|
|
796
|
+
this.model= {
|
|
797
|
+
f_pcd_id: '',
|
|
798
|
+
f_street_id: '',
|
|
799
|
+
f_iscity:'市区',
|
|
800
|
+
f_residential_area_id: '',
|
|
801
|
+
f_pcd: '',
|
|
802
|
+
f_comment1:'',
|
|
803
|
+
f_comments:'',
|
|
804
|
+
f_street: '',
|
|
805
|
+
f_residential_area: '',
|
|
806
|
+
f_slice_area: '',
|
|
807
|
+
slice_area: '',
|
|
808
|
+
f_building: '',
|
|
809
|
+
f_area_period: '',
|
|
810
|
+
f_building_start: '',
|
|
811
|
+
f_building_end: '',
|
|
812
|
+
f_building_prefix: '',
|
|
813
|
+
f_building_suffix: '幢',
|
|
814
|
+
f_unit: '',
|
|
815
|
+
f_unit_start: '',
|
|
816
|
+
f_unit_end: '',
|
|
817
|
+
f_unit_prefix: '',
|
|
818
|
+
f_unit_suffix: '单元',
|
|
819
|
+
f_floor: '',
|
|
820
|
+
f_floor_start: '',
|
|
821
|
+
f_floor_end: '',
|
|
822
|
+
f_floor_prefix: '',
|
|
823
|
+
f_floor_suffix: this.config.f_floor_suffix,
|
|
824
|
+
f_room: '',
|
|
825
|
+
f_room_start: '',
|
|
826
|
+
f_room_end: '',
|
|
827
|
+
f_room_prefix: '',
|
|
828
|
+
f_room_suffix: '室',
|
|
829
|
+
//详细地址
|
|
830
|
+
f_address: '',
|
|
831
|
+
//单位名称
|
|
832
|
+
f_company: '',
|
|
833
|
+
//单位地址
|
|
834
|
+
f_company_address: '',
|
|
835
|
+
f_lng: '',
|
|
836
|
+
f_lat: ''
|
|
837
|
+
}
|
|
838
|
+
// this.pcdslist = []
|
|
839
|
+
// this.streetslist = []
|
|
840
|
+
// this.areaslist = []
|
|
841
|
+
},
|
|
842
|
+
|
|
843
|
+
//根据名字找数据
|
|
844
|
+
findbyid(list,name){
|
|
845
|
+
var result
|
|
846
|
+
list.forEach((row, n) => {
|
|
847
|
+
if(name==row.value){
|
|
848
|
+
result= row.data
|
|
865
849
|
}
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
850
|
+
})
|
|
851
|
+
return result
|
|
852
|
+
},
|
|
853
|
+
openModal () {
|
|
854
|
+
try{
|
|
855
|
+
let map = new AMap.Map('addboxmap', {
|
|
856
|
+
zoom: 12,
|
|
857
|
+
resizeEnable: true, // 如果center属性缺省,地图默认定位到用户所在城市的中心
|
|
858
|
+
viewMode: '2D', //设置地图模式
|
|
859
|
+
lang: 'zh_cn', //设置地图语言类型
|
|
860
|
+
zindex: 99999
|
|
861
|
+
})
|
|
862
|
+
console.log('map',map)
|
|
863
|
+
if (map) {
|
|
864
|
+
this.isshow = true
|
|
865
|
+
}
|
|
866
|
+
}catch (e) {
|
|
877
867
|
this.isshow = false
|
|
868
|
+
console.log('这里报错了。。。。。',e)
|
|
878
869
|
}
|
|
879
870
|
},
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
871
|
+
closeModal () {
|
|
872
|
+
this.isshow = false;
|
|
873
|
+
},
|
|
874
|
+
getmylocation (res) {
|
|
875
|
+
this.templng = res.position.lng
|
|
876
|
+
this.templat = res.position.lat
|
|
877
|
+
},
|
|
878
|
+
confirmLocation () {
|
|
879
|
+
this.model.f_lat = this.templat
|
|
880
|
+
this.model.f_lng = this.templng
|
|
881
|
+
this.isshow = false
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
watch: {
|
|
885
|
+
//分公司变化
|
|
886
|
+
'f_filialeids'(){
|
|
887
|
+
if (this.model.f_filialeid) {
|
|
888
|
+
if (this.model.f_filialeid != this.f_filialeids) {
|
|
889
|
+
this.$dispatch('cancel')
|
|
887
890
|
}
|
|
888
|
-
this.cleardara()
|
|
889
|
-
this.initdata()
|
|
890
|
-
},
|
|
891
|
-
'row'(){
|
|
892
|
-
this.onedata='one'
|
|
893
891
|
}
|
|
892
|
+
this.cleardara()
|
|
893
|
+
this.initdata()
|
|
894
894
|
},
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
895
|
+
'row'(){
|
|
896
|
+
this.onedata='one'
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
computed: {
|
|
900
|
+
//地址状态下拉框
|
|
901
|
+
addresstate() {
|
|
902
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
|
|
900
903
|
}
|
|
901
904
|
}
|
|
905
|
+
}
|
|
902
906
|
</script>
|
|
903
907
|
<style lang="less">
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
}
|
|
908
|
+
#userAddress{
|
|
909
|
+
#addboxmap {
|
|
910
|
+
height: 300px;
|
|
911
|
+
}
|
|
912
|
+
.glyphicon:hover {
|
|
913
|
+
color: red;
|
|
914
|
+
}
|
|
915
|
+
.glyphicon {
|
|
916
|
+
color: blue;
|
|
917
|
+
cursor: pointer;
|
|
915
918
|
}
|
|
919
|
+
}
|
|
916
920
|
</style>
|
|
917
921
|
|
|
918
922
|
|