address-client 3.0.24-78 → 3.0.24-aode

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/.gradle/{5.2.1 → 5.5}/fileChanges/last-build.bin +0 -0
  2. package/.gradle/5.5/fileHashes/fileHashes.lock +0 -0
  3. package/.gradle/{5.2.1 → 5.5}/gc.properties +0 -0
  4. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  5. package/.gradle/buildOutputCleanup/built.bin +0 -0
  6. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  7. package/.gradle/buildOutputCleanup/cache.properties.lock +1 -0
  8. package/CHANGELOG.md +0 -3
  9. package/build/dev-server.js +2 -2
  10. package/build/webpack.base.conf.js +2 -6
  11. package/examples/showAdd/App.vue +2 -2
  12. package/index.html +0 -4
  13. package/package.json +5 -6
  14. package/src/address.js +5 -11
  15. package/src/components/AddAreaMsg.vue +78 -148
  16. package/src/components/AddStreetOrPcd.vue +2 -79
  17. package/src/components/AddressList.vue +108 -182
  18. package/src/components/AddressManage.vue +1 -1
  19. package/src/components/AddressTree.vue +1 -1
  20. package/src/components/AreaList.vue +247 -317
  21. package/src/components/AreaManage.vue +18 -17
  22. package/src/components/CityManage.vue +1 -1
  23. package/src/components/NewAddressInfo.vue +1 -1
  24. package/src/components/StreetList.vue +26 -50
  25. package/src/components/UserAddress.vue +383 -509
  26. package/src/components/areauser/AreaUser.vue +233 -0
  27. package/.gradle/5.2.1/executionHistory/executionHistory.bin +0 -0
  28. package/.gradle/5.2.1/executionHistory/executionHistory.lock +0 -0
  29. package/.gradle/5.2.1/fileHashes/fileHashes.bin +0 -0
  30. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  31. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  32. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  33. package/gradle/wrapper/gradle-wrapper.properties +0 -5
  34. package/gradlew +0 -172
  35. package/gradlew.bat +0 -84
  36. package/src/components/CityList.vue +0 -133
  37. package/src/filiale/WEINAN/AddAreaMsg.vue +0 -656
  38. package/src/filiale/WEINAN/AddressList.vue +0 -351
  39. package/src/filiale/WEINAN/AddressManage.vue +0 -122
  40. package/src/filiale/WEINAN/AreaList.vue +0 -275
  41. package/src/filiale/WEINAN/UserAddress.vue +0 -783
  42. package/src/filiale/WEINAN/sale.js +0 -16
  43. package/src/filiale/gaomi/AddressList.vue +0 -430
  44. package/src/filiale/gaomi/UserAddress.vue +0 -832
  45. package/src/filiale/gaomi/sale.js +0 -14
  46. package/src/filiale/gongyi/AddAreaMsg.vue +0 -640
  47. package/src/filiale/gongyi/AreaManage.vue +0 -100
  48. package/src/filiale/gongyi/UserAddress.vue +0 -751
  49. package/src/filiale/gongyi/sale.js +0 -14
  50. package/src/filiale/jingwei/UserAddress.vue +0 -764
  51. package/src/filiale/jingwei/sale.js +0 -12
  52. package/src/filiale/macheng/AddAreaMsg.vue +0 -635
  53. package/src/filiale/macheng/AddStreetOrPcd.vue +0 -231
  54. package/src/filiale/macheng/AddressList.vue +0 -306
  55. package/src/filiale/macheng/AreaList.vue +0 -279
  56. package/src/filiale/macheng/CityManage.vue +0 -76
  57. package/src/filiale/macheng/StreetList.vue +0 -186
  58. package/src/filiale/macheng/UserAddress.vue +0 -743
  59. package/src/filiale/macheng/sale.js +0 -17
  60. package/src/filiale/rongcheng/AddressList.vue +0 -363
  61. package/src/filiale/rongcheng/UserAddress.vue +0 -799
  62. package/src/filiale/rongcheng/sale.js +0 -11
  63. package/src/filiale/shaoguan/AddAreaMsg.vue +0 -631
  64. package/src/filiale/shaoguan/UserAddress.vue +0 -764
  65. package/src/filiale/shaoguan/sale.js +0 -11
  66. package/src/filiale/tongchuan/AddAreaMsg.vue +0 -635
  67. package/src/filiale/tongchuan/AddStreetOrPcd.vue +0 -308
  68. package/src/filiale/tongchuan/AddressList.vue +0 -379
  69. package/src/filiale/tongchuan/AreaList.vue +0 -315
  70. package/src/filiale/tongchuan/AreaManage.vue +0 -100
  71. package/src/filiale/tongchuan/CityList.vue +0 -133
  72. package/src/filiale/tongchuan/StreetList.vue +0 -208
  73. package/src/filiale/tongchuan/UserAddress.vue +0 -795
  74. package/src/filiale/tongchuan/sale.js +0 -19
  75. package/src/filiale/wuhai/UserAddress.vue +0 -795
  76. package/src/filiale/wuhai/sale.js +0 -12
  77. package/src/filiale/zhoukou/AddressList.vue +0 -391
  78. package/src/filiale/zhoukou/UserAddress.vue +0 -833
  79. package/src/filiale/zhoukou/sale.js +0 -13
