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