address-client 3.2.105 → 3.2.106-shimen

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