address-client 4.0.1 → 4.0.2

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 (160) 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/jingwei/UserAddress.vue +764 -764
  78. package/src/filiale/jingwei/sale.js +12 -12
  79. package/src/filiale/lixianV3/AreaList.vue +416 -416
  80. package/src/filiale/lixianV3/sale.js +12 -12
  81. package/src/filiale/macheng/AddAreaMsg.vue +635 -635
  82. package/src/filiale/macheng/AddStreetOrPcd.vue +231 -231
  83. package/src/filiale/macheng/AddressList.vue +613 -613
  84. package/src/filiale/macheng/AreaList.vue +318 -318
  85. package/src/filiale/macheng/CityManage.vue +76 -76
  86. package/src/filiale/macheng/StreetList.vue +186 -186
  87. package/src/filiale/macheng/UserAddress.vue +743 -743
  88. package/src/filiale/macheng/sale.js +17 -17
  89. package/src/filiale/meihekou/UserAddress.vue +898 -898
  90. package/src/filiale/meihekou/sale.js +8 -8
  91. package/src/filiale/qianneng/AddAreaMsg.vue +755 -755
  92. package/src/filiale/qianneng/AddStreetOrPcd.vue +328 -328
  93. package/src/filiale/qianneng/AddressList.vue +638 -638
  94. package/src/filiale/qianneng/AreaList.vue +431 -431
  95. package/src/filiale/qianneng/CityManage.vue +81 -81
  96. package/src/filiale/qianneng/UserAddress.vue +1125 -1125
  97. package/src/filiale/qianneng/sale.js +20 -20
  98. package/src/filiale/qinhua/AddAreaMsg.vue +743 -743
  99. package/src/filiale/qinhua/AddressList.vue +627 -627
  100. package/src/filiale/qinhua/AddressManage.vue +117 -117
  101. package/src/filiale/qinhua/AreaList.vue +425 -425
  102. package/src/filiale/qinhua/AreaManage.vue +100 -100
  103. package/src/filiale/qinhua/CityManage.vue +76 -76
  104. package/src/filiale/qinhua/StreetList.vue +241 -241
  105. package/src/filiale/qinhua/UserAddress.vue +894 -894
  106. package/src/filiale/qinhua/sale.js +20 -20
  107. package/src/filiale/rizhao/UserAddress.vue +897 -897
  108. package/src/filiale/rizhao/sale.js +8 -8
  109. package/src/filiale/rongcheng/AddressList.vue +363 -363
  110. package/src/filiale/rongcheng/UserAddress.vue +799 -799
  111. package/src/filiale/rongcheng/sale.js +11 -11
  112. package/src/filiale/shanggao/AddAreaMsg.vue +752 -752
  113. package/src/filiale/shanggao/AddStreetOrPcd.vue +312 -312
  114. package/src/filiale/shanggao/AddressList.vue +613 -613
  115. package/src/filiale/shanggao/AreaList.vue +436 -436
  116. package/src/filiale/shanggao/BuildingList.vue +129 -129
  117. package/src/filiale/shanggao/StreetList.vue +240 -240
  118. package/src/filiale/shanggao/UserAddress.vue +953 -953
  119. package/src/filiale/shanggao/sale.js +16 -16
  120. package/src/filiale/shanxian/AddAreaMsg.vue +766 -766
  121. package/src/filiale/shanxian/AddressList.vue +658 -658
  122. package/src/filiale/shanxian/AreaList.vue +458 -458
  123. package/src/filiale/shanxian/AreaManage.vue +107 -107
  124. package/src/filiale/shanxian/UserAddress.vue +900 -900
  125. package/src/filiale/shanxian/sale.js +15 -15
  126. package/src/filiale/shaoguan/AddAreaMsg.vue +629 -629
  127. package/src/filiale/shaoguan/UserAddress.vue +762 -762
  128. package/src/filiale/shaoguan/sale.js +11 -11
  129. package/src/filiale/tongchuan/AddAreaMsg.vue +635 -635
  130. package/src/filiale/tongchuan/AddStreetOrPcd.vue +351 -351
  131. package/src/filiale/tongchuan/AddressList.vue +379 -379
  132. package/src/filiale/tongchuan/AreaList.vue +315 -315
  133. package/src/filiale/tongchuan/AreaManage.vue +100 -100
  134. package/src/filiale/tongchuan/CityList.vue +133 -133
  135. package/src/filiale/tongchuan/StreetList.vue +215 -215
  136. package/src/filiale/tongchuan/UserAddress.vue +822 -822
  137. package/src/filiale/tongchuan/sale.js +19 -19
  138. package/src/filiale/wuhai/UserAddress.vue +795 -795
  139. package/src/filiale/wuhai/sale.js +12 -12
  140. package/src/filiale/xihu/AreaList.vue +409 -409
  141. package/src/filiale/xihu/StreetList.vue +238 -238
  142. package/src/filiale/xihu/sale.js +14 -14
  143. package/src/filiale/xinkang/AddAreaMsg.vue +780 -780
  144. package/src/filiale/xinkang/AreaList.vue +413 -413
  145. package/src/filiale/xinkang/sale.js +9 -9
  146. package/src/filiale/yangchun/AddAreaMsg.vue +764 -764
  147. package/src/filiale/yangchun/sale.js +7 -7
  148. package/src/filiale/zhongsheng/AddressList.vue +671 -671
  149. package/src/filiale/zhongsheng/AreaList.vue +500 -500
  150. package/src/filiale/zhongsheng/sale.js +12 -12
  151. package/src/filiale/zhongyi/AddAreaMsg.vue +757 -757
  152. package/src/filiale/zhongyi/sale.js +12 -12
  153. package/src/filiale/zhoukou/AddAreaMsg.vue +673 -673
  154. package/src/filiale/zhoukou/AddressList.vue +391 -391
  155. package/src/filiale/zhoukou/AddressManage.vue +115 -115
  156. package/src/filiale/zhoukou/AreaList.vue +319 -319
  157. package/src/filiale/zhoukou/AreaManage.vue +100 -100
  158. package/src/filiale/zhoukou/UserAddress.vue +925 -925
  159. package/src/filiale/zhoukou/sale.js +23 -23
  160. package/src/main.js +23 -23
