address-client 4.0.1 → 4.0.3

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 (167) 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/dependencies-accessors/gc.properties +0 -0
  4. package/.gradle/8.5/executionHistory/executionHistory.bin +0 -0
  5. package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
  6. package/.gradle/8.5/fileChanges/last-build.bin +0 -0
  7. package/.gradle/8.5/fileHashes/fileHashes.bin +0 -0
  8. package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  9. package/.gradle/8.5/gc.properties +0 -0
  10. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  12. package/.gradle/file-system.probe +0 -0
  13. package/.gradle/vcs-1/gc.properties +0 -0
  14. package/CHANGELOG.md +15 -15
  15. package/build/dev-server.js +185 -185
  16. package/build/versionCheck.js +31 -31
  17. package/build/webpack.base.conf.js +82 -82
  18. package/examples/showAdd/App.vue +40 -40
  19. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  20. package/gradle/wrapper/gradle-wrapper.properties +7 -0
  21. package/gradlew +249 -0
  22. package/gradlew.bat +92 -0
  23. package/index.html +44 -44
  24. package/package.json +101 -101
  25. package/src/address.js +74 -74
  26. package/src/components/AddAreaMsg.vue +757 -757
  27. package/src/components/AddCommunityManageMsg.vue +220 -220
  28. package/src/components/AddStreetManageMsg.vue +204 -204
  29. package/src/components/AddStreetOrPcd.vue +316 -316
  30. package/src/components/AddressAddAddress.vue +479 -479
  31. package/src/components/AddressFiles.vue +156 -156
  32. package/src/components/AddressList.vue +637 -637
  33. package/src/components/AddressListLiuLi.vue +17 -17
  34. package/src/components/AddressManage.vue +117 -117
  35. package/src/components/AddressTree.vue +501 -501
  36. package/src/components/AreaFiles.vue +73 -73
  37. package/src/components/AreaList.vue +410 -410
  38. package/src/components/AreaManage.vue +104 -104
  39. package/src/components/AreaTree.vue +508 -508
  40. package/src/components/Basch.vue +72 -72
  41. package/src/components/BatchOrders.vue +328 -328
  42. package/src/components/BuildingList.vue +129 -129
  43. package/src/components/CityList.vue +134 -134
  44. package/src/components/CityManage.vue +76 -76
  45. package/src/components/CommunityAreaList.vue +87 -87
  46. package/src/components/CommunityManage.vue +78 -78
  47. package/src/components/CommunityManageList.vue +244 -244
  48. package/src/components/NewAddressInfo.vue +432 -432
  49. package/src/components/StreetList.vue +241 -241
  50. package/src/components/StreetManage.vue +68 -68
  51. package/src/components/StreetManageList.vue +225 -225
  52. package/src/components/UserAddress.vue +911 -907
  53. package/src/components/UserAddressChange.vue +58 -58
  54. package/src/components/selectAddress/BatchList.vue +326 -326
  55. package/src/components/selectAddress/BatchOrders.vue +37 -36
  56. package/src/filiale/WEINAN/AddAreaMsg.vue +745 -745
  57. package/src/filiale/WEINAN/AddressList.vue +588 -588
  58. package/src/filiale/WEINAN/AddressManage.vue +122 -122
  59. package/src/filiale/WEINAN/AreaList.vue +435 -435
  60. package/src/filiale/WEINAN/AreaManage.vue +109 -109
  61. package/src/filiale/WEINAN/AreaUserList.vue +226 -226
  62. package/src/filiale/WEINAN/UserAddress.vue +783 -783
  63. package/src/filiale/WEINAN/sale.js +18 -18
  64. package/src/filiale/chengtou/UserAddress.vue +894 -894
  65. package/src/filiale/chengtou/sale.js +7 -7
  66. package/src/filiale/dongguan/AddStreetOrPcd.vue +422 -422
  67. package/src/filiale/dongguan/sale.js +7 -7
  68. package/src/filiale/gaomi/AddressList.vue +430 -430
  69. package/src/filiale/gaomi/UserAddress.vue +832 -832
  70. package/src/filiale/gaomi/sale.js +14 -14
  71. package/src/filiale/gongyi/AddAreaMsg.vue +651 -651
  72. package/src/filiale/gongyi/AreaManage.vue +100 -100
  73. package/src/filiale/gongyi/UserAddress.vue +751 -751
  74. package/src/filiale/gongyi/sale.js +14 -14
  75. package/src/filiale/haile/AddressList.vue +615 -615
  76. package/src/filiale/haile/sale.js +8 -8
  77. package/src/filiale/huaran/components/AddAreaMsg.vue +765 -0
  78. package/src/filiale/huaran/components/AddStreetOrPcd.vue +324 -0
  79. package/src/filiale/huaran/components/AddressList.vue +637 -0
  80. package/src/filiale/huaran/components/AreaList.vue +410 -0
  81. package/src/filiale/huaran/components/StreetList.vue +241 -0
  82. package/src/filiale/huaran/components/UserAddress.vue +919 -0
  83. package/src/filiale/huaran/sale.js +22 -0
  84. package/src/filiale/jingwei/UserAddress.vue +764 -764
  85. package/src/filiale/jingwei/sale.js +12 -12
  86. package/src/filiale/lixianV3/AreaList.vue +416 -416
  87. package/src/filiale/lixianV3/sale.js +12 -12
  88. package/src/filiale/macheng/AddAreaMsg.vue +635 -635
  89. package/src/filiale/macheng/AddStreetOrPcd.vue +231 -231
  90. package/src/filiale/macheng/AddressList.vue +613 -613
  91. package/src/filiale/macheng/AreaList.vue +318 -318
  92. package/src/filiale/macheng/CityManage.vue +76 -76
  93. package/src/filiale/macheng/StreetList.vue +186 -186
  94. package/src/filiale/macheng/UserAddress.vue +743 -743
  95. package/src/filiale/macheng/sale.js +17 -17
  96. package/src/filiale/meihekou/UserAddress.vue +898 -898
  97. package/src/filiale/meihekou/sale.js +8 -8
  98. package/src/filiale/qianneng/AddAreaMsg.vue +755 -755
  99. package/src/filiale/qianneng/AddStreetOrPcd.vue +328 -328
  100. package/src/filiale/qianneng/AddressList.vue +638 -638
  101. package/src/filiale/qianneng/AreaList.vue +431 -431
  102. package/src/filiale/qianneng/CityManage.vue +81 -81
  103. package/src/filiale/qianneng/UserAddress.vue +1125 -1125
  104. package/src/filiale/qianneng/sale.js +20 -20
  105. package/src/filiale/qinhua/AddAreaMsg.vue +743 -743
  106. package/src/filiale/qinhua/AddressList.vue +627 -627
  107. package/src/filiale/qinhua/AddressManage.vue +117 -117
  108. package/src/filiale/qinhua/AreaList.vue +425 -425
  109. package/src/filiale/qinhua/AreaManage.vue +100 -100
  110. package/src/filiale/qinhua/CityManage.vue +76 -76
  111. package/src/filiale/qinhua/StreetList.vue +241 -241
  112. package/src/filiale/qinhua/UserAddress.vue +894 -894
  113. package/src/filiale/qinhua/sale.js +20 -20
  114. package/src/filiale/rizhao/UserAddress.vue +897 -897
  115. package/src/filiale/rizhao/sale.js +8 -8
  116. package/src/filiale/rongcheng/AddressList.vue +363 -363
  117. package/src/filiale/rongcheng/UserAddress.vue +799 -799
  118. package/src/filiale/rongcheng/sale.js +11 -11
  119. package/src/filiale/shanggao/AddAreaMsg.vue +752 -752
  120. package/src/filiale/shanggao/AddStreetOrPcd.vue +312 -312
  121. package/src/filiale/shanggao/AddressList.vue +613 -613
  122. package/src/filiale/shanggao/AreaList.vue +436 -436
  123. package/src/filiale/shanggao/BuildingList.vue +129 -129
  124. package/src/filiale/shanggao/StreetList.vue +240 -240
  125. package/src/filiale/shanggao/UserAddress.vue +953 -953
  126. package/src/filiale/shanggao/sale.js +16 -16
  127. package/src/filiale/shanxian/AddAreaMsg.vue +766 -766
  128. package/src/filiale/shanxian/AddressList.vue +658 -658
  129. package/src/filiale/shanxian/AreaList.vue +458 -458
  130. package/src/filiale/shanxian/AreaManage.vue +107 -107
  131. package/src/filiale/shanxian/UserAddress.vue +900 -900
  132. package/src/filiale/shanxian/sale.js +15 -15
  133. package/src/filiale/shaoguan/AddAreaMsg.vue +629 -629
  134. package/src/filiale/shaoguan/UserAddress.vue +762 -762
  135. package/src/filiale/shaoguan/sale.js +11 -11
  136. package/src/filiale/tongchuan/AddAreaMsg.vue +635 -635
  137. package/src/filiale/tongchuan/AddStreetOrPcd.vue +351 -351
  138. package/src/filiale/tongchuan/AddressList.vue +379 -379
  139. package/src/filiale/tongchuan/AreaList.vue +315 -315
  140. package/src/filiale/tongchuan/AreaManage.vue +100 -100
  141. package/src/filiale/tongchuan/CityList.vue +133 -133
  142. package/src/filiale/tongchuan/StreetList.vue +215 -215
  143. package/src/filiale/tongchuan/UserAddress.vue +822 -822
  144. package/src/filiale/tongchuan/sale.js +19 -19
  145. package/src/filiale/wuhai/UserAddress.vue +795 -795
  146. package/src/filiale/wuhai/sale.js +12 -12
  147. package/src/filiale/xihu/AreaList.vue +409 -409
  148. package/src/filiale/xihu/StreetList.vue +238 -238
  149. package/src/filiale/xihu/sale.js +14 -14
  150. package/src/filiale/xinkang/AddAreaMsg.vue +780 -780
  151. package/src/filiale/xinkang/AreaList.vue +413 -413
  152. package/src/filiale/xinkang/sale.js +9 -9
  153. package/src/filiale/yangchun/AddAreaMsg.vue +764 -764
  154. package/src/filiale/yangchun/sale.js +7 -7
  155. package/src/filiale/zhongsheng/AddressList.vue +671 -671
  156. package/src/filiale/zhongsheng/AreaList.vue +500 -500
  157. package/src/filiale/zhongsheng/sale.js +12 -12
  158. package/src/filiale/zhongyi/AddAreaMsg.vue +757 -757
  159. package/src/filiale/zhongyi/sale.js +12 -12
  160. package/src/filiale/zhoukou/AddAreaMsg.vue +673 -673
  161. package/src/filiale/zhoukou/AddressList.vue +391 -391
  162. package/src/filiale/zhoukou/AddressManage.vue +115 -115
  163. package/src/filiale/zhoukou/AreaList.vue +319 -319
  164. package/src/filiale/zhoukou/AreaManage.vue +100 -100
  165. package/src/filiale/zhoukou/UserAddress.vue +925 -925
  166. package/src/filiale/zhoukou/sale.js +23 -23
  167. package/src/main.js +23 -23
