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,430 +1,430 @@
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
-
7
- <div class="row">
8
-
9
- <div :class="$parent.$parent.style">
10
- <label class="font_normal_body">组织机构</label>
11
- <res-select
12
- restype='organization'
13
- @res-select="$parent.$parent.getorg"
14
- is-mul="false"
15
- :initresid='$parent.$parent.curorgid'
16
- >
17
- </res-select>
18
- </div>
19
- <div :class="$parent.$parent.style" v-if="$parent.$parent.showrightchange">
20
- <label class="font_normal_body">用户编号</label>
21
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
22
- condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
23
- </div>
24
- <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
25
- <label class="font_normal_body">小&emsp;&emsp;区</label>
26
- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
27
- condition="a.f_residential_area like '%{}%'" placeholder="小区"
28
- :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
29
- </div>
30
- <!--<div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.useraddressShow">-->
31
-
32
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.showrightchange">
33
- <label class="font_normal_body">楼&emsp;&emsp;号</label>
34
- <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
35
- condition="a.f_building like '%{}%'" placeholder="楼号"
36
- :size="model.f_building ? model.f_building.length*2 : 6"/>
37
- </div>
38
- <div class="col-sm-4 form-group button-range" >
39
- <button class="button_search button_spacing" @click="search()" >查询</button>
40
- <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('民用')">添加民用</button>
41
- <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('非民用')">添加特殊地址</button>
42
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
43
- <button class="button_export button_spacing" @click="$parent.$parent.importAddress('导入')">模板导入</button>
44
- <button class="button_export button_spacing"
45
- v-show="this.$login.r.includes('完善地址')"
46
- @click="$parent.$parent.importAddress('完善')">完善地址</button>
47
- <export-excel :data="$parent.$parent.getCondition"
48
- :field="$parent.$parent.getfield"
49
- sqlurl="api/af-revenue/logic/exportfile"
50
- sql-name="addressGetAddress"
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-show="$parent.$parent.criteriaShow">
57
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.showrightchange">
58
- <label class="font_normal_body">用户编号</label>
59
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
60
- condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
61
- </div>
62
- <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
63
- <label class="font_normal_body">用户名称</label>
64
- <input type="text" class="input_search" style="width:60%" v-model="model.f_user_name" style="width:60%"
65
- condition="u.f_user_name like '%{}%'" placeholder="用户名称"
66
- :size="model.f_user_name ? model.f_user_name.length*2 : 8"/>
67
- </div>
68
- <div v-if="!$parent.$parent.showrightchange" :class="$parent.$parent.style">
69
- <label class="font_normal_body">小&emsp;&emsp;区</label>
70
- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
71
- condition="a.f_residential_area like '%{}%'" placeholder="小区"
72
- :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
73
- </div>
74
- <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
75
- <label class="font_normal_body">客户类型</label>
76
- <v-select :value.sync="model.f_user_type"
77
- :options='$parent.$parent.usertypes'
78
- placeholder='请选择' v-model="model.f_user_type"
79
- condition="f_user_type = '{}'" class="select_list select"
80
- close-on-select></v-select>
81
- </div>
82
- <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
83
- <label class="font_normal_body">气表类型</label>
84
- <v-select :value.sync="model.f_meter_type" multiple
85
- :options='$parent.$parent.metertypes'
86
- placeholder='请选择' class="select_list select"
87
- condition="ta.f_meter_type in {}"
88
- v-model="model.f_meter_type"
89
- close-on-select></v-select>
90
- </div>
91
- <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
92
- <label class="font_normal_body">气表品牌</label>
93
- <v-select :value.sync="model.f_meter_brand"
94
- v-model="model.f_meter_brand" class="select_list select"
95
- :options='$parent.$parent.meterbrands' placeholder='请选择'
96
- condition="ta.f_meter_brand = '{}'"
97
- close-on-select></v-select>
98
- </div>
99
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
100
- <label class="font_normal_body">楼&emsp;&emsp;号</label>
101
- <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
102
- condition="a.f_building like '%{}%'" placeholder="楼号"
103
- :size="model.f_building ? model.f_building.length*2 : 6"/>
104
- </div>
105
- <div :class="$parent.$parent.style" >
106
- <label class="font_normal_body">单&emsp;&emsp;元</label>
107
- <input type="text" class="input_search" style="width:60%" v-model="model.f_unit" style="width:60%"
108
- condition="a.f_unit like '%{}%'" placeholder="单元"
109
- :size="model.f_unit ? model.f_unit.length*2 : 6"/>
110
- </div>
111
- <div :class="$parent.$parent.style">
112
- <label class="font_normal_body">楼&emsp;&emsp;层</label>
113
- <input type="text" class="input_search" style="width:60%" v-model="model.f_floor" style="width:60%"
114
- condition="a.f_floor like '%{}%'" placeholder="楼层"
115
- :size="model.f_floor ? model.f_floor.length*2 : 6"/>
116
- </div>
117
- <div :class="$parent.$parent.style">
118
- <label class="font_normal_body">门&ensp;牌&ensp;号</label>
119
- <input type="text" class="input_search" style="width:60%" v-model="model.f_room" style="width:60%"
120
- condition="a.f_room like '%{}%'" placeholder="门牌号"
121
- :size="model.f_room ? model.f_room.length*2 : 6"/>
122
- </div>
123
- <!-- <div :class="$parent.$parent.style">-->
124
- <!-- <label class="font_normal_body">小&emsp;&emsp;区</label>-->
125
- <!-- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"-->
126
- <!-- condition="a.f_residential_area like '%{}%'" placeholder="小区"-->
127
- <!-- :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>-->
128
- <!-- </div>-->
129
-
130
- <div :class="$parent.$parent.style">
131
- <label class="font_normal_body">地址&emsp;ID</label>
132
- <input type="text" class="input_search" style="width:60%" v-model="model.id" style="width:60%"
133
- condition="a.id = '{}'" placeholder="地址ID"
134
- />
135
- </div>
136
- <div :class="$parent.$parent.style" >
137
- <label class="font_normal_body">详细地址</label>
138
- <input type="text" class="input_search" style="width:60%" v-model="model.f_address" style="width:60%"
139
- condition="a.f_address like '%{}%'" placeholder="详细地址"
140
- :size="model.f_address ? model.f_address.length*2 : 8"/>
141
- </div>
142
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
143
- <label class="font_normal_body">街&emsp;&emsp;道</label>
144
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
145
- condition="f_street like '%{}%'" placeholder="街道"
146
- :size="model.f_street ? model.f_street.length*2 : 6"/>
147
- </div>
148
- <div :class="$parent.$parent.style" >
149
- <label class="font_normal_body">地址状态</label>
150
- <v-select :value.sync="model.f_address_state"
151
- class="select_list select"
152
- v-model="model.f_address_state"
153
- condition="a.f_address_state = '{}'"
154
- :options='$parent.$parent.getaddresstate' placeholder='地址状态'
155
- close-on-select>
156
- </v-select>
157
- </div>
158
- </div>
159
- </div>
160
- </criteria>
161
- <data-grid :model="model" partial='list' style="overflow: auto" class="list_area table_sy" v-ref:grid>
162
- <template partial='head'>
163
- <tr>
164
- <th><nobr>序号</nobr></th>
165
- <th><nobr>用户编号</nobr></th>
166
- <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>区/县</nobr></th>
167
- <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>片区</nobr></th>
168
- <th><nobr>街道</nobr></th>
169
- <th><nobr>小区(单位)</nobr></th>
170
- <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>楼号</nobr></th>
171
- <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>单元</nobr></th>
172
- <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>楼层</nobr></th>
173
- <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>门牌号</nobr></th>
174
- <th><nobr>详细地址</nobr></th>
175
- <th><nobr>地址状态</nobr></th>
176
- <th><nobr>时间</nobr></th>
177
- <th><nobr>操作</nobr></th>
178
- </tr>
179
- </template>
180
- <template partial='body'>
181
- <tr>
182
- <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
183
- <td style="text-align:center"><nobr>{{row.f_userinfo_code}}</nobr></td>
184
- <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
185
- <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
186
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
187
- <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
188
- <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_building}}{{row.f_building_suffix}}</nobr></td>
189
- <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_unit}}{{row.f_unit_suffix}}</nobr></td>
190
- <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_floor}}{{row.f_floor_suffix}}</nobr></td>
191
- <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_room}}{{row.f_room_suffix}}</nobr></td>
192
- <td style="text-align:center"><nobr>{{row.f_address}}</nobr></td>
193
- <td style="text-align:center"><nobr>{{row.f_address_state}}</nobr></td>
194
- <td style="text-align:center"><nobr>{{row.f_create_date}}</nobr></td>
195
- <td style="text-align:center">
196
- <!-- <button type="button" name="button" class="btn btn-link"
197
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
198
- <button v-if="!row.f_useraddress_id" type="button" name="button" class="btn btn-danger"
199
- style="padding: 5px 12px"
200
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
201
- </td>
202
- </tr>
203
- </template>
204
- <template partial='foot'></template>
205
- </data-grid>
206
- </criteria-paged>
207
- </div>
208
- <work-busy :is-busy='isbusy'></work-busy>
209
- <modal :show.sync="showFile" width="480px" v-ref:modal backdrop="true">
210
- <header slot="modal-header" class="modal-header">
211
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
212
- <h4 class="modal-title">选择文件</h4>
213
- </header>
214
- <article slot="modal-body" class="modal-body">
215
- <div class="form-group">
216
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
217
- </div>
218
- </article>
219
- <footer slot="modal-footer" class="modal-footer" style="display: none"></footer>
220
- </modal>
221
- </template>
222
-
223
- <script>
224
- import { PagedList,HttpResetClass } from 'vue-client'
225
- let readyGen = async function (self) {
226
- self.getfield = self.config.excelHeaders
227
- }
228
-
229
- export default {
230
- data () {
231
- return {
232
- criteriaShow: false,
233
- model: new PagedList('api/af-revenue/sql/address_getAddress',20,{tablename: `'t_user_address'`,items: `'*'`,orderitem: `'id desc'`}),
234
- config: {
235
- // 导出列要和查询列相同
236
- excelHeaders: {
237
- 'f_user_name':'用户姓名',
238
- 'f_userinfo_code':'用户编号',
239
- 'id':'地址ID',
240
- 'f_pcd':'区/县',
241
- 'f_slice_area':'片区',
242
- 'f_street':'街道',
243
- 'f_residential_area':'小区',
244
- 'f_building':'楼号',
245
- 'f_unit':'单元',
246
- 'f_floor':'楼层',
247
- 'f_room':'门牌号',
248
- 'f_address':'详细地址',
249
- 'f_address_state':'地址状态',
250
- 'f_create_date':'时间'
251
- },
252
- },
253
- meterbrands: [],
254
- meterstyle:[],
255
- isbusy:false,
256
- addflag: false,
257
- addtitle:'',
258
- other: [],
259
- footer: [],
260
- getfield: {},
261
- imptype:'',
262
- // 公司下拉
263
- curorgid: [this.$login.f.orgid],
264
- f_orgid: '',
265
-
266
- //文件上传弹框
267
- showFile: false,
268
- showrightchange:true
269
- }
270
- },
271
- title: '地址列表',
272
- props:{
273
- f_filialeids:{
274
- type: String
275
- },
276
- style: {
277
- type: String,
278
- default: 'col-sm-2 '
279
- }
280
- },
281
- ready(){
282
- readyGen(this)
283
- this.search()
284
- this.initParams()
285
- },
286
- methods: {
287
- async initParams(){
288
- console.log("进入initParams,初始化气表品牌")
289
- // 初始化气表品牌
290
- let http =new HttpResetClass()
291
- let res=await http.load('post','api/af-revenue/sql/address_singleTable',{data:{items:'f_meter_brand',tablename:'t_gasbrand',condition:`f_orgid = '${this.curorgid}'`}},{resolveMsg:null,rejectMsg:null})
292
- console.log("kanak返回的",res)
293
- res.data.forEach((item) => {
294
- let temp = {}
295
- temp.label = item.f_meter_brand
296
- temp.value = item.f_meter_brand
297
- this.meterbrands.push(temp)
298
- })
299
-
300
- },
301
- getotherfooter() {
302
- // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
303
- // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
304
- this.other = [];
305
- this.footer = [];
306
- // let exportdata = this.getCondition;
307
- let otherInData = [];
308
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
309
- let footerData = [], exportfield = this.getfield;
310
- footerData.push("合计");
311
- let self = this;
312
- for (var field in self.sumsmodel) {
313
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
314
- }
315
- this.footer.push(footerData);
316
- this.other.push(otherInData);
317
- },
318
- hidden() {
319
- this.criteriaShow = !this.criteriaShow
320
- },
321
- //添加方法
322
- add(val){
323
- if (this.f_filialeids) {
324
- this.$refs.paged.$refs.grid.selectStore.selected = null
325
- this.$dispatch('add',val)
326
- this.showrightchange = false;
327
- } else {
328
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
329
- }
330
- },
331
- importAddress(val){
332
- this.imptype = val
333
- this.showFile = true
334
- },
335
- // 关闭文件上传对话框
336
- closeFile() {
337
- this.showFile = false
338
- // 将选的文件清空
339
- this.$refs.file.$el.querySelector('input').value = ''
340
- },
341
- //修改
342
- modify(val){
343
- this.$refs.paged.$refs.grid.selectStore.selected = null
344
- this.$dispatch('modify',val)
345
- },
346
- async delete(row){
347
- if(row.id){
348
- var id = row.id
349
- let userfiles = await this.$resetpost('api/af-revenue/sql/address_singleTable', {data: {items: 'f_useraddress_id',tablename: 't_userfiles',condition: `f_useraddress_id='${id}' and f_table_state = '正常'`}},{resolveMsg: null, rejectMsg: null})
350
- if(userfiles.data.length){
351
- this.$showAlert('该地址下已有正常表具档案,无法删除!','warning',1000)
352
- }else{
353
- this.$resetdelete('api/af-revenue/entity/t_user_address', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
354
- this.$dispatch('cancel')
355
- })
356
- }
357
- }
358
- },
359
-
360
- search () {
361
- this.$refs.paged.$refs.cri.search()
362
- },
363
-
364
- selfSearch (args) {
365
-
366
- if (!this.f_orgid) {
367
- this.getorg([this.$login.f.orgid])
368
- }
369
-
370
- args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
371
- this.model.search(args.condition, args.model)
372
- },
373
-
374
- //清空
375
- clear(){
376
- this.$refs.paged.$refs.cri.model = {}
377
- },
378
- getorg (val) {
379
- this.f_orgid = this.$login.convertToIn(val)
380
- this.f_filialeids = val[0]
381
- }
382
- },
383
- events: {
384
- onFileUpload: async function (file, res) {
385
- this.isbusy = true
386
- console.log("上传完毕"+JSON.stringify(res))
387
- let data = {
388
- filepath: res.f_downloadpath,
389
- user:this.$login.f,
390
- type :this.imptype
391
- }
392
- console.log("filepath="+JSON.stringify(data))
393
- await this.$resetpost(`api/af-revenue/logic/address_useraddressimport`,data, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0).then((res)=>{
394
- this.isbusy = false
395
- if(res.data.type=="success"){
396
- this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
397
- }else{
398
- this.$showMessage(res.data.msg);
399
- }
400
- //关闭上传框
401
- this.closeFile()
402
- //重新查询
403
- this.init()
404
- }).catch(error=>{
405
- this.isbusy = false
406
- })
407
- },
408
- 'onFileError'(error) {
409
- this.$showAlert(error, 'warning', 2000)
410
- }
411
- },
412
- computed: {
413
- usertypes() {
414
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
415
- },
416
- metertypes() {
417
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
418
- },
419
- //地址状态下拉框
420
- getaddresstate() {
421
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
422
- },
423
- getCondition() {
424
- return {
425
- condition: `${this.$refs.paged.$refs.cri.condition}` + `and a.f_filialeid = '${this.f_filialeids}'`}
426
- }
427
- }
428
-
429
- }
430
- </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
+
7
+ <div class="row">
8
+
9
+ <div :class="$parent.$parent.style">
10
+ <label class="font_normal_body">组织机构</label>
11
+ <res-select
12
+ restype='organization'
13
+ @res-select="$parent.$parent.getorg"
14
+ is-mul="false"
15
+ :initresid='$parent.$parent.curorgid'
16
+ >
17
+ </res-select>
18
+ </div>
19
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.showrightchange">
20
+ <label class="font_normal_body">用户编号</label>
21
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
22
+ condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
23
+ </div>
24
+ <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
25
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
26
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
27
+ condition="a.f_residential_area like '%{}%'" placeholder="小区"
28
+ :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
29
+ </div>
30
+ <!--<div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.useraddressShow">-->
31
+
32
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.showrightchange">
33
+ <label class="font_normal_body">楼&emsp;&emsp;号</label>
34
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
35
+ condition="a.f_building like '%{}%'" placeholder="楼号"
36
+ :size="model.f_building ? model.f_building.length*2 : 6"/>
37
+ </div>
38
+ <div class="col-sm-4 form-group button-range" >
39
+ <button class="button_search button_spacing" @click="search()" >查询</button>
40
+ <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('民用')">添加民用</button>
41
+ <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('非民用')">添加特殊地址</button>
42
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
43
+ <button class="button_export button_spacing" @click="$parent.$parent.importAddress('导入')">模板导入</button>
44
+ <button class="button_export button_spacing"
45
+ v-show="this.$login.r.includes('完善地址')"
46
+ @click="$parent.$parent.importAddress('完善')">完善地址</button>
47
+ <export-excel :data="$parent.$parent.getCondition"
48
+ :field="$parent.$parent.getfield"
49
+ sqlurl="api/af-revenue/logic/exportfile"
50
+ sql-name="addressGetAddress"
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-show="$parent.$parent.criteriaShow">
57
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.showrightchange">
58
+ <label class="font_normal_body">用户编号</label>
59
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" style="width:60%"
60
+ condition="f_userinfo_code = '{}'" placeholder="用户编号"/>
61
+ </div>
62
+ <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
63
+ <label class="font_normal_body">用户名称</label>
64
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_user_name" style="width:60%"
65
+ condition="u.f_user_name like '%{}%'" placeholder="用户名称"
66
+ :size="model.f_user_name ? model.f_user_name.length*2 : 8"/>
67
+ </div>
68
+ <div v-if="!$parent.$parent.showrightchange" :class="$parent.$parent.style">
69
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
70
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"
71
+ condition="a.f_residential_area like '%{}%'" placeholder="小区"
72
+ :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>
73
+ </div>
74
+ <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
75
+ <label class="font_normal_body">客户类型</label>
76
+ <v-select :value.sync="model.f_user_type"
77
+ :options='$parent.$parent.usertypes'
78
+ placeholder='请选择' v-model="model.f_user_type"
79
+ condition="f_user_type = '{}'" class="select_list select"
80
+ close-on-select></v-select>
81
+ </div>
82
+ <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
83
+ <label class="font_normal_body">气表类型</label>
84
+ <v-select :value.sync="model.f_meter_type" multiple
85
+ :options='$parent.$parent.metertypes'
86
+ placeholder='请选择' class="select_list select"
87
+ condition="ta.f_meter_type in {}"
88
+ v-model="model.f_meter_type"
89
+ close-on-select></v-select>
90
+ </div>
91
+ <div v-if="$parent.$parent.showrightchange" :class="$parent.$parent.style">
92
+ <label class="font_normal_body">气表品牌</label>
93
+ <v-select :value.sync="model.f_meter_brand"
94
+ v-model="model.f_meter_brand" class="select_list select"
95
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
96
+ condition="ta.f_meter_brand = '{}'"
97
+ close-on-select></v-select>
98
+ </div>
99
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
100
+ <label class="font_normal_body">楼&emsp;&emsp;号</label>
101
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_building" style="width:60%"
102
+ condition="a.f_building like '%{}%'" placeholder="楼号"
103
+ :size="model.f_building ? model.f_building.length*2 : 6"/>
104
+ </div>
105
+ <div :class="$parent.$parent.style" >
106
+ <label class="font_normal_body">单&emsp;&emsp;元</label>
107
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_unit" style="width:60%"
108
+ condition="a.f_unit like '%{}%'" placeholder="单元"
109
+ :size="model.f_unit ? model.f_unit.length*2 : 6"/>
110
+ </div>
111
+ <div :class="$parent.$parent.style">
112
+ <label class="font_normal_body">楼&emsp;&emsp;层</label>
113
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_floor" style="width:60%"
114
+ condition="a.f_floor like '%{}%'" placeholder="楼层"
115
+ :size="model.f_floor ? model.f_floor.length*2 : 6"/>
116
+ </div>
117
+ <div :class="$parent.$parent.style">
118
+ <label class="font_normal_body">门&ensp;牌&ensp;号</label>
119
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_room" style="width:60%"
120
+ condition="a.f_room like '%{}%'" placeholder="门牌号"
121
+ :size="model.f_room ? model.f_room.length*2 : 6"/>
122
+ </div>
123
+ <!-- <div :class="$parent.$parent.style">-->
124
+ <!-- <label class="font_normal_body">小&emsp;&emsp;区</label>-->
125
+ <!-- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_arearea" style="width:60%"-->
126
+ <!-- condition="a.f_residential_area like '%{}%'" placeholder="小区"-->
127
+ <!-- :size="model.f_residential_arearea ? model.f_residential_arearea.length*2 : 8"/>-->
128
+ <!-- </div>-->
129
+
130
+ <div :class="$parent.$parent.style">
131
+ <label class="font_normal_body">地址&emsp;ID</label>
132
+ <input type="text" class="input_search" style="width:60%" v-model="model.id" style="width:60%"
133
+ condition="a.id = '{}'" placeholder="地址ID"
134
+ />
135
+ </div>
136
+ <div :class="$parent.$parent.style" >
137
+ <label class="font_normal_body">详细地址</label>
138
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_address" style="width:60%"
139
+ condition="a.f_address like '%{}%'" placeholder="详细地址"
140
+ :size="model.f_address ? model.f_address.length*2 : 8"/>
141
+ </div>
142
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.showrightchange">
143
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
144
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
145
+ condition="f_street like '%{}%'" placeholder="街道"
146
+ :size="model.f_street ? model.f_street.length*2 : 6"/>
147
+ </div>
148
+ <div :class="$parent.$parent.style" >
149
+ <label class="font_normal_body">地址状态</label>
150
+ <v-select :value.sync="model.f_address_state"
151
+ class="select_list select"
152
+ v-model="model.f_address_state"
153
+ condition="a.f_address_state = '{}'"
154
+ :options='$parent.$parent.getaddresstate' placeholder='地址状态'
155
+ close-on-select>
156
+ </v-select>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ </criteria>
161
+ <data-grid :model="model" partial='list' style="overflow: auto" class="list_area table_sy" v-ref:grid>
162
+ <template partial='head'>
163
+ <tr>
164
+ <th><nobr>序号</nobr></th>
165
+ <th><nobr>用户编号</nobr></th>
166
+ <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>区/县</nobr></th>
167
+ <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>片区</nobr></th>
168
+ <th><nobr>街道</nobr></th>
169
+ <th><nobr>小区(单位)</nobr></th>
170
+ <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>楼号</nobr></th>
171
+ <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>单元</nobr></th>
172
+ <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>楼层</nobr></th>
173
+ <th v-show="!$parent.$parent.$parent.$parent.useraddressShow"><nobr>门牌号</nobr></th>
174
+ <th><nobr>详细地址</nobr></th>
175
+ <th><nobr>地址状态</nobr></th>
176
+ <th><nobr>时间</nobr></th>
177
+ <th><nobr>操作</nobr></th>
178
+ </tr>
179
+ </template>
180
+ <template partial='body'>
181
+ <tr>
182
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
183
+ <td style="text-align:center"><nobr>{{row.f_userinfo_code}}</nobr></td>
184
+ <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
185
+ <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
186
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
187
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
188
+ <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_building}}{{row.f_building_suffix}}</nobr></td>
189
+ <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_unit}}{{row.f_unit_suffix}}</nobr></td>
190
+ <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_floor}}{{row.f_floor_suffix}}</nobr></td>
191
+ <td v-show="!$parent.$parent.$parent.$parent.useraddressShow" style="text-align:center"><nobr>{{row.f_room}}{{row.f_room_suffix}}</nobr></td>
192
+ <td style="text-align:center"><nobr>{{row.f_address}}</nobr></td>
193
+ <td style="text-align:center"><nobr>{{row.f_address_state}}</nobr></td>
194
+ <td style="text-align:center"><nobr>{{row.f_create_date}}</nobr></td>
195
+ <td style="text-align:center">
196
+ <!-- <button type="button" name="button" class="btn btn-link"
197
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
198
+ <button v-if="!row.f_useraddress_id" type="button" name="button" class="btn btn-danger"
199
+ style="padding: 5px 12px"
200
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
201
+ </td>
202
+ </tr>
203
+ </template>
204
+ <template partial='foot'></template>
205
+ </data-grid>
206
+ </criteria-paged>
207
+ </div>
208
+ <work-busy :is-busy='isbusy'></work-busy>
209
+ <modal :show.sync="showFile" width="480px" v-ref:modal backdrop="true">
210
+ <header slot="modal-header" class="modal-header">
211
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
212
+ <h4 class="modal-title">选择文件</h4>
213
+ </header>
214
+ <article slot="modal-body" class="modal-body">
215
+ <div class="form-group">
216
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
217
+ </div>
218
+ </article>
219
+ <footer slot="modal-footer" class="modal-footer" style="display: none"></footer>
220
+ </modal>
221
+ </template>
222
+
223
+ <script>
224
+ import { PagedList,HttpResetClass } from 'vue-client'
225
+ let readyGen = async function (self) {
226
+ self.getfield = self.config.excelHeaders
227
+ }
228
+
229
+ export default {
230
+ data () {
231
+ return {
232
+ criteriaShow: false,
233
+ model: new PagedList('api/af-revenue/sql/address_getAddress',20,{tablename: `'t_user_address'`,items: `'*'`,orderitem: `'id desc'`}),
234
+ config: {
235
+ // 导出列要和查询列相同
236
+ excelHeaders: {
237
+ 'f_user_name':'用户姓名',
238
+ 'f_userinfo_code':'用户编号',
239
+ 'id':'地址ID',
240
+ 'f_pcd':'区/县',
241
+ 'f_slice_area':'片区',
242
+ 'f_street':'街道',
243
+ 'f_residential_area':'小区',
244
+ 'f_building':'楼号',
245
+ 'f_unit':'单元',
246
+ 'f_floor':'楼层',
247
+ 'f_room':'门牌号',
248
+ 'f_address':'详细地址',
249
+ 'f_address_state':'地址状态',
250
+ 'f_create_date':'时间'
251
+ },
252
+ },
253
+ meterbrands: [],
254
+ meterstyle:[],
255
+ isbusy:false,
256
+ addflag: false,
257
+ addtitle:'',
258
+ other: [],
259
+ footer: [],
260
+ getfield: {},
261
+ imptype:'',
262
+ // 公司下拉
263
+ curorgid: [this.$login.f.orgid],
264
+ f_orgid: '',
265
+
266
+ //文件上传弹框
267
+ showFile: false,
268
+ showrightchange:true
269
+ }
270
+ },
271
+ title: '地址列表',
272
+ props:{
273
+ f_filialeids:{
274
+ type: String
275
+ },
276
+ style: {
277
+ type: String,
278
+ default: 'col-sm-2 '
279
+ }
280
+ },
281
+ ready(){
282
+ readyGen(this)
283
+ this.search()
284
+ this.initParams()
285
+ },
286
+ methods: {
287
+ async initParams(){
288
+ console.log("进入initParams,初始化气表品牌")
289
+ // 初始化气表品牌
290
+ let http =new HttpResetClass()
291
+ let res=await http.load('post','api/af-revenue/sql/address_singleTable',{data:{items:'f_meter_brand',tablename:'t_gasbrand',condition:`f_orgid = '${this.curorgid}'`}},{resolveMsg:null,rejectMsg:null})
292
+ console.log("kanak返回的",res)
293
+ res.data.forEach((item) => {
294
+ let temp = {}
295
+ temp.label = item.f_meter_brand
296
+ temp.value = item.f_meter_brand
297
+ this.meterbrands.push(temp)
298
+ })
299
+
300
+ },
301
+ getotherfooter() {
302
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
303
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
304
+ this.other = [];
305
+ this.footer = [];
306
+ // let exportdata = this.getCondition;
307
+ let otherInData = [];
308
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
309
+ let footerData = [], exportfield = this.getfield;
310
+ footerData.push("合计");
311
+ let self = this;
312
+ for (var field in self.sumsmodel) {
313
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
314
+ }
315
+ this.footer.push(footerData);
316
+ this.other.push(otherInData);
317
+ },
318
+ hidden() {
319
+ this.criteriaShow = !this.criteriaShow
320
+ },
321
+ //添加方法
322
+ add(val){
323
+ if (this.f_filialeids) {
324
+ this.$refs.paged.$refs.grid.selectStore.selected = null
325
+ this.$dispatch('add',val)
326
+ this.showrightchange = false;
327
+ } else {
328
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
329
+ }
330
+ },
331
+ importAddress(val){
332
+ this.imptype = val
333
+ this.showFile = true
334
+ },
335
+ // 关闭文件上传对话框
336
+ closeFile() {
337
+ this.showFile = false
338
+ // 将选的文件清空
339
+ this.$refs.file.$el.querySelector('input').value = ''
340
+ },
341
+ //修改
342
+ modify(val){
343
+ this.$refs.paged.$refs.grid.selectStore.selected = null
344
+ this.$dispatch('modify',val)
345
+ },
346
+ async delete(row){
347
+ if(row.id){
348
+ var id = row.id
349
+ let userfiles = await this.$resetpost('api/af-revenue/sql/address_singleTable', {data: {items: 'f_useraddress_id',tablename: 't_userfiles',condition: `f_useraddress_id='${id}' and f_table_state = '正常'`}},{resolveMsg: null, rejectMsg: null})
350
+ if(userfiles.data.length){
351
+ this.$showAlert('该地址下已有正常表具档案,无法删除!','warning',1000)
352
+ }else{
353
+ this.$resetdelete('api/af-revenue/entity/t_user_address', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
354
+ this.$dispatch('cancel')
355
+ })
356
+ }
357
+ }
358
+ },
359
+
360
+ search () {
361
+ this.$refs.paged.$refs.cri.search()
362
+ },
363
+
364
+ selfSearch (args) {
365
+
366
+ if (!this.f_orgid) {
367
+ this.getorg([this.$login.f.orgid])
368
+ }
369
+
370
+ args.condition = `${args.condition} and a.f_filialeid = '${this.f_filialeids}'`
371
+ this.model.search(args.condition, args.model)
372
+ },
373
+
374
+ //清空
375
+ clear(){
376
+ this.$refs.paged.$refs.cri.model = {}
377
+ },
378
+ getorg (val) {
379
+ this.f_orgid = this.$login.convertToIn(val)
380
+ this.f_filialeids = val[0]
381
+ }
382
+ },
383
+ events: {
384
+ onFileUpload: async function (file, res) {
385
+ this.isbusy = true
386
+ console.log("上传完毕"+JSON.stringify(res))
387
+ let data = {
388
+ filepath: res.f_downloadpath,
389
+ user:this.$login.f,
390
+ type :this.imptype
391
+ }
392
+ console.log("filepath="+JSON.stringify(data))
393
+ await this.$resetpost(`api/af-revenue/logic/address_useraddressimport`,data, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0).then((res)=>{
394
+ this.isbusy = false
395
+ if(res.data.type=="success"){
396
+ this.$showAlert("导入信息:"+res.data.msg, res.data.type, 2000);
397
+ }else{
398
+ this.$showMessage(res.data.msg);
399
+ }
400
+ //关闭上传框
401
+ this.closeFile()
402
+ //重新查询
403
+ this.init()
404
+ }).catch(error=>{
405
+ this.isbusy = false
406
+ })
407
+ },
408
+ 'onFileError'(error) {
409
+ this.$showAlert(error, 'warning', 2000)
410
+ }
411
+ },
412
+ computed: {
413
+ usertypes() {
414
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
415
+ },
416
+ metertypes() {
417
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
418
+ },
419
+ //地址状态下拉框
420
+ getaddresstate() {
421
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
422
+ },
423
+ getCondition() {
424
+ return {
425
+ condition: `${this.$refs.paged.$refs.cri.condition}` + `and a.f_filialeid = '${this.f_filialeids}'`}
426
+ }
427
+ }
428
+
429
+ }
430
+ </script>