@@ -1,500 +1,500 @@
1
- <template>
2
- <div class="flex" @keyup.enter="search">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div :class="$parent.$parent.style">
8
- <label class="font_normal_body">组织机构</label>
9
- <res-select restype='organization'
10
- @res-select="$parent.$parent.getorg"
11
- is-mul="false"
12
- :initresid='$parent.$parent.curorgid'>
13
- </res-select>
14
- </div>
15
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
16
- <label class="font_normal_body">小区编号</label>
17
- <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
18
- condition="f_area_id = '{}'" placeholder="小区编号"/>
19
- </div>
20
- <div :class="$parent.$parent.style" v-if="false">
21
- <label class="font_normal_body">省&emsp;&emsp;份</label>
22
- <input type="text" class="input_search" style="width:60%" v-model="model.f_province"
23
- condition="f_province like '%{}%'" placeholder="省份"/>
24
- </div>
25
- <!--<div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">-->
26
- <div :class="$parent.$parent.style" v-if="false">
27
- <label class="font_normal_body">城&emsp;&emsp;市</label>
28
- <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
29
- condition="f_city like '%{}%'" placeholder="城市"/>
30
- </div>
31
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
32
- <label class="font_normal_body">区&emsp;&emsp;县</label>
33
- <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
34
- condition="f_district like '%{}%'" placeholder="区县"/>
35
- </div>
36
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
37
- <label class="font_normal_body">街道/乡镇</label>
38
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
39
- condition="f_street like '%{}%'" placeholder="街道/乡镇"/>
40
- </div>
41
- <div class="col-sm-4 form-group button-range">
42
- <button class="button_search button_spacing" @click="search()" >查询</button>
43
- <button class="button_search button_spacing" @click="$parent.$parent.batchDelete()">批量删除</button>
44
- <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
45
- <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
46
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
47
- <export-excel :data="$parent.$parent.getCondition"
48
- :field="$parent.$parent.getfield"
49
- sqlurl="api/af-revenue/logic/exportfile"
50
- sql-name="manage_getarealist"
51
- template-name='小区信息查询导出'
52
- :choose-col="true"></export-excel>
53
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
54
- </div>
55
- </div>
56
- <div class="row" v-if="$parent.$parent.criteriaShow">
57
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
58
- <label class="font_normal_body">小区编号</label>
59
- <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
60
- condition="f_area_id = '{}'" placeholder="小区编号"/>
61
- </div>
62
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
63
- <label class="font_normal_body">城&emsp;&emsp;市</label>
64
- <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
65
- condition="f_city like '%{}%'" placeholder="城市"
66
- :size="model.f_city ? model.f_city.length*2 : 6"/>
67
- </div>
68
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
69
- <label class="font_normal_body">区&emsp;&emsp;县</label>
70
- <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
71
- condition="f_district like '%{}%'" placeholder="区县"
72
- :size="model.f_district ? model.f_district.length*2 : 6"/>
73
- </div>
74
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
75
- <label class="font_normal_body">街道/乡镇</label>
76
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
77
- condition="f_street like '%{}%'" placeholder="街道/乡镇"
78
- :size="model.f_street ? model.f_street.length*2 : 6"/>
79
- </div>
80
- <div :class="$parent.$parent.style">
81
- <label class="font_normal_body">片&emsp;&emsp;区</label>
82
- <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area"
83
- :options='$parent.$parent.area' placeholder='片区/管理站'
84
- condition="f_slice_area in {}" @change="$parent.$parent.sliceareachange"
85
- close-on-select>
86
- </v-select>
87
- </div>
88
- <div :class="$parent.$parent.style">
89
- <label class="font_normal_body">小&emsp;&emsp;区</label>
90
- <v-select :value.sync="model.f_residential_area" condition="f_residential_area in {}"
91
- v-model="model.f_residential_area" style="width: 60%"
92
- :options='$parent.$parent.residentialArea' placeholder='选择小区'
93
- close-on-select>
94
- </v-select>
95
- </div>
96
- <div :class="$parent.$parent.style">
97
- <label class="font_normal_body">房屋类型</label>
98
- <v-select :options='$parent.$parent.housetype' :value.sync="model.f_house_type"
99
- close-on-select condition="f_house_type='{}'"
100
- placeholder='房屋类型' v-model="model.f_house_type"></v-select>
101
- </div>
102
- <div :class="$parent.$parent.style">
103
- <label class="font_normal_body">安装位置</label>
104
- <v-select :options='$parent.$parent.position' :value.sync="model.f_position"
105
- close-on-select condition="f_position='{}'"
106
- placeholder='安装位置' v-model="model.f_position"></v-select>
107
- </div>
108
- <div :class="$parent.$parent.style">
109
- <label class="font_normal_body">&emsp;抄表员</label>
110
- <v-select :options='$parent.$parent.inputtores' :value.sync="model.f_inputtor"
111
- close-on-select condition="f_inputtor='{}'"
112
- placeholder='抄表员' v-model="model.f_inputtor"></v-select>
113
- </div>
114
- </div>
115
- </div>
116
- </criteria>
117
-
118
- <data-grid :model="model" partial='list' class="list_area table_sy" :optional="true" v-ref:grid>
119
- <template partial='head'>
120
- <th><nobr>序号</nobr></th>
121
- <th v-if="false"><nobr>省份</nobr></th>
122
- <th v-if="false"><nobr>城市</nobr></th>
123
- <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>区/县</nobr></th>
124
- <th><nobr>街道/乡镇</nobr></th>
125
- <!--民用小区信息开始-->
126
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
127
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
128
- <th v-if="!$parent.$parent.$parent.f_special && !$parent.$parent.$parent.$parent.areaShow"><nobr>小区备注</nobr></th>
129
- <!--民用小区信息结束-->
130
- <!--非民用单位信息开始-->
131
- <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
132
- <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
133
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
134
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
135
- <!--非民用单位信息结束-->
136
- <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>抄表员</nobr></th>
137
- <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>房屋类型</nobr></th>
138
- <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>安装位置</nobr></th>
139
- <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>片区/管理站 </nobr></th>
140
- <th><nobr>操作人</nobr></th>
141
- <th><nobr>操作日期</nobr></th>
142
- <th title="该小区下现有的地址数"><nobr>地址数</nobr></th>
143
- <th><nobr>操作</nobr></th>
144
- </template>
145
- <template partial='body'>
146
- <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
147
- <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
148
- <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
149
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
150
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
151
- <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
152
- <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
153
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
154
- <!--非民用单位信息开始-->
155
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
156
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
157
- <!--非民用单位信息结束-->
158
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_inputtor}}</nobr></td>
159
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_house_type}}</nobr></td>
160
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_position}}</nobr></td>
161
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
162
- <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
163
- <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
164
- <td style="text-align:center"><nobr>{{row.addressnum}}</nobr></td>
165
- <td><nobr>
166
- <!--<button type="button" name="button" class="btn btn-link"
167
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
168
- <button v-if="!row.f_residential_area_id" type="button" name="button" class="btn btn-danger"
169
- style="padding: 5px 12px"
170
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
171
- </nobr>
172
- </td>
173
- </template>
174
- <template partial='foot'></template>
175
- </data-grid>
176
- </criteria-paged>
177
- <modal :show="showDelete" large backdrop="false" :width="900">
178
- <header slot="modal-header" class="modal-header">
179
- <p class="bg-info text-center" style="padding: 8px;">请选择目标小区</p>
180
- </header>
181
- <article slot="modal-body" class="modal-body">
182
- <validator name='v'>
183
- <div class="col-sm-6 form-group ">
184
- <label class="font_normal_body">小区名称</label>
185
- <input type="text" style="width:41%" v-show="false" v-validate:f_residential_area_id='{required: true }' v-model="areamodel.f_residential_area_id">
186
- <v-select :value.sync="areamodel.f_residential_area_id" :value-single="true"
187
- @change="areaChange"
188
- :options='areaslist' placeholder='请选择'
189
- close-on-select search="true">
190
- </v-select>
191
- </div>
192
- </validator>
193
- </article>
194
- <footer slot="modal-footer" class="modal-footer">
195
- <button v-show="showDelete" type="button" class="button_search button_spacing" @click='confirmDelete()' :disabled='!$v.valid'>确认</button>
196
- <button v-show="showDelete" type="button" class="button_clear button_spacing" @click='cancelDelete()'>取消</button>
197
- </footer>
198
- </modal>
199
- </div>
200
- </template>
201
-
202
- <script>
203
- import { HttpResetClass, PagedList } from 'vue-client'
204
- let readyGen = async function (self) {
205
- self.getfield = self.config.excelHeaders
206
- self.search()
207
- }
208
- export default {
209
-
210
- data () {
211
- return {
212
- showDelete: false,
213
- criteriaShow: false,
214
- // 目标小区数据
215
- areamodel: {
216
- f_residential_area_id: '',
217
- f_pcd: '',
218
- f_pcd_id: '',
219
- f_street: '',
220
- f_street_id: '',
221
- f_slice_area: '',
222
- f_residential_area: ''
223
- },
224
- model: new PagedList('api/af-revenue/sql/address_getarealist',20),
225
- addflag: false,
226
- addtitle:'',
227
- getfield: {},
228
- // 公司下拉
229
- curorgid: [this.$login.f.orgid],
230
- f_orgid: '',
231
- //初始化小区数据
232
- areaslist:[],
233
- config: {
234
- // 导出列要和查询列相同
235
- excelHeaders: {
236
- 'f_district':'区/县',
237
- 'f_street':'街道名称',
238
- 'f_residential_area':'小区名称',
239
- 'f_area_address':'小区地址',
240
- 'f_comments':'小区备注',
241
- 'f_inputtor':'抄表员',
242
- 'f_house_type':'房屋类型',
243
- 'f_position':'安装位置',
244
- 'f_slice_area':'片区/管理站',
245
- 'f_operator':'操作人',
246
- 'f_operate_date':'操作日期',
247
- 'addressnum':'地址数'
248
- }
249
- },
250
- residentialArea: [], //小区
251
- area: [], //片区
252
- areacondition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`,
253
- housetype:[{label:'全部',value:''},{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
254
- position:this.$appdata.getParam('安装位置')?[{label:'全部',value:''},...this.$appdata.getParam('安装位置')]:[{label:'全部',value:''}]
255
- }
256
- },
257
- title: '小区管理',
258
- props:{
259
- f_filialeids:{
260
- type: String
261
- },
262
- style: {
263
- type: String,
264
- default: 'col-sm-2 form-group'
265
- },
266
- f_special:{
267
- type: String
268
- }
269
- },
270
- ready(){
271
- readyGen(this);
272
- this.getaddress();
273
- this.initAreas(this.$login.f.orgid)
274
- },
275
- methods: {
276
-
277
- async sliceareachange(){
278
- console.log('片区变了:',this.$refs.paged.$refs.cri.model.f_slice_area[0])
279
- this.$refs.paged.$refs.cri.model.f_residential_arearea = []
280
- if(this.$refs.paged.$refs.cri.model.f_slice_area[0]){
281
- this.areacondition = this.areacondition + ` and f_slice_area = '${this.$refs.paged.$refs.cri.model.f_slice_area[0]}'`
282
- this.getaddress()
283
- this.areacondition = `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
284
- }else{
285
- this.getaddress()
286
- }
287
- },
288
- //获取小区下拉框
289
- async getaddress(){
290
- console.log('开始获取小区')
291
- let temp = {
292
- condition:this.areacondition
293
- }
294
- let HttpReset = new HttpResetClass()
295
- var data = await HttpReset.load('POST', 'api/af-revenue/sql/manage_getarealist', {data: temp},
296
- {resolveMsg: null, rejectMsg: '获取小区失败!'})
297
- console.log('小区',data)
298
- this.residentialArea = []
299
- let house = []
300
- for (let row of data.data){
301
- console.log('开始保存小区')
302
- house.push({label: row.f_residential_area, value: row.f_residential_area})
303
- }
304
- this.residentialArea = house
305
- },
306
- // 初始化片区
307
- async initAreas (val) {
308
- console.log('initAreas:',val)
309
- if (val) {
310
- console.log('this.$login.f.id:',this.$login.f.id)
311
- let http = new HttpResetClass()
312
- let getAllArea = await http.load('POST', '/rs/search', {
313
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
314
- userid: this.$login.f.id
315
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
316
- let arr = getAllArea.data.filter((res) => {
317
- return res.parentid == val
318
- })
319
- console.log('过滤之后的片区', arr)
320
- this.area = []
321
- arr.forEach((res) => {
322
- this.area.push({label: res.name, value: res.name})
323
- })
324
- }
325
- },
326
-
327
- hidden() {
328
- this.criteriaShow = !this.criteriaShow
329
- },
330
- search() {
331
- this.$refs.paged.$refs.cri.search()
332
- },
333
-
334
- async delete(row){
335
- if(row.id >= 0){
336
- var id = row.id
337
- let useraredss = await this.$resetpost('api/af-revenue/sql/address_singleTable',
338
- {data: {
339
- items: 'f_residential_area_id',
340
- tablename: 't_user_address',
341
- condition: `f_residential_area_id='${id}'`}
342
- },
343
- {resolveMsg: null, rejectMsg: null})
344
- if(useraredss.data.length>0){
345
- this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
346
- }else{
347
- this.$resetdelete('api/af-revenue/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
348
- this.$dispatch('cancel')
349
- })
350
- }
351
- }
352
- },
353
- add(val){
354
- if (this.f_filialeids) {
355
- this.$refs.paged.$refs.grid.selectStore.selected = null
356
- this.$dispatch('add')
357
- } else {
358
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
359
- }
360
- },
361
- modify(val){
362
- this.$refs.paged.$refs.grid.selectStore.selected = null
363
- this.$dispatch('modify',val)
364
- },
365
- selfSearch (args) {
366
-
367
- if (!this.f_orgid) {
368
- this.getorg([this.$login.f.orgid])
369
- }
370
- if(this.f_special){
371
- args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
372
- }else{
373
- args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
374
- }
375
- this.model.search(args.condition, args.model)
376
- },
377
- //清空
378
- clear(){
379
- this.$refs.paged.$refs.cri.model = {}
380
- },
381
- getorg (val) {
382
- this.f_orgid = this.$login.convertToIn(val)
383
- this.f_filialeids = val[0]
384
- },
385
- async batchDelete () {
386
- if (this.f_filialeids) {
387
- if (this.$refs.paged.$refs.grid.getRowData().length != 0) {
388
- this.showDelete = true
389
- let condition = `a.f_orgid = '${this.f_filialeids}'`
390
- let req = await this.$resetpost('api/af-revenue/sql/address_getresidential', {
391
- data: {
392
- condition: condition
393
- }
394
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
395
- let redata = []
396
- req.data.forEach((row) => {
397
- redata.push({
398
- label: row.f_residential_area,
399
- value: row.id,
400
- data: row,
401
- id: row.id
402
- })
403
- })
404
- this.areaslist = redata
405
- } else {
406
- this.$showAlert('请至少选择一项!', 'warning', 2000)
407
- }
408
- }else {
409
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
410
- }
411
- },
412
- confirmDelete () {
413
- let msg = {
414
- resolveMsg: '批量删除成功',
415
- rejectMsg: '批量删除失败!'
416
- }
417
- let oldAreaIds = []
418
- // 获取要批量删除的小区数据
419
- this.$refs.paged.$refs.grid.getRowData().forEach((row,n) => {
420
- oldAreaIds[n] = row.id
421
- })
422
- this.$resetpost('api/af-revenue/logic/batchDelete',{
423
- data:{
424
- areamodel:this.areamodel,
425
- oldAreaIds:oldAreaIds,
426
- f_operator: this.$login.f.name,
427
- f_operatorid: this.$login.f.id,
428
- f_orgid: this.$login.f.orgid,
429
- f_orgname: this.$login.f.orgs,
430
- f_depid: this.$login.f.depids,
431
- f_depname: this.$login.f.deps
432
- }
433
- },msg)
434
- this.$refs.paged.$refs.grid.selectInit()
435
- this.$refs.paged.$refs.cri.search()
436
- this.areamodel.f_residential_area_id = ''
437
- this.showDelete = false
438
- },
439
- cancelDelete () {
440
- this.$refs.paged.$refs.grid.selectInit()
441
- this.$refs.paged.$refs.cri.search()
442
- this.areamodel.f_residential_area_id = ''
443
- this.showDelete = false
444
- },
445
- areaChange(val){
446
- console.log("小区变化",val)
447
- let selectArea // 选中的小区数据
448
- for (let row of this.areaslist) {
449
- if (val == row.value) {
450
- selectArea = row.data
451
- break
452
- }
453
- }
454
- if (selectArea) {
455
- this.areamodel.f_residential_area_id = selectArea.id
456
- this.areamodel.f_pcd = selectArea.f_pcd
457
- this.areamodel.f_pcd_id = selectArea.f_pcd_id
458
- this.areamodel.f_street = selectArea.f_street
459
- this.areamodel.f_street_id = selectArea.f_street_id
460
- this.areamodel.f_slice_area = selectArea.f_slice_area
461
- this.areamodel.f_residential_area = selectArea.f_residential_area
462
- }
463
- this.$nextTick(() => {
464
- this.$resetValidation()
465
- })
466
- },
467
- },
468
- watch:{
469
-
470
- },
471
- computed:{
472
- getCondition() {
473
- var condition=''
474
- if(this.f_special){
475
- condition = `${this.$refs.paged.$refs.cri.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
476
- }else{
477
- condition = `${this.$refs.paged.$refs.cri.condition} and s.f_filialeid = ${this.f_orgid}`
478
- }
479
- return {
480
- condition: condition
481
- }
482
- },
483
- inputtores () {
484
- // 获取抄表员
485
- let rs = new Array()
486
- if (this.$login.f.f_gasman.length > 0) {
487
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
488
- let temp = {
489
- label: this.$login.f.f_gasman[i].name,
490
- value: this.$login.f.f_gasman[i].name
491
- }
492
- rs.push(temp)
493
- }
494
- }
495
- return rs
496
- }
497
- }
498
-
499
- }
500
- </script>
1
+ <template>
2
+ <div class="flex" @keyup.enter="search">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">组织机构</label>
9
+ <res-select restype='organization'
10
+ @res-select="$parent.$parent.getorg"
11
+ is-mul="false"
12
+ :initresid='$parent.$parent.curorgid'>
13
+ </res-select>
14
+ </div>
15
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
16
+ <label class="font_normal_body">小区编号</label>
17
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
18
+ condition="f_area_id = '{}'" placeholder="小区编号"/>
19
+ </div>
20
+ <div :class="$parent.$parent.style" v-if="false">
21
+ <label class="font_normal_body">省&emsp;&emsp;份</label>
22
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_province"
23
+ condition="f_province like '%{}%'" placeholder="省份"/>
24
+ </div>
25
+ <!--<div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">-->
26
+ <div :class="$parent.$parent.style" v-if="false">
27
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
28
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
29
+ condition="f_city like '%{}%'" placeholder="城市"/>
30
+ </div>
31
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
32
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
33
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
34
+ condition="f_district like '%{}%'" placeholder="区县"/>
35
+ </div>
36
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
37
+ <label class="font_normal_body">街道/乡镇</label>
38
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
39
+ condition="f_street like '%{}%'" placeholder="街道/乡镇"/>
40
+ </div>
41
+ <div class="col-sm-4 form-group button-range">
42
+ <button class="button_search button_spacing" @click="search()" >查询</button>
43
+ <button class="button_search button_spacing" @click="$parent.$parent.batchDelete()">批量删除</button>
44
+ <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
45
+ <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
46
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
47
+ <export-excel :data="$parent.$parent.getCondition"
48
+ :field="$parent.$parent.getfield"
49
+ sqlurl="api/af-revenue/logic/exportfile"
50
+ sql-name="manage_getarealist"
51
+ template-name='小区信息查询导出'
52
+ :choose-col="true"></export-excel>
53
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
54
+ </div>
55
+ </div>
56
+ <div class="row" v-if="$parent.$parent.criteriaShow">
57
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
58
+ <label class="font_normal_body">小区编号</label>
59
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
60
+ condition="f_area_id = '{}'" placeholder="小区编号"/>
61
+ </div>
62
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
63
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
64
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
65
+ condition="f_city like '%{}%'" placeholder="城市"
66
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
67
+ </div>
68
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
69
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
70
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
71
+ condition="f_district like '%{}%'" placeholder="区县"
72
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
73
+ </div>
74
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
75
+ <label class="font_normal_body">街道/乡镇</label>
76
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
77
+ condition="f_street like '%{}%'" placeholder="街道/乡镇"
78
+ :size="model.f_street ? model.f_street.length*2 : 6"/>
79
+ </div>
80
+ <div :class="$parent.$parent.style">
81
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
82
+ <v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area"
83
+ :options='$parent.$parent.area' placeholder='片区/管理站'
84
+ condition="f_slice_area in {}" @change="$parent.$parent.sliceareachange"
85
+ close-on-select>
86
+ </v-select>
87
+ </div>
88
+ <div :class="$parent.$parent.style">
89
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
90
+ <v-select :value.sync="model.f_residential_area" condition="f_residential_area in {}"
91
+ v-model="model.f_residential_area" style="width: 60%"
92
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
93
+ close-on-select>
94
+ </v-select>
95
+ </div>
96
+ <div :class="$parent.$parent.style">
97
+ <label class="font_normal_body">房屋类型</label>
98
+ <v-select :options='$parent.$parent.housetype' :value.sync="model.f_house_type"
99
+ close-on-select condition="f_house_type='{}'"
100
+ placeholder='房屋类型' v-model="model.f_house_type"></v-select>
101
+ </div>
102
+ <div :class="$parent.$parent.style">
103
+ <label class="font_normal_body">安装位置</label>
104
+ <v-select :options='$parent.$parent.position' :value.sync="model.f_position"
105
+ close-on-select condition="f_position='{}'"
106
+ placeholder='安装位置' v-model="model.f_position"></v-select>
107
+ </div>
108
+ <div :class="$parent.$parent.style">
109
+ <label class="font_normal_body">&emsp;抄表员</label>
110
+ <v-select :options='$parent.$parent.inputtores' :value.sync="model.f_inputtor"
111
+ close-on-select condition="f_inputtor='{}'"
112
+ placeholder='抄表员' v-model="model.f_inputtor"></v-select>
113
+ </div>
114
+ </div>
115
+ </div>
116
+ </criteria>
117
+
118
+ <data-grid :model="model" partial='list' class="list_area table_sy" :optional="true" v-ref:grid>
119
+ <template partial='head'>
120
+ <th><nobr>序号</nobr></th>
121
+ <th v-if="false"><nobr>省份</nobr></th>
122
+ <th v-if="false"><nobr>城市</nobr></th>
123
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>区/县</nobr></th>
124
+ <th><nobr>街道/乡镇</nobr></th>
125
+ <!--民用小区信息开始-->
126
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
127
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
128
+ <th v-if="!$parent.$parent.$parent.f_special && !$parent.$parent.$parent.$parent.areaShow"><nobr>小区备注</nobr></th>
129
+ <!--民用小区信息结束-->
130
+ <!--非民用单位信息开始-->
131
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
132
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
133
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
134
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
135
+ <!--非民用单位信息结束-->
136
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>抄表员</nobr></th>
137
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>房屋类型</nobr></th>
138
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>安装位置</nobr></th>
139
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>片区/管理站 </nobr></th>
140
+ <th><nobr>操作人</nobr></th>
141
+ <th><nobr>操作日期</nobr></th>
142
+ <th title="该小区下现有的地址数"><nobr>地址数</nobr></th>
143
+ <th><nobr>操作</nobr></th>
144
+ </template>
145
+ <template partial='body'>
146
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
147
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
148
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
149
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
150
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
151
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
152
+ <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
153
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
154
+ <!--非民用单位信息开始-->
155
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
156
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
157
+ <!--非民用单位信息结束-->
158
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_inputtor}}</nobr></td>
159
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_house_type}}</nobr></td>
160
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_position}}</nobr></td>
161
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
162
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
163
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
164
+ <td style="text-align:center"><nobr>{{row.addressnum}}</nobr></td>
165
+ <td><nobr>
166
+ <!--<button type="button" name="button" class="btn btn-link"
167
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
168
+ <button v-if="!row.f_residential_area_id" type="button" name="button" class="btn btn-danger"
169
+ style="padding: 5px 12px"
170
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
171
+ </nobr>
172
+ </td>
173
+ </template>
174
+ <template partial='foot'></template>
175
+ </data-grid>
176
+ </criteria-paged>
177
+ <modal :show="showDelete" large backdrop="false" :width="900">
178
+ <header slot="modal-header" class="modal-header">
179
+ <p class="bg-info text-center" style="padding: 8px;">请选择目标小区</p>
180
+ </header>
181
+ <article slot="modal-body" class="modal-body">
182
+ <validator name='v'>
183
+ <div class="col-sm-6 form-group ">
184
+ <label class="font_normal_body">小区名称</label>
185
+ <input type="text" style="width:41%" v-show="false" v-validate:f_residential_area_id='{required: true }' v-model="areamodel.f_residential_area_id">
186
+ <v-select :value.sync="areamodel.f_residential_area_id" :value-single="true"
187
+ @change="areaChange"
188
+ :options='areaslist' placeholder='请选择'
189
+ close-on-select search="true">
190
+ </v-select>
191
+ </div>
192
+ </validator>
193
+ </article>
194
+ <footer slot="modal-footer" class="modal-footer">
195
+ <button v-show="showDelete" type="button" class="button_search button_spacing" @click='confirmDelete()' :disabled='!$v.valid'>确认</button>
196
+ <button v-show="showDelete" type="button" class="button_clear button_spacing" @click='cancelDelete()'>取消</button>
197
+ </footer>
198
+ </modal>
199
+ </div>
200
+ </template>
201
+
202
+ <script>
203
+ import { HttpResetClass, PagedList } from 'vue-client'
204
+ let readyGen = async function (self) {
205
+ self.getfield = self.config.excelHeaders
206
+ self.search()
207
+ }
208
+ export default {
209
+
210
+ data () {
211
+ return {
212
+ showDelete: false,
213
+ criteriaShow: false,
214
+ // 目标小区数据
215
+ areamodel: {
216
+ f_residential_area_id: '',
217
+ f_pcd: '',
218
+ f_pcd_id: '',
219
+ f_street: '',
220
+ f_street_id: '',
221
+ f_slice_area: '',
222
+ f_residential_area: ''
223
+ },
224
+ model: new PagedList('api/af-revenue/sql/address_getarealist',20),
225
+ addflag: false,
226
+ addtitle:'',
227
+ getfield: {},
228
+ // 公司下拉
229
+ curorgid: [this.$login.f.orgid],
230
+ f_orgid: '',
231
+ //初始化小区数据
232
+ areaslist:[],
233
+ config: {
234
+ // 导出列要和查询列相同
235
+ excelHeaders: {
236
+ 'f_district':'区/县',
237
+ 'f_street':'街道名称',
238
+ 'f_residential_area':'小区名称',
239
+ 'f_area_address':'小区地址',
240
+ 'f_comments':'小区备注',
241
+ 'f_inputtor':'抄表员',
242
+ 'f_house_type':'房屋类型',
243
+ 'f_position':'安装位置',
244
+ 'f_slice_area':'片区/管理站',
245
+ 'f_operator':'操作人',
246
+ 'f_operate_date':'操作日期',
247
+ 'addressnum':'地址数'
248
+ }
249
+ },
250
+ residentialArea: [], //小区
251
+ area: [], //片区
252
+ areacondition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`,
253
+ housetype:[{label:'全部',value:''},{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
254
+ position:this.$appdata.getParam('安装位置')?[{label:'全部',value:''},...this.$appdata.getParam('安装位置')]:[{label:'全部',value:''}]
255
+ }
256
+ },
257
+ title: '小区管理',
258
+ props:{
259
+ f_filialeids:{
260
+ type: String
261
+ },
262
+ style: {
263
+ type: String,
264
+ default: 'col-sm-2 form-group'
265
+ },
266
+ f_special:{
267
+ type: String
268
+ }
269
+ },
270
+ ready(){
271
+ readyGen(this);
272
+ this.getaddress();
273
+ this.initAreas(this.$login.f.orgid)
274
+ },
275
+ methods: {
276
+
277
+ async sliceareachange(){
278
+ console.log('片区变了:',this.$refs.paged.$refs.cri.model.f_slice_area[0])
279
+ this.$refs.paged.$refs.cri.model.f_residential_arearea = []
280
+ if(this.$refs.paged.$refs.cri.model.f_slice_area[0]){
281
+ this.areacondition = this.areacondition + ` and f_slice_area = '${this.$refs.paged.$refs.cri.model.f_slice_area[0]}'`
282
+ this.getaddress()
283
+ this.areacondition = `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
284
+ }else{
285
+ this.getaddress()
286
+ }
287
+ },
288
+ //获取小区下拉框
289
+ async getaddress(){
290
+ console.log('开始获取小区')
291
+ let temp = {
292
+ condition:this.areacondition
293
+ }
294
+ let HttpReset = new HttpResetClass()
295
+ var data = await HttpReset.load('POST', 'api/af-revenue/sql/manage_getarealist', {data: temp},
296
+ {resolveMsg: null, rejectMsg: '获取小区失败!'})
297
+ console.log('小区',data)
298
+ this.residentialArea = []
299
+ let house = []
300
+ for (let row of data.data){
301
+ console.log('开始保存小区')
302
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
303
+ }
304
+ this.residentialArea = house
305
+ },
306
+ // 初始化片区
307
+ async initAreas (val) {
308
+ console.log('initAreas:',val)
309
+ if (val) {
310
+ console.log('this.$login.f.id:',this.$login.f.id)
311
+ let http = new HttpResetClass()
312
+ let getAllArea = await http.load('POST', '/rs/search', {
313
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
314
+ userid: this.$login.f.id
315
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
316
+ let arr = getAllArea.data.filter((res) => {
317
+ return res.parentid == val
318
+ })
319
+ console.log('过滤之后的片区', arr)
320
+ this.area = []
321
+ arr.forEach((res) => {
322
+ this.area.push({label: res.name, value: res.name})
323
+ })
324
+ }
325
+ },
326
+
327
+ hidden() {
328
+ this.criteriaShow = !this.criteriaShow
329
+ },
330
+ search() {
331
+ this.$refs.paged.$refs.cri.search()
332
+ },
333
+
334
+ async delete(row){
335
+ if(row.id >= 0){
336
+ var id = row.id
337
+ let useraredss = await this.$resetpost('api/af-revenue/sql/address_singleTable',
338
+ {data: {
339
+ items: 'f_residential_area_id',
340
+ tablename: 't_user_address',
341
+ condition: `f_residential_area_id='${id}'`}
342
+ },
343
+ {resolveMsg: null, rejectMsg: null})
344
+ if(useraredss.data.length>0){
345
+ this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
346
+ }else{
347
+ this.$resetdelete('api/af-revenue/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
348
+ this.$dispatch('cancel')
349
+ })
350
+ }
351
+ }
352
+ },
353
+ add(val){
354
+ if (this.f_filialeids) {
355
+ this.$refs.paged.$refs.grid.selectStore.selected = null
356
+ this.$dispatch('add')
357
+ } else {
358
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
359
+ }
360
+ },
361
+ modify(val){
362
+ this.$refs.paged.$refs.grid.selectStore.selected = null
363
+ this.$dispatch('modify',val)
364
+ },
365
+ selfSearch (args) {
366
+
367
+ if (!this.f_orgid) {
368
+ this.getorg([this.$login.f.orgid])
369
+ }
370
+ if(this.f_special){
371
+ args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
372
+ }else{
373
+ args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
374
+ }
375
+ this.model.search(args.condition, args.model)
376
+ },
377
+ //清空
378
+ clear(){
379
+ this.$refs.paged.$refs.cri.model = {}
380
+ },
381
+ getorg (val) {
382
+ this.f_orgid = this.$login.convertToIn(val)
383
+ this.f_filialeids = val[0]
384
+ },
385
+ async batchDelete () {
386
+ if (this.f_filialeids) {
387
+ if (this.$refs.paged.$refs.grid.getRowData().length != 0) {
388
+ this.showDelete = true
389
+ let condition = `a.f_orgid = '${this.f_filialeids}'`
390
+ let req = await this.$resetpost('api/af-revenue/sql/address_getresidential', {
391
+ data: {
392
+ condition: condition
393
+ }
394
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
395
+ let redata = []
396
+ req.data.forEach((row) => {
397
+ redata.push({
398
+ label: row.f_residential_area,
399
+ value: row.id,
400
+ data: row,
401
+ id: row.id
402
+ })
403
+ })
404
+ this.areaslist = redata
405
+ } else {
406
+ this.$showAlert('请至少选择一项!', 'warning', 2000)
407
+ }
408
+ }else {
409
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
410
+ }
411
+ },
412
+ confirmDelete () {
413
+ let msg = {
414
+ resolveMsg: '批量删除成功',
415
+ rejectMsg: '批量删除失败!'
416
+ }
417
+ let oldAreaIds = []
418
+ // 获取要批量删除的小区数据
419
+ this.$refs.paged.$refs.grid.getRowData().forEach((row,n) => {
420
+ oldAreaIds[n] = row.id
421
+ })
422
+ this.$resetpost('api/af-revenue/logic/batchDelete',{
423
+ data:{
424
+ areamodel:this.areamodel,
425
+ oldAreaIds:oldAreaIds,
426
+ f_operator: this.$login.f.name,
427
+ f_operatorid: this.$login.f.id,
428
+ f_orgid: this.$login.f.orgid,
429
+ f_orgname: this.$login.f.orgs,
430
+ f_depid: this.$login.f.depids,
431
+ f_depname: this.$login.f.deps
432
+ }
433
+ },msg)
434
+ this.$refs.paged.$refs.grid.selectInit()
435
+ this.$refs.paged.$refs.cri.search()
436
+ this.areamodel.f_residential_area_id = ''
437
+ this.showDelete = false
438
+ },
439
+ cancelDelete () {
440
+ this.$refs.paged.$refs.grid.selectInit()
441
+ this.$refs.paged.$refs.cri.search()
442
+ this.areamodel.f_residential_area_id = ''
443
+ this.showDelete = false
444
+ },
445
+ areaChange(val){
446
+ console.log("小区变化",val)
447
+ let selectArea // 选中的小区数据
448
+ for (let row of this.areaslist) {
449
+ if (val == row.value) {
450
+ selectArea = row.data
451
+ break
452
+ }
453
+ }
454
+ if (selectArea) {
455
+ this.areamodel.f_residential_area_id = selectArea.id
456
+ this.areamodel.f_pcd = selectArea.f_pcd
457
+ this.areamodel.f_pcd_id = selectArea.f_pcd_id
458
+ this.areamodel.f_street = selectArea.f_street
459
+ this.areamodel.f_street_id = selectArea.f_street_id
460
+ this.areamodel.f_slice_area = selectArea.f_slice_area
461
+ this.areamodel.f_residential_area = selectArea.f_residential_area
462
+ }
463
+ this.$nextTick(() => {
464
+ this.$resetValidation()
465
+ })
466
+ },
467
+ },
468
+ watch:{
469
+
470
+ },
471
+ computed:{
472
+ getCondition() {
473
+ var condition=''
474
+ if(this.f_special){
475
+ condition = `${this.$refs.paged.$refs.cri.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
476
+ }else{
477
+ condition = `${this.$refs.paged.$refs.cri.condition} and s.f_filialeid = ${this.f_orgid}`
478
+ }
479
+ return {
480
+ condition: condition
481
+ }
482
+ },
483
+ inputtores () {
484
+ // 获取抄表员
485
+ let rs = new Array()
486
+ if (this.$login.f.f_gasman.length > 0) {
487
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
488
+ let temp = {
489
+ label: this.$login.f.f_gasman[i].name,
490
+ value: this.$login.f.f_gasman[i].name
491
+ }
492
+ rs.push(temp)
493
+ }
494
+ }
495
+ return rs
496
+ }
497
+ }
498
+
499
+ }
500
+ </script>