address-client 1.5.19 → 1.5.23
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/build/dev-server.js +115 -114
- package/build.gradle +14 -14
- package/package.json +1 -1
- package/src/components/AddressList.vue +4 -5
- package/src/components/AreaList.vue +175 -177
- package/src/components/StreetList.vue +145 -146
- package/src/components/UserAddress.vue +17 -13
- package/src/main.js +19 -21
- package/yarn.lock +0 -7463
|
@@ -1,146 +1,145 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex">
|
|
3
|
-
<criteria-paged :model="model" v-ref:paged>
|
|
4
|
-
<criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
|
|
5
|
-
<div novalidate class="form-inline auto" partial>
|
|
6
|
-
<div class="form-group form-input-group">
|
|
7
|
-
<right-tree
|
|
8
|
-
:userid.sync='$parent.$parent.userid'
|
|
9
|
-
:source.sync='$parent.$parent.source'
|
|
10
|
-
@re-res="$parent.$parent.getRes"></right-tree>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="form-group form-input-group">
|
|
13
|
-
<input type="text" class="form-control" v-model="model.f_province"
|
|
14
|
-
condition="f_province like '%{}%'" placeholder="省份"
|
|
15
|
-
:size="model.f_province ? model.f_province.length*2 : 2"/>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="form-group form-input-group">
|
|
18
|
-
<input type="text" class="form-control" v-model="model.f_city"
|
|
19
|
-
condition="f_city like '%{}%'" placeholder="城市"
|
|
20
|
-
:size="model.f_city ? model.f_city.length*2 : 2"/>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="form-group form-input-group">
|
|
23
|
-
<input type="text" class="form-control" v-model="model.f_district"
|
|
24
|
-
condition="f_district like '%{}%'" placeholder="区县"
|
|
25
|
-
:size="model.f_district ? model.f_district.length*2 : 2"/>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="form-group form-input-group">
|
|
28
|
-
<input type="text" class="form-control" v-model="model.f_street"
|
|
29
|
-
condition="f_street like '%{}%'" placeholder="街道"
|
|
30
|
-
:size="model.f_street ? model.f_street.length*2 : 2"/>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="form-group form-input-group">
|
|
33
|
-
<button class="btn btn-success width-80" @click="search()" >查询</button>
|
|
34
|
-
<button class="btn btn-success width-80" @click="$parent.$parent.add('省市区')">添加省市区</button>
|
|
35
|
-
<button class="btn btn-success width-80" @click="$parent.$parent.add('街道')">添加街道</button>
|
|
36
|
-
<button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</criteria>
|
|
40
|
-
<data-grid :model="model" partial='list' v-ref:grid>
|
|
41
|
-
<template partial='head'>
|
|
42
|
-
<tr>
|
|
43
|
-
<th><nobr>id</nobr></th>
|
|
44
|
-
<th><nobr>省份</nobr></th>
|
|
45
|
-
<th><nobr>城市</nobr></th>
|
|
46
|
-
<th><nobr>区/县</nobr></th>
|
|
47
|
-
<th><nobr>街道名称</nobr></th>
|
|
48
|
-
<th><nobr>详细地址</nobr></th>
|
|
49
|
-
<th><nobr>片区/管理站 </nobr></th>
|
|
50
|
-
<th><nobr>分公司</nobr></th>
|
|
51
|
-
<th><nobr>操作</nobr></th>
|
|
52
|
-
</tr>
|
|
53
|
-
</template>
|
|
54
|
-
<template partial='body'>
|
|
55
|
-
<tr>
|
|
56
|
-
<td style="text-align:center"><nobr>{{row.id}}</nobr></td>
|
|
57
|
-
<td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
|
|
58
|
-
<td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
|
|
59
|
-
<td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
|
|
60
|
-
<td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
|
|
61
|
-
<td style="text-align:center"><nobr>{{row.f_pcd}}-{{row.f_street}}</nobr></td>
|
|
62
|
-
<td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
|
|
63
|
-
<td style="text-align:center"><nobr>{{row.f_filiale}}</nobr></td>
|
|
64
|
-
<td style="text-align:center"
|
|
65
|
-
|
|
66
|
-
@click.stop="$parent.$parent.$parent.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.$
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
this.$
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
args.condition
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex">
|
|
3
|
+
<criteria-paged :model="model" v-ref:paged>
|
|
4
|
+
<criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
|
|
5
|
+
<div novalidate class="form-inline auto" partial>
|
|
6
|
+
<div class="form-group form-input-group">
|
|
7
|
+
<right-tree
|
|
8
|
+
:userid.sync='$parent.$parent.userid'
|
|
9
|
+
:source.sync='$parent.$parent.source'
|
|
10
|
+
@re-res="$parent.$parent.getRes"></right-tree>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="form-group form-input-group">
|
|
13
|
+
<input type="text" class="form-control" v-model="model.f_province"
|
|
14
|
+
condition="f_province like '%{}%'" placeholder="省份"
|
|
15
|
+
:size="model.f_province ? model.f_province.length*2 : 2"/>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="form-group form-input-group">
|
|
18
|
+
<input type="text" class="form-control" v-model="model.f_city"
|
|
19
|
+
condition="f_city like '%{}%'" placeholder="城市"
|
|
20
|
+
:size="model.f_city ? model.f_city.length*2 : 2"/>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="form-group form-input-group">
|
|
23
|
+
<input type="text" class="form-control" v-model="model.f_district"
|
|
24
|
+
condition="f_district like '%{}%'" placeholder="区县"
|
|
25
|
+
:size="model.f_district ? model.f_district.length*2 : 2"/>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="form-group form-input-group">
|
|
28
|
+
<input type="text" class="form-control" v-model="model.f_street"
|
|
29
|
+
condition="f_street like '%{}%'" placeholder="街道"
|
|
30
|
+
:size="model.f_street ? model.f_street.length*2 : 2"/>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="form-group form-input-group">
|
|
33
|
+
<button class="btn btn-success width-80" @click="search()" >查询</button>
|
|
34
|
+
<button class="btn btn-success width-80" @click="$parent.$parent.add('省市区')">添加省市区</button>
|
|
35
|
+
<button class="btn btn-success width-80" @click="$parent.$parent.add('街道')">添加街道</button>
|
|
36
|
+
<button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</criteria>
|
|
40
|
+
<data-grid :model="model" partial='list' v-ref:grid>
|
|
41
|
+
<template partial='head'>
|
|
42
|
+
<tr>
|
|
43
|
+
<th><nobr>id</nobr></th>
|
|
44
|
+
<th><nobr>省份</nobr></th>
|
|
45
|
+
<th><nobr>城市</nobr></th>
|
|
46
|
+
<th><nobr>区/县</nobr></th>
|
|
47
|
+
<th><nobr>街道名称</nobr></th>
|
|
48
|
+
<th><nobr>详细地址</nobr></th>
|
|
49
|
+
<th><nobr>片区/管理站 </nobr></th>
|
|
50
|
+
<th><nobr>分公司</nobr></th>
|
|
51
|
+
<th ><nobr>操作</nobr></th>
|
|
52
|
+
</tr>
|
|
53
|
+
</template>
|
|
54
|
+
<template partial='body'>
|
|
55
|
+
<tr>
|
|
56
|
+
<td style="text-align:center"><nobr>{{row.id}}</nobr></td>
|
|
57
|
+
<td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
|
|
58
|
+
<td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
|
|
59
|
+
<td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
|
|
60
|
+
<td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
|
|
61
|
+
<td style="text-align:center"><nobr>{{row.f_pcd}}-{{row.f_street}}</nobr></td>
|
|
62
|
+
<td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
|
|
63
|
+
<td style="text-align:center"><nobr>{{row.f_filiale}}</nobr></td>
|
|
64
|
+
<td style="text-align:center">
|
|
65
|
+
<button type="button" name="button" class="btn btn-danger" style="padding: 5px 12px"
|
|
66
|
+
@click.stop="$parent.$parent.$parent.delete(row)">删除</button>
|
|
67
|
+
</td>
|
|
68
|
+
</tr>
|
|
69
|
+
</template>
|
|
70
|
+
<template partial='foot'></template>
|
|
71
|
+
</data-grid>
|
|
72
|
+
</criteria-paged>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script>
|
|
77
|
+
import { PagedList } from 'vue-client'
|
|
78
|
+
|
|
79
|
+
export default {
|
|
80
|
+
data () {
|
|
81
|
+
return {
|
|
82
|
+
model: new PagedList('rs/sql/address_getstreetlist',20),
|
|
83
|
+
userid: this.$login.f.id,
|
|
84
|
+
jurisdiction: this.$login.r,
|
|
85
|
+
source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
|
|
86
|
+
addflag: false,
|
|
87
|
+
addtitle:''
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
title: '街道管理',
|
|
91
|
+
props:{
|
|
92
|
+
f_filialeids:{
|
|
93
|
+
type: String
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
ready(){
|
|
97
|
+
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
async delete(row){
|
|
101
|
+
if(row.id){
|
|
102
|
+
var id = row.id
|
|
103
|
+
let useraredss = await this.$resetpost('rs/sql/address_singleTable',
|
|
104
|
+
{data: {
|
|
105
|
+
items: 'f_street_id',
|
|
106
|
+
tablename: 't_area',
|
|
107
|
+
condition: `f_street_id='${id}'`}
|
|
108
|
+
},
|
|
109
|
+
{resolveMsg: null, rejectMsg: null})
|
|
110
|
+
if(useraredss.data.length>0){
|
|
111
|
+
this.$showAlert('该街道下已有小区信息,无法删除!','warning',1000)
|
|
112
|
+
}else{
|
|
113
|
+
this.$resetdelete('rs/entity/t_street', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
114
|
+
this.$dispatch('cancel')
|
|
115
|
+
})
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
add(val){
|
|
120
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
121
|
+
this.$dispatch('add',val)
|
|
122
|
+
},
|
|
123
|
+
modify(val){
|
|
124
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
125
|
+
this.$dispatch('modify',val)
|
|
126
|
+
},
|
|
127
|
+
search (args) {
|
|
128
|
+
args.condition = `${args.condition} and s.f_filialeids = '${this.f_filialeids}'`
|
|
129
|
+
this.model.search(args.condition, args.model)
|
|
130
|
+
},
|
|
131
|
+
//清空
|
|
132
|
+
clear(){
|
|
133
|
+
this.$refs.paged.$refs.cri.model = {}
|
|
134
|
+
},
|
|
135
|
+
getRes (obj) {
|
|
136
|
+
console.log(obj,'选择到公司')
|
|
137
|
+
this.f_filialeids = obj.resids
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
watch:{
|
|
141
|
+
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
@@ -439,18 +439,19 @@
|
|
|
439
439
|
//街道变化
|
|
440
440
|
streetChange(val){
|
|
441
441
|
console.log("街道变化",val)
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
442
|
+
console.log("街道变化",this.operation)
|
|
443
|
+
if(val&&this.operation=='add' || this.operation=='modify'){
|
|
444
|
+
// if(this.model.f_pcd_id.length==0){
|
|
445
|
+
// this.model.f_pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
|
|
446
|
+
// }
|
|
446
447
|
//那就把[小区]重新组织一下
|
|
447
448
|
this.initareas(` f_filialeids = '${this.f_filialeids}' and f_street_id ='${val}' `)
|
|
448
|
-
if(this.model.f_residential_area_id){
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}
|
|
449
|
+
// if(this.model.f_residential_area_id){
|
|
450
|
+
// let street_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_street_id
|
|
451
|
+
// if(street_id!=val){
|
|
452
|
+
// this.model.f_residential_area_id=''
|
|
453
|
+
// }
|
|
454
|
+
// }
|
|
454
455
|
}
|
|
455
456
|
this.$resetValidation()
|
|
456
457
|
},
|
|
@@ -517,7 +518,7 @@
|
|
|
517
518
|
if(this.onedata=='one'){
|
|
518
519
|
this.saveonedata()
|
|
519
520
|
}
|
|
520
|
-
this.cleardara()
|
|
521
|
+
// this.cleardara()
|
|
521
522
|
this.$dispatch('confirm')
|
|
522
523
|
},
|
|
523
524
|
//保存一户信息
|
|
@@ -543,7 +544,10 @@
|
|
|
543
544
|
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
544
545
|
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
545
546
|
this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
|
|
546
|
-
|
|
547
|
+
this.model.f_address = this.model.f_street + this.model.f_residential_area + this.model.f_building +
|
|
548
|
+
(this.model.f_building?this.model.f_building_suffix:'') + this.model.f_unit +
|
|
549
|
+
(this.model.f_unit?this.model.f_unit_suffix:'') + this.model.f_floor +
|
|
550
|
+
(this.model.f_floor?this.model.f_floor_suffix:'') + this.model.f_room + this.model.f_room_suffix
|
|
547
551
|
|
|
548
552
|
}
|
|
549
553
|
let result = this.$resetpost('rs/logic/address_updateuseraddress', this.model)
|
|
@@ -554,7 +558,7 @@
|
|
|
554
558
|
},
|
|
555
559
|
cleardara(){
|
|
556
560
|
this.model= {
|
|
557
|
-
f_pcd_id: '',
|
|
561
|
+
// f_pcd_id: '',
|
|
558
562
|
f_street_id: '',
|
|
559
563
|
f_residential_area_id: '',
|
|
560
564
|
f_pcd: '',
|
package/src/main.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import App from './App'
|
|
3
|
-
import { all } from 'vue-client'
|
|
4
|
-
import { system } from 'system-clients'
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
components: { App }
|
|
21
|
-
})
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import App from './App'
|
|
3
|
+
import { all } from 'vue-client'
|
|
4
|
+
import { system } from 'system-clients'
|
|
5
|
+
import address from './address'
|
|
6
|
+
|
|
7
|
+
Vue.config.silent = true
|
|
8
|
+
|
|
9
|
+
/** **************************通用组件******************************/
|
|
10
|
+
all()
|
|
11
|
+
address()
|
|
12
|
+
system(false)
|
|
13
|
+
require('./bootstrap/less/bootstrap.less')
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
new Vue({
|
|
17
|
+
el: 'body',
|
|
18
|
+
components: { App }
|
|
19
|
+
})
|