address-client 3.2.113-yangchun → 3.2.113

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 (111) hide show
  1. package/.gradle/8.5/checksums/checksums.lock +0 -0
  2. package/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  3. package/.gradle/8.5/executionHistory/executionHistory.bin +0 -0
  4. package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
  5. package/.gradle/8.5/fileHashes/fileHashes.bin +0 -0
  6. package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  7. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  8. package/.gradle/file-system.probe +0 -0
  9. package/build/dev-server.js +14 -3
  10. package/build/versionCheck.js +31 -0
  11. package/package.json +5 -4
  12. package/src/components/AddAreaMsg.vue +481 -470
  13. package/src/components/AddCommunityManageMsg.vue +3 -3
  14. package/src/components/AddStreetManageMsg.vue +3 -3
  15. package/src/components/AddStreetOrPcd.vue +17 -21
  16. package/src/components/AddressAddAddress.vue +14 -14
  17. package/src/components/AddressFiles.vue +1 -1
  18. package/src/components/AddressList.vue +16 -9
  19. package/src/components/AddressTree.vue +5 -5
  20. package/src/components/AreaFiles.vue +1 -1
  21. package/src/components/AreaList.vue +5 -5
  22. package/src/components/AreaManage.vue +1 -1
  23. package/src/components/AreaTree.vue +5 -5
  24. package/src/components/Basch.vue +1 -1
  25. package/src/components/BatchOrders.vue +6 -6
  26. package/src/components/BuildingList.vue +2 -2
  27. package/src/components/CityList.vue +4 -3
  28. package/src/components/CommunityAreaList.vue +1 -1
  29. package/src/components/CommunityManageList.vue +4 -4
  30. package/src/components/NewAddressInfo.vue +4 -4
  31. package/src/components/StreetList.vue +5 -4
  32. package/src/components/StreetManageList.vue +4 -4
  33. package/src/components/UserAddress.vue +33 -44
  34. package/src/components/UserAddressChange.vue +1 -1
  35. package/src/components/selectAddress/BatchList.vue +6 -6
  36. package/src/filiale/WEINAN/AddAreaMsg.vue +5 -5
  37. package/src/filiale/WEINAN/AddressList.vue +9 -9
  38. package/src/filiale/WEINAN/AreaList.vue +5 -5
  39. package/src/filiale/WEINAN/AreaUserList.vue +3 -3
  40. package/src/filiale/WEINAN/UserAddress.vue +5 -5
  41. package/src/filiale/bayan/AddAreaMsg.vue +782 -0
  42. package/src/filiale/bayan/AddStreetOrPcd.vue +348 -0
  43. package/src/filiale/bayan/AddressList.vue +641 -0
  44. package/src/filiale/bayan/AreaList.vue +431 -0
  45. package/src/filiale/bayan/StreetList.vue +245 -0
  46. package/src/filiale/bayan/UserAddress.vue +924 -0
  47. package/src/filiale/bayan/sale.js +17 -0
  48. package/src/filiale/chengtou/UserAddress.vue +6 -6
  49. package/src/filiale/dongguan/AddStreetOrPcd.vue +6 -6
  50. package/src/filiale/gaomi/AddressList.vue +6 -6
  51. package/src/filiale/gaomi/UserAddress.vue +5 -5
  52. package/src/filiale/gongyi/AddAreaMsg.vue +4 -4
  53. package/src/filiale/gongyi/UserAddress.vue +5 -5
  54. package/src/filiale/haile/AddressList.vue +9 -9
  55. package/src/filiale/jingwei/UserAddress.vue +5 -5
  56. package/src/filiale/lixianV3/AreaList.vue +5 -5
  57. package/src/filiale/macheng/AddAreaMsg.vue +4 -4
  58. package/src/filiale/macheng/AddStreetOrPcd.vue +3 -3
  59. package/src/filiale/macheng/AddressList.vue +9 -9
  60. package/src/filiale/macheng/AreaList.vue +4 -4
  61. package/src/filiale/macheng/StreetList.vue +3 -3
  62. package/src/filiale/macheng/UserAddress.vue +5 -5
  63. package/src/filiale/meihekou/UserAddress.vue +6 -6
  64. package/src/filiale/qianneng/AddAreaMsg.vue +11 -7
  65. package/src/filiale/qianneng/AddStreetOrPcd.vue +5 -5
  66. package/src/filiale/qianneng/AddressList.vue +10 -10
  67. package/src/filiale/qianneng/AreaList.vue +6 -6
  68. package/src/filiale/qianneng/UserAddress.vue +22 -22
  69. package/src/filiale/qinhua/AddAreaMsg.vue +7 -7
  70. package/src/filiale/qinhua/AddressList.vue +9 -9
  71. package/src/filiale/qinhua/AreaList.vue +6 -6
  72. package/src/filiale/qinhua/StreetList.vue +4 -4
  73. package/src/filiale/qinhua/UserAddress.vue +6 -6
  74. package/src/filiale/rizhao/UserAddress.vue +6 -6
  75. package/src/filiale/rongcheng/AddressList.vue +5 -5
  76. package/src/filiale/rongcheng/UserAddress.vue +5 -5
  77. package/src/filiale/shanggao/AddAreaMsg.vue +7 -7
  78. package/src/filiale/shanggao/AddStreetOrPcd.vue +5 -5
  79. package/src/filiale/shanggao/AddressList.vue +9 -9
  80. package/src/filiale/shanggao/AreaList.vue +6 -6
  81. package/src/filiale/shanggao/BuildingList.vue +2 -2
  82. package/src/filiale/shanggao/StreetList.vue +4 -4
  83. package/src/filiale/shanggao/UserAddress.vue +7 -7
  84. package/src/filiale/shanxian/AddAreaMsg.vue +7 -7
  85. package/src/filiale/shanxian/AddressList.vue +9 -9
  86. package/src/filiale/shanxian/AreaList.vue +6 -6
  87. package/src/filiale/shanxian/UserAddress.vue +6 -6
  88. package/src/filiale/shaoguan/AddAreaMsg.vue +4 -4
  89. package/src/filiale/shaoguan/UserAddress.vue +5 -5
  90. package/src/filiale/tongchuan/AddAreaMsg.vue +4 -4
  91. package/src/filiale/tongchuan/AddStreetOrPcd.vue +6 -6
  92. package/src/filiale/tongchuan/AddressList.vue +5 -5
  93. package/src/filiale/tongchuan/AreaList.vue +4 -4
  94. package/src/filiale/tongchuan/CityList.vue +3 -3
  95. package/src/filiale/tongchuan/StreetList.vue +4 -4
  96. package/src/filiale/tongchuan/UserAddress.vue +6 -6
  97. package/src/filiale/wuhai/UserAddress.vue +5 -5
  98. package/src/filiale/xihu/AreaList.vue +409 -0
  99. package/src/filiale/xihu/StreetList.vue +238 -0
  100. package/src/filiale/xihu/sale.js +14 -0
  101. package/src/filiale/xinkang/AddAreaMsg.vue +8 -8
  102. package/src/filiale/xinkang/AreaList.vue +5 -5
  103. package/src/filiale/yangchun/AddAreaMsg.vue +11 -11
  104. package/src/filiale/zhongsheng/AddressList.vue +10 -10
  105. package/src/filiale/zhongsheng/AreaList.vue +7 -7
  106. package/src/filiale/zhongyi/AddAreaMsg.vue +7 -7
  107. package/src/filiale/zhoukou/AddAreaMsg.vue +5 -5
  108. package/src/filiale/zhoukou/AddressList.vue +5 -5
  109. package/src/filiale/zhoukou/AreaList.vue +4 -4
  110. package/src/filiale/zhoukou/UserAddress.vue +6 -6
  111. package/src/main.js +3 -3
