address-client 3.0.34-aodeToV4 → 3.0.35-aodeToV4

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 (41) hide show
  1. package/AddressClient.iml +12 -12
  2. package/CHANGELOG.md +12 -12
  3. package/build/dev-server.js +128 -128
  4. package/build/webpack.base.conf.js +81 -81
  5. package/examples/showAdd/App.vue +40 -40
  6. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  7. package/gradle/wrapper/gradle-wrapper.properties +5 -0
  8. package/gradlew +234 -0
  9. package/gradlew.bat +89 -0
  10. package/index.html +40 -40
  11. package/package.json +1 -1
  12. package/src/address.js +58 -58
  13. package/src/components/AddAreaMsg.vue +599 -599
  14. package/src/components/AddStreetOrPcd.vue +231 -231
  15. package/src/components/AddressAddAddress.vue +479 -479
  16. package/src/components/AddressFiles.vue +156 -156
  17. package/src/components/AddressList.vue +323 -323
  18. package/src/components/AddressManage.vue +117 -117
  19. package/src/components/AddressTree.vue +501 -501
  20. package/src/components/AreaFiles.vue +73 -73
  21. package/src/components/AreaList.vue +357 -357
  22. package/src/components/AreaManage.vue +101 -101
  23. package/src/components/AreaTree.vue +508 -508
  24. package/src/components/Basch.vue +72 -72
  25. package/src/components/BatchOrders.vue +328 -328
  26. package/src/components/CityManage.vue +76 -76
  27. package/src/components/NewAddressInfo.vue +432 -432
  28. package/src/components/OneCodeList.vue +251 -251
  29. package/src/components/StreetList.vue +184 -184
  30. package/src/components/UserAddress.vue +780 -780
  31. package/src/components/UserAddressChange.vue +58 -58
  32. package/src/components/addressts/AddressListts.vue +307 -307
  33. package/src/components/addressts/AddressManagets.vue +117 -117
  34. package/src/components/addressts/UserAddressChangets.vue +58 -58
  35. package/src/components/addressts/UserAddressts.vue +739 -739
  36. package/src/components/areauser/AreaUser.vue +233 -233
  37. package/src/components/selectAddress/BatchList.vue +177 -174
  38. package/src/main.js +23 -23
  39. package/.gradle/3.5.1/file-changes/last-build.bin +0 -0
  40. package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
  41. package/.gradle/buildOutputCleanup/cache.properties +0 -2
