address-client 3.2.97 → 3.2.99
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.
- package/build/dev-server.js +174 -174
- package/package.json +1 -1
- package/src/address.js +74 -74
- package/src/components/AddStreetOrPcd.vue +320 -320
- package/src/components/CommunityAreaList.vue +87 -87
- package/src/components/CommunityManage.vue +78 -78
- package/src/components/StreetList.vue +240 -240
- package/src/components/UserAddress.vue +889 -898
- package/src/filiale/WEINAN/AreaList.vue +413 -413
- package/src/filiale/WEINAN/AreaUserList.vue +226 -225
- package/src/filiale/tongchuan/AddStreetOrPcd.vue +351 -351
- package/src/filiale/tongchuan/StreetList.vue +215 -215
- package/src/filiale/xinkang/AddAreaMsg.vue +780 -780
- package/src/filiale/xinkang/AreaList.vue +413 -413
- package/src/filiale/xinkang/sale.js +9 -9
- package/src/main.js +22 -22
|
@@ -1,413 +1,413 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex" @keyup.enter="search">
|
|
3
|
-
<criteria-paged :model="model" v-ref:paged @dblclick="handDblclick">
|
|
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">省  份</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">城  市</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">区  县</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
|
-
<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>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="row" v-if="$parent.$parent.criteriaShow">
|
|
51
|
-
<div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
|
|
52
|
-
<label class="font_normal_body">城  市</label>
|
|
53
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_city"
|
|
54
|
-
condition="f_city like '%{}%'" placeholder="城市"
|
|
55
|
-
:size="model.f_city ? model.f_city.length*2 : 6"/>
|
|
56
|
-
</div>
|
|
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_district"
|
|
60
|
-
condition="f_district like '%{}%'" placeholder="区县"
|
|
61
|
-
:size="model.f_district ? model.f_district.length*2 : 6"/>
|
|
62
|
-
</div>
|
|
63
|
-
<div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
|
|
64
|
-
<label class="font_normal_body">街  道</label>
|
|
65
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_street"
|
|
66
|
-
condition="f_street like '%{}%'" placeholder="街道"
|
|
67
|
-
:size="model.f_street ? model.f_street.length*2 : 6"/>
|
|
68
|
-
</div>
|
|
69
|
-
<div :class="$parent.$parent.style">
|
|
70
|
-
<label class="font_normal_body">小  区</label>
|
|
71
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
|
|
72
|
-
condition="f_residential_area like '%{}%'" placeholder="小区"
|
|
73
|
-
:size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
|
|
74
|
-
</div>
|
|
75
|
-
<div :class="$parent.$parent.style">
|
|
76
|
-
<label class="font_normal_body">房屋类型</label>
|
|
77
|
-
<v-select :options='$parent.$parent.housetype' :value.sync="model.f_use_institution"
|
|
78
|
-
close-on-select condition="f_use_institution='{}'"
|
|
79
|
-
placeholder='房屋类型' v-model="model.f_use_institution"></v-select>
|
|
80
|
-
</div>
|
|
81
|
-
<div :class="$parent.$parent.style">
|
|
82
|
-
<label class="font_normal_body">安装位置</label>
|
|
83
|
-
<v-select :options='$parent.$parent.position' :value.sync="model.f_position"
|
|
84
|
-
close-on-select condition="f_position='{}'"
|
|
85
|
-
placeholder='安装位置' v-model="model.f_position"></v-select>
|
|
86
|
-
</div>
|
|
87
|
-
<div :class="$parent.$parent.style">
|
|
88
|
-
<label class="font_normal_body"> 抄表员</label>
|
|
89
|
-
<v-select :options='$parent.$parent.inputtores' :value.sync="model.f_inputtor"
|
|
90
|
-
close-on-select condition="f_inputtor='{}'"
|
|
91
|
-
placeholder='抄表员' v-model="model.f_inputtor"></v-select>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</criteria>
|
|
98
|
-
<data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :optional="true">
|
|
99
|
-
<template partial='head'>
|
|
100
|
-
<th v-if="false"><nobr>省份</nobr></th>
|
|
101
|
-
<th v-if="false"><nobr>城市</nobr></th>
|
|
102
|
-
<th><nobr>街道名称</nobr></th>
|
|
103
|
-
<!--民用小区信息开始-->
|
|
104
|
-
<th v-if="!$parent.$parent.$parent.f_special"><nobr>小区编号</nobr></th>
|
|
105
|
-
<th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
|
|
106
|
-
<th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
|
|
107
|
-
<th v-if="!$parent.$parent.$parent.f_special && !$parent.$parent.$parent.$parent.areaShow"><nobr>小区备注</nobr></th>
|
|
108
|
-
<!--民用小区信息结束-->
|
|
109
|
-
<!--非民用单位信息开始-->
|
|
110
|
-
<th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
|
|
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
|
-
<th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>通气时间</nobr></th>
|
|
116
|
-
<th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>现有户数</nobr></th>
|
|
117
|
-
<th><nobr>操作人</nobr></th>
|
|
118
|
-
<th><nobr>操作日期</nobr></th>
|
|
119
|
-
<th><nobr>操作</nobr></th>
|
|
120
|
-
</template>
|
|
121
|
-
<template partial='body'>
|
|
122
|
-
<td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
|
|
123
|
-
<td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
|
|
124
|
-
<td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
|
|
125
|
-
<td style="text-align:center"><nobr>{{row.f_area_id}}</nobr></td>
|
|
126
|
-
<td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
|
|
127
|
-
<td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
|
|
128
|
-
<td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
|
|
129
|
-
<!--非民用单位信息开始-->
|
|
130
|
-
<td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
|
|
131
|
-
<td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
|
|
132
|
-
<!--非民用单位信息结束-->
|
|
133
|
-
<td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.gasdate}}</nobr></td>
|
|
134
|
-
<td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center">
|
|
135
|
-
<nobr>
|
|
136
|
-
<span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.addressnum}}</a></span>
|
|
137
|
-
</nobr></td>
|
|
138
|
-
<td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
|
|
139
|
-
<td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
|
|
140
|
-
<td><nobr>
|
|
141
|
-
<!--<button type="button" name="button" class="btn btn-link"
|
|
142
|
-
@click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
|
|
143
|
-
<button v-if="(row.addressnum === 0)" type="button" name="button" class="btn btn-danger"
|
|
144
|
-
style="padding: 5px 12px"
|
|
145
|
-
@click.stop="$parent.$parent.$parent.delete(row)">删除</button>
|
|
146
|
-
</nobr></td>
|
|
147
|
-
</template>
|
|
148
|
-
<template partial='foot'></template>
|
|
149
|
-
</data-grid>
|
|
150
|
-
</criteria-paged>
|
|
151
|
-
<modal :show="showDelete" large backdrop="false" :width="900">
|
|
152
|
-
<header slot="modal-header" class="modal-header">
|
|
153
|
-
<p class="bg-info text-center" style="padding: 8px;">请选择目标小区</p>
|
|
154
|
-
</header>
|
|
155
|
-
<article slot="modal-body" class="modal-body">
|
|
156
|
-
<validator name='v'>
|
|
157
|
-
<div class="col-sm-6 form-group ">
|
|
158
|
-
<label class="font_normal_body">小区名称</label>
|
|
159
|
-
<input type="text" style="width:41%" v-show="false" v-validate:f_residential_area_id='{required: true }' v-model="areamodel.f_residential_area_id">
|
|
160
|
-
<v-select :value.sync="areamodel.f_residential_area_id" :value-single="true"
|
|
161
|
-
@change="areaChange"
|
|
162
|
-
:options='areaslist' placeholder='请选择'
|
|
163
|
-
close-on-select search="true">
|
|
164
|
-
</v-select>
|
|
165
|
-
</div>
|
|
166
|
-
</validator>
|
|
167
|
-
</article>
|
|
168
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
169
|
-
<button v-show="showDelete" type="button" class="button_search button_spacing" @click='confirmDelete()' :disabled='!$v.valid'>确认</button>
|
|
170
|
-
<button v-show="showDelete" type="button" class="button_clear button_spacing" @click='cancelDelete()'>取消</button>
|
|
171
|
-
</footer>
|
|
172
|
-
</modal>
|
|
173
|
-
</div>
|
|
174
|
-
<table class="table-hover">
|
|
175
|
-
<tr style="position: relative" class="table-bordered">
|
|
176
|
-
<td
|
|
177
|
-
style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
|
|
178
|
-
汇总信息
|
|
179
|
-
</td>
|
|
180
|
-
<td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
|
|
181
|
-
共有用户: {{sumsmodel.addressnum}}户
|
|
182
|
-
</td>
|
|
183
|
-
<td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
|
|
184
|
-
共有小区: {{sumsmodel.f_count}}个
|
|
185
|
-
</td>
|
|
186
|
-
</tr>
|
|
187
|
-
</table>
|
|
188
|
-
</template>
|
|
189
|
-
|
|
190
|
-
<script>
|
|
191
|
-
import { PagedList } from 'vue-client'
|
|
192
|
-
|
|
193
|
-
export default {
|
|
194
|
-
|
|
195
|
-
data () {
|
|
196
|
-
return {
|
|
197
|
-
criteriaShow: false,
|
|
198
|
-
model: new PagedList('rs/sql/address_getarealist',20,{},{addressnum: 0,f_count:0}),
|
|
199
|
-
addflag: false,
|
|
200
|
-
addtitle:'',
|
|
201
|
-
|
|
202
|
-
// 公司下拉
|
|
203
|
-
curorgid: [this.$login.f.orgid],
|
|
204
|
-
f_orgid: '',
|
|
205
|
-
handmonth:[{label:'全部',value:''},{label:'单月',value:'单月'},{label:'双月',value:'双月'}],
|
|
206
|
-
housetype:[{label:'全部',value:''},...this.$appdata.getParam('房屋类型')],
|
|
207
|
-
position:this.$appdata.getParam('安装位置')?[{label:'全部',value:''},...this.$appdata.getParam('安装位置')]:[{label:'全部',value:''}],
|
|
208
|
-
// 合计数据
|
|
209
|
-
sumsmodel: {},
|
|
210
|
-
//初始化小区数据
|
|
211
|
-
areaslist:[],
|
|
212
|
-
// 目标小区数据
|
|
213
|
-
areamodel: {
|
|
214
|
-
f_residential_area_id: '',
|
|
215
|
-
f_pcd: '',
|
|
216
|
-
f_pcd_id: '',
|
|
217
|
-
f_street: '',
|
|
218
|
-
f_street_id: '',
|
|
219
|
-
f_slice_area: '',
|
|
220
|
-
f_residential_area: ''
|
|
221
|
-
},
|
|
222
|
-
showDelete: false,
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
title: '小区管理',
|
|
226
|
-
props:{
|
|
227
|
-
f_filialeids:{
|
|
228
|
-
type: String
|
|
229
|
-
},
|
|
230
|
-
style: {
|
|
231
|
-
type: String,
|
|
232
|
-
default: 'col-sm-2 form-group'
|
|
233
|
-
},
|
|
234
|
-
f_special:{
|
|
235
|
-
type: String
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
ready(){
|
|
239
|
-
this.search()
|
|
240
|
-
},
|
|
241
|
-
methods: {
|
|
242
|
-
handDblclick(row){
|
|
243
|
-
console.log('row',row)
|
|
244
|
-
this.$dispatch("child-dblclick",row)
|
|
245
|
-
},
|
|
246
|
-
dealmsg (row) {
|
|
247
|
-
this.$dispatch('shouAreaAllUser',row)
|
|
248
|
-
},
|
|
249
|
-
hidden() {
|
|
250
|
-
this.criteriaShow = !this.criteriaShow
|
|
251
|
-
},
|
|
252
|
-
search() {
|
|
253
|
-
this.$refs.paged.$refs.cri.search()
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
async delete(row){
|
|
257
|
-
if(row.id){
|
|
258
|
-
var id = row.id
|
|
259
|
-
let useraredss = await this.$resetpost('rs/sql/address_singleTable',
|
|
260
|
-
{data: {
|
|
261
|
-
items: 'f_residential_area_id',
|
|
262
|
-
tablename: 't_user_address',
|
|
263
|
-
condition: `f_residential_area_id='${id}'`}
|
|
264
|
-
},
|
|
265
|
-
{resolveMsg: null, rejectMsg: null})
|
|
266
|
-
if(useraredss.data.length>0){
|
|
267
|
-
this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
|
|
268
|
-
}else{
|
|
269
|
-
this.$resetdelete('rs/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
270
|
-
this.$dispatch('cancel')
|
|
271
|
-
})
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
add(val){
|
|
276
|
-
if (this.f_filialeids) {
|
|
277
|
-
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
278
|
-
this.$dispatch('add')
|
|
279
|
-
} else {
|
|
280
|
-
this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
modify(val){
|
|
284
|
-
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
285
|
-
this.$dispatch('modify',val)
|
|
286
|
-
},
|
|
287
|
-
selfSearch (args) {
|
|
288
|
-
|
|
289
|
-
if (!this.f_orgid) {
|
|
290
|
-
this.getorg([this.$login.f.orgid])
|
|
291
|
-
}
|
|
292
|
-
console.log('查询。。。', this.f_orgid)
|
|
293
|
-
if(this.f_special){
|
|
294
|
-
args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
|
|
295
|
-
}else{
|
|
296
|
-
args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
|
|
297
|
-
}
|
|
298
|
-
this.model.search(args.condition, args.model)
|
|
299
|
-
this.sumsmodel = this.$refs.paged.$refs.grid.model.sums;
|
|
300
|
-
},
|
|
301
|
-
//清空
|
|
302
|
-
clear(){
|
|
303
|
-
this.$refs.paged.$refs.cri.model = {}
|
|
304
|
-
},
|
|
305
|
-
getorg (val) {
|
|
306
|
-
this.f_orgid = this.$login.convertToIn(val)
|
|
307
|
-
this.f_filialeids = val[0]
|
|
308
|
-
},
|
|
309
|
-
async batchDelete () {
|
|
310
|
-
if (this.f_filialeids) {
|
|
311
|
-
if (this.$refs.paged.$refs.grid.getRowData().length != 0) {
|
|
312
|
-
this.showDelete = true
|
|
313
|
-
let condition = `a.f_orgid = '${this.f_filialeids}'`
|
|
314
|
-
let req = await this.$resetpost('rs/sql/address_getresidential', {
|
|
315
|
-
data: {
|
|
316
|
-
condition: condition
|
|
317
|
-
}
|
|
318
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
319
|
-
let redata = []
|
|
320
|
-
req.data.forEach((row) => {
|
|
321
|
-
redata.push({
|
|
322
|
-
label: row.f_residential_area,
|
|
323
|
-
value: row.id,
|
|
324
|
-
data: row,
|
|
325
|
-
id: row.id
|
|
326
|
-
})
|
|
327
|
-
})
|
|
328
|
-
this.areaslist = redata
|
|
329
|
-
} else {
|
|
330
|
-
this.$showAlert('请至少选择一项!', 'warning', 2000)
|
|
331
|
-
}
|
|
332
|
-
}else {
|
|
333
|
-
this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
confirmDelete () {
|
|
337
|
-
let msg = {
|
|
338
|
-
resolveMsg: '批量删除成功',
|
|
339
|
-
rejectMsg: '批量删除失败!'
|
|
340
|
-
}
|
|
341
|
-
let oldAreaIds = []
|
|
342
|
-
// 获取要批量删除的小区数据
|
|
343
|
-
this.$refs.paged.$refs.grid.getRowData().forEach((row,n) => {
|
|
344
|
-
oldAreaIds[n] = row.id
|
|
345
|
-
})
|
|
346
|
-
this.$resetpost('rs/logic/batchDelete',{
|
|
347
|
-
data:{
|
|
348
|
-
areamodel:this.areamodel,
|
|
349
|
-
oldAreaIds:oldAreaIds,
|
|
350
|
-
f_operator: this.$login.f.name,
|
|
351
|
-
f_operatorid: this.$login.f.id,
|
|
352
|
-
f_orgid: this.$login.f.orgid,
|
|
353
|
-
f_orgname: this.$login.f.orgs,
|
|
354
|
-
f_depid: this.$login.f.depids,
|
|
355
|
-
f_depname: this.$login.f.deps
|
|
356
|
-
}
|
|
357
|
-
},msg)
|
|
358
|
-
this.$refs.paged.$refs.grid.selectInit()
|
|
359
|
-
this.$refs.paged.$refs.cri.search()
|
|
360
|
-
this.areamodel.f_residential_area_id = ''
|
|
361
|
-
this.showDelete = false
|
|
362
|
-
},
|
|
363
|
-
cancelDelete () {
|
|
364
|
-
this.$refs.paged.$refs.grid.selectInit()
|
|
365
|
-
this.$refs.paged.$refs.cri.search()
|
|
366
|
-
this.areamodel.f_residential_area_id = ''
|
|
367
|
-
this.showDelete = false
|
|
368
|
-
},
|
|
369
|
-
areaChange(val){
|
|
370
|
-
console.log("小区变化",val)
|
|
371
|
-
let selectArea // 选中的小区数据
|
|
372
|
-
for (let row of this.areaslist) {
|
|
373
|
-
if (val == row.value) {
|
|
374
|
-
selectArea = row.data
|
|
375
|
-
break
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
if (selectArea) {
|
|
379
|
-
this.areamodel.f_residential_area_id = selectArea.id
|
|
380
|
-
this.areamodel.f_pcd = selectArea.f_pcd
|
|
381
|
-
this.areamodel.f_pcd_id = selectArea.f_pcd_id
|
|
382
|
-
this.areamodel.f_street = selectArea.f_street
|
|
383
|
-
this.areamodel.f_street_id = selectArea.f_street_id
|
|
384
|
-
this.areamodel.f_slice_area = selectArea.f_slice_area
|
|
385
|
-
this.areamodel.f_residential_area = selectArea.f_residential_area
|
|
386
|
-
}
|
|
387
|
-
this.$nextTick(() => {
|
|
388
|
-
this.$resetValidation()
|
|
389
|
-
})
|
|
390
|
-
},
|
|
391
|
-
},
|
|
392
|
-
watch:{
|
|
393
|
-
|
|
394
|
-
},
|
|
395
|
-
computed:{
|
|
396
|
-
inputtores () {
|
|
397
|
-
// 获取抄表员
|
|
398
|
-
let rs = new Array()
|
|
399
|
-
if (this.$login.f.f_gasman.length > 0) {
|
|
400
|
-
for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
|
|
401
|
-
let temp = {
|
|
402
|
-
label: this.$login.f.f_gasman[i].name,
|
|
403
|
-
value: this.$login.f.f_gasman[i].name
|
|
404
|
-
}
|
|
405
|
-
rs.push(temp)
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
return rs
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
}
|
|
413
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex" @keyup.enter="search">
|
|
3
|
+
<criteria-paged :model="model" v-ref:paged @dblclick="handDblclick">
|
|
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">省  份</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">城  市</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">区  县</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
|
+
<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>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="row" v-if="$parent.$parent.criteriaShow">
|
|
51
|
+
<div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
|
|
52
|
+
<label class="font_normal_body">城  市</label>
|
|
53
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_city"
|
|
54
|
+
condition="f_city like '%{}%'" placeholder="城市"
|
|
55
|
+
:size="model.f_city ? model.f_city.length*2 : 6"/>
|
|
56
|
+
</div>
|
|
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_district"
|
|
60
|
+
condition="f_district like '%{}%'" placeholder="区县"
|
|
61
|
+
:size="model.f_district ? model.f_district.length*2 : 6"/>
|
|
62
|
+
</div>
|
|
63
|
+
<div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
|
|
64
|
+
<label class="font_normal_body">街  道</label>
|
|
65
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_street"
|
|
66
|
+
condition="f_street like '%{}%'" placeholder="街道"
|
|
67
|
+
:size="model.f_street ? model.f_street.length*2 : 6"/>
|
|
68
|
+
</div>
|
|
69
|
+
<div :class="$parent.$parent.style">
|
|
70
|
+
<label class="font_normal_body">小  区</label>
|
|
71
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
|
|
72
|
+
condition="f_residential_area like '%{}%'" placeholder="小区"
|
|
73
|
+
:size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
|
|
74
|
+
</div>
|
|
75
|
+
<div :class="$parent.$parent.style">
|
|
76
|
+
<label class="font_normal_body">房屋类型</label>
|
|
77
|
+
<v-select :options='$parent.$parent.housetype' :value.sync="model.f_use_institution"
|
|
78
|
+
close-on-select condition="f_use_institution='{}'"
|
|
79
|
+
placeholder='房屋类型' v-model="model.f_use_institution"></v-select>
|
|
80
|
+
</div>
|
|
81
|
+
<div :class="$parent.$parent.style">
|
|
82
|
+
<label class="font_normal_body">安装位置</label>
|
|
83
|
+
<v-select :options='$parent.$parent.position' :value.sync="model.f_position"
|
|
84
|
+
close-on-select condition="f_position='{}'"
|
|
85
|
+
placeholder='安装位置' v-model="model.f_position"></v-select>
|
|
86
|
+
</div>
|
|
87
|
+
<div :class="$parent.$parent.style">
|
|
88
|
+
<label class="font_normal_body"> 抄表员</label>
|
|
89
|
+
<v-select :options='$parent.$parent.inputtores' :value.sync="model.f_inputtor"
|
|
90
|
+
close-on-select condition="f_inputtor='{}'"
|
|
91
|
+
placeholder='抄表员' v-model="model.f_inputtor"></v-select>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
</criteria>
|
|
98
|
+
<data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :optional="true">
|
|
99
|
+
<template partial='head'>
|
|
100
|
+
<th v-if="false"><nobr>省份</nobr></th>
|
|
101
|
+
<th v-if="false"><nobr>城市</nobr></th>
|
|
102
|
+
<th><nobr>街道名称</nobr></th>
|
|
103
|
+
<!--民用小区信息开始-->
|
|
104
|
+
<th v-if="!$parent.$parent.$parent.f_special"><nobr>小区编号</nobr></th>
|
|
105
|
+
<th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
|
|
106
|
+
<th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
|
|
107
|
+
<th v-if="!$parent.$parent.$parent.f_special && !$parent.$parent.$parent.$parent.areaShow"><nobr>小区备注</nobr></th>
|
|
108
|
+
<!--民用小区信息结束-->
|
|
109
|
+
<!--非民用单位信息开始-->
|
|
110
|
+
<th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
|
|
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
|
+
<th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>通气时间</nobr></th>
|
|
116
|
+
<th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>现有户数</nobr></th>
|
|
117
|
+
<th><nobr>操作人</nobr></th>
|
|
118
|
+
<th><nobr>操作日期</nobr></th>
|
|
119
|
+
<th><nobr>操作</nobr></th>
|
|
120
|
+
</template>
|
|
121
|
+
<template partial='body'>
|
|
122
|
+
<td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
|
|
123
|
+
<td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
|
|
124
|
+
<td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
|
|
125
|
+
<td style="text-align:center"><nobr>{{row.f_area_id}}</nobr></td>
|
|
126
|
+
<td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
|
|
127
|
+
<td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
|
|
128
|
+
<td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
|
|
129
|
+
<!--非民用单位信息开始-->
|
|
130
|
+
<td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
|
|
131
|
+
<td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
|
|
132
|
+
<!--非民用单位信息结束-->
|
|
133
|
+
<td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.gasdate}}</nobr></td>
|
|
134
|
+
<td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center">
|
|
135
|
+
<nobr>
|
|
136
|
+
<span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.addressnum}}</a></span>
|
|
137
|
+
</nobr></td>
|
|
138
|
+
<td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
|
|
139
|
+
<td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
|
|
140
|
+
<td><nobr>
|
|
141
|
+
<!--<button type="button" name="button" class="btn btn-link"
|
|
142
|
+
@click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
|
|
143
|
+
<button v-if="(row.addressnum === 0)" type="button" name="button" class="btn btn-danger"
|
|
144
|
+
style="padding: 5px 12px"
|
|
145
|
+
@click.stop="$parent.$parent.$parent.delete(row)">删除</button>
|
|
146
|
+
</nobr></td>
|
|
147
|
+
</template>
|
|
148
|
+
<template partial='foot'></template>
|
|
149
|
+
</data-grid>
|
|
150
|
+
</criteria-paged>
|
|
151
|
+
<modal :show="showDelete" large backdrop="false" :width="900">
|
|
152
|
+
<header slot="modal-header" class="modal-header">
|
|
153
|
+
<p class="bg-info text-center" style="padding: 8px;">请选择目标小区</p>
|
|
154
|
+
</header>
|
|
155
|
+
<article slot="modal-body" class="modal-body">
|
|
156
|
+
<validator name='v'>
|
|
157
|
+
<div class="col-sm-6 form-group ">
|
|
158
|
+
<label class="font_normal_body">小区名称</label>
|
|
159
|
+
<input type="text" style="width:41%" v-show="false" v-validate:f_residential_area_id='{required: true }' v-model="areamodel.f_residential_area_id">
|
|
160
|
+
<v-select :value.sync="areamodel.f_residential_area_id" :value-single="true"
|
|
161
|
+
@change="areaChange"
|
|
162
|
+
:options='areaslist' placeholder='请选择'
|
|
163
|
+
close-on-select search="true">
|
|
164
|
+
</v-select>
|
|
165
|
+
</div>
|
|
166
|
+
</validator>
|
|
167
|
+
</article>
|
|
168
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
169
|
+
<button v-show="showDelete" type="button" class="button_search button_spacing" @click='confirmDelete()' :disabled='!$v.valid'>确认</button>
|
|
170
|
+
<button v-show="showDelete" type="button" class="button_clear button_spacing" @click='cancelDelete()'>取消</button>
|
|
171
|
+
</footer>
|
|
172
|
+
</modal>
|
|
173
|
+
</div>
|
|
174
|
+
<table class="table-hover">
|
|
175
|
+
<tr style="position: relative" class="table-bordered">
|
|
176
|
+
<td
|
|
177
|
+
style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
|
|
178
|
+
汇总信息
|
|
179
|
+
</td>
|
|
180
|
+
<td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
|
|
181
|
+
共有用户: {{sumsmodel.addressnum}}户
|
|
182
|
+
</td>
|
|
183
|
+
<td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
|
|
184
|
+
共有小区: {{sumsmodel.f_count}}个
|
|
185
|
+
</td>
|
|
186
|
+
</tr>
|
|
187
|
+
</table>
|
|
188
|
+
</template>
|
|
189
|
+
|
|
190
|
+
<script>
|
|
191
|
+
import { PagedList } from 'vue-client'
|
|
192
|
+
|
|
193
|
+
export default {
|
|
194
|
+
|
|
195
|
+
data () {
|
|
196
|
+
return {
|
|
197
|
+
criteriaShow: false,
|
|
198
|
+
model: new PagedList('rs/sql/address_getarealist',20,{},{addressnum: 0,f_count:0}),
|
|
199
|
+
addflag: false,
|
|
200
|
+
addtitle:'',
|
|
201
|
+
|
|
202
|
+
// 公司下拉
|
|
203
|
+
curorgid: [this.$login.f.orgid],
|
|
204
|
+
f_orgid: '',
|
|
205
|
+
handmonth:[{label:'全部',value:''},{label:'单月',value:'单月'},{label:'双月',value:'双月'}],
|
|
206
|
+
housetype:[{label:'全部',value:''},...this.$appdata.getParam('房屋类型')],
|
|
207
|
+
position:this.$appdata.getParam('安装位置')?[{label:'全部',value:''},...this.$appdata.getParam('安装位置')]:[{label:'全部',value:''}],
|
|
208
|
+
// 合计数据
|
|
209
|
+
sumsmodel: {},
|
|
210
|
+
//初始化小区数据
|
|
211
|
+
areaslist:[],
|
|
212
|
+
// 目标小区数据
|
|
213
|
+
areamodel: {
|
|
214
|
+
f_residential_area_id: '',
|
|
215
|
+
f_pcd: '',
|
|
216
|
+
f_pcd_id: '',
|
|
217
|
+
f_street: '',
|
|
218
|
+
f_street_id: '',
|
|
219
|
+
f_slice_area: '',
|
|
220
|
+
f_residential_area: ''
|
|
221
|
+
},
|
|
222
|
+
showDelete: false,
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
title: '小区管理',
|
|
226
|
+
props:{
|
|
227
|
+
f_filialeids:{
|
|
228
|
+
type: String
|
|
229
|
+
},
|
|
230
|
+
style: {
|
|
231
|
+
type: String,
|
|
232
|
+
default: 'col-sm-2 form-group'
|
|
233
|
+
},
|
|
234
|
+
f_special:{
|
|
235
|
+
type: String
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
ready(){
|
|
239
|
+
this.search()
|
|
240
|
+
},
|
|
241
|
+
methods: {
|
|
242
|
+
handDblclick(row){
|
|
243
|
+
console.log('row',row)
|
|
244
|
+
this.$dispatch("child-dblclick",row)
|
|
245
|
+
},
|
|
246
|
+
dealmsg (row) {
|
|
247
|
+
this.$dispatch('shouAreaAllUser',row)
|
|
248
|
+
},
|
|
249
|
+
hidden() {
|
|
250
|
+
this.criteriaShow = !this.criteriaShow
|
|
251
|
+
},
|
|
252
|
+
search() {
|
|
253
|
+
this.$refs.paged.$refs.cri.search()
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
async delete(row){
|
|
257
|
+
if(row.id){
|
|
258
|
+
var id = row.id
|
|
259
|
+
let useraredss = await this.$resetpost('rs/sql/address_singleTable',
|
|
260
|
+
{data: {
|
|
261
|
+
items: 'f_residential_area_id',
|
|
262
|
+
tablename: 't_user_address',
|
|
263
|
+
condition: `f_residential_area_id='${id}'`}
|
|
264
|
+
},
|
|
265
|
+
{resolveMsg: null, rejectMsg: null})
|
|
266
|
+
if(useraredss.data.length>0){
|
|
267
|
+
this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
|
|
268
|
+
}else{
|
|
269
|
+
this.$resetdelete('rs/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
270
|
+
this.$dispatch('cancel')
|
|
271
|
+
})
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
add(val){
|
|
276
|
+
if (this.f_filialeids) {
|
|
277
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
278
|
+
this.$dispatch('add')
|
|
279
|
+
} else {
|
|
280
|
+
this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
modify(val){
|
|
284
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
285
|
+
this.$dispatch('modify',val)
|
|
286
|
+
},
|
|
287
|
+
selfSearch (args) {
|
|
288
|
+
|
|
289
|
+
if (!this.f_orgid) {
|
|
290
|
+
this.getorg([this.$login.f.orgid])
|
|
291
|
+
}
|
|
292
|
+
console.log('查询。。。', this.f_orgid)
|
|
293
|
+
if(this.f_special){
|
|
294
|
+
args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
|
|
295
|
+
}else{
|
|
296
|
+
args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
|
|
297
|
+
}
|
|
298
|
+
this.model.search(args.condition, args.model)
|
|
299
|
+
this.sumsmodel = this.$refs.paged.$refs.grid.model.sums;
|
|
300
|
+
},
|
|
301
|
+
//清空
|
|
302
|
+
clear(){
|
|
303
|
+
this.$refs.paged.$refs.cri.model = {}
|
|
304
|
+
},
|
|
305
|
+
getorg (val) {
|
|
306
|
+
this.f_orgid = this.$login.convertToIn(val)
|
|
307
|
+
this.f_filialeids = val[0]
|
|
308
|
+
},
|
|
309
|
+
async batchDelete () {
|
|
310
|
+
if (this.f_filialeids) {
|
|
311
|
+
if (this.$refs.paged.$refs.grid.getRowData().length != 0) {
|
|
312
|
+
this.showDelete = true
|
|
313
|
+
let condition = `a.f_orgid = '${this.f_filialeids}'`
|
|
314
|
+
let req = await this.$resetpost('rs/sql/address_getresidential', {
|
|
315
|
+
data: {
|
|
316
|
+
condition: condition
|
|
317
|
+
}
|
|
318
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
319
|
+
let redata = []
|
|
320
|
+
req.data.forEach((row) => {
|
|
321
|
+
redata.push({
|
|
322
|
+
label: row.f_residential_area,
|
|
323
|
+
value: row.id,
|
|
324
|
+
data: row,
|
|
325
|
+
id: row.id
|
|
326
|
+
})
|
|
327
|
+
})
|
|
328
|
+
this.areaslist = redata
|
|
329
|
+
} else {
|
|
330
|
+
this.$showAlert('请至少选择一项!', 'warning', 2000)
|
|
331
|
+
}
|
|
332
|
+
}else {
|
|
333
|
+
this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
confirmDelete () {
|
|
337
|
+
let msg = {
|
|
338
|
+
resolveMsg: '批量删除成功',
|
|
339
|
+
rejectMsg: '批量删除失败!'
|
|
340
|
+
}
|
|
341
|
+
let oldAreaIds = []
|
|
342
|
+
// 获取要批量删除的小区数据
|
|
343
|
+
this.$refs.paged.$refs.grid.getRowData().forEach((row,n) => {
|
|
344
|
+
oldAreaIds[n] = row.id
|
|
345
|
+
})
|
|
346
|
+
this.$resetpost('rs/logic/batchDelete',{
|
|
347
|
+
data:{
|
|
348
|
+
areamodel:this.areamodel,
|
|
349
|
+
oldAreaIds:oldAreaIds,
|
|
350
|
+
f_operator: this.$login.f.name,
|
|
351
|
+
f_operatorid: this.$login.f.id,
|
|
352
|
+
f_orgid: this.$login.f.orgid,
|
|
353
|
+
f_orgname: this.$login.f.orgs,
|
|
354
|
+
f_depid: this.$login.f.depids,
|
|
355
|
+
f_depname: this.$login.f.deps
|
|
356
|
+
}
|
|
357
|
+
},msg)
|
|
358
|
+
this.$refs.paged.$refs.grid.selectInit()
|
|
359
|
+
this.$refs.paged.$refs.cri.search()
|
|
360
|
+
this.areamodel.f_residential_area_id = ''
|
|
361
|
+
this.showDelete = false
|
|
362
|
+
},
|
|
363
|
+
cancelDelete () {
|
|
364
|
+
this.$refs.paged.$refs.grid.selectInit()
|
|
365
|
+
this.$refs.paged.$refs.cri.search()
|
|
366
|
+
this.areamodel.f_residential_area_id = ''
|
|
367
|
+
this.showDelete = false
|
|
368
|
+
},
|
|
369
|
+
areaChange(val){
|
|
370
|
+
console.log("小区变化",val)
|
|
371
|
+
let selectArea // 选中的小区数据
|
|
372
|
+
for (let row of this.areaslist) {
|
|
373
|
+
if (val == row.value) {
|
|
374
|
+
selectArea = row.data
|
|
375
|
+
break
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (selectArea) {
|
|
379
|
+
this.areamodel.f_residential_area_id = selectArea.id
|
|
380
|
+
this.areamodel.f_pcd = selectArea.f_pcd
|
|
381
|
+
this.areamodel.f_pcd_id = selectArea.f_pcd_id
|
|
382
|
+
this.areamodel.f_street = selectArea.f_street
|
|
383
|
+
this.areamodel.f_street_id = selectArea.f_street_id
|
|
384
|
+
this.areamodel.f_slice_area = selectArea.f_slice_area
|
|
385
|
+
this.areamodel.f_residential_area = selectArea.f_residential_area
|
|
386
|
+
}
|
|
387
|
+
this.$nextTick(() => {
|
|
388
|
+
this.$resetValidation()
|
|
389
|
+
})
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
watch:{
|
|
393
|
+
|
|
394
|
+
},
|
|
395
|
+
computed:{
|
|
396
|
+
inputtores () {
|
|
397
|
+
// 获取抄表员
|
|
398
|
+
let rs = new Array()
|
|
399
|
+
if (this.$login.f.f_gasman.length > 0) {
|
|
400
|
+
for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
|
|
401
|
+
let temp = {
|
|
402
|
+
label: this.$login.f.f_gasman[i].name,
|
|
403
|
+
value: this.$login.f.f_gasman[i].name
|
|
404
|
+
}
|
|
405
|
+
rs.push(temp)
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return rs
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
}
|
|
413
|
+
</script>
|