@@ -0,0 +1,924 @@
1
+ <template>
2
+ <div class="auto" id="userAddress" style="height:80%">
3
+ <validator name='v'>
4
+ <p class="bg-info text-center" style="padding: 8px;">{{usertype ? '特殊地址管理' : '民用地址管理'}}</p>
5
+ <div class="auto select-overspread form-horizontal">
6
+ <div class="form-group" v-if="!usertype&&!model.id&&!config.hasnumber">
7
+ <input type="radio" id="true" value="one" v-model="onedata">
8
+ <label for="true">单户</label>
9
+ <input type="radio" id="false" value="more" v-model="onedata">
10
+ <label for="false">多户</label>
11
+ </div>
12
+ <!--单个录入-->
13
+ <div v-if="onedata=='one'" class="row">
14
+ <div class="col-sm-6 form-group "
15
+ :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']" v-if="!usertype">
16
+ <label class="font_normal_body">省&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 ">
78
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
79
+ <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"
80
+ :options='sliceArea' placeholder='片区/管理站' filer-key="name"
81
+ close-on-select v-ref:slice>
82
+ </v-select>
83
+ </div>
84
+ <div class="col-sm-6 form-group " v-if="!usertype">
85
+ <label class="font_normal_body">地区类型</label>
86
+ <v-select
87
+ :value.sync="model.f_iscity" :value-single="true"
88
+ :options='iscity' placeholder='请选择'
89
+ @change="changecity"
90
+ close-on-select>
91
+ </v-select>
92
+ </div>
93
+ <div v-if="!usertype" class="col-sm-6 form-group ">
94
+ <label for="f_address" class="font_normal_body">区(期)数</label>
95
+ <input type="text" style="width:40%" v-model="model.f_area_period" class="input_search"
96
+ placeholder="区(期)数"/>
97
+ </div>
98
+ <div v-if="!usertype" class="col-sm-6 form-group ">
99
+ <label for="f_address" class="font_normal_body">楼&emsp;&emsp;号</label>
100
+ <input type="text" style="width:40%" v-model="model.f_building" class="input_search"
101
+ placeholder="楼号"/>
102
+ <input type="text" style="width:20%" value="幢" class="input_search" disabled
103
+ />
104
+
105
+ </div>
106
+ <div v-if="!usertype" class="col-sm-6 form-group ">
107
+ <label for="f_address" class="font_normal_body">单&emsp;&emsp;元</label>
108
+ <input type="text" style="width:40%" v-model="model.f_unit" class="input_search" placeholder="单元"/>
109
+ <input type="text" style="width:20%" value="单元" class="input_search" disabled
110
+ />
111
+ </div>
112
+ <div v-if="!usertype" class="col-sm-6 form-group ">
113
+ <label for="f_address" class="font_normal_body">楼&emsp;&emsp;层</label>
114
+ <input type="text" style="width:40%" v-model="model.f_floor" class="input_search"
115
+ placeholder="楼层" />
116
+ <input type="text" style="width:20%" value="层" class="input_search" disabled
117
+ />
118
+ </div>
119
+ <div v-if="!usertype" class="col-sm-6 form-group "
120
+ :class="[$v.f_room.required ? 'has-error' : 'has-success']">
121
+ <label for="f_address" class="font_normal_body">门&ensp;牌&ensp;号</label>
122
+ <input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"
123
+ v-validate:f_room='{required: true }'/>
124
+ <input type="text" style="width:20%" value="室" class="input_search" disabled
125
+ />
126
+ </div>
127
+ <div class="col-sm-6 form-group">
128
+ <label class="font_normal_body">地址状态</label>
129
+ <v-select :value.sync="model.f_address_state" :value-single="true"
130
+ class="select_list select"
131
+ condition="f_address_state = '{}'"
132
+ :options='addresstate' placeholder='地址状态'
133
+ close-on-select>
134
+ </v-select>
135
+ </div>
136
+ <div v-if="!usertype" class="col-sm-8 form-group ">
137
+ <label class="font_normal_body">经&ensp;纬&ensp;度</label>
138
+ <input type="text" style="width:30%" v-model="model.f_lng" class="input_search" placeholder="经度"/>
139
+ <input type="text" style="width:30%" v-model="model.f_lat" class="input_search" placeholder="纬度"/>
140
+ &ensp;<span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
141
+ </div>
142
+
143
+ <div v-if="usertype" class="col-sm-12 form-group "
144
+ :class="[$v.f_address.required ? 'has-error' : 'has-success']">
145
+ <label for="f_address" class="font_normal_body">详细地址</label>
146
+ <input type="text" style="width:80%" v-model="model.f_address" class="input_search" placeholder="详细地址"
147
+ v-validate:f_address='{required: true }'/>
148
+ </div>
149
+ <div v-if="usertype" class="col-sm-8 form-group ">
150
+ <label class="font_normal_body">经&ensp;纬&ensp;度</label>
151
+ <input type="text" style="width:30%" v-model="model.f_lng" class="input_search" placeholder="经度"/>
152
+ <input type="text" style="width:30%" v-model="model.f_lat" class="input_search" placeholder="纬度"/>
153
+ &ensp;<span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
154
+ </div>
155
+ <div class="col-sm-6 form-group " v-if="config.hasnumber"
156
+ :class="[$v.f_standard_number.required ? 'has-error' : 'has-success']">
157
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;规范号</label>
158
+ <input type="text" v-model="model.f_standard_number"
159
+ @change="standardyanzheng"
160
+ class="input_search" style="width:60%" placeholder="地址规范号"
161
+ v-validate:f_standard_number='{required: true }'>
162
+ </div>
163
+ <div class="col-sm-6 form-group " v-if="config.hasnumber"
164
+ :class="[$v.f_contracts_number.required ? 'has-error' : 'has-success']">
165
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;合同号</label>
166
+ <input type="text" v-model="model.f_contracts_number"
167
+ @change="contractsyanzheng"
168
+ class="input_search" style="width:60%" placeholder="合同顺序号"
169
+ v-validate:f_contracts_number='{required: true }'>
170
+ </div>
171
+ <div class="col-sm-12 form-group" style="margin-bottom: 12px;margin-top: 12px;">
172
+ <label class="font_normal_body">小区备注</label>
173
+ <textarea class="input_textarea" rows="3" style="width:80%; height:auto;" v-model="model.f_comments1"></textarea>
174
+ </div>
175
+ <div class="col-sm-12 form-group" style="margin-top: 12px; margin-bottom: 12px;">
176
+ <label class="font_normal_body">备&emsp;&emsp;注</label>
177
+ <textarea class="input_textarea" rows="3" style="margin-top: 25px; width:80%; height:auto;" v-model="model.f_comments"></textarea>
178
+ </div>
179
+ <div style="text-align:right;margin-top:40px;margin-right:50px;" class="col-sm-12">
180
+ <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
181
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
182
+ </div>
183
+
184
+ </div>
185
+ <!--批量录入-->
186
+ <div v-if="onedata=='more'" class="row">
187
+ <div class="col-sm-6 form-group "
188
+ :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
189
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
190
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_pcd_id"
191
+ >
192
+ <v-select :value.sync="model.f_pcd_id" :value-single="true"
193
+ :options='pcdslist' placeholder='请选择'
194
+ close-on-select search="true" @change="pcdChange" :disabled="!usertype">
195
+ </v-select>
196
+ </div>
197
+ <div class="col-sm-6 form-group "
198
+ :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
199
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
200
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_street_id"
201
+ >
202
+ <v-select :value.sync="model.f_street_id" :value-single="true"
203
+ :options='streetslist' placeholder='请选择'
204
+ close-on-select search="true" :disabled="!usertype">
205
+ </v-select>
206
+ </div>
207
+ <div class="col-sm-6 form-group "
208
+ :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
209
+ <label class="font_normal_body">小区名称</label>
210
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_residential_area_id"
211
+ v-validate:f_residential_area_id='{required: true }'>
212
+ <v-select :value.sync="model.f_residential_area_id" :value-single="true"
213
+ @change="areaChange"
214
+ :options='areaslist' placeholder='请选择'
215
+ close-on-select search="true">
216
+ </v-select>
217
+ </div>
218
+ <!-- <div class="col-sm-6 form-group " :class="[$v.slice.required ? 'has-error' : 'has-success']">-->
219
+ <!-- <label class="font_normal_body">片&emsp;&emsp;区</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
+ <div class="col-sm-6 form-group "
228
+ :class="[$v.f_area_period.integernum || $v.f_area_period.dctest ?'has-error' : 'has-success']">
229
+ <label for="f_address" class="font_normal_body">区(期)数</label>
230
+ <input type="text" style="width:40%" v-model="model.f_area_period" class="input_search"
231
+ placeholder="楼号"/>
232
+ </div>
233
+ <div class="col-sm-6 form-group "
234
+ :class="[$v.f_building_start.integernum || $v.f_building_start.dctest ?'has-error' : 'has-success']">
235
+ <label for="f_address" class="font_normal_body">起始楼号</label>
236
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
237
+ <input type="text" style="width:25%"
238
+ v-validate:f_building_start='{integernum: true ,dctest: [model.f_building_end, "<=" ]}'
239
+ v-model="model.f_building_start" class="input_search" placeholder="楼号"/>
240
+ <input type="text" style="width:17%" value="幢" class="input_search" disabled/>
241
+ </div>
242
+ <div class="col-sm-6 form-group "
243
+ :class="[$v.f_building_end.integernum ||$v.f_building_end.dctest ? 'has-error' : 'has-success']">
244
+ <label for="f_address" class="font_normal_body">截止楼号</label>
245
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
246
+ <input type="text" style="width:25%"
247
+ v-validate:f_building_end='{integernum: true ,dctest: [model.f_building_start, ">=" ]}'
248
+ v-model="model.f_building_end" class="input_search" placeholder="楼号"/>
249
+ <input type="text" style="width:17%" value="幢" class="input_search" disabled
250
+ />
251
+ </div>
252
+ <div class="col-sm-6 form-group "
253
+ :class="[$v.f_unit_start.integernum || $v.f_unit_start.dctest ? 'has-error' : 'has-success']">
254
+ <label for="f_address" class="font_normal_body">起始单元</label>
255
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
256
+ <input type="text" style="width:25%"
257
+ v-validate:f_unit_start='{integernum: true ,dctest: [model.f_unit_end, "<=" ]}'
258
+ v-model="model.f_unit_start" class="input_search" placeholder="单元"/>
259
+ <input type="text" style="width:17%" value="单元" class="input_search" disabled/>
260
+ </div>
261
+ <div class="col-sm-6 form-group "
262
+ :class="[$v.f_unit_end.integernum ||$v.f_unit_end.dctest ? 'has-error' : 'has-success']">
263
+ <label for="f_address" class="font_normal_body">截止单元</label>
264
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
265
+ <input type="text" style="width:25%"
266
+ v-validate:f_unit_end='{integernum: true ,dctest: [model.f_unit_start, ">="]}'
267
+ v-model="model.f_unit_end" class="input_search" placeholder="单元"/>
268
+ <input type="text" style="width:17%" value="单元" class="input_search" disabled/>
269
+ </div>
270
+ <div class="col-sm-6 form-group "
271
+ :class="[$v.f_floor_start.integernum || $v.f_floor_start.dctest ? 'has-error' : 'has-success']">
272
+ <label for="f_address" class="font_normal_body">起始楼层</label>
273
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
274
+ <input type="text" style="width:25%"
275
+ v-validate:f_floor_start='{integernum: true,dctest: [model.f_floor_end, "<=" ] }'
276
+ v-model="model.f_floor_start" class="input_search" placeholder="楼层"/>
277
+ <input type="text" style="width:17%" value="层" class="input_search"/>
278
+ </div>
279
+ <div class="col-sm-6 form-group "
280
+ :class="[$v.f_floor_end.integernum ||$v.f_floor_end.dctest ? 'has-error' : 'has-success']">
281
+ <label for="f_address" class="font_normal_body">截止楼层</label>
282
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
283
+ <input type="text" style="width:25%" v-model="model.f_floor_end"
284
+ v-validate:f_floor_end='{integernum: true,dctest: [model.f_floor_start, ">=" ] }'
285
+ class="input_search" placeholder="楼层"/>
286
+ <input type="text" style="width:17%" value="层" class="input_search"/>
287
+ </div>
288
+ <div class="col-sm-6 form-group "
289
+ :class="[$v.f_room_start.integernum || $v.f_room_start.dctest ? 'has-error' : 'has-success']">
290
+ <label for="f_address" class="font_normal_body">起始门牌</label>
291
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
292
+ <input type="text" style="width:25%" v-model="model.f_room_start"
293
+ class="input_search" placeholder="门牌号"
294
+ v-validate:f_room_start='{integernum: true ,dctest: [model.f_room_end, "<=" ]}'
295
+ />
296
+ <input type="text" style="width:17%" value="室" class="input_search" disabled/>
297
+ </div>
298
+ <div class="col-sm-6 form-group "
299
+ :class="[$v.f_room_end.integernum ||$v.f_room_end.dctest ? 'has-error' : 'has-success']">
300
+ <label for="f_address" class="font_normal_body">截止门牌</label>
301
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
302
+ <input type="text" style="width:25%" v-model="model.f_room_end" class="input_search" placeholder="门牌号"
303
+ v-validate:f_room_end='{integernum: true ,dctest: [model.f_room_start, ">=" ]}'/>
304
+ <input type="text" style="width:17%" value="室" class="input_search" disabled/>
305
+ </div>
306
+ <div class="col-sm-6 form-group">
307
+ <label class="font_normal_body">地址状态</label>
308
+ <v-select :value.sync="model.f_address_state" :value-single="true"
309
+ class="select_list select"
310
+ condition="f_address_state = '{}'"
311
+ :options='addresstate' placeholder='地址状态'
312
+ close-on-select>
313
+ </v-select>
314
+ </div>
315
+ <div class="col-sm-10 form-group ">
316
+ <p class="navbar-text" style="margin-left: 10%">说明: 层数输入1,门牌号输入001。产生的最终门牌号显示1001</p>
317
+ </div>
318
+ <div class="col-sm-12 form-group">
319
+ <label class="font_normal_body " style="margin-top:-20px">备&emsp;&emsp;注</label>
320
+ <textarea class="input_textarea" rows="3" style="width:80%;height: auto;" v-model="model.f_comments"></textarea>
321
+ </div>
322
+ <div class="row">
323
+ <div style="text-align:right;margin-top:20px;margin-right:50px;" class="col-sm-12">
324
+ <button class="button_search button_spacing" @click="confirmall()" :disabled='!$v.valid'>保存</button>
325
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
326
+ </div>
327
+ </div>
328
+ </div>
329
+ </div>
330
+ </validator>
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>-->
343
+
344
+ </div>
345
+ </template>
346
+
347
+ <script>
348
+ import {HttpResetClass} from 'vue-client'
349
+
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
+
358
+ export default {
359
+ title: '用户地址添加',
360
+ data () {
361
+ return {
362
+ //模态框是否显示
363
+ isshow: false,
364
+ //接收位置
365
+ templng: '', //临时经度
366
+ templat: '' , //临时纬度
367
+
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
+
425
+ // 公司信息
426
+ curorgid: [this.$login.f.orgid],
427
+
428
+ f_orgid: '',
429
+
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}'`
450
+ }
451
+ let req = await this.$resetpost('api/af-revenue/sql/address_getresidential', {
452
+ data: {
453
+ condition: condition
454
+ }
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
463
+ })
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
+
489
+ },
490
+
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
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
+ }
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
+ redata.push({
573
+ label: row.f_residential_area,
574
+ value: row.id,
575
+ data: row,
576
+ id: row.id
577
+ })}
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){
596
+ this.model.f_street_id=''
597
+ }
598
+ } else {
599
+ this.model.f_street_id=''
600
+ }
601
+
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){
609
+ this.model.f_residential_area_id=''
610
+ }
611
+ } else {
612
+ this.model.f_residential_area_id=''
613
+ }
614
+
615
+ }
616
+ }
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(() => {
642
+ this.$resetValidation()
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
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 {
667
+ this.model.f_residential_area_id=''
668
+ }
669
+
670
+ }
671
+ }
672
+ this.$resetValidation()
673
+ },
674
+
675
+ getorg (val) {
676
+ this.f_orgid = val[0]
677
+ },
678
+
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_slice_area + 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
+
719
+ }
720
+ resultlist.push(data)
721
+ }
722
+ }
723
+ }
724
+ }
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: '地址保存失败'
738
+ }
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
+ })
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
+ 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_slice_area + 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
849
+ }
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) {
867
+ this.isshow = false
868
+ console.log('这里报错了。。。。。',e)
869
+ }
870
+ },
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')
890
+ }
891
+ }
892
+ this.cleardara()
893
+ this.initdata()
894
+ },
895
+ 'row'(){
896
+ this.onedata='one'
897
+ }
898
+ },
899
+ computed: {
900
+ //地址状态下拉框
901
+ addresstate() {
902
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
903
+ }
904
+ }
905
+ }
906
+ </script>
907
+ <style lang="less">
908
+ #userAddress{
909
+ #addboxmap {
910
+ height: 300px;
911
+ }
912
+ .glyphicon:hover {
913
+ color: red;
914
+ }
915
+ .glyphicon {
916
+ color: blue;
917
+ cursor: pointer;
918
+ }
919
+ }
920
+ </style>
921
+
922
+
923
+
924
+