@@ -1,357 +1,357 @@
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">
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">街&emsp;&emsp;道</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="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
42
- <label class="font_normal_body">户数大于</label>
43
- <input type="text" class="input_search" style="width:60%" v-model="model.areacount"
44
- condition="isnull(resi.areacount,0) >= '{}'" placeholder="使用人数大于等于"/>
45
- </div>
46
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
47
- <label class="font_normal_body">户数小于</label>
48
- <input type="text" class="input_search" style="width:60%" v-model="model.areacount_end"
49
- condition="isnull(resi.areacount,0) <='{}'" placeholder="使用人数小于等于"/>
50
- </div>
51
- <div class="col-sm-4 form-group button-range">
52
- <button class="button_search button_spacing" @click="search()" >查询</button>
53
- <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
54
- <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
55
- <button v-if="$parent.$parent.checkitem.length>=1" class="button_clear button_spacing" @click="$parent.$parent.deleteall()">批量删除</button>
56
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
57
- <export-excel :data="$parent.$parent.getCondition" :defaultselect="$parent.$parent.getfield"
58
- :field="$parent.$parent.getfield"
59
- sqlurl="api/af-revenue/logic/exportfile" sql-name="address_getarealist" template-name='小区导出'
60
- :choose-col="true"></export-excel>
61
- <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>
62
- </div>
63
- </div>
64
- <div class="row" v-if="$parent.$parent.criteriaShow">
65
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
66
- <label class="font_normal_body">城&emsp;&emsp;市</label>
67
- <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
68
- condition="f_city like '%{}%'" placeholder="城市"
69
- :size="model.f_city ? model.f_city.length*2 : 6"/>
70
- </div>
71
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
72
- <label class="font_normal_body">区&emsp;&emsp;县</label>
73
- <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
74
- condition="f_district like '%{}%'" placeholder="区县"
75
- :size="model.f_district ? model.f_district.length*2 : 6"/>
76
- </div>
77
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
78
- <label class="font_normal_body">街&emsp;&emsp;道</label>
79
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
80
- condition="f_street like '%{}%'" placeholder="街道"
81
- :size="model.f_street ? model.f_street.length*2 : 6"/>
82
- </div>
83
- <div :class="$parent.$parent.style">
84
- <label class="font_normal_body">小&emsp;&emsp;区</label>
85
- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
86
- condition="f_residential_area like '%{}%'" placeholder="小区"
87
- :size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
88
- </div>
89
-
90
- </div>
91
- </div>
92
-
93
-
94
- </criteria>
95
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
96
- <template partial='head'>
97
- <tr>
98
- <th>
99
- <input
100
- type="checkbox"
101
- v-model="$parent.$parent.$parent.checkall"
102
- @change="$parent.$parent.$parent.chooseAll"
103
- />
104
- </th>
105
- <th><nobr>序号</nobr></th>
106
- <th v-if="false"><nobr>省份</nobr></th>
107
- <th v-if="false"><nobr>城市</nobr></th>
108
- <th><nobr>区/县</nobr></th>
109
- <th><nobr>街道名称</nobr></th>
110
- <!--民用小区信息开始-->
111
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
112
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
113
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区备注</nobr></th>
114
- <!--民用小区信息结束-->
115
- <!--非民用单位信息开始-->
116
- <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
117
- <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
118
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
119
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
120
- <!--非民用单位信息结束-->
121
- <th><nobr>片区/管理站 </nobr></th>
122
- <th><nobr>使用人数 </nobr></th>
123
- <th><nobr>首次通气日期 </nobr></th>
124
- <th><nobr>通气年限 </nobr></th>
125
- <th><nobr>关联地址 </nobr></th>
126
- <th><nobr>操作人</nobr></th>
127
- <th><nobr>操作日期</nobr></th>
128
- <th><nobr>操作</nobr></th>
129
-
130
- </tr>
131
- </template>
132
- <template partial='body'>
133
- <tr>
134
- <td style="text-align: center">
135
- <input
136
- v-if="row.areacount===0"
137
- :id="model.pageIndex"
138
- type="checkbox"
139
- @change="$parent.$parent.$parent.chooseOne($event, row, model.rows)"
140
- :checked="$parent.$parent.$parent.ischecked(row.id)"
141
- />
142
- </td>
143
- <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
144
- <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
145
- <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
146
- <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
147
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
148
- <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
149
- <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
150
- <td style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
151
- <!--非民用单位信息开始-->
152
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
153
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
154
- <!--非民用单位信息结束-->
155
- <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
156
- <td style="text-align:center"><button @click.stop="$parent.$parent.$parent.operate(row.id,row.f_residential_area)" class="btn btn-link">{{row.areacount}}</button></td>
157
- <td style="text-align:center"><nobr>{{row.addresscount}}</nobr></td>
158
- <td style="text-align:center"><nobr>{{row.open_date}}</nobr></td>
159
- <td style="text-align:center"><nobr>{{row.yeardiff}}</nobr></td>
160
- <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
161
- <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
162
- <td><nobr>
163
- <!--<button type="button" name="button" class="btn btn-link"
164
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
165
- <button type="button" name="button" class="btn btn-link" v-if="row.areacount===0"
166
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
167
- </nobr></td>
168
- </tr>
169
- </template>
170
- <template partial='foot'></template>
171
- </data-grid>
172
- </criteria-paged>
173
- </div>
174
- </template>
175
-
176
- <script>
177
- import { PagedList } from 'vue-client'
178
-
179
- export default {
180
-
181
- data () {
182
- return {
183
- checkall:false,
184
- checkitem:[],
185
- criteriaShow: false,
186
- model: new PagedList('api/af-revenue/sql/address_getarealist',50),
187
- addflag: false,
188
- addtitle:'',
189
- condition:'',
190
- // 公司下拉
191
- curorgid: [this.$login.f.orgid],
192
- f_orgid: ''
193
- }
194
- },
195
- title: '小区管理',
196
- computed:{
197
- getCondition() {
198
- return {condition: this.condition}
199
- },
200
- getfield() {
201
- let filed =[]
202
- if(this.f_special){
203
- filed = {'f_district': '区/县', 'f_street': '街道名称','f_residential_area':'小区名称','f_area_address': '详细地址','f_comments': '小区备注', 'f_slice_area': '片区/管理站','areacount':'使用人数',
204
- 'open_date': '首次通气时间','yeardiff': '通气年限','f_operator': '操作人','f_operate_date': '操作日期'}
205
- }else {
206
- filed = {'f_district': '区/县', 'f_street': '街道名称','f_residential_area':'单位名称','f_area_address': '单位地址','f_comments': '小区备注','f_linkname':'联系人', 'f_linkphone':'联系电话','f_slice_area': '片区/管理站','areacount':'使用人数',
207
- 'open_date': '首次通气时间','yeardiff': '通气年限','f_operator': '操作人','f_operate_date': '操作日期'}
208
- }
209
- return filed
210
- },
211
- ischeckall(){
212
- let arr =[]
213
- for(let i=0;i<this.model.rows.length;i++){
214
- if(this.model.rows[i].areacount<1){
215
- arr.push(this.model.rows[i].id)
216
- }
217
- }
218
- if(arr.sort().toString()===this.checkitem.sort().toString() && this.checkitem.length>0){
219
- console.log(arr.sort().toString())
220
- console.log(this.checkitem.sort().toString())
221
- // this.checkall = true
222
- } else {
223
- // this.checkall = false
224
- }
225
- // return this.checkall
226
- }
227
- },
228
- props:{
229
- f_filialeids:{
230
- type: String
231
- },
232
- style: {
233
- type: String,
234
- default: 'col-sm-2 form-group'
235
- },
236
- f_special:{
237
- type: String
238
- }
239
- },
240
- ready(){
241
- this.search()
242
- },
243
- methods: {
244
- chooseAll(){
245
- console.log(this.checkall)
246
- if(this.checkall){
247
- this.checkitem = []
248
- for(let i=0;i<this.model.rows.length;i++){
249
- if(this.model.rows[i].areacount<1){
250
- this.checkitem.push(this.model.rows[i].id)
251
- }
252
- }
253
- }else{
254
- this.checkitem = []
255
- }
256
- },
257
- chooseOne(e, row, rows) {
258
- console.log("row", row);
259
- let checked = e.target.checked;
260
- console.log("state", e.target.checked);
261
- if(checked===false){
262
- this.checkitem.splice(this.checkitem.indexOf(row.id), 1)
263
- } else {
264
- this.checkitem.push(row.id)
265
- }
266
- },
267
- ischecked(row){
268
- return this.checkitem.indexOf(row)>-1
269
- },
270
- operate (f_residential_area_id,f_residential_area) {
271
- this.$parent.areaShow = false;
272
- this.$parent.usershow=true
273
- this.$parent.f_residential_area_id=f_residential_area_id
274
- this.$parent.f_residential_area=f_residential_area
275
- },
276
- hidden() {
277
- this.criteriaShow = !this.criteriaShow
278
- },
279
- search() {
280
- this.$refs.paged.$refs.cri.search()
281
- },
282
-
283
- async delete(row){
284
- if(row.id){
285
- var id = row.id
286
- let useraredss = await this.$resetpost('api/af-revenue/sql/address_singleTable',
287
- {data: {
288
- items: 'f_residential_area_id',
289
- tablename: 't_user_address',
290
- condition: `f_residential_area_id='${id}'`}
291
- },
292
- {resolveMsg: null, rejectMsg: null})
293
- if(useraredss.data.length>0){
294
- this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
295
- }else{
296
- this.$resetdelete('api/af-revenue/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
297
- this.$dispatch('cancel')
298
- })
299
- }
300
- }
301
- },
302
- deleteall(){
303
- let msg =`共计删除${this.checkitem.length}个小区,请确认删除操作`
304
- this.$showMessage(msg, ['confirm', 'cancel']).then((res) => {
305
- if (res === 'confirm') {
306
- //发出事件,用于建档或修正档案
307
- this.$resetpost('api/af-revenue/logic/deleteAreaAll',{data:{arr:this.checkitem}}).then((res)=>{
308
- this.search()
309
- })
310
- }
311
- })
312
-
313
-
314
- },
315
- add(val){
316
- if (this.f_filialeids) {
317
- this.$refs.paged.$refs.grid.selectStore.selected = null
318
- this.$dispatch('add')
319
- } else {
320
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
321
- }
322
- },
323
- modify(val){
324
- this.$refs.paged.$refs.grid.selectStore.selected = null
325
- this.$dispatch('modify',val)
326
- },
327
- selfSearch (args) {
328
- this.checkall = false;
329
- this.$parent.usershow = false;
330
- this.$parent.areaShow = false;
331
- if (!this.f_orgid) {
332
- this.getorg([this.$login.f.orgid])
333
- }
334
- console.log('查询。。。', this.f_orgid)
335
- if(this.f_special){
336
- args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
337
- }else{
338
- args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
339
- }
340
- this.condition = args.condition
341
- this.model.search(args.condition, args.model)
342
- },
343
- //清空
344
- clear(){
345
- this.$refs.paged.$refs.cri.model = {}
346
- },
347
- getorg (val) {
348
- this.f_orgid = this.$login.convertToIn(val)
349
- this.f_filialeids = val[0]
350
- }
351
- },
352
- watch:{
353
-
354
- }
355
-
356
- }
357
- </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">
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">街&emsp;&emsp;道</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="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
42
+ <label class="font_normal_body">户数大于</label>
43
+ <input type="text" class="input_search" style="width:60%" v-model="model.areacount"
44
+ condition="isnull(resi.areacount,0) >= '{}'" placeholder="使用人数大于等于"/>
45
+ </div>
46
+ <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
47
+ <label class="font_normal_body">户数小于</label>
48
+ <input type="text" class="input_search" style="width:60%" v-model="model.areacount_end"
49
+ condition="isnull(resi.areacount,0) <='{}'" placeholder="使用人数小于等于"/>
50
+ </div>
51
+ <div class="col-sm-4 form-group button-range">
52
+ <button class="button_search button_spacing" @click="search()" >查询</button>
53
+ <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
54
+ <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
55
+ <button v-if="$parent.$parent.checkitem.length>=1" class="button_clear button_spacing" @click="$parent.$parent.deleteall()">批量删除</button>
56
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
57
+ <export-excel :data="$parent.$parent.getCondition" :defaultselect="$parent.$parent.getfield"
58
+ :field="$parent.$parent.getfield"
59
+ sqlurl="api/af-revenue/logic/exportfile" sql-name="address_getarealist" template-name='小区导出'
60
+ :choose-col="true"></export-excel>
61
+ <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>
62
+ </div>
63
+ </div>
64
+ <div class="row" v-if="$parent.$parent.criteriaShow">
65
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
66
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
67
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
68
+ condition="f_city like '%{}%'" placeholder="城市"
69
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
70
+ </div>
71
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
72
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
73
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
74
+ condition="f_district like '%{}%'" placeholder="区县"
75
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
76
+ </div>
77
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
78
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
79
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
80
+ condition="f_street like '%{}%'" placeholder="街道"
81
+ :size="model.f_street ? model.f_street.length*2 : 6"/>
82
+ </div>
83
+ <div :class="$parent.$parent.style">
84
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
85
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
86
+ condition="f_residential_area like '%{}%'" placeholder="小区"
87
+ :size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
88
+ </div>
89
+
90
+ </div>
91
+ </div>
92
+
93
+
94
+ </criteria>
95
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
96
+ <template partial='head'>
97
+ <tr>
98
+ <th>
99
+ <input
100
+ type="checkbox"
101
+ v-model="$parent.$parent.$parent.checkall"
102
+ @change="$parent.$parent.$parent.chooseAll"
103
+ />
104
+ </th>
105
+ <th><nobr>序号</nobr></th>
106
+ <th v-if="false"><nobr>省份</nobr></th>
107
+ <th v-if="false"><nobr>城市</nobr></th>
108
+ <th><nobr>区/县</nobr></th>
109
+ <th><nobr>街道名称</nobr></th>
110
+ <!--民用小区信息开始-->
111
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
112
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
113
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区备注</nobr></th>
114
+ <!--民用小区信息结束-->
115
+ <!--非民用单位信息开始-->
116
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
117
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
118
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
119
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
120
+ <!--非民用单位信息结束-->
121
+ <th><nobr>片区/管理站 </nobr></th>
122
+ <th><nobr>使用人数 </nobr></th>
123
+ <th><nobr>首次通气日期 </nobr></th>
124
+ <th><nobr>通气年限 </nobr></th>
125
+ <th><nobr>关联地址 </nobr></th>
126
+ <th><nobr>操作人</nobr></th>
127
+ <th><nobr>操作日期</nobr></th>
128
+ <th><nobr>操作</nobr></th>
129
+
130
+ </tr>
131
+ </template>
132
+ <template partial='body'>
133
+ <tr>
134
+ <td style="text-align: center">
135
+ <input
136
+ v-if="row.areacount===0"
137
+ :id="model.pageIndex"
138
+ type="checkbox"
139
+ @change="$parent.$parent.$parent.chooseOne($event, row, model.rows)"
140
+ :checked="$parent.$parent.$parent.ischecked(row.id)"
141
+ />
142
+ </td>
143
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
144
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
145
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
146
+ <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
147
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
148
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
149
+ <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
150
+ <td style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
151
+ <!--非民用单位信息开始-->
152
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
153
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
154
+ <!--非民用单位信息结束-->
155
+ <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
156
+ <td style="text-align:center"><button @click.stop="$parent.$parent.$parent.operate(row.id,row.f_residential_area)" class="btn btn-link">{{row.areacount}}</button></td>
157
+ <td style="text-align:center"><nobr>{{row.addresscount}}</nobr></td>
158
+ <td style="text-align:center"><nobr>{{row.open_date}}</nobr></td>
159
+ <td style="text-align:center"><nobr>{{row.yeardiff}}</nobr></td>
160
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
161
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
162
+ <td><nobr>
163
+ <!--<button type="button" name="button" class="btn btn-link"
164
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
165
+ <button type="button" name="button" class="btn btn-link" v-if="row.areacount===0"
166
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
167
+ </nobr></td>
168
+ </tr>
169
+ </template>
170
+ <template partial='foot'></template>
171
+ </data-grid>
172
+ </criteria-paged>
173
+ </div>
174
+ </template>
175
+
176
+ <script>
177
+ import { PagedList } from 'vue-client'
178
+
179
+ export default {
180
+
181
+ data () {
182
+ return {
183
+ checkall:false,
184
+ checkitem:[],
185
+ criteriaShow: false,
186
+ model: new PagedList('api/af-revenue/sql/address_getarealist',50),
187
+ addflag: false,
188
+ addtitle:'',
189
+ condition:'',
190
+ // 公司下拉
191
+ curorgid: [this.$login.f.orgid],
192
+ f_orgid: ''
193
+ }
194
+ },
195
+ title: '小区管理',
196
+ computed:{
197
+ getCondition() {
198
+ return {condition: this.condition}
199
+ },
200
+ getfield() {
201
+ let filed =[]
202
+ if(this.f_special){
203
+ filed = {'f_district': '区/县', 'f_street': '街道名称','f_residential_area':'小区名称','f_area_address': '详细地址','f_comments': '小区备注', 'f_slice_area': '片区/管理站','areacount':'使用人数',
204
+ 'open_date': '首次通气时间','yeardiff': '通气年限','f_operator': '操作人','f_operate_date': '操作日期'}
205
+ }else {
206
+ filed = {'f_district': '区/县', 'f_street': '街道名称','f_residential_area':'单位名称','f_area_address': '单位地址','f_comments': '小区备注','f_linkname':'联系人', 'f_linkphone':'联系电话','f_slice_area': '片区/管理站','areacount':'使用人数',
207
+ 'open_date': '首次通气时间','yeardiff': '通气年限','f_operator': '操作人','f_operate_date': '操作日期'}
208
+ }
209
+ return filed
210
+ },
211
+ ischeckall(){
212
+ let arr =[]
213
+ for(let i=0;i<this.model.rows.length;i++){
214
+ if(this.model.rows[i].areacount<1){
215
+ arr.push(this.model.rows[i].id)
216
+ }
217
+ }
218
+ if(arr.sort().toString()===this.checkitem.sort().toString() && this.checkitem.length>0){
219
+ console.log(arr.sort().toString())
220
+ console.log(this.checkitem.sort().toString())
221
+ // this.checkall = true
222
+ } else {
223
+ // this.checkall = false
224
+ }
225
+ // return this.checkall
226
+ }
227
+ },
228
+ props:{
229
+ f_filialeids:{
230
+ type: String
231
+ },
232
+ style: {
233
+ type: String,
234
+ default: 'col-sm-2 form-group'
235
+ },
236
+ f_special:{
237
+ type: String
238
+ }
239
+ },
240
+ ready(){
241
+ this.search()
242
+ },
243
+ methods: {
244
+ chooseAll(){
245
+ console.log(this.checkall)
246
+ if(this.checkall){
247
+ this.checkitem = []
248
+ for(let i=0;i<this.model.rows.length;i++){
249
+ if(this.model.rows[i].areacount<1){
250
+ this.checkitem.push(this.model.rows[i].id)
251
+ }
252
+ }
253
+ }else{
254
+ this.checkitem = []
255
+ }
256
+ },
257
+ chooseOne(e, row, rows) {
258
+ console.log("row", row);
259
+ let checked = e.target.checked;
260
+ console.log("state", e.target.checked);
261
+ if(checked===false){
262
+ this.checkitem.splice(this.checkitem.indexOf(row.id), 1)
263
+ } else {
264
+ this.checkitem.push(row.id)
265
+ }
266
+ },
267
+ ischecked(row){
268
+ return this.checkitem.indexOf(row)>-1
269
+ },
270
+ operate (f_residential_area_id,f_residential_area) {
271
+ this.$parent.areaShow = false;
272
+ this.$parent.usershow=true
273
+ this.$parent.f_residential_area_id=f_residential_area_id
274
+ this.$parent.f_residential_area=f_residential_area
275
+ },
276
+ hidden() {
277
+ this.criteriaShow = !this.criteriaShow
278
+ },
279
+ search() {
280
+ this.$refs.paged.$refs.cri.search()
281
+ },
282
+
283
+ async delete(row){
284
+ if(row.id){
285
+ var id = row.id
286
+ let useraredss = await this.$resetpost('api/af-revenue/sql/address_singleTable',
287
+ {data: {
288
+ items: 'f_residential_area_id',
289
+ tablename: 't_user_address',
290
+ condition: `f_residential_area_id='${id}'`}
291
+ },
292
+ {resolveMsg: null, rejectMsg: null})
293
+ if(useraredss.data.length>0){
294
+ this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
295
+ }else{
296
+ this.$resetdelete('api/af-revenue/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
297
+ this.$dispatch('cancel')
298
+ })
299
+ }
300
+ }
301
+ },
302
+ deleteall(){
303
+ let msg =`共计删除${this.checkitem.length}个小区,请确认删除操作`
304
+ this.$showMessage(msg, ['confirm', 'cancel']).then((res) => {
305
+ if (res === 'confirm') {
306
+ //发出事件,用于建档或修正档案
307
+ this.$resetpost('api/af-revenue/logic/deleteAreaAll',{data:{arr:this.checkitem}}).then((res)=>{
308
+ this.search()
309
+ })
310
+ }
311
+ })
312
+
313
+
314
+ },
315
+ add(val){
316
+ if (this.f_filialeids) {
317
+ this.$refs.paged.$refs.grid.selectStore.selected = null
318
+ this.$dispatch('add')
319
+ } else {
320
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
321
+ }
322
+ },
323
+ modify(val){
324
+ this.$refs.paged.$refs.grid.selectStore.selected = null
325
+ this.$dispatch('modify',val)
326
+ },
327
+ selfSearch (args) {
328
+ this.checkall = false;
329
+ this.$parent.usershow = false;
330
+ this.$parent.areaShow = false;
331
+ if (!this.f_orgid) {
332
+ this.getorg([this.$login.f.orgid])
333
+ }
334
+ console.log('查询。。。', this.f_orgid)
335
+ if(this.f_special){
336
+ args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
337
+ }else{
338
+ args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
339
+ }
340
+ this.condition = args.condition
341
+ this.model.search(args.condition, args.model)
342
+ },
343
+ //清空
344
+ clear(){
345
+ this.$refs.paged.$refs.cri.model = {}
346
+ },
347
+ getorg (val) {
348
+ this.f_orgid = this.$login.convertToIn(val)
349
+ this.f_filialeids = val[0]
350
+ }
351
+ },
352
+ watch:{
353
+
354
+ }
355
+
356
+ }
357
+ </script>