@@ -1,743 +0,0 @@
1
- <template>
2
- <div class="auto" 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">
7
- <input type="radio" id="true" value="one" v-model="onedata">
8
- <label for="one">单户</label>
9
- <input type="radio" id="false" value="more" v-model="onedata">
10
- <label for="more">多户</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">省&ensp;市&ensp;区</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">省&ensp;市&ensp;区</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 " :class="[$v.slice_area1.required ? 'has-error' : 'has-success']">
78
- <label class="font_normal_body">片&emsp;&emsp;区</label>
79
- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"
80
- v-validate:slice_area1='{required: true }'>
81
- <v-select :value.sync="model.slice_area" v-model="model.slice_area" :value-single="true"
82
- :options='sliceArea' placeholder='片区/管理站' filer-key="name"
83
- close-on-select v-ref:slice>
84
- </v-select>
85
- </div>
86
- <div v-if="!usertype" class="col-sm-6 form-group ">
87
- <label for="f_address" class="font_normal_body">楼&emsp;&emsp;号</label>
88
- <input type="text" style="width:40%" v-model="model.f_building" class="input_search"
89
- placeholder="楼号"/>
90
- <input type="text" style="width:20%" v-model="model.f_building_suffix" class="input_search"
91
- />
92
-
93
- </div>
94
- <div v-if="!usertype" class="col-sm-6 form-group ">
95
- <label for="f_address" class="font_normal_body">单&emsp;&emsp;元</label>
96
- <input type="text" style="width:40%" v-model="model.f_unit" class="input_search" placeholder="单元"/>
97
- <input type="text" style="width:20%" v-model="model.f_unit_suffix" class="input_search"
98
- />
99
- </div>
100
- <div v-if="!usertype" class="col-sm-6 form-group ">
101
- <label for="f_address" class="font_normal_body">楼&emsp;&emsp;层</label>
102
- <input type="text" style="width:40%" v-model="model.f_floor" class="input_search"
103
- placeholder="楼层" />
104
- <input type="text" style="width:20%" v-model="model.f_floor_suffix" class="input_search"
105
- />
106
- </div>
107
- <div v-if="!usertype" class="col-sm-6 form-group "
108
- :class="[$v.f_room.required ? 'has-error' : 'has-success']">
109
- <label for="f_address" class="font_normal_body">门&ensp;牌&ensp;号</label>
110
- <input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"/>
111
- <input type="text" style="width:20%" v-model="model.f_room_suffix" class="input_search"
112
- />
113
- </div>
114
- <div class="col-sm-6 form-group">
115
- <label class="font_normal_body">地址状态</label>
116
- <v-select :value.sync="model.f_address_state" :value-single="true"
117
- class="select_list select"
118
- condition="f_address_state = '{}'"
119
- :options='addresstate' placeholder='地址状态'
120
- close-on-select>
121
- </v-select>
122
- </div>
123
- <div v-if="usertype" class="col-sm-12 form-group "
124
- :class="[$v.f_address.required ? 'has-error' : 'has-success']">
125
- <label for="f_address" class="font_normal_body">详细地址</label>
126
- <input type="text" style="width:80%" v-model="model.f_address" class="input_search" placeholder="详细地址"
127
- v-validate:f_address='{required: true }'/>
128
- </div>
129
- <div class="col-sm-12 form-group">
130
- <label class="font_normal_body " >备&emsp;&emsp;注</label>
131
- <textarea class="input_textarea" rows="3" style="margin-top: 25px; width:80%;height: auto;" v-model="model.f_comments"></textarea>
132
- </div>
133
- <div style="text-align:right;margin-top:40px;margin-right:50px;" class="col-sm-12">
134
- <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
135
- <button class="button_clear button_spacing" @click="cancel()">取消</button>
136
- </div>
137
-
138
- </div>
139
- <!--批量录入-->
140
- <div v-if="onedata=='more'" class="row">
141
- <div class="col-sm-6 form-group "
142
- :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
143
- <label class="font_normal_body">省&ensp;市&ensp;区</label>
144
- <input type="text" style="width:60%" v-show="false" v-model="model.f_pcd_id"
145
- >
146
- <v-select :value.sync="model.f_pcd_id" :value-single="true"
147
- :options='pcdslist' placeholder='请选择'
148
- close-on-select search="true" @change="pcdChange" :disabled="!usertype">
149
- </v-select>
150
- </div>
151
- <div class="col-sm-6 form-group "
152
- :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
153
- <label class="font_normal_body">街&emsp;&emsp;道</label>
154
- <input type="text" style="width:60%" v-show="false" v-model="model.f_street_id"
155
- >
156
- <v-select :value.sync="model.f_street_id" :value-single="true"
157
- :options='streetslist' placeholder='请选择'
158
- close-on-select search="true" :disabled="!usertype">
159
- </v-select>
160
- </div>
161
- <div class="col-sm-6 form-group "
162
- :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
163
- <label class="font_normal_body">小区名称</label>
164
- <input type="text" style="width:60%" v-show="false" v-model="model.f_residential_area_id"
165
- v-validate:f_residential_area_id='{required: true }'>
166
- <v-select :value.sync="model.f_residential_area_id" :value-single="true"
167
- @change="areaChange"
168
- :options='areaslist' placeholder='请选择'
169
- close-on-select search="true">
170
- </v-select>
171
- </div>
172
- <div class="col-sm-6 form-group " :class="[$v.slice.required ? 'has-error' : 'has-success']">
173
- <label class="font_normal_body">片&emsp;&emsp;区</label>
174
- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"
175
- v-validate:slice='{required: true }'>
176
- <v-select :value.sync="model.slice_area" v-model="model.slice_area"
177
- :options='sliceArea' placeholder='片区/管理站' filer-key="name"
178
- close-on-select v-ref:slice>
179
- </v-select>
180
- </div>
181
-
182
- <div class="col-sm-6 form-group "
183
- :class="[$v.f_building_start.integernum || $v.f_building_start.dctest ?'has-error' : 'has-success']">
184
- <label for="f_address" class="font_normal_body">起始楼号</label>
185
- <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
186
- <input type="text" style="width:25%"
187
- v-validate:f_building_start='{integernum: true ,dctest: [model.f_building_end, "<=" ]}'
188
- v-model="model.f_building_start" class="input_search" placeholder="楼号"/>
189
- <input type="text" style="width:17%" v-model="model.f_building_suffix" class="input_search"/>
190
- </div>
191
- <div class="col-sm-6 form-group "
192
- :class="[$v.f_building_end.integernum ||$v.f_building_end.dctest ? 'has-error' : 'has-success']">
193
- <label for="f_address" class="font_normal_body">截止楼号</label>
194
- <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
195
- <input type="text" style="width:25%"
196
- v-validate:f_building_end='{integernum: true ,dctest: [model.f_building_start, ">=" ]}'
197
- v-model="model.f_building_end" class="input_search" placeholder="楼号"/>
198
- <input type="text" style="width:17%" v-model="model.f_building_suffix" class="input_search"
199
- />
200
- </div>
201
- <div class="col-sm-6 form-group "
202
- :class="[$v.f_unit_start.integernum || $v.f_unit_start.dctest ? 'has-error' : 'has-success']">
203
- <label for="f_address" class="font_normal_body">起始单元</label>
204
- <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
205
- <input type="text" style="width:25%"
206
- v-validate:f_unit_start='{integernum: true ,dctest: [model.f_unit_end, "<=" ]}'
207
- v-model="model.f_unit_start" class="input_search" placeholder="单元"/>
208
- <input type="text" style="width:17%" v-model="model.f_unit_suffix" class="input_search" />
209
- </div>
210
- <div class="col-sm-6 form-group "
211
- :class="[$v.f_unit_end.integernum ||$v.f_unit_end.dctest ? 'has-error' : 'has-success']">
212
- <label for="f_address" class="font_normal_body">截止单元</label>
213
- <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
214
- <input type="text" style="width:25%"
215
- v-validate:f_unit_end='{integernum: true ,dctest: [model.f_unit_start, ">="]}'
216
- v-model="model.f_unit_end" class="input_search" placeholder="单元"/>
217
- <input type="text" style="width:17%" v-model="model.f_unit_suffix" class="input_search"/>
218
- </div>
219
- <div class="col-sm-6 form-group "
220
- :class="[$v.f_floor_start.integernum || $v.f_floor_start.dctest ? 'has-error' : 'has-success']">
221
- <label for="f_address" class="font_normal_body">起始楼层</label>
222
- <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
223
- <input type="text" style="width:25%"
224
- v-validate:f_floor_start='{integernum: true,dctest: [model.f_floor_end, "<=" ] }'
225
- v-model="model.f_floor_start" class="input_search" placeholder="楼层"/>
226
- <input type="text" style="width:17%" v-model="model.f_floor_suffix" class="input_search"/>
227
- </div>
228
- <div class="col-sm-6 form-group "
229
- :class="[$v.f_floor_end.integernum ||$v.f_floor_end.dctest ? 'has-error' : 'has-success']">
230
- <label for="f_address" class="font_normal_body">截止楼层</label>
231
- <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
232
- <input type="text" style="width:25%" v-model="model.f_floor_end"
233
- v-validate:f_floor_end='{integernum: true,dctest: [model.f_floor_start, ">=" ] }'
234
- class="input_search" placeholder="楼层"/>
235
- <input type="text" style="width:17%" v-model="model.f_floor_suffix" class="input_search"/>
236
- </div>
237
- <div class="col-sm-6 form-group ">
238
- <label for="f_address" class="font_normal_body">起始门牌</label>
239
- <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
240
- <input type="text" style="width:25%" v-model="model.f_room_start"
241
- class="input_search" placeholder="门牌号" />
242
- <input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
243
- </div>
244
- <div class="col-sm-6 form-group ">
245
- <label for="f_address" class="font_normal_body">截止门牌</label>
246
- <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
247
- <input type="text" style="width:25%" v-model="model.f_room_end" class="input_search" placeholder="门牌号"/>
248
- <input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
249
- </div>
250
- <div class="col-sm-10 form-group ">
251
- <p class="navbar-text" style="margin-left: 10%">说明: 层数输入1,门牌号输入001。产生的最终门牌号显示1001</p>
252
- </div>
253
- <div class="col-sm-12 form-group">
254
- <label class="font_normal_body " style="margin-top:-20px">备&emsp;&emsp;注</label>
255
- <textarea class="input_textarea" rows="3" style="width:80%;height: auto;" v-model="model.f_comments"></textarea>
256
- </div>
257
- <div class="row">
258
- <div style="text-align:right;margin-top:20px;margin-right:50px;" class="col-sm-12">
259
- <button class="button_search button_spacing" @click="confirmall()" :disabled='!$v.valid'>保存</button>
260
- <button class="button_clear button_spacing" @click="cancel()">取消</button>
261
- </div>
262
- </div>
263
- </div>
264
- </div>
265
- </validator>
266
- </div>
267
- </template>
268
-
269
- <script>
270
- import {HttpResetClass} from 'vue-client'
271
-
272
-
273
- let getAreaConfig = async function (self) {
274
- // 获取气价里面的配置
275
- await self.$getConfig(self, 'UserAddress')
276
- console.log('原地址配置',self.config)
277
- console.log('获取地址配置',self.config)
278
- Object.assign(self.model, self.config)
279
- }
280
-
281
- export default {
282
- title: '用户地址添加',
283
- data () {
284
- return {
285
- //初始化省市区数据
286
- pcdslist:[],
287
- //初始化街道数据
288
- streetslist:[],
289
- //初始化街道数据
290
- areaslist:[],
291
- config:{
292
- f_building_suffix: '-',
293
- f_unit_suffix: '-',
294
- f_floor_suffix: '',
295
- f_room_suffix: '号'
296
- },
297
- model: {
298
- f_pcd_id: '',
299
- f_street_id: '',
300
- f_comments:'',
301
- f_residential_area_id: '',
302
- f_pcd: '',
303
- f_street: '',
304
- f_residential_area: '',
305
- f_slice_area: '',
306
- slice_area:'',
307
- f_building: '',
308
- f_building_start: '',
309
- f_building_end: '',
310
- f_building_suffix: '',
311
- f_unit: '',
312
- f_unit_start: '',
313
- f_unit_end: '',
314
- f_unit_suffix: '',
315
- f_floor: '',
316
- f_floor_start: '',
317
- f_floor_end: '',
318
- f_floor_suffix: '',
319
- f_room: '',
320
- f_room_start: '',
321
- f_room_end: '',
322
- f_room_suffix: '',
323
- //详细地址
324
- f_address: '',
325
- //单位名称
326
- f_company: '',
327
- //单位地址
328
- f_company_address: '',
329
- },
330
- //判读是否为单个数据录入
331
- onedata: 'one',
332
- //选中所有地址
333
- addresslist: [],
334
- usertype:false,
335
-
336
- // 公司信息
337
- curorgid: [this.$login.f.orgid],
338
-
339
- f_orgid: '',
340
-
341
- sliceArea: []
342
- }
343
- },
344
- props: ['f_filialeids', 'row','operation','usertype'],
345
- ready(){
346
- this.initdata()
347
- getAreaConfig(this)
348
- this.model.f_building_suffix=this.config.f_building_suffix
349
- this.model.f_unit_suffix=this.config.f_unit_suffix
350
- this.model.f_floor_suffix=this.config.f_floor_suffix
351
- this.model.f_room_suffix=this.config.f_room_suffix
352
- },
353
- methods: {
354
- async initdata(){
355
- this.model.f_address_state = '已通气'
356
- this.initAreas(this.f_filialeids)
357
- // 添加特殊地址选省市区
358
-
359
- this.initpcds(` f_orgid = '${this.f_filialeids}'`)
360
- this.initstreets(` f_orgid = '${this.f_filialeids}' `)
361
- this.initareas(` f_orgid = '${this.f_filialeids}'`)
362
-
363
- },
364
-
365
- // 初始化片区
366
- async initAreas (val) {
367
- if (val) {
368
- let getAllArea = await this.$resetpost('/rs/search', {
369
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
370
- userid: this.$login.f.id
371
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
372
-
373
- let arr = getAllArea.data.filter((res) => {
374
- return res.parentid == val
375
- })
376
- console.log('过滤之后的片区', arr)
377
- this.sliceArea = []
378
- arr.forEach((res) => {
379
- this.sliceArea.push({label: res.name, value: res.name})
380
- })
381
- }
382
- },
383
- //初始化省市区,添加街道
384
- async initpcds(pconditon){
385
- this.pcdslist = []
386
- let HttpReset = new HttpResetClass()
387
- let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
388
- data: {
389
- items: '*',
390
- tablename: 't_pcd',
391
- orderitem: 'id',
392
- condition: pconditon
393
- }
394
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
395
- let redata = []
396
- req.data.forEach((row, n) => {
397
- redata[n] = {
398
- label: row.f_pcd,
399
- value: row.id,
400
- data:row,
401
- id:row.id
402
- }
403
- })
404
- this.pcdslist=redata
405
- },
406
- //初始化街道 添加小区
407
- async initstreets(pconditon){
408
- this.streetslist = []
409
- let HttpReset = new HttpResetClass()
410
- let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
411
- data: {
412
- items: '*',
413
- tablename: 't_street',
414
- orderitem: 'id',
415
- condition: pconditon
416
- }
417
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
418
- let redata = []
419
- req.data.forEach((row, n) => {
420
- redata[n] = {
421
- label: row.f_street,
422
- value: row.id,
423
- data:row,
424
- id:row.id
425
- }
426
- })
427
- this.streetslist=redata
428
- },
429
- //初始化小区添加小区
430
- async initareas(pconditon){
431
- // if(this.usertype){
432
- // pconditon=pconditon+` and f_special='1' `
433
- // }
434
- this.areaslist = []
435
- let HttpReset = new HttpResetClass()
436
- let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
437
- data: {
438
- items: '*',
439
- tablename: 't_area',
440
- orderitem: 'id',
441
- condition: pconditon
442
- }
443
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
444
- let redata = []
445
- req.data.forEach((row) => {
446
- redata.push({
447
- label: row.f_residential_area,
448
- value: row.id,
449
- data: row,
450
- id: row.id
451
- })
452
- })
453
- this.areaslist=redata
454
- },
455
- //省/市/区变化
456
- async pcdChange(val){
457
- // 只有添加特殊地址时才级联
458
- if (!this.usertype) {
459
- return
460
- }
461
- console.log("省/市/区变化",val)
462
- if(val){
463
- //那就把[小区,街道]重新组织一下
464
- await this.initstreets(` f_pcd_id ='${val}' `)
465
- if(this.model.f_street_id){
466
- if (this.findbyid(this.streetslist,this.model.f_street_id)) {
467
- let pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
468
- if(pcd_id!=val){
469
- this.model.f_street_id=''
470
- }
471
- } else {
472
- this.model.f_street_id=''
473
- }
474
-
475
- //那就把[小区,街道]重新组织一下
476
- if (this.model.f_street_id) {
477
- await this.initareas(` f_street_id ='${this.model.f_street_id}' `)
478
- if(this.model.f_residential_area_id){
479
- if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
480
- let pcd_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_pcd_id
481
- if(pcd_id!=val){
482
- this.model.f_residential_area_id=''
483
- }
484
- } else {
485
- this.model.f_residential_area_id=''
486
- }
487
-
488
- }
489
- }
490
- }
491
- }
492
- this.$resetValidation()
493
- },
494
- //小区变化
495
- areaChange(val){
496
- console.log("小区变化",val)
497
- // 选择小区后级联出省市区和街道
498
- let selectArea // 选中的小区数据
499
- for (let row of this.areaslist) {
500
- if (val == row.value) {
501
- selectArea = row.data
502
- break
503
- }
504
- }
505
- if (selectArea) {
506
- this.model.f_street_id = selectArea.f_street_id
507
- this.model.f_pcd_id = selectArea.f_pcd_id
508
- this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
509
- this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
510
- this.model.slice_area = selectArea.f_slice_area
511
- // 拼接地址
512
- this.model.f_address = `${selectArea.f_pcd}.slice(6)${selectArea.f_street}${selectArea.f_residential_area}`
513
- }
514
- this.$nextTick(() => {
515
- this.$resetValidation()
516
- })
517
- },
518
- //街道变化
519
- async streetChange(val){
520
- console.log("街道变化",val)
521
- if(this.streetslist[0]) {
522
- var street=''
523
- this.streetslist.forEach((item)=>{
524
- if(item.id===val){
525
- street=item.label
526
- }
527
- })
528
- this.model.f_address = street
529
- }
530
- if(val){
531
- //那就把[小区]重新组织一下
532
- await this.initareas(` f_street_id ='${val}' `)
533
- if(this.model.f_residential_area_id){
534
- if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
535
- let street_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_street_id
536
- if(street_id!=val){
537
- this.model.f_residential_area_id=''
538
- }
539
- } else {
540
- this.model.f_residential_area_id=''
541
- }
542
-
543
- }
544
- }
545
- this.$resetValidation()
546
- },
547
-
548
- getorg (val) {
549
- this.f_orgid = val[0]
550
- },
551
-
552
- //处理批量地址信息
553
- dealaddlist(){
554
- try {
555
- var resultlist=[]
556
- for (var i = parseInt(this.model.f_building_start); i <= parseInt(this.model.f_building_end); i++) {
557
- for (var j = parseInt(this.model.f_unit_start); j <= parseInt(this.model.f_unit_end); j++) {
558
- for (var m = parseInt(this.model.f_floor_start); m <= parseInt(this.model.f_floor_end); m++) {
559
- for (var n = parseInt(this.model.f_room_start); n <= parseInt(this.model.f_room_end); n++) {
560
- //预备一个空的json
561
- console.log('批量', this.model)
562
- let data=Object.assign({},this.model)
563
- data.f_create_person= this.$login.f.name
564
- data.f_building= data.f_building_prefix + i
565
- data.f_unit= data.f_unit_prefix + j
566
- data.f_floor= data.f_floor_prefix + m
567
- // 目前房号都按两位处理 如: 101室 201室 110室
568
- if ((n+'').length == 1) {
569
- data.f_room = data.f_room_prefix + m + '0' + n
570
- } else {
571
- data.f_room = data.f_room_prefix + m + '' + n
572
- }
573
- data.f_filialeid = this.f_filialeids
574
- data.f_operator = this.$login.f.name
575
- data.f_operatorid = this.$login.f.id
576
- data.f_orgid = this.$login.f.orgid
577
- data.f_orgname = this.$login.f.orgs
578
- data.f_depid = this.$login.f.depids
579
- data.f_depname = this.$login.f.deps
580
- data.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
581
- data.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
582
- data.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
583
- data.f_address = data.f_street
584
- + data.f_residential_area +
585
- data.f_building + data.f_building_suffix
586
- + data.f_unit + data.f_unit_suffix
587
- + data.f_floor + data.f_floor_suffix
588
- + data.f_room + data.f_room_suffix
589
- if (this.model.slice_area) {
590
- data.f_slice_area = this.model.slice_area
591
-
592
- }
593
- resultlist.push(data)
594
- }
595
- }
596
- }
597
- }
598
- this.addresslist=resultlist
599
- } catch (e) {
600
- console.log(e)
601
- this.$showAlert('输出数据有误,请检查', 'warning', 2000)
602
- }
603
- },
604
- //保存多个
605
- async confirmall(){
606
- this.dealaddlist()
607
- if(this.addresslist.length>0){
608
- let msg = {
609
- resolveMsg: '地址保存成功',
610
- rejectMsg: '地址保存失败'
611
- }
612
- this.$showMessage('确定要批量添加'+this.addresslist.length+'户地址吗?,如有已经存在的,将会重复添加!!!', ['confirm', 'cancel']).then((res) => {
613
- if (res === 'confirm') {
614
- this.$resetpost('rs/logic/address_adduserlist',{data: {addlist:this.addresslist}},msg).then((req) => {
615
- this.cleardara()
616
- this.$dispatch('confirm')
617
- })
618
- }
619
- })
620
- }
621
- },
622
- //保存
623
- async confirm(){
624
- if(this.onedata=='one'){
625
- await this.saveonedata()
626
- }
627
- this.cleardara()
628
- this.$dispatch('confirm')
629
- },
630
- //保存一户信息
631
- async saveonedata(){
632
- this.model.f_create_person= this.$login.f.name
633
- this.model.f_filialeid = this.f_filialeids
634
- this.model.f_operator = this.$login.f.name
635
- this.model.f_operatorid = this.$login.f.id
636
- this.model.f_orgid = this.$login.f.orgid
637
- this.model.f_orgname = this.$login.f.orgs
638
- this.model.f_depid = this.$login.f.depids
639
- this.model.f_depname = this.$login.f.deps
640
- if (this.model.slice_area) {
641
- this.model.f_slice_area = this.model.slice_area
642
-
643
- }
644
- if (this.usertype) {
645
- //非民用
646
- this.model.f_special='1'
647
- this.model.f_building_suffix=''
648
- this.model.f_unit_suffix=''
649
- this.model.f_floor_suffix=''
650
- this.model.f_room_suffix=''
651
- this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
652
- this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
653
- 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 : ''
654
- } else {
655
- //民用
656
- this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
657
- this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
658
- this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
659
- this.model.f_address = this.model.f_pcd.slice(6)+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
660
- }
661
- await this.$resetpost('rs/logic/address_updateuseraddress', this.model)
662
- },
663
- cancel(){
664
- this.cleardara()
665
- this.$dispatch('cancel')
666
- },
667
- cleardara(){
668
- this.model= {
669
- f_pcd_id: '',
670
- f_street_id: '',
671
- f_residential_area_id: '',
672
- f_pcd: '',
673
- f_comments:'',
674
- f_street: '',
675
- f_residential_area: '',
676
- f_slice_area: '',
677
- slice_area: '',
678
- f_building: '',
679
- f_building_start: '',
680
- f_building_end: '',
681
- f_building_prefix: '',
682
- f_building_suffix: this.config.f_building_suffix,
683
- f_unit: '',
684
- f_unit_start: '',
685
- f_unit_end: '',
686
- f_unit_prefix: '',
687
- f_unit_suffix: this.config.f_unit_suffix,
688
- f_floor: '',
689
- f_floor_start: '',
690
- f_floor_end: '',
691
- f_floor_prefix: '',
692
- f_floor_suffix: this.config.f_floor_suffix,
693
- f_room: '',
694
- f_room_start: '',
695
- f_room_end: '',
696
- f_room_prefix: '',
697
- f_room_suffix: this.config.f_room_suffix,
698
- //详细地址
699
- f_address: '',
700
- //单位名称
701
- f_company: '',
702
- //单位地址
703
- f_company_address: '',
704
- }
705
- // this.pcdslist = []
706
- // this.streetslist = []
707
- // this.areaslist = []
708
- },
709
-
710
- //根据名字找数据
711
- findbyid(list,name){
712
- var result
713
- list.forEach((row, n) => {
714
- if(name==row.value){
715
- result= row.data
716
- }
717
- })
718
- return result
719
- },
720
- },
721
- watch: {
722
- //分公司变化
723
- 'f_filialeids'(){
724
- if (this.model.f_filialeid) {
725
- if (this.model.f_filialeid != this.f_filialeids) {
726
- this.$dispatch('cancel')
727
- }
728
- }
729
- this.cleardara()
730
- this.initdata()
731
- },
732
- 'row'(){
733
- this.onedata='one'
734
- }
735
- },
736
- computed: {
737
- //地址状态下拉框
738
- addresstate() {
739
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
740
- }
741
- }
742
- }
743
- </script>