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