address-client 1.3.55 → 1.3.57-2
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/4.4/fileChanges/last-build.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
- package/build/dev-server.js +134 -134
- package/build/webpack.base.conf.js +78 -78
- package/build.gradle +14 -14
- package/package.json +1 -1
- package/src/address.js +48 -48
- package/src/components/AddAreaMsg.vue +564 -544
- package/src/components/AddStreetOrPcd.vue +235 -237
- package/src/components/AddressList.vue +226 -211
- package/src/components/AddressManage.vue +113 -92
- package/src/components/AreaFiles.vue +80 -80
- package/src/components/AreaList.vue +189 -180
- package/src/components/AreaManage.vue +75 -75
- package/src/components/NewAddressInfo.vue +435 -434
- package/src/components/StreetList.vue +153 -146
- package/src/components/UserAddress.vue +641 -626
- package/src/main.js +25 -25
- package/.npmignore +0 -9
- package/build/.npmignore +0 -1
- package/yarn.lock +0 -7463
|
@@ -1,237 +1,235 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="span">
|
|
3
|
-
<validator name='v'>
|
|
4
|
-
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='add'">添加{{areatype}}</p>
|
|
5
|
-
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='modify'&&areatype=='街道'">修改【{{streetmodel.f_street}}】街道</p>
|
|
6
|
-
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='modify'&&areatype=='省市区'">修改【{{pcdmodel.f_pcd}}】</p>
|
|
7
|
-
<div class="auto select-overspread form-horizontal">
|
|
8
|
-
<div style="text-align:right;margin-top:6px;" class="col-sm-12">
|
|
9
|
-
<!-- 省市区-->
|
|
10
|
-
<div v-if="areatype=='省市区'">
|
|
11
|
-
<div class="col-sm-6 form-group form-input-group"
|
|
12
|
-
:class="[$v.f_province.required ? 'has-error' : 'has-success']">
|
|
13
|
-
<label class="col-sm-2 control-label">省份</label>
|
|
14
|
-
<div class="col-sm-4">
|
|
15
|
-
<input type="text" v-model="pcdmodel.f_province"
|
|
16
|
-
class="form-control" placeholder="省份"
|
|
17
|
-
v-validate:f_province='{required: true }'>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="col-sm-6 form-group form-input-group"
|
|
21
|
-
:class="[$v.f_city.required ? 'has-error' : 'has-success']">
|
|
22
|
-
<label class="col-sm-2 control-label">城市</label>
|
|
23
|
-
<div class="col-sm-4">
|
|
24
|
-
<input type="text" v-model="pcdmodel.f_city"
|
|
25
|
-
class="form-control" placeholder="城市"
|
|
26
|
-
v-validate:f_city='{required: true }'>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="col-sm-6 form-group form-input-group"
|
|
30
|
-
:class="[$v.f_district.required ? 'has-error' : 'has-success']">
|
|
31
|
-
<label class="col-sm-2 control-label">区/县</label>
|
|
32
|
-
<div class="col-sm-4">
|
|
33
|
-
<input type="text" v-model="pcdmodel.f_district"
|
|
34
|
-
class="form-control" placeholder="区/县"
|
|
35
|
-
v-validate:f_district='{required: true }'>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<!-- 街道-->
|
|
40
|
-
<div v-if="areatype=='街道'">
|
|
41
|
-
<div class="col-sm-6 form-group form-input-group"
|
|
42
|
-
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
|
|
43
|
-
<label class="control-label">省市区</label>
|
|
44
|
-
<div class="col-sm-4">
|
|
45
|
-
<input type="text" v-show="false" v-model="streetmodel.f_pcd_id"
|
|
46
|
-
v-validate:f_pcd_id='{required: true }'>
|
|
47
|
-
<v-select
|
|
48
|
-
:value.sync="streetmodel.f_pcd_id" :value-single="true"
|
|
49
|
-
:options='pcdslist' placeholder='请选择'
|
|
50
|
-
close-on-select search="true" @change="pcdChange">
|
|
51
|
-
</v-select>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="col-sm-6 form-group form-input-group">
|
|
55
|
-
<label class="control-label">片区</label>
|
|
56
|
-
<div class="col-sm-4">
|
|
57
|
-
<v-select :value.sync="streetmodel.f_slice_area" :value-single="true"
|
|
58
|
-
:options='sliceArea' placeholder='片区/管理站'
|
|
59
|
-
close-on-select>
|
|
60
|
-
</v-select>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
<div class="col-sm-6 form-group form-input-group"
|
|
64
|
-
:class="[$v.f_street.required ? 'has-error' : 'has-success']">
|
|
65
|
-
<label class="control-label">街道名称</label>
|
|
66
|
-
<div class="col-sm-4">
|
|
67
|
-
<input type="text" v-model="streetmodel.f_street"
|
|
68
|
-
class="form-control" placeholder="街道名称"
|
|
69
|
-
v-validate:f_street='{required: true }'>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<button class="btn btn-success" @click="confirm()" :disabled='!$v.valid'>保存</button>
|
|
74
|
-
<button class="btn btn-default" @click="cancel()">取消</button>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</validator>
|
|
78
|
-
</div>
|
|
79
|
-
</template>
|
|
80
|
-
|
|
81
|
-
<script>
|
|
82
|
-
import {HttpResetClass} from 'vue-client'
|
|
83
|
-
export default {
|
|
84
|
-
title: '区域地址添加',
|
|
85
|
-
data () {
|
|
86
|
-
return {
|
|
87
|
-
//初始化省市区数据
|
|
88
|
-
pcdslist:[],
|
|
89
|
-
//省市区
|
|
90
|
-
pcdmodel: {
|
|
91
|
-
f_province:'',
|
|
92
|
-
f_city:'',
|
|
93
|
-
f_district:'',
|
|
94
|
-
},
|
|
95
|
-
//街道
|
|
96
|
-
streetmodel: {
|
|
97
|
-
f_pcd_id:'',
|
|
98
|
-
f_street_id:'',
|
|
99
|
-
f_slice_area:'',
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
this
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
this
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
this.
|
|
175
|
-
|
|
176
|
-
this.pcdmodel.
|
|
177
|
-
this.pcdmodel.
|
|
178
|
-
this.pcdmodel.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this.
|
|
187
|
-
|
|
188
|
-
this.streetmodel.
|
|
189
|
-
this.streetmodel.
|
|
190
|
-
this.streetmodel.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
this
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="span">
|
|
3
|
+
<validator name='v'>
|
|
4
|
+
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='add'">添加{{areatype}}</p>
|
|
5
|
+
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='modify'&&areatype=='街道'">修改【{{streetmodel.f_street}}】街道</p>
|
|
6
|
+
<p class="bg-info text-center" style="padding: 8px;" v-if="operation=='modify'&&areatype=='省市区'">修改【{{pcdmodel.f_pcd}}】</p>
|
|
7
|
+
<div class="auto select-overspread form-horizontal">
|
|
8
|
+
<div style="text-align:right;margin-top:6px;" class="col-sm-12">
|
|
9
|
+
<!-- 省市区-->
|
|
10
|
+
<div v-if="areatype=='省市区'">
|
|
11
|
+
<div class="col-sm-6 form-group form-input-group"
|
|
12
|
+
:class="[$v.f_province.required ? 'has-error' : 'has-success']">
|
|
13
|
+
<label class="col-sm-2 control-label">省份</label>
|
|
14
|
+
<div class="col-sm-4">
|
|
15
|
+
<input type="text" v-model="pcdmodel.f_province"
|
|
16
|
+
class="form-control" placeholder="省份"
|
|
17
|
+
v-validate:f_province='{required: true }'>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="col-sm-6 form-group form-input-group"
|
|
21
|
+
:class="[$v.f_city.required ? 'has-error' : 'has-success']">
|
|
22
|
+
<label class="col-sm-2 control-label">城市</label>
|
|
23
|
+
<div class="col-sm-4">
|
|
24
|
+
<input type="text" v-model="pcdmodel.f_city"
|
|
25
|
+
class="form-control" placeholder="城市"
|
|
26
|
+
v-validate:f_city='{required: true }'>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="col-sm-6 form-group form-input-group"
|
|
30
|
+
:class="[$v.f_district.required ? 'has-error' : 'has-success']">
|
|
31
|
+
<label class="col-sm-2 control-label">区/县</label>
|
|
32
|
+
<div class="col-sm-4">
|
|
33
|
+
<input type="text" v-model="pcdmodel.f_district"
|
|
34
|
+
class="form-control" placeholder="区/县"
|
|
35
|
+
v-validate:f_district='{required: true }'>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<!-- 街道-->
|
|
40
|
+
<div v-if="areatype=='街道'">
|
|
41
|
+
<div class="col-sm-6 form-group form-input-group"
|
|
42
|
+
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
|
|
43
|
+
<label class="control-label">省市区</label>
|
|
44
|
+
<div class="col-sm-4">
|
|
45
|
+
<input type="text" v-show="false" v-model="streetmodel.f_pcd_id"
|
|
46
|
+
v-validate:f_pcd_id='{required: true }'>
|
|
47
|
+
<v-select
|
|
48
|
+
:value.sync="streetmodel.f_pcd_id" :value-single="true"
|
|
49
|
+
:options='pcdslist' placeholder='请选择'
|
|
50
|
+
close-on-select search="true" @change="pcdChange">
|
|
51
|
+
</v-select>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="col-sm-6 form-group form-input-group">
|
|
55
|
+
<label class="control-label">片区</label>
|
|
56
|
+
<div class="col-sm-4">
|
|
57
|
+
<v-select :value.sync="streetmodel.f_slice_area" :value-single="true"
|
|
58
|
+
:options='sliceArea' placeholder='片区/管理站'
|
|
59
|
+
close-on-select>
|
|
60
|
+
</v-select>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="col-sm-6 form-group form-input-group"
|
|
64
|
+
:class="[$v.f_street.required ? 'has-error' : 'has-success']">
|
|
65
|
+
<label class="control-label">街道名称</label>
|
|
66
|
+
<div class="col-sm-4">
|
|
67
|
+
<input type="text" v-model="streetmodel.f_street"
|
|
68
|
+
class="form-control" placeholder="街道名称"
|
|
69
|
+
v-validate:f_street='{required: true }'>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<button class="btn btn-success" @click="confirm()" :disabled='!$v.valid'>保存</button>
|
|
74
|
+
<button class="btn btn-default" @click="cancel()">取消</button>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</validator>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<script>
|
|
82
|
+
import {HttpResetClass} from 'vue-client'
|
|
83
|
+
export default {
|
|
84
|
+
title: '区域地址添加',
|
|
85
|
+
data () {
|
|
86
|
+
return {
|
|
87
|
+
//初始化省市区数据
|
|
88
|
+
pcdslist:[],
|
|
89
|
+
//省市区
|
|
90
|
+
pcdmodel: {
|
|
91
|
+
f_province:'',
|
|
92
|
+
f_city:'',
|
|
93
|
+
f_district:'',
|
|
94
|
+
},
|
|
95
|
+
//街道
|
|
96
|
+
streetmodel: {
|
|
97
|
+
f_pcd_id:'',
|
|
98
|
+
f_street_id:'',
|
|
99
|
+
f_slice_area:'',
|
|
100
|
+
f_street:'',
|
|
101
|
+
},
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
props: ['f_filialeids', 'areatype','row','operation'],
|
|
105
|
+
ready(){
|
|
106
|
+
this.initdata()
|
|
107
|
+
},
|
|
108
|
+
methods: {
|
|
109
|
+
//初始化省市区,添加街道
|
|
110
|
+
initpcds(pconditon){
|
|
111
|
+
console.log("省市区准备")
|
|
112
|
+
let HttpReset = new HttpResetClass()
|
|
113
|
+
HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
114
|
+
data: {
|
|
115
|
+
items: '*',
|
|
116
|
+
tablename: 't_pcd',
|
|
117
|
+
orderitem: 'id',
|
|
118
|
+
condition: pconditon
|
|
119
|
+
}
|
|
120
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
|
|
121
|
+
let redata = []
|
|
122
|
+
req.data.forEach((row, n) => {
|
|
123
|
+
redata[n] = {
|
|
124
|
+
label: row.f_pcd,
|
|
125
|
+
value: row.id,
|
|
126
|
+
data:row,
|
|
127
|
+
id:row.id
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
this.pcdslist=redata
|
|
131
|
+
//this.$emit('ready')
|
|
132
|
+
})
|
|
133
|
+
},
|
|
134
|
+
//根据名字找数据
|
|
135
|
+
findbyid(list,name){
|
|
136
|
+
var result
|
|
137
|
+
list.forEach((row, n) => {
|
|
138
|
+
if(name==row.id){
|
|
139
|
+
result= row.data
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
return result
|
|
143
|
+
},
|
|
144
|
+
//初始化数据
|
|
145
|
+
initdata(){
|
|
146
|
+
console.log('areatype是....',this.areatype)
|
|
147
|
+
if(this.areatype=='街道'){
|
|
148
|
+
this.initpcds(` f_filialeids = '${this.f_filialeids}'`)
|
|
149
|
+
}
|
|
150
|
+
if(this.areatype=='小区'){
|
|
151
|
+
this.initpcds(` f_filialeids = '${this.f_filialeids}'`)
|
|
152
|
+
this.initstreets(` f_filialeids = '${this.f_filialeids}'`)
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
//省/市/区变化
|
|
156
|
+
pcdChange(val){
|
|
157
|
+
console.log("省/市/区变化",val)
|
|
158
|
+
this.$resetValidation()
|
|
159
|
+
},
|
|
160
|
+
//保存
|
|
161
|
+
confirm(){
|
|
162
|
+
if(this.areatype=='省市区'){
|
|
163
|
+
this.savepcd()
|
|
164
|
+
}
|
|
165
|
+
if(this.areatype=='街道'){
|
|
166
|
+
this.savestreet()
|
|
167
|
+
}
|
|
168
|
+
this.cleardara()
|
|
169
|
+
this.$dispatch('confirm')
|
|
170
|
+
},
|
|
171
|
+
//保存省市区
|
|
172
|
+
savepcd(){
|
|
173
|
+
this.pcdmodel.f_operator= this.$login.f.name
|
|
174
|
+
if(this.operation=='add'){
|
|
175
|
+
this.pcdmodel.f_filiale = this.$login.f.f_fengongsi
|
|
176
|
+
this.pcdmodel.f_outlets = this.$login.f.f_parentname
|
|
177
|
+
this.pcdmodel.f_orgstr = this.$login.f.orgpathstr
|
|
178
|
+
this.pcdmodel.f_filialeids = this.f_filialeids
|
|
179
|
+
}
|
|
180
|
+
this.pcdmodel.f_pcd = this.pcdmodel.f_province+this.pcdmodel.f_city+this.pcdmodel.f_district
|
|
181
|
+
let result = this.$resetpost('rs/logic/address_updatepcd', this.pcdmodel)
|
|
182
|
+
},
|
|
183
|
+
//保存街道
|
|
184
|
+
savestreet(){
|
|
185
|
+
this.streetmodel.f_operator= this.$login.f.name
|
|
186
|
+
if(this.operation=='add'){
|
|
187
|
+
this.streetmodel.f_filiale = this.$login.f.f_fengongsi
|
|
188
|
+
this.streetmodel.f_outlets = this.$login.f.f_parentname
|
|
189
|
+
this.streetmodel.f_orgstr = this.$login.f.orgpathstr
|
|
190
|
+
this.streetmodel.f_filialeids = this.f_filialeids
|
|
191
|
+
}
|
|
192
|
+
this.streetmodel.f_pcd=this.findbyid(this.pcdslist,this.streetmodel.f_pcd_id).f_pcd
|
|
193
|
+
let result = this.$resetpost('rs/logic/address_updatestreet', this.streetmodel)
|
|
194
|
+
},
|
|
195
|
+
cancel(){
|
|
196
|
+
this.cleardara()
|
|
197
|
+
this.$dispatch('cancel')
|
|
198
|
+
},
|
|
199
|
+
cleardara () {
|
|
200
|
+
this.pcdmodel = {
|
|
201
|
+
f_province: '',
|
|
202
|
+
f_city: '',
|
|
203
|
+
f_district: ''
|
|
204
|
+
}
|
|
205
|
+
this.streetmodel = {
|
|
206
|
+
f_pcd_id: '',
|
|
207
|
+
f_slice_area: '',
|
|
208
|
+
f_street: ''
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
watch: {
|
|
213
|
+
'areatype'(){
|
|
214
|
+
this.initdata()
|
|
215
|
+
},
|
|
216
|
+
'f_filialeids'(){
|
|
217
|
+
this.initdata()
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
computed: {
|
|
221
|
+
// 片区处理
|
|
222
|
+
sliceArea () {
|
|
223
|
+
let rs = new Array()
|
|
224
|
+
for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
|
|
225
|
+
let temp = {
|
|
226
|
+
label: this.$login.f.f_allArea[i].label,
|
|
227
|
+
value: this.$login.f.f_allArea[i].label
|
|
228
|
+
}
|
|
229
|
+
rs.push(temp)
|
|
230
|
+
}
|
|
231
|
+
return rs
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
</script>
|