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,782 @@
1
+ <template>
2
+ <div class="span">
3
+ <validator name='v'>
4
+ <div class="form-horizontal select-overspread container-fluid" style="overflow-y: auto">
5
+ <div class="row auto">
6
+ <div class="col-sm-12 bg-info text-center" style="padding: 8px;font-size: 18px;font-weight: bold">
7
+ <span v-if="operation=='add'&&!f_specia">添加{{ areatype }}</span>
8
+ <span v-if="operation=='modify'&&!f_special">修改【{{ areamodel.f_residential_area }}】小区</span>
9
+ <span v-if="operation=='add'&&f_specia">添加{{ areatype }}</span>
10
+ <span v-if="operation=='modify'&&f_special">修改【{{ areamodel.f_residential_area }}】单位</span>
11
+ </div>
12
+ <div v-if="areatype != '楼栋'">
13
+ <!--基本小区(单位)信息-->
14
+ <div class="col-sm-6 form-group" v-if="!config.hasnumber">
15
+ <label class="font_normal_body">小区编号</label>
16
+ <input type="text" class="input_search" style="width:60%" v-model="areamodel.f_area_id"
17
+ @blur="areaidChange" placeholder="小区编号">
18
+ </div>
19
+
20
+ <div class="col-sm-6 form-group" v-if="config.hasnumber"
21
+ :class="[$v.f_area_id.required ? 'has-error' : 'has-success']">
22
+ <label class="font_normal_body">小区编号</label>
23
+ <input type="number" class="input_search" style="width:60%" v-model="areamodel.f_area_id"
24
+ v-validate:f_area_id='{required: true }'
25
+ @change="areaidChangeHasnumber" placeholder="小区编号">
26
+ </div>
27
+
28
+ <div class="col-sm-6 form-group"
29
+ :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
30
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
31
+ <input type="text" class="input_search" class="input_search" style="width:60%" v-show="false"
32
+ v-model="areamodel.f_pcd_id"
33
+ v-validate:f_pcd_id='{required: true }'>
34
+ <v-select
35
+ :value.sync="areamodel.f_pcd_id" :value-single="true"
36
+ :options='pcdslist' placeholder='请选择'
37
+ close-on-select search="true" @change="pcdChange">
38
+ </v-select>
39
+ </div>
40
+ <div class="col-sm-6 form-group"
41
+ :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
42
+ <label class="font_normal_body">街道/乡镇</label>
43
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_street_id"
44
+ v-validate:f_street_id='{required: true }'>
45
+ <v-select
46
+ :value.sync="areamodel.f_street_id" :value-single="true"
47
+ :options='streetslist' placeholder='请选择'
48
+ close-on-select search="true" @change="streetChange">
49
+ </v-select>
50
+ </div>
51
+ <div class="col-sm-6 form-group">
52
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
53
+ <v-select :value.sync="areamodel.slice_area" v-model="areamodel.slice_area"
54
+ :options='sliceArea' placeholder='片区/管理站' filer-key="name"
55
+ close-on-select v-ref:slice>
56
+ </v-select>
57
+ </div>
58
+ <!--小区(特殊)信息-->
59
+ <div v-if="!f_special"
60
+ class="col-sm-6 form-group"
61
+ :class="[$v.f_residential_area.required ? 'has-error' : 'has-success']">
62
+ <label class="font_normal_body">小区名称</label>
63
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_residential_area"
64
+ class="form-control" placeholder="小区名称"
65
+ v-validate:f_residential_area='{required: true }'>
66
+ </div>
67
+ <div v-if="!f_special"
68
+ class="col-sm-6 form-group"
69
+ >
70
+ <label class="font_normal_body">置换日期</label>
71
+ <datepicker style="width:60%" id="f_replacement_date" placeholder="置换日期" width='100%'
72
+ v-model="areamodel.f_replacement_date"
73
+ :value.sync="areamodel.f_replacement_date"
74
+ class="datepicker"
75
+ :format="'yyyy-MM-dd'"
76
+ :show-reset-button="true">
77
+ </datepicker>
78
+ </div>
79
+ <div v-if="!f_special"
80
+ class="col-sm-6 form-group"
81
+ >
82
+ <label class="font_normal_body">物业电话</label>
83
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_property_phone"
84
+ class="form-control" placeholder="联系电话"
85
+ >
86
+ </div>
87
+
88
+ <div v-if="!f_special"
89
+ class="col-sm-12 form-group">
90
+ <label class="font_normal_body">小区地址</label>
91
+ <input type="text" style="width:80%" class="input_search" v-model="areamodel.f_area_address"
92
+ class="form-control" placeholder="小区地址">
93
+ </div>
94
+ <!--单位(特殊)信息-->
95
+ <div v-if="f_special"
96
+ class="col-sm-6 form-group"
97
+ :class="[$v.f_residential_area.required ? 'has-error' : 'has-success']">
98
+ <label class="font_normal_body">单位名称</label>
99
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_residential_area"
100
+ class="form-control" placeholder="单位名称"
101
+ v-validate:f_residential_area='{required: true }'>
102
+ </div>
103
+ <div v-if="f_special"
104
+ class="col-sm-12 form-group">
105
+ <label class="font_normal_body">单位地址</label>
106
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_area_address"
107
+ class="form-control" placeholder="单位地址">
108
+ </div>
109
+ <div v-if="f_special"
110
+ class="col-sm-6 form-group"
111
+ :class="[$v.f_linkname.required ? 'has-error' : 'has-success']">
112
+ <label class="font_normal_body">联&ensp;系&ensp;人</label>
113
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_linkname"
114
+ class="form-control" placeholder="联系人"
115
+ v-validate:f_linkname='{required: true }'>
116
+ </div>
117
+ <div v-if="f_special"
118
+ class="col-sm-6 form-group"
119
+ :class="[$v.f_linkphone.required ? 'has-error' : 'has-success']">
120
+ <label class="font_normal_body">联系电话</label>
121
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_linkphone"
122
+ class="form-control" placeholder="联系电话"
123
+ v-validate:f_linkphone='{required: true }'>
124
+ </div>
125
+ <div class="col-sm-12 form-group">
126
+ <label class="font_normal_body " style="">备&emsp;&emsp;注</label>
127
+ <textarea class="input_textarea" rows="3" style="margin-top:20px;width:80%;height: auto;"
128
+ v-model="areamodel.f_comments"></textarea>
129
+ </div>
130
+ <div class="col-sm-12 form-group">
131
+ <br/>
132
+ </div>
133
+ <!--表具信息-->
134
+ <div v-if="!f_special" class="col-sm-12 bg-info text-center"
135
+ style="padding: 8px;font-size: 18px;font-weight: bold">
136
+ <span>默认表具信息</span>
137
+ </div>
138
+ <div v-if="!f_special" class="row">
139
+ <div class="col-sm-6 form-group">
140
+ <label class="font_normal_body">用户类型</label>
141
+ <input type="text" style="width:60%" class="input_search" v-show="false"
142
+ v-model="areamodel.f_user_type">
143
+ <v-select
144
+ :value.sync="areamodel.f_user_type" :value-single="true"
145
+ :options='usertypes' placeholder='用户类型' @change="userTypeChange"
146
+ close-on-select>
147
+ </v-select>
148
+ </div>
149
+ <div class="col-sm-6 form-group">
150
+ <label class="font_normal_body">用气性质</label>
151
+ <input type="text" style="width:60%" class="input_search" v-show="false"
152
+ v-model="areamodel.f_gasproperties">
153
+ <v-select
154
+ :value.sync="areamodel.f_gasproperties" :value-single="true"
155
+ :options='gasproperties' placeholder='用气性质'
156
+ close-on-select>
157
+ </v-select>
158
+ </div>
159
+ <div class="col-sm-6 form-group">
160
+ <label class="font_normal_body">气价类型</label>
161
+ <input type="text" style="width:60%" class="input_search" v-show="false"
162
+ v-model="areamodel.f_price_type">
163
+ <v-select
164
+ :value.sync="areamodel.f_price_type" :value-single="true"
165
+ :options='f_price_types' placeholder='气价类型'
166
+ close-on-select>
167
+ </v-select>
168
+ </div>
169
+ <div class="col-sm-6 form-group">
170
+ <label class="font_normal_body">气价名称</label>
171
+ <input type="text" style="width:60%" class="input_search" v-show="false"
172
+ v-model="areamodel.f_price_name">
173
+ <v-select
174
+ :value.sync="areamodel.f_price_name" :value-single="true"
175
+ :options='pricenames' placeholder='气价名称'
176
+ close-on-select>
177
+ </v-select>
178
+ </div>
179
+ <div class="col-sm-6 form-group">
180
+ <label class="font_normal_body">气表品牌</label>
181
+ <input type="text" style="width:60%" class="input_search" v-show="false"
182
+ v-model="areamodel.f_meter_brand">
183
+ <v-select
184
+ :value.sync="areamodel.f_meter_brand" :value-single="true"
185
+ :options='meterbrands' placeholder='气表品牌'
186
+ close-on-select>
187
+ </v-select>
188
+ </div>
189
+ <div class="col-sm-6 form-group">
190
+ <label class="font_normal_body">气表型号</label>
191
+ <input type="text" style="width:60%" class="input_search" v-show="false"
192
+ v-model="areamodel.f_meter_style">
193
+ <v-select
194
+ :value.sync="areamodel.f_meter_style" :value-single="true"
195
+ :options='meterstyle' placeholder='气表型号'
196
+ close-on-select>
197
+ </v-select>
198
+ </div>
199
+ <div class="col-sm-6 form-group" :class="[$v.f_meter_type.required ? 'has-error' : 'has-success']">
200
+ <label class="font_normal_body">气表类型</label>
201
+ <input type="text" style="width:60%" class="input_search" v-show="false"
202
+ v-model="areamodel.f_meter_type">
203
+ <v-select :value.sync="areamodel.f_meter_type" :value-single="true"
204
+ :options='metertypes' placeholder='请选择'
205
+ close-on-select></v-select>
206
+ </div>
207
+ <div class="col-sm-6 form-group" v-if="isMachine">
208
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
209
+ <input type="text" style="width:60%" class="input_search" v-show="false"
210
+ v-model="areamodel.f_meter_book">
211
+ <v-select
212
+ :value.sync="areamodel.f_meter_book" :value-single="true"
213
+ :options='meterbooks' placeholder='抄表册'
214
+ close-on-select>
215
+ </v-select>
216
+ </div>
217
+ <div class="col-sm-6 form-group" v-if="!isMachine"
218
+ :class="[$v.f_meter_book.required ? 'has-error' : 'has-success']">
219
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
220
+ <input type="text" style="width:60%" class="input_search" v-show="false"
221
+ v-model="areamodel.f_meter_book">
222
+ <v-select
223
+ :value.sync="areamodel.f_meter_book" :value-single="true"
224
+ :options='meterbooks' placeholder='抄表册'
225
+ close-on-select>
226
+ </v-select>
227
+ </div>
228
+ <div class="col-sm-6 form-group" :class="[$v.f_inputtor.required ? 'has-error' : 'has-success']">
229
+ <label class="font_normal_body">抄&ensp;表&ensp;员</label>
230
+ <input type="text" style="width:60%" class="input_search"
231
+ v-show="false" v-model="areamodel.f_inputtor">
232
+ <v-select
233
+ :value.sync="areamodel.f_inputtor" :value-single="true"
234
+ :options='inputtores' placeholder='抄表员'
235
+ close-on-select>
236
+ </v-select>
237
+ </div>
238
+ <div class="col-sm-6 form-group" :class="[$v.f_adjustable_id.required ? 'has-error' : 'has-success']">
239
+ <label class="font_normal_body">调&ensp;压&ensp;箱</label>
240
+ <input type="text" style="width:60%" class="input_search" v-show="false"
241
+ v-model="areamodel.f_adjustable_id">
242
+ <v-select
243
+ :value.sync="areamodel.f_adjustable_id" :value-single="true"
244
+ :options='adjustables' placeholder='调压箱'
245
+ close-on-select>
246
+ </v-select>
247
+ </div>
248
+ <div class="col-sm-6 form-group" :class="[$v.f_house_type.required ? 'has-error' : 'has-success']">
249
+ <label class="font_normal_body">房屋类型</label>
250
+ <input type="text" style="width:60%" class="input_search" v-show="false"
251
+ v-model="areamodel.f_house_type">
252
+ <v-select
253
+ :value.sync="areamodel.f_house_type" :value-single="true"
254
+ :options='housetypeoptions' placeholder='房屋类型'
255
+ close-on-select>
256
+ </v-select>
257
+ </div>
258
+ <div class="col-sm-6 form-group" :class="[$v.f_position.required ? 'has-error' : 'has-success']">
259
+ <label class="font_normal_body">安装位置</label>
260
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_position">
261
+ <v-select
262
+ :value.sync="areamodel.f_position" :value-single="true"
263
+ :options='positions' placeholder='安装位置'
264
+ close-on-select>
265
+ </v-select>
266
+ </div>
267
+ </div>
268
+ <div v-if="f_special" class="col-sm-6 form-group">
269
+ <br/>
270
+ </div>
271
+ </div>
272
+ <div v-if="areatype == '楼栋'">
273
+ <div class="col-sm-6 form-group "
274
+ :class="[$v.f_residential_area_id1.required ? 'has-error' : 'has-success']">
275
+ <label class="font_normal_body">小区名称</label>
276
+ <input type="text" style="width:41%" v-show="false" v-model="buildingmodel.f_residential_area_id"
277
+ v-validate:f_residential_area_id1='{required: true }'>
278
+ <v-select :value.sync="buildingmodel.f_residential_area_id" :value-single="true" v-ref:areaselect
279
+ :options='areaslist' placeholder='请选择'
280
+ close-on-select search="true">
281
+ </v-select>
282
+ </div>
283
+ <div class="col-sm-6 form-group" :class="[$v.f_building.required ? 'has-error' : 'has-success']">
284
+ <label class="font_normal_body">楼栋名称</label>
285
+ <input type="text" class="input_search" style="width:60%" v-validate:f_building='{required: true }'
286
+ v-model="buildingmodel.f_building" placeholder="楼栋名称">
287
+ </div>
288
+ </div>
289
+ </div>
290
+ <div class="row auto" style="text-align:right;">
291
+ <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
292
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
293
+ </div>
294
+ <div v-if="areatype == '楼栋'" class="row" style="margin-top:40px;height: 580px;">
295
+ <building-list v-ref:buildinglist @select-changed="selected" :areaslist="areaslist"
296
+ :f_filialeids.sync="f_filialeids"></building-list>
297
+ </div>
298
+ </div>
299
+ </validator>
300
+ </div>
301
+ </template>
302
+
303
+ <script>
304
+ import {HttpResetClass} from 'vue-client'
305
+
306
+ let initGen = async function (self) {
307
+ await self.$getConfig(self, 'UserArea')
308
+ console.log('原地址配置', self.config)
309
+ console.log('获取地址配置', self.config)
310
+ // Object.assign(self.model, self.config)
311
+ await self.initdata()
312
+ await self.$LoadParams.loadMeterBook(self.f_filialeids)
313
+ await self.loadMeterBooks();
314
+ }
315
+ export default {
316
+ title: '小区添加',
317
+ data() {
318
+ return {
319
+ config: {
320
+ hasnumber: false,
321
+ },
322
+ //初始化省市区数据
323
+ pcdslist: [],
324
+ //初始化街道数据
325
+ streetslist: [],
326
+ //小区
327
+ areamodel: {
328
+ f_area_id: '',
329
+ f_pcd_id: '',
330
+ f_linkname: '',
331
+ f_linkphone: '',
332
+ f_street_id: '',
333
+ f_slice_area: '',
334
+ f_adjustable_id: '',
335
+ f_residential_area: '',
336
+ f_replacement_date: '',
337
+ f_property_phone: '',
338
+ f_user_type: '',
339
+ f_gasproperties: '',
340
+ f_meter_brand: '',
341
+ f_price_name: '',
342
+ f_area_address: '',
343
+ f_price_type: '',
344
+ f_meter_style: '',
345
+ f_position: '',
346
+ f_comments: '',
347
+ f_meter_type: ''
348
+ },
349
+ // 初始化小区数据
350
+ areaslist: [],
351
+ // 楼栋
352
+ buildingmodel: {
353
+ f_residential_area: '',
354
+ f_residential_area_id: '',
355
+ f_building: ''
356
+ },
357
+ meterbrands: [],
358
+ adjustables: [],
359
+ sliceArea: [],
360
+ gasproperties: [],
361
+ meterbooks: [{label: '全部', value: ''}],
362
+ isMachine: true
363
+ }
364
+ },
365
+ props: ['f_filialeids', 'f_special', 'areatype', 'row', 'operation'],
366
+ ready() {
367
+ initGen(this)
368
+ },
369
+ methods: {
370
+ loadMeterBooks() {
371
+ this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
372
+ },
373
+ //初始化数据
374
+ async initdata() {
375
+ // 初始化参数
376
+ await this.initParams()
377
+ if (this.areatype == '楼栋') {
378
+ this.initareas(` f_orgid = '${this.f_filialeids}'`)
379
+ }
380
+ // 初始化片区
381
+ await this.initSlice(this.f_filialeids)
382
+ await this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
383
+ },
384
+ initrow(val) {
385
+ this.areamodel.f_meter_book = val.f_meter_book;
386
+ this.areamodel.f_adjustable_id = val.f_adjustable_id;
387
+ },
388
+ async initParams() {
389
+ await this.$LoadParams.loadParam(this.f_filialeids)
390
+ this.initBrands()
391
+ this.initAdjustables()
392
+ },
393
+
394
+ initBrands() {
395
+ let ret = this.$GetSaleParam.getGasbrand()
396
+ let rs = new Array()
397
+ ret.forEach((item, index) => {
398
+ rs.push({label: item.label, value: item.value.f_meter_brand})
399
+ })
400
+ this.meterbrands = rs
401
+ },
402
+
403
+ initAdjustables() {
404
+ let filter = this.$login.f.orgid
405
+ let ret = this.$GetSaleParam.getAdjustable(filter)
406
+ let arr = new Array()
407
+ ret.forEach((item, index) => {
408
+ arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
409
+ })
410
+ this.adjustables = arr
411
+ },
412
+
413
+ async initSlice(val) {
414
+ if (val) {
415
+ let getAllArea = await this.$resetpost('/rs/search', {
416
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
417
+ userid: this.$login.f.id
418
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
419
+
420
+ let arr = getAllArea.data.filter((res) => {
421
+ return res.parentid == val
422
+ })
423
+ this.sliceArea = []
424
+ arr.forEach((res) => {
425
+ this.sliceArea.push({label: res.name, value: {name: res.name, code: res.number}})
426
+ })
427
+ }
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', 'api/af-revenue/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_street + ']' + row.f_residential_area,
448
+ value: row.id,
449
+ data: row,
450
+ id: row.id
451
+ })
452
+ })
453
+ this.areaslist = redata
454
+ },
455
+
456
+ //初始化省市区,添加街道
457
+ async initpcds(pconditon) {
458
+ this.pcdslist = []
459
+ let HttpReset = new HttpResetClass()
460
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
461
+ data: {
462
+ items: '*',
463
+ tablename: 't_pcd',
464
+ orderitem: 'id',
465
+ condition: pconditon
466
+ }
467
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
468
+ let redata = []
469
+ req.data.forEach((row, n) => {
470
+ redata[n] = {
471
+ label: row.f_pcd,
472
+ value: row.id,
473
+ data: row,
474
+ id: row.id
475
+ }
476
+ })
477
+ this.pcdslist = redata
478
+
479
+ },
480
+ //初始化街道 添加小区
481
+ async initstreets(pconditon) {
482
+ this.streetslist = []
483
+ let HttpReset = new HttpResetClass()
484
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
485
+ data: {
486
+ items: '*',
487
+ tablename: 't_street',
488
+ orderitem: 'id',
489
+ condition: pconditon
490
+ }
491
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
492
+ let redata = []
493
+ req.data.forEach((row, n) => {
494
+ redata[n] = {
495
+ label: row.f_street,
496
+ value: row.id,
497
+ data: row,
498
+ id: row.id
499
+ }
500
+ })
501
+ this.streetslist = redata
502
+ },
503
+ async areaidChangeHasnumber() {
504
+ console.log(this.areamodel.f_area_id.length)
505
+ if (this.areamodel.f_area_id.length != 2) {
506
+ this.$showAlert('请输入正确的位数', 'warning', 2000)
507
+ this.areamodel.f_area_id = ''
508
+ } else {
509
+ let res = await this.$resetpost('api/af-revenue/sql/address_singleTableOrderBy', {
510
+ data: {
511
+ items: '*',
512
+ tablename: 't_area',
513
+ orderitem: 'id',
514
+ condition: `f_area_id = '${this.areamodel.f_area_id}' and f_orgid = '${this.$login.f.orgid}'`
515
+ }
516
+ }, {resolveMsg: null, rejectMsg: null})
517
+ if (res.data.length > 0) {
518
+ if (res.data[0].id != this.areamodel.id) {
519
+ this.$showAlert('当前编号已存在', 'warning', 2000)
520
+ this.areamodel.f_area_id = ''
521
+ }
522
+ }
523
+ }
524
+ },
525
+ async areaidChange() {
526
+ // 验证小区编号是否已存在
527
+
528
+ let param = {
529
+ id: this.areamodel.id,
530
+ f_area_id: this.areamodel.f_area_id,
531
+ f_filialeid: this.f_filialeids
532
+ }
533
+
534
+ let res = await this.$resetpost('api/af-revenue/logic/address_validateAreaID', param, {
535
+ resolveMsg: null,
536
+ rejectMsg: '小区编号验证失败!!'
537
+ })
538
+ console.log('验证小区是否存在', res)
539
+ if (res.data) {
540
+ this.$showAlert('这个小区编号已存在!!!请核实', 'warning', 3000)
541
+ this.areamodel.f_area_id = ''
542
+ }
543
+
544
+ },
545
+
546
+
547
+ //根据名字找数据
548
+ findbyid(list, name) {
549
+ var result
550
+ list.forEach((row, n) => {
551
+ if (name == row.id) {
552
+ result = row.data
553
+ }
554
+ })
555
+ return result
556
+ },
557
+ userTypeChange() {
558
+ this.gasproperties = []
559
+ if (this.areamodel.f_user_type) {
560
+ this.gasproperties = this.$appdata.getParam(this.areamodel.f_user_type)
561
+ }
562
+ },
563
+
564
+ //省/市/区变化
565
+ async pcdChange(val) {
566
+ if (val) {
567
+ //那就把街道数据重新组织一下
568
+ await this.initstreets(` f_filialeid = '${this.f_filialeids}' and f_pcd_id ='${val}' `)
569
+ if (this.areamodel.f_street_id) {
570
+ if (this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
571
+ let pcd_id = this.findbyid(this.streetslist, this.areamodel.f_street_id).f_pcd_id
572
+ if (pcd_id != val) {
573
+ this.areamodel.f_street_id = ''
574
+ }
575
+ } else {
576
+ this.areamodel.f_street_id = ''
577
+ }
578
+
579
+ }
580
+ }
581
+ this.$resetValidation()
582
+ },
583
+ //街道变化
584
+ streetChange(val) {
585
+ if (val && this.operation == 'add') {
586
+ // if(this.areamodel.f_pcd_id.length==0){
587
+ if (this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
588
+ this.areamodel.f_pcd_id = this.findbyid(this.streetslist, this.areamodel.f_street_id).f_pcd_id
589
+ }
590
+ // }
591
+ }
592
+ this.$resetValidation()
593
+ },
594
+ //保存
595
+ async confirm() {
596
+ if (this.areatype == '楼栋') {
597
+ await this.savebuilding()
598
+ } else {
599
+ await this.savearea()
600
+ this.cleardara()
601
+ this.$dispatch('confirm')
602
+ }
603
+ },
604
+ // 保存楼栋
605
+ async savebuilding() {
606
+ this.buildingmodel.f_residential_area = this.$refs.areaselect.selectedItems
607
+ this.buildingmodel.f_filialeid = this.f_filialeids
608
+ this.buildingmodel.f_operator = this.$login.f.name
609
+ this.buildingmodel.f_operatorid = this.$login.f.id
610
+ this.buildingmodel.f_orgid = this.$login.f.orgid
611
+ this.buildingmodel.f_orgname = this.$login.f.orgs
612
+ this.buildingmodel.f_depid = this.$login.f.depids
613
+ this.buildingmodel.f_depname = this.$login.f.deps
614
+ await this.$resetpost('api/af-revenue/logic/address_savebuilding', this.buildingmodel)
615
+ this.$refs.buildinglist.search()
616
+ },
617
+ //保存小区
618
+ async savearea() {
619
+ if (this.f_special) {
620
+ this.areamodel.f_special = '1'
621
+ }
622
+ this.areamodel.f_filialeid = this.f_filialeids
623
+ this.areamodel.f_operator = this.$login.f.name
624
+ this.areamodel.f_operatorid = this.$login.f.id
625
+ this.areamodel.f_orgid = this.$login.f.orgid
626
+ this.areamodel.f_orgname = this.$login.f.orgs
627
+ this.areamodel.f_depid = this.$login.f.depids
628
+ this.areamodel.f_depname = this.$login.f.deps
629
+ if (this.areamodel.slice_area) {
630
+ if (this.areamodel.slice_area.length > 0) {
631
+ this.areamodel.f_slice_area = this.areamodel.slice_area[0].name
632
+ this.areamodel.f_area_code = this.areamodel.slice_area[0].code
633
+ }
634
+ }
635
+ // this.areamodel.f_pcd = this.findbyid(this.pcdslist, this.areamodel.f_pcd_id).f_pcd
636
+ this.areamodel.f_street = this.findbyid(this.streetslist, this.areamodel.f_street_id).f_street
637
+
638
+ await this.$resetpost('api/af-revenue/logic/address_updatearea', this.areamodel)
639
+ },
640
+ cleardara() {
641
+ this.areamodel = {
642
+ f_area_id: '',
643
+ f_pcd_id: '',
644
+ f_street_id: '',
645
+ f_slice_area: '',
646
+ f_linkname: '',
647
+ f_linkphone: '',
648
+ f_adjustable_id: '',
649
+ f_residential_area: '',
650
+ f_user_type: '',
651
+ f_gasproperties: '',
652
+ f_area_address: '',
653
+ f_meter_brand: '',
654
+ f_price_name: '',
655
+ f_price_type: '',
656
+ f_meter_style: '',
657
+ f_position: '',
658
+ f_comments: '',
659
+ f_meter_type: ''
660
+ }
661
+ },
662
+ cancel() {
663
+ this.cleardara()
664
+ this.$dispatch('cancel')
665
+ },
666
+ },
667
+ watch: {
668
+ 'areamodel.f_meter_type'(val) {
669
+ if (val === '机表')
670
+ this.isMachine = false
671
+ },
672
+ 'areatype'() {
673
+ this.initdata()
674
+ },
675
+ 'areamodel.f_pcd_id'() {
676
+ if (this.areamodel.f_pcd_id && this.areamodel.f_street_id) {
677
+ if (this.findbyid(this.pcdslist, this.areamodel.f_pcd_id) && this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
678
+ this.areamodel.f_area_address = this.findbyid(this.pcdslist, this.areamodel.f_pcd_id).f_pcd + this.findbyid(this.streetslist, this.areamodel.f_street_id).f_street
679
+ }
680
+ }
681
+ },
682
+ 'areamodel.f_street_id'() {
683
+ if (this.areamodel.f_pcd_id && this.areamodel.f_street_id) {
684
+ if (this.findbyid(this.pcdslist, this.areamodel.f_pcd_id) && this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
685
+ this.areamodel.f_area_address = this.findbyid(this.pcdslist, this.areamodel.f_pcd_id).f_pcd + this.findbyid(this.streetslist, this.areamodel.f_street_id).f_street
686
+ }
687
+ }
688
+ },
689
+ 'f_filialeids'() {
690
+ if (this.areamodel.f_filialeid) {
691
+ if (this.areamodel.f_filialeid != this.f_filialeids) {
692
+ this.$dispatch('cancel')
693
+ }
694
+ }
695
+ this.cleardara()
696
+ this.initdata()
697
+ }
698
+ },
699
+ computed: {
700
+ metertypes() {
701
+ return this.$appdata.getParam('气表类型')
702
+ },
703
+ housetypeoptions() {
704
+ return this.$appdata.getParam('房屋类型')
705
+ },
706
+ usertypes() {
707
+ return this.$appdata.getParam('用户类型')
708
+ },
709
+ f_price_types() {
710
+ return this.$appdata.getParam('气价类型')
711
+ },
712
+ meterstyle() {
713
+ let ret = this.$GetSaleParam.getGasbrand()
714
+ let rs = new Array()
715
+ if (this.areamodel.f_meter_brand) {
716
+ ret.forEach((item, index) => {
717
+ if (this.areamodel.f_meter_brand == item.value.f_meter_brand) {
718
+ item.value.gasmodel.forEach((item1, index) => {
719
+ rs.push({label: item1.label, value: item1.label})
720
+ })
721
+ }
722
+ })
723
+ }
724
+ return rs
725
+ },
726
+ pricenames() {
727
+ let rs = new Array()
728
+ if (this.areamodel.f_user_type && this.areamodel.f_gasproperties && this.areamodel.f_price_type) {
729
+ let params = {
730
+ f_user_type: this.areamodel.f_user_type,
731
+ f_gasproperties: this.areamodel.f_gasproperties,
732
+ f_price_type: this.areamodel.f_price_type,
733
+ filter: this.f_filialeids
734
+ }
735
+ let ret = this.$GetSaleParam.getPrice(params)
736
+ ret.forEach((item, index) => {
737
+ rs.push({label: item.label, value: item.value.f_price_name})
738
+ })
739
+ }
740
+ if (rs.length == 0) {
741
+ this.areamodel.f_price_name = ''
742
+ }
743
+ return rs
744
+ },
745
+ positions() {
746
+ return this.$appdata.getParam('安装位置')
747
+ },
748
+ inputtores() {
749
+ // 获取抄表员
750
+ let rs = new Array()
751
+ if (this.$login.f.f_gasman.length > 0) {
752
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
753
+ let temp = {
754
+ label: this.$login.f.f_gasman[i].name,
755
+ value: this.$login.f.f_gasman[i].name
756
+ }
757
+ rs.push(temp)
758
+ }
759
+ }
760
+ return rs
761
+ }
762
+ }
763
+ }
764
+ </script>
765
+ <style>
766
+ .box {
767
+ width: 727px;
768
+ height: 175px;
769
+ border-radius: 2px;
770
+ background-color: #fafafa;
771
+ border: 1px solid #999999;
772
+ margin-top: 13px;
773
+ }
774
+
775
+ .datapanel {
776
+ color: #333;
777
+ background-color: white;
778
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
779
+ padding: 10px 30px 10px 30px;
780
+ border-radius: 15px;
781
+ }
782
+ </style>