@@ -0,0 +1,919 @@
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">楼&emsp;&emsp;号</label>
95
+ <input type="text" style="width:40%" v-model="model.f_building" class="input_search"
96
+ placeholder="楼号"/>
97
+ <input type="text" style="width:20%" v-model="model.f_building_suffix" class="input_search"
98
+ />
99
+
100
+ </div>
101
+ <div v-if="!usertype" class="col-sm-6 form-group ">
102
+ <label for="f_address" class="font_normal_body">单&emsp;&emsp;元</label>
103
+ <input type="text" style="width:40%" v-model="model.f_unit" class="input_search" placeholder="单元"/>
104
+ <input type="text" style="width:20%" v-model="model.f_unit_suffix" class="input_search"
105
+ />
106
+ </div>
107
+ <div v-if="!usertype" class="col-sm-6 form-group ">
108
+ <label for="f_address" class="font_normal_body">楼&emsp;&emsp;层</label>
109
+ <input type="text" style="width:40%" v-model="model.f_floor" class="input_search"
110
+ placeholder="楼层" />
111
+ <input type="text" style="width:20%" v-model="model.f_floor_suffix" class="input_search"
112
+ />
113
+ </div>
114
+ <div v-if="!usertype" class="col-sm-6 form-group "
115
+ :class="[$v.f_room.required ? 'has-error' : 'has-success']">
116
+ <label for="f_address" class="font_normal_body">门&ensp;牌&ensp;号</label>
117
+ <input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"
118
+ v-validate:f_room='{required: true }'/>
119
+ <input type="text" style="width:20%" v-model="model.f_room_suffix" class="input_search"
120
+ />
121
+ </div>
122
+ <div class="col-sm-6 form-group">
123
+ <label class="font_normal_body">地址状态</label>
124
+ <v-select :value.sync="model.f_address_state" :value-single="true"
125
+ class="select_list select"
126
+ condition="f_address_state = '{}'"
127
+ :options='addresstate' placeholder='地址状态'
128
+ close-on-select>
129
+ </v-select>
130
+ </div>
131
+ <div v-if="!usertype" class="col-sm-8 form-group ">
132
+ <label class="font_normal_body">经&ensp;纬&ensp;度</label>
133
+ <input type="text" style="width:30%" v-model="model.f_lng" class="input_search" placeholder="经度"/>
134
+ <input type="text" style="width:30%" v-model="model.f_lat" class="input_search" placeholder="纬度"/>
135
+ &ensp;<span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
136
+ </div>
137
+
138
+ <div v-if="usertype" class="col-sm-12 form-group "
139
+ :class="[$v.f_address.required ? 'has-error' : 'has-success']">
140
+ <label for="f_address" class="font_normal_body">详细地址</label>
141
+ <input type="text" style="width:80%" v-model="model.f_address" class="input_search" placeholder="详细地址"
142
+ v-validate:f_address='{required: true }'/>
143
+ </div>
144
+ <div v-if="usertype" class="col-sm-8 form-group ">
145
+ <label class="font_normal_body">经&ensp;纬&ensp;度</label>
146
+ <input type="text" style="width:30%" v-model="model.f_lng" class="input_search" placeholder="经度"/>
147
+ <input type="text" style="width:30%" v-model="model.f_lat" class="input_search" placeholder="纬度"/>
148
+ &ensp;<span class="glyphicon glyphicon-map-marker" @click="openModal" ></span>
149
+ </div>
150
+ <div class="col-sm-6 form-group " v-if="config.hasnumber"
151
+ :class="[$v.f_standard_number.required ? 'has-error' : 'has-success']">
152
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;规范号</label>
153
+ <input type="text" v-model="model.f_standard_number"
154
+ @change="standardyanzheng"
155
+ class="input_search" style="width:60%" placeholder="地址规范号"
156
+ v-validate:f_standard_number='{required: true }'>
157
+ </div>
158
+ <div class="col-sm-6 form-group " v-if="config.hasnumber"
159
+ :class="[$v.f_contracts_number.required ? 'has-error' : 'has-success']">
160
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;合同号</label>
161
+ <input type="text" v-model="model.f_contracts_number"
162
+ @change="contractsyanzheng"
163
+ class="input_search" style="width:60%" placeholder="合同顺序号"
164
+ v-validate:f_contracts_number='{required: true }'>
165
+ </div>
166
+ <div class="col-sm-12 form-group" style="margin-bottom: 12px;margin-top: 12px;">
167
+ <label class="font_normal_body">小区备注</label>
168
+ <textarea class="input_textarea" rows="3" style="width:80%; height:auto;" v-model="model.f_comments1"></textarea>
169
+ </div>
170
+ <div class="col-sm-12 form-group" style="margin-top: 12px; margin-bottom: 12px;">
171
+ <label class="font_normal_body">备&emsp;&emsp;注</label>
172
+ <textarea class="input_textarea" rows="3" style="margin-top: 25px; width:80%; height:auto;" v-model="model.f_comments"></textarea>
173
+ </div>
174
+ <div style="text-align:right;margin-top:40px;margin-right:50px;" class="col-sm-12">
175
+ <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid || !this.validateCanSave()'>保存</button>
176
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
177
+ </div>
178
+
179
+ </div>
180
+ <!--批量录入-->
181
+ <div v-if="onedata=='more'" class="row">
182
+ <div class="col-sm-6 form-group "
183
+ :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
184
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
185
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_pcd_id"
186
+ >
187
+ <v-select :value.sync="model.f_pcd_id" :value-single="true"
188
+ :options='pcdslist' placeholder='请选择'
189
+ close-on-select search="true" @change="pcdChange" :disabled="!usertype">
190
+ </v-select>
191
+ </div>
192
+ <div class="col-sm-6 form-group "
193
+ :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
194
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
195
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_street_id"
196
+ >
197
+ <v-select :value.sync="model.f_street_id" :value-single="true"
198
+ :options='streetslist' placeholder='请选择'
199
+ close-on-select search="true" :disabled="!usertype">
200
+ </v-select>
201
+ </div>
202
+ <div class="col-sm-6 form-group "
203
+ :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
204
+ <label class="font_normal_body">小区名称</label>
205
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_residential_area_id"
206
+ v-validate:f_residential_area_id='{required: true }'>
207
+ <v-select :value.sync="model.f_residential_area_id" :value-single="true"
208
+ @change="areaChange"
209
+ :options='areaslist' placeholder='请选择'
210
+ close-on-select search="true">
211
+ </v-select>
212
+ </div>
213
+ <!-- <div class="col-sm-6 form-group " :class="[$v.slice.required ? 'has-error' : 'has-success']">-->
214
+ <!-- <label class="font_normal_body">片&emsp;&emsp;区</label>-->
215
+ <!-- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"-->
216
+ <!-- >-->
217
+ <!-- <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"-->
218
+ <!-- :options='sliceArea' placeholder='片区/管理站' filer-key="name"-->
219
+ <!-- close-on-select v-ref:slice>-->
220
+ <!-- </v-select>-->
221
+ <!-- </div>-->
222
+
223
+ <div class="col-sm-6 form-group "
224
+ :class="[$v.f_building_start.integernum || $v.f_building_start.dctest ?'has-error' : 'has-success']">
225
+ <label for="f_address" class="font_normal_body">起始楼号</label>
226
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
227
+ <input type="text" style="width:25%"
228
+ v-validate:f_building_start='{integernum: true ,dctest: [model.f_building_end, "<=" ]}'
229
+ v-model="model.f_building_start" class="input_search" placeholder="楼号"/>
230
+ <input type="text" style="width:17%" v-model="model.f_building_suffix" class="input_search"/>
231
+ </div>
232
+ <div class="col-sm-6 form-group "
233
+ :class="[$v.f_building_end.integernum ||$v.f_building_end.dctest ? 'has-error' : 'has-success']">
234
+ <label for="f_address" class="font_normal_body">截止楼号</label>
235
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
236
+ <input type="text" style="width:25%"
237
+ v-validate:f_building_end='{integernum: true ,dctest: [model.f_building_start, ">=" ]}'
238
+ v-model="model.f_building_end" class="input_search" placeholder="楼号"/>
239
+ <input type="text" style="width:17%" v-model="model.f_building_suffix" class="input_search"
240
+ />
241
+ </div>
242
+ <div class="col-sm-6 form-group "
243
+ :class="[$v.f_unit_start.integernum || $v.f_unit_start.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_unit_prefix" class="input_search" />
246
+ <input type="text" style="width:25%"
247
+ v-validate:f_unit_start='{integernum: true ,dctest: [model.f_unit_end, "<=" ]}'
248
+ v-model="model.f_unit_start" class="input_search" placeholder="单元"/>
249
+ <input type="text" style="width:17%" v-model="model.f_unit_suffix" class="input_search" />
250
+ </div>
251
+ <div class="col-sm-6 form-group "
252
+ :class="[$v.f_unit_end.integernum ||$v.f_unit_end.dctest ? 'has-error' : 'has-success']">
253
+ <label for="f_address" class="font_normal_body">截止单元</label>
254
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
255
+ <input type="text" style="width:25%"
256
+ v-validate:f_unit_end='{integernum: true ,dctest: [model.f_unit_start, ">="]}'
257
+ v-model="model.f_unit_end" class="input_search" placeholder="单元"/>
258
+ <input type="text" style="width:17%" v-model="model.f_unit_suffix" class="input_search"/>
259
+ </div>
260
+ <div class="col-sm-6 form-group "
261
+ :class="[$v.f_floor_start.integernum || $v.f_floor_start.dctest ? 'has-error' : 'has-success']">
262
+ <label for="f_address" class="font_normal_body">起始楼层</label>
263
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
264
+ <input type="text" style="width:25%"
265
+ v-validate:f_floor_start='{integernum: true,dctest: [model.f_floor_end, "<=" ] }'
266
+ v-model="model.f_floor_start" class="input_search" placeholder="楼层"/>
267
+ <input type="text" style="width:17%" v-model="model.f_floor_suffix" class="input_search"/>
268
+ </div>
269
+ <div class="col-sm-6 form-group "
270
+ :class="[$v.f_floor_end.integernum ||$v.f_floor_end.dctest ? 'has-error' : 'has-success']">
271
+ <label for="f_address" class="font_normal_body">截止楼层</label>
272
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
273
+ <input type="text" style="width:25%" v-model="model.f_floor_end"
274
+ v-validate:f_floor_end='{integernum: true,dctest: [model.f_floor_start, ">=" ] }'
275
+ class="input_search" placeholder="楼层"/>
276
+ <input type="text" style="width:17%" v-model="model.f_floor_suffix" class="input_search"/>
277
+ </div>
278
+ <div class="col-sm-6 form-group "
279
+ :class="[$v.f_room_start.integernum || $v.f_room_start.dctest ? 'has-error' : 'has-success']">
280
+ <label for="f_address" class="font_normal_body">起始门牌</label>
281
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
282
+ <input type="text" style="width:25%" v-model="model.f_room_start"
283
+ class="input_search" placeholder="门牌号"
284
+ v-validate:f_room_start='{integernum: true ,dctest: [model.f_room_end, "<=" ]}'
285
+ />
286
+ <input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
287
+ </div>
288
+ <div class="col-sm-6 form-group "
289
+ :class="[$v.f_room_end.integernum ||$v.f_room_end.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_end" class="input_search" placeholder="门牌号"
293
+ v-validate:f_room_end='{integernum: true ,dctest: [model.f_room_start, ">=" ]}'/>
294
+ <input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
295
+ </div>
296
+ <div class="col-sm-6 form-group">
297
+ <label class="font_normal_body">地址状态</label>
298
+ <v-select :value.sync="model.f_address_state" :value-single="true"
299
+ class="select_list select"
300
+ condition="f_address_state = '{}'"
301
+ :options='addresstate' placeholder='地址状态'
302
+ close-on-select>
303
+ </v-select>
304
+ </div>
305
+ <div class="col-sm-10 form-group ">
306
+ <p class="navbar-text" style="margin-left: 10%">说明: 层数输入1,门牌号输入001。产生的最终门牌号显示1001</p>
307
+ </div>
308
+ <div class="col-sm-12 form-group">
309
+ <label class="font_normal_body " style="margin-top:-20px">备&emsp;&emsp;注</label>
310
+ <textarea class="input_textarea" rows="3" style="width:80%;height: auto;" v-model="model.f_comments"></textarea>
311
+ </div>
312
+ <div class="row">
313
+ <div style="text-align:right;margin-top:20px;margin-right:50px;" class="col-sm-12">
314
+ <button class="button_search button_spacing" @click="confirmall()" :disabled='!$v.valid || !this.validateCanSave()'>保存</button>
315
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
316
+ </div>
317
+ </div>
318
+ </div>
319
+ </div>
320
+ </validator>
321
+
322
+ <!-- <modal v-if="isshow" :show.sync="isshow" large backdrop="false" :width="900">-->
323
+ <!-- <header slot="modal-header" class="modal-header">-->
324
+ <!-- </header>-->
325
+ <!-- <article slot="modal-body" class="modal-body">-->
326
+ <!-- <amap-location :islocationclearmark="false" dom="addboxmap" v-ref:positionInfo @getmylocation="getmylocation"></amap-location>-->
327
+ <!-- </article>-->
328
+ <!-- <footer slot="modal-footer" class="modal-footer">-->
329
+ <!-- <button v-show="isshow" type="button" class="button_search button_spacing" @click='confirmLocation'>确认</button>-->
330
+ <!-- <button v-show="isshow" type="button" class="button_clear button_spacing" @click='closeModal'>取消</button>-->
331
+ <!-- </footer>-->
332
+ <!-- </modal>-->
333
+
334
+ </div>
335
+ </template>
336
+
337
+ <script>
338
+ import {HttpResetClass} from 'vue-client'
339
+
340
+ let getAreaConfig = async function (self) {
341
+ // 获取气价里面的配置
342
+ await self.$getConfig(self, 'UserAddress')
343
+ console.log('原地址配置',self.config)
344
+ console.log('获取地址配置',self.config)
345
+ Object.assign(self.model, self.config)
346
+ }
347
+
348
+ export default {
349
+ title: '用户地址添加',
350
+ data () {
351
+ return {
352
+ canSave: true,
353
+ //模态框是否显示
354
+ isshow: false,
355
+ //接收位置
356
+ templng: '', //临时经度
357
+ templat: '' , //临时纬度
358
+
359
+ //初始化省市区数据
360
+ pcdslist:[],
361
+ //初始化街道数据
362
+ streetslist:[],
363
+ //初始化街道数据
364
+ areaslist:[],
365
+ iscity:[{label:'市区',value:'市区'},{label:'乡镇',value:'乡镇'},{label:'全部',value:''}],
366
+ config:{
367
+ hasnumber:false,
368
+ f_building_suffix: '号楼',
369
+ f_unit_suffix: '单元',
370
+ f_floor_suffix: '层',
371
+ f_room_suffix: '室'
372
+ },
373
+ model: {
374
+ f_pcd_id: '',
375
+ f_street_id: '',
376
+ f_comments1:'',
377
+ f_comments:'',
378
+ f_residential_area_id: '',
379
+ f_pcd: '',
380
+ f_street: '',
381
+ f_residential_area: '',
382
+ f_slice_area: '',
383
+ slice_area:'',
384
+ f_building: '',
385
+ f_building_start: '',
386
+ f_building_end: '',
387
+ f_building_suffix: '',
388
+ f_unit: '',
389
+ f_unit_start: '',
390
+ f_unit_end: '',
391
+ f_unit_suffix: '',
392
+ f_floor: '',
393
+ f_floor_start: '',
394
+ f_floor_end: '',
395
+ f_floor_suffix: '',
396
+ f_room: '',
397
+ f_room_start: '',
398
+ f_room_end: '',
399
+ f_room_suffix: '',
400
+ //详细地址
401
+ f_address: '',
402
+ //单位名称
403
+ f_company: '',
404
+ //单位地址
405
+ f_company_address: '',
406
+ f_lng: '', //经度
407
+ f_lat: '' //纬度
408
+ },
409
+ //判读是否为单个数据录入
410
+ onedata: 'one',
411
+ //选中所有地址
412
+ addresslist: [],
413
+ usertype:false,
414
+
415
+ // 公司信息
416
+ curorgid: [this.$login.f.orgid],
417
+
418
+ f_orgid: '',
419
+
420
+ sliceArea: []
421
+ }
422
+ },
423
+ props: ['f_filialeids', 'row','operation','usertype'],
424
+ ready(){
425
+ this.initdata()
426
+ getAreaConfig(this)
427
+ this.model.f_building_suffix=this.config.f_building_suffix
428
+ this.model.f_unit_suffix=this.config.f_unit_suffix
429
+ this.model.f_floor_suffix=this.config.f_floor_suffix
430
+ this.model.f_room_suffix=this.config.f_room_suffix
431
+ },
432
+ methods: {
433
+ validateCanSave() {
434
+ this.canSave = this.$login.r.includes('地址修改权限')
435
+ if (!this.canSave) {
436
+ this.$showAlert('您没有权限进行保存操作', 'warning', 1500)
437
+ }
438
+ return this.canSave
439
+ },
440
+ async changecity(){
441
+ this.areaslist = []
442
+ // this.model.f_residential_area_id = null
443
+ // this.model.f_residential_area = null
444
+ let condition = `a.f_orgid = '${this.$login.f.orgid}'`
445
+ if(this.model.f_iscity) {
446
+ condition = condition + ` and f_iscity = '${this.model.f_iscity}'`
447
+ }
448
+ let req = await this.$resetpost('api/af-revenue/sql/address_getresidential', {
449
+ data: {
450
+ condition: condition
451
+ }
452
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
453
+ let redata = []
454
+ req.data.forEach((row) => {
455
+ redata.push({
456
+ label: row.f_residential_area,
457
+ value: row.id,
458
+ data: row,
459
+ id: row.id
460
+ })
461
+ })
462
+ this.areaslist=redata
463
+ },
464
+ standardyanzheng() {
465
+ console.log(this.model.f_standard_number.length)
466
+ if (this.model.f_standard_number.length != 2){
467
+ this.$showAlert('请输入正确的位数', 'warning', 2000)
468
+ this.model.f_standard_number = ''
469
+ }
470
+ },
471
+ contractsyanzheng(){
472
+ console.log(this.model.f_contracts_number.length)
473
+ if (this.model.f_contracts_number.length != 5){
474
+ this.$showAlert('请输入正确的位数', 'warning', 2000)
475
+ this.model.f_contracts_number = ''
476
+ }
477
+ },
478
+ async initdata(){
479
+ this.model.f_address_state = '已通气'
480
+ this.initAreas(this.f_filialeids)
481
+ // 添加特殊地址选省市区
482
+ this.initpcds(` f_orgid = '${this.$login.f.orgid}'`)
483
+ this.initstreets(` f_orgid = '${this.$login.f.orgid}' `)
484
+ this.initareas(` f_orgid = '${this.$login.f.orgid}'`)
485
+
486
+ },
487
+
488
+ // 初始化片区
489
+ async initAreas (val) {
490
+ if (val) {
491
+ let getAllArea = await this.$resetpost('/rs/search', {
492
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
493
+ userid: this.$login.f.id
494
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
495
+ let arr = getAllArea.data.filter((res) => {
496
+ return res.parentid == val
497
+ })
498
+ console.log('过滤之后的片区', arr)
499
+ this.sliceArea = []
500
+ arr.forEach((res) => {
501
+ this.sliceArea.push({label: res.name, value: res.name})
502
+ })
503
+ }
504
+ },
505
+ //初始化省市区,添加街道
506
+ async initpcds(pconditon){
507
+ this.pcdslist = []
508
+ let HttpReset = new HttpResetClass()
509
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
510
+ data: {
511
+ items: '*',
512
+ tablename: 't_pcd',
513
+ orderitem: 'id',
514
+ condition: pconditon
515
+ }
516
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
517
+ let redata = []
518
+ req.data.forEach((row, n) => {
519
+ redata[n] = {
520
+ label: row.f_pcd,
521
+ value: row.id,
522
+ data:row,
523
+ id:row.id
524
+ }
525
+ })
526
+ this.pcdslist=redata
527
+ },
528
+ //初始化街道 添加小区
529
+ async initstreets(pconditon){
530
+ this.streetslist = []
531
+ let HttpReset = new HttpResetClass()
532
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
533
+ data: {
534
+ items: '*',
535
+ tablename: 't_street',
536
+ orderitem: 'id',
537
+ condition: pconditon
538
+ }
539
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
540
+ let redata = []
541
+ req.data.forEach((row, n) => {
542
+ redata[n] = {
543
+ label: row.f_street,
544
+ value: row.id,
545
+ data:row,
546
+ id:row.id
547
+ }
548
+ })
549
+ this.streetslist=redata
550
+ },
551
+ //初始化小区添加小区
552
+ async initareas(pconditon){
553
+ // if(this.usertype){
554
+ // pconditon=pconditon+` and f_special='1' `
555
+ // }
556
+ this.areaslist = []
557
+ let HttpReset = new HttpResetClass()
558
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
559
+ data: {
560
+ items: '*',
561
+ tablename: 't_area',
562
+ orderitem: 'id',
563
+ condition: pconditon
564
+ }
565
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
566
+ let redata = []
567
+ req.data.forEach((row) => {
568
+ redata.push({
569
+ label: row.f_residential_area,
570
+ value: row.id,
571
+ data: row,
572
+ id: row.id
573
+ })
574
+ })
575
+ this.areaslist=redata
576
+ this.areaChange(this.model.f_residential_area_id)
577
+ },
578
+ //省/市/区变化
579
+ async pcdChange(val){
580
+ // 只有添加特殊地址时才级联
581
+ if (!this.usertype) {
582
+ return
583
+ }
584
+ console.log("省/市/区变化",val)
585
+ if(val){
586
+ //那就把[小区,街道]重新组织一下
587
+ await this.initstreets(` f_pcd_id ='${val}' `)
588
+ if(this.model.f_street_id){
589
+ if (this.findbyid(this.streetslist,this.model.f_street_id)) {
590
+ let pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
591
+ if(pcd_id!=val){
592
+ this.model.f_street_id=''
593
+ }
594
+ } else {
595
+ this.model.f_street_id=''
596
+ }
597
+
598
+ //那就把[小区,街道]重新组织一下
599
+ if (this.model.f_street_id) {
600
+ await this.initareas(` f_street_id ='${this.model.f_street_id}' `)
601
+ if(this.model.f_residential_area_id){
602
+ if (this.findbyid(this.areaslist,this.model.f_residential_area_id)) {
603
+ let pcd_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_pcd_id
604
+ if(pcd_id!=val){
605
+ this.model.f_residential_area_id=''
606
+ }
607
+ } else {
608
+ this.model.f_residential_area_id=''
609
+ }
610
+
611
+ }
612
+ }
613
+ }
614
+ }
615
+ this.$resetValidation()
616
+ },
617
+ //小区变化
618
+ areaChange(val){
619
+ console.log("小区变化",val)
620
+ // 选择小区后级联出省市区和街道
621
+ let selectArea // 选中的小区数据
622
+ for (let row of this.areaslist) {
623
+ if (val == row.value) {
624
+ selectArea = row.data
625
+ break
626
+ }
627
+ }
628
+ if (selectArea) {
629
+ this.model.f_street_id = selectArea.f_street_id
630
+ this.model.f_pcd_id = selectArea.f_pcd_id
631
+ this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
632
+ this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
633
+ this.model.f_slice_area = selectArea.f_slice_area
634
+ // 拼接地址
635
+ this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
636
+ }
637
+ this.$nextTick(() => {
638
+ this.$resetValidation()
639
+ })
640
+ },
641
+ //街道变化
642
+ async streetChange(val){
643
+ if (typeof val !== 'number') {
644
+ console.error('Invalid input: expected an integer.')
645
+ return
646
+ }
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_street
711
+ + data.f_residential_area +
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
+ if (this.usertype) {
769
+ //非民用
770
+ this.model.f_special='1'
771
+ this.model.f_building_suffix=''
772
+ this.model.f_unit_suffix=''
773
+ this.model.f_floor_suffix=''
774
+ this.model.f_room_suffix=''
775
+ this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
776
+ this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
777
+ this.model.f_residential_area = this.findbyid(this.areaslist,this.model.f_residential_area_id) ? this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area : ''
778
+ } else {
779
+ //民用
780
+ this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
781
+ this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
782
+ this.model.f_residential_area=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_residential_area
783
+ this.model.f_address = this.model.f_street + this.model.f_residential_area + (this.model.f_building?this.model.f_building +this.model.f_building_suffix:'') + (this.model.f_unit?this.model.f_unit +this.model.f_unit_suffix:'') + (this.model.f_floor?this.model.f_floor +this.model.f_floor_suffix:'') + this.model.f_room + this.model.f_room_suffix
784
+ }
785
+ await this.$resetpost('api/af-revenue/logic/address_updateuseraddress', this.model)
786
+ },
787
+ cancel(){
788
+ this.cleardara()
789
+ this.$dispatch('cancel')
790
+ },
791
+ cleardara(){
792
+ this.model= {
793
+ f_pcd_id: '',
794
+ f_street_id: '',
795
+ f_iscity:'市区',
796
+ f_residential_area_id: '',
797
+ f_pcd: '',
798
+ f_comment1:'',
799
+ f_comments:'',
800
+ f_street: '',
801
+ f_residential_area: '',
802
+ f_slice_area: '',
803
+ slice_area: '',
804
+ f_building: '',
805
+ f_building_start: '',
806
+ f_building_end: '',
807
+ f_building_prefix: '',
808
+ f_building_suffix: this.config.f_building_suffix,
809
+ f_unit: '',
810
+ f_unit_start: '',
811
+ f_unit_end: '',
812
+ f_unit_prefix: '',
813
+ f_unit_suffix: this.config.f_unit_suffix,
814
+ f_floor: '',
815
+ f_floor_start: '',
816
+ f_floor_end: '',
817
+ f_floor_prefix: '',
818
+ f_floor_suffix: this.config.f_floor_suffix,
819
+ f_room: '',
820
+ f_room_start: '',
821
+ f_room_end: '',
822
+ f_room_prefix: '',
823
+ f_room_suffix: this.config.f_room_suffix,
824
+ //详细地址
825
+ f_address: '',
826
+ //单位名称
827
+ f_company: '',
828
+ //单位地址
829
+ f_company_address: '',
830
+ f_lng: '',
831
+ f_lat: ''
832
+ }
833
+ // this.pcdslist = []
834
+ // this.streetslist = []
835
+ // this.areaslist = []
836
+ },
837
+
838
+ //根据名字找数据
839
+ findbyid(list,name){
840
+ var result
841
+ list.forEach((row, n) => {
842
+ if(name==row.value){
843
+ result= row.data
844
+ }
845
+ })
846
+ return result
847
+ },
848
+ openModal () {
849
+ try{
850
+ let map = new AMap.Map('addboxmap', {
851
+ zoom: 12,
852
+ resizeEnable: true, // 如果center属性缺省,地图默认定位到用户所在城市的中心
853
+ viewMode: '2D', //设置地图模式
854
+ lang: 'zh_cn', //设置地图语言类型
855
+ zindex: 99999
856
+ })
857
+ console.log('map',map)
858
+ if (map) {
859
+ this.isshow = true
860
+ }
861
+ }catch (e) {
862
+ this.isshow = false
863
+ console.log('这里报错了。。。。。',e)
864
+ }
865
+ },
866
+ closeModal () {
867
+ this.isshow = false;
868
+ },
869
+ getmylocation (res) {
870
+ this.templng = res.position.lng
871
+ this.templat = res.position.lat
872
+ },
873
+ confirmLocation () {
874
+ this.model.f_lat = this.templat
875
+ this.model.f_lng = this.templng
876
+ this.isshow = false
877
+ }
878
+ },
879
+ watch: {
880
+ //分公司变化
881
+ 'f_filialeids'(){
882
+ if (this.model.f_filialeid) {
883
+ if (this.model.f_filialeid != this.f_filialeids) {
884
+ this.$dispatch('cancel')
885
+ }
886
+ }
887
+ this.cleardara()
888
+ this.initdata()
889
+ },
890
+ 'row'(){
891
+ this.onedata='one'
892
+ }
893
+ },
894
+ computed: {
895
+ //地址状态下拉框
896
+ addresstate() {
897
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
898
+ }
899
+ }
900
+ }
901
+ </script>
902
+ <style lang="less">
903
+ #userAddress{
904
+ #addboxmap {
905
+ height: 300px;
906
+ }
907
+ .glyphicon:hover {
908
+ color: red;
909
+ }
910
+ .glyphicon {
911
+ color: blue;
912
+ cursor: pointer;
913
+ }
914
+ }
915
+ </style>
916
+
917
+
918
+
919
+