address-client 4.0.21 → 4.0.22

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.
@@ -1,413 +0,0 @@
1
- <template>
2
- <div class="flex" @keyup.enter="search">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div :class="$parent.$parent.style">
8
- <label class="font_normal_body">组织机构</label>
9
- <res-select restype='organization'
10
- @res-select="$parent.$parent.getorg"
11
- is-mul="false"
12
- :initresid='$parent.$parent.curorgid'>
13
- </res-select>
14
- </div>
15
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
16
- <label class="font_normal_body">小区编号</label>
17
- <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
18
- condition="f_area_id = '{}'" placeholder="小区编号"/>
19
- </div>
20
- <div :class="$parent.$parent.style" v-if="false">
21
- <label class="font_normal_body">省&emsp;&emsp;份</label>
22
- <input type="text" class="input_search" style="width:60%" v-model="model.f_province"
23
- condition="f_province like '%{}%'" placeholder="省份"/>
24
- </div>
25
- <!--<div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">-->
26
- <div :class="$parent.$parent.style" v-if="false">
27
- <label class="font_normal_body">城&emsp;&emsp;市</label>
28
- <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
29
- condition="f_city like '%{}%'" placeholder="城市"/>
30
- </div>
31
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
32
- <label class="font_normal_body">区&emsp;&emsp;县</label>
33
- <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
34
- condition="f_district like '%{}%'" placeholder="区县"/>
35
- </div>
36
- <div :class="$parent.$parent.style" v-if="!$parent.$parent.$parent.areaShow">
37
- <label class="font_normal_body">街道/乡镇</label>
38
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
39
- condition="f_street like '%{}%'" placeholder="街道/乡镇"/>
40
- </div>
41
- <div class="col-sm-4 form-group button-range">
42
- <button class="button_search button_spacing" @click="search()" >查询</button>
43
- <button class="button_search button_spacing" @click="$parent.$parent.batchDelete()">批量删除</button>
44
- <button v-if="!$parent.$parent.f_special" class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('小区')">添加小区</button>
45
- <button v-if="$parent.$parent.f_special"class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add('单位')">添加单位</button>
46
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
47
- <export-excel :data="$parent.$parent.getCondition"
48
- :field="$parent.$parent.getfield"
49
- sqlurl="api/af-revenue/logic/exportfile"
50
- sql-name="manage_getarealist"
51
- template-name='小区信息查询导出'
52
- :choose-col="true"></export-excel>
53
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
54
- </div>
55
- </div>
56
- <div class="row" v-if="$parent.$parent.criteriaShow">
57
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
58
- <label class="font_normal_body">小区编号</label>
59
- <input type="text" class="input_search" style="width:60%" v-model="model.f_area_id"
60
- condition="f_area_id = '{}'" placeholder="小区编号"/>
61
- </div>
62
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
63
- <label class="font_normal_body">城&emsp;&emsp;市</label>
64
- <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
65
- condition="f_city like '%{}%'" placeholder="城市"
66
- :size="model.f_city ? model.f_city.length*2 : 6"/>
67
- </div>
68
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
69
- <label class="font_normal_body">区&emsp;&emsp;县</label>
70
- <input type="text" class="input_search" style="width:60%" v-model="model.f_district"
71
- condition="f_district like '%{}%'" placeholder="区县"
72
- :size="model.f_district ? model.f_district.length*2 : 6"/>
73
- </div>
74
- <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
75
- <label class="font_normal_body">街道/乡镇</label>
76
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
77
- condition="f_street like '%{}%'" placeholder="街道/乡镇"
78
- :size="model.f_street ? model.f_street.length*2 : 6"/>
79
- </div>
80
- <div :class="$parent.$parent.style">
81
- <label class="font_normal_body">小区名称</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"/>
85
- </div>
86
- <div :class="$parent.$parent.style">
87
- <label class="font_normal_body">房屋类型</label>
88
- <v-select :options='$parent.$parent.housetype' :value.sync="model.f_house_type"
89
- close-on-select condition="f_house_type='{}'"
90
- placeholder='房屋类型' v-model="model.f_house_type"></v-select>
91
- </div>
92
- <div :class="$parent.$parent.style">
93
- <label class="font_normal_body">安装位置</label>
94
- <v-select :options='$parent.$parent.position' :value.sync="model.f_position"
95
- close-on-select condition="f_position='{}'"
96
- placeholder='安装位置' v-model="model.f_position"></v-select>
97
- </div>
98
- <div :class="$parent.$parent.style">
99
- <label class="font_normal_body">&emsp;抄表员</label>
100
- <v-select :options='$parent.$parent.inputtores' :value.sync="model.f_inputtor"
101
- close-on-select condition="f_inputtor='{}'"
102
- placeholder='抄表员' v-model="model.f_inputtor"></v-select>
103
- </div>
104
- </div>
105
- </div>
106
- </criteria>
107
-
108
- <data-grid :model="model" partial='list' class="list_area table_sy" :optional="true" v-ref:grid>
109
- <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
- <th><nobr>社区</nobr></th>
116
- <!--民用小区信息开始-->
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 && !$parent.$parent.$parent.$parent.areaShow"><nobr>小区备注</nobr></th>
120
- <!--民用小区信息结束-->
121
- <!--非民用单位信息开始-->
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
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
126
- <!--非民用单位信息结束-->
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 v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>片区/管理站 </nobr></th>
131
- <th><nobr>操作人</nobr></th>
132
- <th><nobr>操作日期</nobr></th>
133
- <th title="该小区下现有的地址数"><nobr>地址数</nobr></th>
134
- <th><nobr>操作</nobr></th>
135
- </template>
136
- <template partial='body'>
137
- <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
138
- <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
139
- <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
140
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
141
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
142
- <td style="text-align:center"><nobr>{{row.f_community}}</nobr></td>
143
- <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
144
- <td style="text-align:center"><nobr>{{row.f_area_address}}</nobr></td>
145
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
146
- <!--非民用单位信息开始-->
147
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
148
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
149
- <!--非民用单位信息结束-->
150
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_inputtor}}</nobr></td>
151
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_house_type}}</nobr></td>
152
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_position}}</nobr></td>
153
- <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
154
- <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
155
- <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
156
- <td style="text-align:center"><nobr>{{row.addressnum}}</nobr></td>
157
- <td><nobr>
158
- <!--<button type="button" name="button" class="btn btn-link"
159
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
160
- <button v-if="!row.addressnum>0" type="button" name="button" class="btn btn-danger"
161
- style="padding: 5px 12px"
162
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
163
- </nobr>
164
- </td>
165
- </template>
166
- <template partial='foot'></template>
167
- </data-grid>
168
- </criteria-paged>
169
- <modal :show="showDelete" large backdrop="false" :width="900">
170
- <header slot="modal-header" class="modal-header">
171
- <p class="bg-info text-center" style="padding: 8px;">提示</p>
172
- </header>
173
- <article slot="modal-body" class="modal-body">
174
- <p>您一共选中{{selectDataLen}}个小区,您确定是否要删除吗?</p>
175
- </article>
176
- <footer slot="modal-footer" class="modal-footer">
177
- <button v-show="showDelete" type="button" class="button_search button_spacing" @click='confirmDelete()' :disabled='!$v.valid'>确认</button>
178
- <button v-show="showDelete" type="button" class="button_clear button_spacing" @click='cancelDelete()'>取消</button>
179
- </footer>
180
- </modal>
181
- </div>
182
- </template>
183
-
184
- <script>
185
- import { PagedList } from 'vue-client'
186
- let readyGen = async function (self) {
187
- self.getfield = self.config.excelHeaders
188
- self.search()
189
- }
190
- export default {
191
-
192
- data () {
193
- return {
194
- showDelete: false,
195
- criteriaShow: false,
196
- model: new PagedList('api/af-revenue/sql/address_getarealist',20),
197
- selectDataLen: 0,
198
- addflag: false,
199
- addtitle:'',
200
- getfield: {},
201
- getRowData:[],
202
- // 公司下拉
203
- curorgid: [this.$login.f.orgid],
204
- f_orgid: '',
205
- //初始化小区数据
206
- areaslist:[],
207
- config: {
208
- // 导出列要和查询列相同
209
- excelHeaders: {
210
- 'f_district':'区/县',
211
- 'f_street':'街道名称',
212
- 'f_community':'社区名称',
213
- 'f_residential_area':'小区名称',
214
- 'f_area_address':'小区地址',
215
- 'f_comments':'小区备注',
216
- 'f_inputtor':'抄表员',
217
- 'f_house_type':'房屋类型',
218
- 'f_position':'安装位置',
219
- 'f_slice_area':'片区/管理站',
220
- 'f_operator':'操作人',
221
- 'f_operate_date':'操作日期',
222
- 'addressnum':'地址数'
223
- }
224
- },
225
- housetype:[{label:'全部',value:''},{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
226
- position:this.$appdata.getParam('安装位置')?[{label:'全部',value:''},...this.$appdata.getParam('安装位置')]:[{label:'全部',value:''}]
227
- }
228
- },
229
- title: '小区管理',
230
- props:{
231
- f_filialeids:{
232
- type: String
233
- },
234
- style: {
235
- type: String,
236
- default: 'col-sm-2 form-group'
237
- },
238
- f_special:{
239
- type: String
240
- }
241
- },
242
- ready(){
243
- readyGen(this)
244
-
245
- },
246
- methods: {
247
- hidden() {
248
- this.criteriaShow = !this.criteriaShow
249
- },
250
- search() {
251
- this.$refs.paged.$refs.cri.search()
252
- },
253
-
254
- async delete(row){
255
- if(row.id >= 0){
256
- var id = row.id
257
- let useraredss = await this.$resetpost('api/af-revenue/sql/address_singleTable',
258
- {data: {
259
- items: 'f_residential_area_id',
260
- tablename: 't_user_address',
261
- condition: `f_residential_area_id='${id}'`}
262
- },
263
- {resolveMsg: null, rejectMsg: null})
264
- if(useraredss.data.length>0){
265
- this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
266
- }else{
267
- this.$resetdelete('api/af-revenue/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
268
- this.$dispatch('cancel')
269
- })
270
- }
271
- }
272
- },
273
- add(val){
274
- if (this.f_filialeids) {
275
- this.$refs.paged.$refs.grid.selectStore.selected = null
276
- this.$dispatch('add')
277
- } else {
278
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
279
- }
280
- },
281
- modify(val){
282
- this.$refs.paged.$refs.grid.selectStore.selected = null
283
- this.$dispatch('modify',val)
284
- },
285
- selfSearch (args) {
286
-
287
- if (!this.f_orgid) {
288
- this.getorg([this.$login.f.orgid])
289
- }
290
- if(this.f_special){
291
- args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
292
- }else{
293
- args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
294
- }
295
- this.model.search(args.condition, args.model)
296
- },
297
- //清空
298
- clear(){
299
- this.$refs.paged.$refs.cri.model = {}
300
- },
301
- getorg (val) {
302
- this.f_orgid = this.$login.convertToIn(val)
303
- this.f_filialeids = val[0]
304
- },
305
- async batchDelete () {
306
- let flag = true
307
- if (this.f_filialeids) {
308
- if (this.$refs.paged.$refs.grid.getRowData().length != 0) {
309
- // 获取要批量删除的小区数据
310
- this.getRowData = this.$refs.paged.$refs.grid.getRowData()
311
- this.getRowData.forEach((row,n) => {
312
- console.log(JSON.stringify(row) + '==========')
313
- if (row.addressnum > 0 ) {
314
- this.$showAlert('您所选择的小区下已有地址信息,无法删除!','warning',2000)
315
- this.selectDataLen = 0
316
- flag = false
317
- }
318
- })
319
- if(flag){
320
- this.selectDataLen = this.getRowData.length
321
- console.log(this.selectDataLen + '-----------------------')
322
- this.showDelete = true
323
- }
324
- } else {
325
- this.$showAlert('请至少选择一项!', 'warning', 2000)
326
- }
327
- }else {
328
- this.$showAlert('请先选择左上角的所在分公司!', 'warning', 2000)
329
- }
330
- },
331
- confirmDelete () {
332
- let msg = {
333
- resolveMsg: '批量删除成功!',
334
- rejectMsg: '批量删除失败!'
335
- }
336
- let oldAreaIds = this.getRowData
337
- console.log('所选中的小区信息:=======' + JSON.stringify(oldAreaIds))
338
- this.$resetpost('api/af-revenue/logic/batchDelete',{
339
- data:{
340
- oldAreaIds:oldAreaIds,
341
- f_operator: this.$login.f.name,
342
- f_operatorid: this.$login.f.id,
343
- f_orgid: this.$login.f.orgid,
344
- f_orgname: this.$login.f.orgs,
345
- f_depid: this.$login.f.depids,
346
- f_depname: this.$login.f.deps
347
- }
348
- },msg)
349
- this.$refs.paged.$refs.grid.selectInit()
350
- this.$refs.paged.$refs.cri.search()
351
- this.showDelete = false
352
- },
353
- cancelDelete () {
354
- this.$refs.paged.$refs.grid.selectInit()
355
- this.$refs.paged.$refs.cri.search()
356
- this.showDelete = false
357
- },
358
- // areaChange(val){
359
- // console.log("小区变化",val)
360
- // let selectArea // 选中的小区数据
361
- // for (let row of this.areaslist) {
362
- // if (val == row.value) {
363
- // selectArea = row.data
364
- // break
365
- // }
366
- // }
367
- // if (selectArea) {
368
- // this.areamodel.f_residential_area_id = selectArea.id
369
- // this.areamodel.f_pcd = selectArea.f_pcd
370
- // this.areamodel.f_pcd_id = selectArea.f_pcd_id
371
- // this.areamodel.f_street = selectArea.f_street
372
- // this.areamodel.f_street_id = selectArea.f_street_id
373
- // this.areamodel.f_slice_area = selectArea.f_slice_area
374
- // this.areamodel.f_residential_area = selectArea.f_residential_area
375
- // }
376
- // this.$nextTick(() => {
377
- // this.$resetValidation()
378
- // })
379
- // },
380
- },
381
- watch:{
382
-
383
- },
384
- computed:{
385
- getCondition() {
386
- var condition=''
387
- if(this.f_special){
388
- condition = `${this.$refs.paged.$refs.cri.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
389
- }else{
390
- condition = `${this.$refs.paged.$refs.cri.condition} and s.f_filialeid = ${this.f_orgid}`
391
- }
392
- return {
393
- condition: condition
394
- }
395
- },
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>