address-client 3.1.3 → 3.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
@@ -0,0 +1,671 @@
1
+ <template>
2
+ <div class="span">
3
+ <validator name='v'>
4
+ <div class="form-horizontal select-overspread container-fluid" style="overflow-y: auto">
5
+ <div class="row auto">
6
+ <div class="col-sm-12 bg-info text-center" style="padding: 8px;font-size: 18px;font-weight: bold">
7
+ <!-- <span v-if="operation=='add'&&!f_specia">添加{{areatype}}</span>-->
8
+ <!-- <span v-if="operation=='modify'&&!f_special">修改【{{areamodel.f_residential_area}}】小区</span>-->
9
+ <span v-if="operation=='add'&&!f_specia">添加集收单位</span>
10
+ <span v-if="operation=='modify'&&!f_special">修改集收单位</span>
11
+ <span v-if="operation=='add'&&f_specia">添加{{areatype}}</span>
12
+ <span v-if="operation=='modify'&&f_special">修改【{{areamodel.f_residential_area}}】单位</span>
13
+ </div>
14
+ <!--基本小区(单位)信息-->
15
+ <div class="col-sm-6 form-group" v-if="!config.hasnumber">
16
+ <label class="font_normal_body">单位编号</label>
17
+ <input type="text" class="input_search" style="width:60%" v-model="areamodel.f_area_id"
18
+ @blur="areaidChange" placeholder="单位编号">
19
+ </div>
20
+
21
+ <div class="col-sm-6 form-group" v-if="config.hasnumber"
22
+ :class="[$v.f_area_id.required ? 'has-error' : 'has-success']">
23
+ <label class="font_normal_body">单位编号</label>
24
+ <input type="number" class="input_search" style="width:60%" v-model="areamodel.f_area_id"
25
+ v-validate:f_area_id='{required: true }'
26
+ @change="areaidChangeHasnumber" placeholder="单位编号">
27
+ </div>
28
+
29
+ <div class="col-sm-6 form-group"
30
+ :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
31
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
32
+ <input type="text" class="input_search" class="input_search" style="width:60%" v-show="false" v-model="areamodel.f_pcd_id"
33
+ v-validate:f_pcd_id='{required: true }'>
34
+ <v-select
35
+ :value.sync="areamodel.f_pcd_id" :value-single="true"
36
+ :options='pcdslist' placeholder='请选择'
37
+ close-on-select search="true" @change="pcdChange">
38
+ </v-select>
39
+ </div>
40
+ <div class="col-sm-6 form-group"
41
+ :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
42
+ <label class="font_normal_body">街道/乡镇</label>
43
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_street_id"
44
+ v-validate:f_street_id='{required: true }'>
45
+ <v-select
46
+ :value.sync="areamodel.f_street_id" :value-single="true"
47
+ :options='streetslist' placeholder='请选择'
48
+ close-on-select search="true" @change="streetChange">
49
+ </v-select>
50
+ </div>
51
+ <div class="col-sm-6 form-group" :class="[$v.slice.required ? 'has-error' : 'has-success']">
52
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
53
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"
54
+ v-validate:slice='{required: true }'>
55
+ <v-select :value.sync="areamodel.slice_area" v-model="areamodel.slice_area"
56
+ :options='sliceArea' placeholder='片区/管理站' filer-key="name"
57
+ close-on-select v-ref:slice>
58
+ </v-select>
59
+ </div>
60
+ <!--小区(特殊)信息-->
61
+ <div v-if="!f_special"
62
+ class="col-sm-6 form-group"
63
+ :class="[$v.f_residential_area.required ? 'has-error' : 'has-success']">
64
+ <label class="font_normal_body">单位名称</label>
65
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_residential_area"
66
+ class="form-control" placeholder="小区名称"
67
+ v-validate:f_residential_area='{required: true }'>
68
+ </div>
69
+ <div v-if="!f_special"
70
+ class="col-sm-12 form-group">
71
+ <label class="font_normal_body">单位地址</label>
72
+ <input type="text" style="width:80%" class="input_search" v-model="areamodel.f_area_address"
73
+ class="form-control" placeholder="单位地址">
74
+ </div>
75
+ <!--单位(特殊)信息-->
76
+ <div v-if="f_special"
77
+ class="col-sm-6 form-group"
78
+ :class="[$v.f_residential_area.required ? 'has-error' : 'has-success']">
79
+ <label class="font_normal_body">单位名称</label>
80
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_residential_area"
81
+ class="form-control" placeholder="单位名称"
82
+ v-validate:f_residential_area='{required: true }'>
83
+ </div>
84
+ <div v-if="f_special"
85
+ class="col-sm-12 form-group">
86
+ <label class="font_normal_body">单位地址</label>
87
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_area_address"
88
+ class="form-control" placeholder="单位地址">
89
+ </div>
90
+ <div v-if="f_special"
91
+ class="col-sm-6 form-group"
92
+ :class="[$v.f_linkname.required ? 'has-error' : 'has-success']">
93
+ <label class="font_normal_body">联&ensp;系&ensp;人</label>
94
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_linkname"
95
+ class="form-control" placeholder="联系人"
96
+ v-validate:f_linkname='{required: true }'>
97
+ </div>
98
+ <div v-if="f_special"
99
+ class="col-sm-6 form-group"
100
+ :class="[$v.f_linkphone.required ? 'has-error' : 'has-success']">
101
+ <label class="font_normal_body">联系电话</label>
102
+ <input type="text" style="width:60%" class="input_search" v-model="areamodel.f_linkphone"
103
+ class="form-control" placeholder="联系电话"
104
+ v-validate:f_linkphone='{required: true }'>
105
+ </div>
106
+ <div class="col-sm-12 form-group">
107
+ <label class="font_normal_body " style="">备&emsp;&emsp;注</label>
108
+ <textarea class="input_textarea" rows="3" style="margin-top:20px;width:80%;height: auto;" v-model="areamodel.f_comments"></textarea>
109
+ </div>
110
+ <div class="col-sm-12 form-group">
111
+ <br/>
112
+ </div>
113
+ <!--表具信息-->
114
+ <div v-if="!f_special" class="col-sm-12 bg-info text-center" style="padding: 8px;font-size: 18px;font-weight: bold">
115
+ <span >默认表具信息</span>
116
+ </div>
117
+ <div v-if="!f_special" class="row">
118
+ <div class="col-sm-6 form-group">
119
+ <label class="font_normal_body">用户类型</label>
120
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_user_type">
121
+ <v-select
122
+ :value.sync="areamodel.f_user_type" :value-single="true"
123
+ :options='usertypes' placeholder='用户类型' @change="userTypeChange"
124
+ close-on-select >
125
+ </v-select>
126
+ </div>
127
+ <div class="col-sm-6 form-group">
128
+ <label class="font_normal_body">用气性质</label>
129
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_gasproperties">
130
+ <v-select
131
+ :value.sync="areamodel.f_gasproperties" :value-single="true"
132
+ :options='gasproperties' placeholder='用气性质'
133
+ close-on-select >
134
+ </v-select>
135
+ </div>
136
+ <div class="col-sm-6 form-group">
137
+ <label class="font_normal_body">气价类型</label>
138
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_price_type">
139
+ <v-select
140
+ :value.sync="areamodel.f_price_type" :value-single="true"
141
+ :options='f_price_types' placeholder='气价类型'
142
+ close-on-select >
143
+ </v-select>
144
+ </div>
145
+ <div class="col-sm-6 form-group">
146
+ <label class="font_normal_body">气价名称</label>
147
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_price_name">
148
+ <v-select
149
+ :value.sync="areamodel.f_price_name" :value-single="true"
150
+ :options='pricenames' placeholder='气价名称'
151
+ close-on-select >
152
+ </v-select>
153
+ </div>
154
+ <div class="col-sm-6 form-group">
155
+ <label class="font_normal_body">气表品牌</label>
156
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_meter_brand">
157
+ <v-select
158
+ :value.sync="areamodel.f_meter_brand" :value-single="true"
159
+ :options='meterbrands' placeholder='气表品牌'
160
+ close-on-select >
161
+ </v-select>
162
+ </div>
163
+ <div class="col-sm-6 form-group">
164
+ <label class="font_normal_body">气表型号</label>
165
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_meter_style">
166
+ <v-select
167
+ :value.sync="areamodel.f_meter_style" :value-single="true"
168
+ :options='meterstyle' placeholder='气表型号'
169
+ close-on-select >
170
+ </v-select>
171
+ </div>
172
+ <div class="col-sm-6 form-group" :class="[$v.f_meter_type.required ? 'has-error' : 'has-success']">
173
+ <label class="font_normal_body">气表类型</label>
174
+ <input type="text" style="width:60%" class="input_search" v-show="false"
175
+ v-model="areamodel.f_meter_type">
176
+ <v-select :value.sync="areamodel.f_meter_type" :value-single="true"
177
+ :options='metertypes' placeholder='请选择'
178
+ close-on-select></v-select>
179
+ </div>
180
+ <div class="col-sm-6 form-group" v-if="isMachine">
181
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
182
+ <input type="text" style="width:60%" class="input_search" v-show="false"
183
+ v-model="areamodel.f_meter_book">
184
+ <v-select
185
+ :value.sync="areamodel.f_meter_book" :value-single="true"
186
+ :options='meterbooks' placeholder='抄表册'
187
+ close-on-select >
188
+ </v-select>
189
+ </div>
190
+ <div class="col-sm-6 form-group" v-if="!isMachine" :class="[$v.f_meter_book.required ? 'has-error' : 'has-success']">
191
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
192
+ <input type="text" style="width:60%" class="input_search" v-show="false"
193
+ v-model="areamodel.f_meter_book">
194
+ <v-select
195
+ :value.sync="areamodel.f_meter_book" :value-single="true"
196
+ :options='meterbooks' placeholder='抄表册'
197
+ close-on-select >
198
+ </v-select>
199
+ </div>
200
+ <div class="col-sm-6 form-group" :class="[$v.f_inputtor.required ? 'has-error' : 'has-success']">
201
+ <label class="font_normal_body">抄&ensp;表&ensp;员</label>
202
+ <input type="text" style="width:60%" class="input_search"
203
+ v-show="false" v-model="areamodel.f_inputtor">
204
+ <v-select
205
+ :value.sync="areamodel.f_inputtor" :value-single="true"
206
+ :options='inputtores' placeholder='抄表员'
207
+ close-on-select >
208
+ </v-select>
209
+ </div>
210
+ <div class="col-sm-6 form-group" :class="[$v.f_adjustable_id.required ? 'has-error' : 'has-success']">
211
+ <label class="font_normal_body">调&ensp;压&ensp;箱</label>
212
+ <input type="text" style="width:60%" class="input_search" v-show="false"
213
+ v-model="areamodel.f_adjustable_id">
214
+ <v-select
215
+ :value.sync="areamodel.f_adjustable_id" :value-single="true"
216
+ :options='adjustables' placeholder='调压箱'
217
+ close-on-select >
218
+ </v-select>
219
+ </div>
220
+ <div class="col-sm-6 form-group" :class="[$v.f_house_type.required ? 'has-error' : 'has-success']">
221
+ <label class="font_normal_body">房屋类型</label>
222
+ <input type="text" style="width:60%" class="input_search" v-show="false"
223
+ v-model="areamodel.f_house_type" >
224
+ <v-select
225
+ :value.sync="areamodel.f_house_type" :value-single="true"
226
+ :options='housetypeoptions' placeholder='房屋类型'
227
+ close-on-select >
228
+ </v-select>
229
+ </div>
230
+ <div class="col-sm-6 form-group" :class="[$v.f_position.required ? 'has-error' : 'has-success']">
231
+ <label class="font_normal_body">安装位置</label>
232
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_position" >
233
+ <v-select
234
+ :value.sync="areamodel.f_position" :value-single="true"
235
+ :options='positions' placeholder='安装位置'
236
+ close-on-select >
237
+ </v-select>
238
+ </div>
239
+ </div>
240
+ <div v-if="f_special" class="col-sm-6 form-group">
241
+ <br/>
242
+ </div>
243
+ </div>
244
+ <div class="row auto" style="text-align:right;">
245
+ <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
246
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
247
+ </div>
248
+ </div>
249
+ </validator>
250
+ </div>
251
+ </template>
252
+
253
+ <script>
254
+ import {HttpResetClass} from 'vue-client'
255
+
256
+ let initGen = async function (self) {
257
+ await self.$getConfig(self, 'UserArea')
258
+ console.log('原地址配置',self.config)
259
+ console.log('获取地址配置',self.config)
260
+ Object.assign(self.model, self.config)
261
+ await self.initdata()
262
+ await self.$LoadParams.loadMeterBook(self.f_filialeids)
263
+ await self.loadMeterBooks();
264
+ }
265
+ export default {
266
+ title: '小区添加',
267
+ data () {
268
+ return {
269
+ config:{
270
+ hasnumber:false,
271
+ },
272
+ //初始化省市区数据
273
+ pcdslist:[],
274
+ //初始化街道数据
275
+ streetslist:[],
276
+ //小区
277
+ areamodel: {
278
+ f_area_id: '',
279
+ f_pcd_id:'',
280
+ f_linkname:'',
281
+ f_linkphone:'',
282
+ f_street_id:'',
283
+ f_slice_area:'',
284
+ f_adjustable_id:'',
285
+ f_residential_area:'',
286
+ f_user_type:'',
287
+ f_gasproperties:'',
288
+ f_meter_brand:'',
289
+ f_price_name:'',
290
+ f_area_address:'',
291
+ f_price_type:'',
292
+ f_meter_style:'',
293
+ f_position:'',
294
+ f_comments:'',
295
+ f_meter_type: ''
296
+ },
297
+ meterbrands: [],
298
+ adjustables: [],
299
+ sliceArea: [],
300
+ gasproperties: [],
301
+ meterbooks:[{label: '全部',value: ''}],
302
+ housetypeoptions:[{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
303
+ isMachine: true
304
+ }
305
+ },
306
+ props: ['f_filialeids','f_special', 'areatype','row','operation'],
307
+ ready(){
308
+ initGen(this)
309
+ },
310
+ methods: {
311
+ loadMeterBooks(){
312
+ this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
313
+ },
314
+ //初始化数据
315
+ async initdata(){
316
+ // 初始化参数
317
+ await this.initParams()
318
+
319
+ // 初始化片区
320
+ await this.initSlice(this.f_filialeids)
321
+ await this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
322
+ },
323
+ initrow(val){
324
+ this.areamodel.f_meter_book = val.f_meter_book;
325
+ this.areamodel.f_adjustable_id = val.f_adjustable_id;
326
+ },
327
+ async initParams() {
328
+ await this.$LoadParams.loadParam(this.f_filialeids)
329
+ this.initBrands()
330
+ this.initAdjustables()
331
+ },
332
+
333
+ initBrands () {
334
+ let ret = this.$GetSaleParam.getGasbrand()
335
+ let rs = new Array()
336
+ ret.forEach((item, index) =>{
337
+ rs.push({label: item.label, value: item.value.f_meter_brand})
338
+ })
339
+ this.meterbrands = rs
340
+ },
341
+
342
+ initAdjustables () {
343
+ let filter = this.$login.f.orgid
344
+ let ret = this.$GetSaleParam.getAdjustable(filter)
345
+ let arr = new Array()
346
+ ret.forEach((item, index) => {
347
+ arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
348
+ })
349
+ this.adjustables = arr
350
+ },
351
+
352
+ async initSlice (val) {
353
+ if (val) {
354
+ let getAllArea = await this.$resetpost('/rs/search', {
355
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
356
+ userid: this.$login.f.id
357
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
358
+
359
+ let arr = getAllArea.data.filter((res) => {
360
+ return res.parentid == val
361
+ })
362
+ this.sliceArea = []
363
+ arr.forEach((res) => {
364
+ this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
365
+ })
366
+ }
367
+ },
368
+
369
+ //初始化省市区,添加街道
370
+ async initpcds(pconditon){
371
+ this.pcdslist = []
372
+ let HttpReset = new HttpResetClass()
373
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
374
+ data: {
375
+ items: '*',
376
+ tablename: 't_pcd',
377
+ orderitem: 'id',
378
+ condition: pconditon
379
+ }
380
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
381
+ let redata = []
382
+ req.data.forEach((row, n) => {
383
+ redata[n] = {
384
+ label: row.f_pcd,
385
+ value: row.id,
386
+ data:row,
387
+ id:row.id
388
+ }
389
+ })
390
+ this.pcdslist=redata
391
+
392
+ },
393
+ //初始化街道 添加小区
394
+ async initstreets(pconditon){
395
+ this.streetslist = []
396
+ let HttpReset = new HttpResetClass()
397
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
398
+ data: {
399
+ items: '*',
400
+ tablename: 't_street',
401
+ orderitem: 'id',
402
+ condition: pconditon
403
+ }
404
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
405
+ let redata = []
406
+ req.data.forEach((row, n) => {
407
+ redata[n] = {
408
+ label: row.f_street,
409
+ value: row.id,
410
+ data:row,
411
+ id:row.id
412
+ }
413
+ })
414
+ this.streetslist=redata
415
+ },
416
+ async areaidChangeHasnumber(){
417
+ console.log(this.areamodel.f_area_id.length)
418
+ if (this.areamodel.f_area_id.length != 2){
419
+ this.$showAlert('请输入正确的位数', 'warning', 2000)
420
+ this.areamodel.f_area_id = ''
421
+ }else{
422
+ let res =await this.$resetpost('rs/sql/address_singleTableOrderBy', {
423
+ data: {
424
+ items: '*',
425
+ tablename: 't_area',
426
+ orderitem: 'id',
427
+ condition: `f_area_id = '${this.areamodel.f_area_id}' and f_orgid = '${this.$login.f.orgid}'`
428
+ }
429
+ }, {resolveMsg: null, rejectMsg: null})
430
+ if (res.data.length>0){
431
+ if (res.data[0].id != this.areamodel.id) {
432
+ this.$showAlert('当前编号已存在', 'warning', 2000)
433
+ this.areamodel.f_area_id = ''
434
+ }
435
+ }
436
+ }
437
+ },
438
+ async areaidChange () {
439
+ // 验证小区编号是否已存在
440
+
441
+ let param = {
442
+ id: this.areamodel.id,
443
+ f_area_id: this.areamodel.f_area_id,
444
+ f_filialeid: this.f_filialeids
445
+ }
446
+
447
+ let res = await this.$resetpost('rs/logic/address_validateAreaID', param, {resolveMsg: null,rejectMsg: '小区编号验证失败!!'})
448
+ console.log('验证小区是否存在', res)
449
+ if (res.data) {
450
+ this.$showAlert('这个小区编号已存在!!!请核实', 'warning', 3000)
451
+ this.areamodel.f_area_id = ''
452
+ }
453
+
454
+ },
455
+
456
+
457
+ //根据名字找数据
458
+ findbyid(list,name){
459
+ var result
460
+ list.forEach((row, n) => {
461
+ if(name==row.id){
462
+ result= row.data
463
+ }
464
+ })
465
+ return result
466
+ },
467
+ userTypeChange () {
468
+ this.gasproperties = []
469
+ if (this.areamodel.f_user_type) {
470
+ this.gasproperties = this.$appdata.getParam(this.areamodel.f_user_type)
471
+ }
472
+ },
473
+
474
+ //省/市/区变化
475
+ async pcdChange(val){
476
+ if(val){
477
+ //那就把街道数据重新组织一下
478
+ await this.initstreets(` f_filialeid = '${this.f_filialeids}' and f_pcd_id ='${val}' `)
479
+ if(this.areamodel.f_street_id){
480
+ if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
481
+ let pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
482
+ if(pcd_id!=val){
483
+ this.areamodel.f_street_id=''
484
+ }
485
+ } else {
486
+ this.areamodel.f_street_id=''
487
+ }
488
+
489
+ }
490
+ }
491
+ this.$resetValidation()
492
+ },
493
+ //街道变化
494
+ streetChange(val){
495
+ if(val&&this.operation=='add'){
496
+ // if(this.areamodel.f_pcd_id.length==0){
497
+ if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
498
+ this.areamodel.f_pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
499
+ }
500
+ // }
501
+ }
502
+ this.$resetValidation()
503
+ },
504
+ //保存
505
+ async confirm(){
506
+ await this.savearea()
507
+ this.cleardara()
508
+ this.$dispatch('confirm')
509
+ },
510
+ //保存小区
511
+ async savearea(){
512
+ if(this.f_special){
513
+ this.areamodel.f_special='1'
514
+ }
515
+ this.areamodel.f_filialeid = this.f_filialeids
516
+ this.areamodel.f_operator = this.$login.f.name
517
+ this.areamodel.f_operatorid = this.$login.f.id
518
+ this.areamodel.f_orgid = this.$login.f.orgid
519
+ this.areamodel.f_orgname = this.$login.f.orgs
520
+ this.areamodel.f_depid = this.$login.f.depids
521
+ this.areamodel.f_depname = this.$login.f.deps
522
+ if (this.areamodel.slice_area) {
523
+ if (this.areamodel.slice_area.length > 0) {
524
+ this.areamodel.f_slice_area = this.areamodel.slice_area[0].name
525
+ this.areamodel.f_area_code = this.areamodel.slice_area[0].code
526
+ }
527
+ }
528
+ this.areamodel.f_pcd=this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd
529
+ this.areamodel.f_street=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
530
+
531
+ await this.$resetpost('rs/logic/address_updatearea', this.areamodel)
532
+ },
533
+ cleardara(){
534
+ this.areamodel= {
535
+ f_area_id: '',
536
+ f_pcd_id:'',
537
+ f_street_id:'',
538
+ f_slice_area:'',
539
+ f_linkname:'',
540
+ f_linkphone:'',
541
+ f_adjustable_id:'',
542
+ f_residential_area:'',
543
+ f_user_type:'',
544
+ f_gasproperties:'',
545
+ f_area_address:'',
546
+ f_meter_brand:'',
547
+ f_price_name:'',
548
+ f_price_type:'',
549
+ f_meter_style:'',
550
+ f_position:'',
551
+ f_comments:'',
552
+ f_meter_type: ''
553
+ }
554
+ },
555
+ cancel(){
556
+ this.cleardara()
557
+ this.$dispatch('cancel')
558
+ },
559
+ },
560
+ watch: {
561
+ 'areamodel.f_meter_type' (val) {
562
+ if (val === '机表')
563
+ this.isMachine = false
564
+ },
565
+ 'areatype'(){
566
+ this.initdata()
567
+ },
568
+ 'areamodel.f_pcd_id'(){
569
+ if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id){
570
+ if (this.findbyid(this.pcdslist,this.areamodel.f_pcd_id) && this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
571
+ this.areamodel.f_area_address = this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd + this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
572
+ }
573
+ }
574
+ },
575
+ 'areamodel.f_street_id'(){
576
+ if (this.areamodel.f_pcd_id && this.areamodel.f_street_id) {
577
+ if (this.findbyid(this.pcdslist, this.areamodel.f_pcd_id) && this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
578
+ this.areamodel.f_area_address = this.findbyid(this.pcdslist, this.areamodel.f_pcd_id).f_pcd + this.findbyid(this.streetslist, this.areamodel.f_street_id).f_street
579
+ }
580
+ }
581
+ },
582
+ 'f_filialeids'(){
583
+ if (this.areamodel.f_filialeid) {
584
+ if (this.areamodel.f_filialeid != this.f_filialeids) {
585
+ this.$dispatch('cancel')
586
+ }
587
+ }
588
+ this.cleardara()
589
+ this.initdata()
590
+ }
591
+ },
592
+ computed: {
593
+ metertypes() {
594
+ return this.$appdata.getParam('气表类型')
595
+ },
596
+ usertypes () {
597
+ return this.$appdata.getParam('用户类型')
598
+ },
599
+ f_price_types () {
600
+ return this.$appdata.getParam('气价类型')
601
+ },
602
+ meterstyle () {
603
+ let ret = this.$GetSaleParam.getGasbrand()
604
+ let rs = new Array()
605
+ if(this.areamodel.f_meter_brand) {
606
+ ret.forEach((item, index) => {
607
+ if(this.areamodel.f_meter_brand == item.value.f_meter_brand) {
608
+ item.value.gasmodel.forEach((item1, index) =>{
609
+ rs.push({label: item1.label, value:item1.label})
610
+ })
611
+ }
612
+ })
613
+ }
614
+ return rs
615
+ },
616
+ pricenames () {
617
+ let rs = new Array()
618
+ if (this.areamodel.f_user_type && this.areamodel.f_gasproperties && this.areamodel.f_price_type) {
619
+ let params = {
620
+ f_user_type: this.areamodel.f_user_type,
621
+ f_gasproperties: this.areamodel.f_gasproperties,
622
+ f_price_type: this.areamodel.f_price_type,
623
+ filter: this.f_filialeids
624
+ }
625
+ let ret = this.$GetSaleParam.getPrice(params)
626
+ ret.forEach((item, index) => {
627
+ rs.push({label: item.label, value: item.value.f_price_name})
628
+ })
629
+ }
630
+ if (rs.length == 0) {
631
+ this.areamodel.f_price_name = ''
632
+ }
633
+ return rs
634
+ },
635
+ positions () {
636
+ return this.$appdata.getParam('安装位置')
637
+ },
638
+ inputtores () {
639
+ // 获取抄表员
640
+ let rs = new Array()
641
+ if (this.$login.f.f_gasman.length > 0) {
642
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
643
+ let temp = {
644
+ label: this.$login.f.f_gasman[i].name,
645
+ value: this.$login.f.f_gasman[i].name
646
+ }
647
+ rs.push(temp)
648
+ }
649
+ }
650
+ return rs
651
+ }
652
+ }
653
+ }
654
+ </script>
655
+ <style>
656
+ .box {
657
+ width: 727px;
658
+ height: 175px;
659
+ border-radius: 2px;
660
+ background-color: #fafafa;
661
+ border: 1px solid #999999;
662
+ margin-top: 13px;
663
+ }
664
+ .datapanel {
665
+ color: #333;
666
+ background-color: white;
667
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
668
+ padding: 10px 30px 10px 30px;
669
+ border-radius:15px;
670
+ }
671
+ </style>
@@ -0,0 +1,317 @@
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">街道/乡镇</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 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;" @click="$parent.$parent.add('单位')">添加单位</button>
45
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
46
+ <export-excel :data="$parent.$parent.getCondition"
47
+ :field="$parent.$parent.getfield"
48
+ sqlurl="rs/logic/exportfile"
49
+ sql-name="address_getarealist"
50
+ template-name='小区信息查询导出'
51
+ :choose-col="true"></export-excel>
52
+ <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>
53
+ </div>
54
+ </div>
55
+ <div class="row" v-if="$parent.$parent.criteriaShow">
56
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
57
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
58
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_city"
59
+ condition="f_city like '%{}%'" placeholder="城市"
60
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
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_district"
65
+ condition="f_district like '%{}%'" placeholder="区县"
66
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
67
+ </div>
68
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.$parent.areaShow">
69
+ <label class="font_normal_body">街道/乡镇</label>
70
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street"
71
+ condition="f_street like '%{}%'" placeholder="街道/乡镇"
72
+ :size="model.f_street ? model.f_street.length*2 : 6"/>
73
+ </div>
74
+ <div :class="$parent.$parent.style">
75
+ <label class="font_normal_body">单位名称</label>
76
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area"
77
+ condition="f_residential_area like '%{}%'" placeholder="单位"
78
+ :size="model.f_residential_area ? model.f_residential_area.length*2 : 6"/>
79
+ </div>
80
+ <div :class="$parent.$parent.style">
81
+ <label class="font_normal_body">房屋类型</label>
82
+ <v-select :options='$parent.$parent.housetype' :value.sync="model.f_house_type"
83
+ close-on-select condition="f_house_type='{}'"
84
+ placeholder='房屋类型' v-model="model.f_house_type"></v-select>
85
+ </div>
86
+ <div :class="$parent.$parent.style">
87
+ <label class="font_normal_body">安装位置</label>
88
+ <v-select :options='$parent.$parent.position' :value.sync="model.f_position"
89
+ close-on-select condition="f_position='{}'"
90
+ placeholder='安装位置' v-model="model.f_position"></v-select>
91
+ </div>
92
+ <div :class="$parent.$parent.style">
93
+ <label class="font_normal_body">&emsp;抄表员</label>
94
+ <v-select :options='$parent.$parent.inputtores' :value.sync="model.f_inputtor"
95
+ close-on-select condition="f_inputtor='{}'"
96
+ placeholder='抄表员' v-model="model.f_inputtor"></v-select>
97
+ </div>
98
+ </div>
99
+ </div>
100
+
101
+
102
+ </criteria>
103
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
104
+ <template partial='head'>
105
+ <tr>
106
+ <th><nobr>序号</nobr></th>
107
+ <th v-if="false"><nobr>省份</nobr></th>
108
+ <th v-if="false"><nobr>城市</nobr></th>
109
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>区/县</nobr></th>
110
+ <th><nobr>街道/乡镇</nobr></th>
111
+ <!--民用小区信息开始-->
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
+ <th v-if="!$parent.$parent.$parent.f_special && !$parent.$parent.$parent.$parent.areaShow"><nobr>小区备注</nobr></th>
115
+ <!--民用小区信息结束-->
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"><nobr>联系人</nobr></th>
120
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
121
+ <!--非民用单位信息结束-->
122
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>抄表员</nobr></th>
123
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>房屋类型</nobr></th>
124
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>安装位置</nobr></th>
125
+ <th v-show="!$parent.$parent.$parent.$parent.areaShow"><nobr>片区/管理站 </nobr></th>
126
+ <th><nobr>操作人</nobr></th>
127
+ <th><nobr>操作日期</nobr></th>
128
+ <th title="该小区下现有的地址数"><nobr>地址数</nobr></th>
129
+ <th><nobr>操作</nobr></th>
130
+
131
+ </tr>
132
+ </template>
133
+ <template partial='body'>
134
+ <tr>
135
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
136
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_province}}</nobr></td>
137
+ <td style="text-align:center" v-if="false"><nobr>{{row.f_city}}</nobr></td>
138
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
139
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
140
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
141
+ <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
142
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_comments}}</nobr></td>
143
+ <!--非民用单位信息开始-->
144
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
145
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
146
+ <!--非民用单位信息结束-->
147
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_inputtor}}</nobr></td>
148
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_house_type}}</nobr></td>
149
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_position}}</nobr></td>
150
+ <td v-show="!$parent.$parent.$parent.$parent.areaShow" style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
151
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
152
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
153
+ <td style="text-align:center"><nobr>{{row.addressnum}}</nobr></td>
154
+ <td><nobr>
155
+ <!--<button type="button" name="button" class="btn btn-link"
156
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
157
+ <button v-if="!row.f_residential_area_id" type="button" name="button" class="btn btn-danger"
158
+ style="padding: 5px 12px"
159
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
160
+ </nobr></td>
161
+ </tr>
162
+ </template>
163
+ <template partial='foot'></template>
164
+ </data-grid>
165
+ </criteria-paged>
166
+ </div>
167
+ </template>
168
+
169
+ <script>
170
+ import { PagedList } from 'vue-client'
171
+ let readyGen = async function (self) {
172
+ self.getfield = self.config.excelHeaders
173
+ self.search()
174
+ }
175
+ export default {
176
+
177
+ data () {
178
+ return {
179
+ criteriaShow: false,
180
+ model: new PagedList('rs/sql/address_getarealist',20),
181
+ addflag: false,
182
+ addtitle:'',
183
+ getfield: {},
184
+ // 公司下拉
185
+ curorgid: [this.$login.f.orgid],
186
+ f_orgid: '',
187
+ config: {
188
+ // 导出列要和查询列相同
189
+ excelHeaders: {
190
+ 'f_district':'区/县',
191
+ 'f_street':'街道名称',
192
+ 'f_residential_area':'小区名称',
193
+ 'f_area_address':'小区地址',
194
+ 'f_comments':'小区备注',
195
+ 'f_inputtor':'抄表员',
196
+ 'f_house_type':'房屋类型',
197
+ 'f_position':'安装位置',
198
+ 'f_slice_area':'片区/管理站',
199
+ 'f_operator':'操作人',
200
+ 'f_operate_date':'操作日期',
201
+ 'addressnum':'地址数'
202
+ }
203
+ },
204
+ housetype:[{label:'全部',value:''},{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
205
+ position:this.$appdata.getParam('安装位置')?[{label:'全部',value:''},...this.$appdata.getParam('安装位置')]:[{label:'全部',value:''}]
206
+ }
207
+ },
208
+ title: '小区管理',
209
+ props:{
210
+ f_filialeids:{
211
+ type: String
212
+ },
213
+ style: {
214
+ type: String,
215
+ default: 'col-sm-2 form-group'
216
+ },
217
+ f_special:{
218
+ type: String
219
+ }
220
+ },
221
+ ready(){
222
+ readyGen(this)
223
+
224
+ },
225
+ methods: {
226
+ hidden() {
227
+ this.criteriaShow = !this.criteriaShow
228
+ },
229
+ search() {
230
+ this.$refs.paged.$refs.cri.search()
231
+ },
232
+
233
+ async delete(row){
234
+ if(row.id >= 0){
235
+ var id = row.id
236
+ let useraredss = await this.$resetpost('rs/sql/address_singleTable',
237
+ {data: {
238
+ items: 'f_residential_area_id',
239
+ tablename: 't_user_address',
240
+ condition: `f_residential_area_id='${id}'`}
241
+ },
242
+ {resolveMsg: null, rejectMsg: null})
243
+ if(useraredss.data.length>0){
244
+ this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
245
+ }else{
246
+ this.$resetdelete('rs/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
247
+ this.$dispatch('cancel')
248
+ })
249
+ }
250
+ }
251
+ },
252
+ add(val){
253
+ if (this.f_filialeids) {
254
+ this.$refs.paged.$refs.grid.selectStore.selected = null
255
+ this.$dispatch('add')
256
+ } else {
257
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
258
+ }
259
+ },
260
+ modify(val){
261
+ this.$refs.paged.$refs.grid.selectStore.selected = null
262
+ this.$dispatch('modify',val)
263
+ },
264
+ selfSearch (args) {
265
+
266
+ if (!this.f_orgid) {
267
+ this.getorg([this.$login.f.orgid])
268
+ }
269
+ if(this.f_special){
270
+ args.condition = `${args.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
271
+ }else{
272
+ args.condition = `${args.condition} and s.f_filialeid = ${this.f_orgid}`
273
+ }
274
+ this.model.search(args.condition, args.model)
275
+ },
276
+ //清空
277
+ clear(){
278
+ this.$refs.paged.$refs.cri.model = {}
279
+ },
280
+ getorg (val) {
281
+ this.f_orgid = this.$login.convertToIn(val)
282
+ this.f_filialeids = val[0]
283
+ }
284
+ },
285
+ watch:{
286
+
287
+ },
288
+ computed:{
289
+ getCondition() {
290
+ var condition=''
291
+ if(this.f_special){
292
+ condition = `${this.$refs.paged.$refs.cri.condition} and s.f_special='1' and s.f_filialeid = '${this.f_filialeids}'`
293
+ }else{
294
+ condition = `${this.$refs.paged.$refs.cri.condition} and s.f_filialeid = ${this.f_orgid}`
295
+ }
296
+ return {
297
+ condition: condition
298
+ }
299
+ },
300
+ inputtores () {
301
+ // 获取抄表员
302
+ let rs = new Array()
303
+ if (this.$login.f.f_gasman.length > 0) {
304
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
305
+ let temp = {
306
+ label: this.$login.f.f_gasman[i].name,
307
+ value: this.$login.f.f_gasman[i].name
308
+ }
309
+ rs.push(temp)
310
+ }
311
+ }
312
+ return rs
313
+ }
314
+ }
315
+
316
+ }
317
+ </script>
@@ -0,0 +1,100 @@
1
+ <template>
2
+ <div id="unit" class="flex-row" :class="{'binary':areaShow}">
3
+ <div :class="{'basic-main':!areaShow,'binary-left':areaShow}">
4
+ <area-list @select-changed="selected" v-ref:arealist :style="style" :f_filialeids.sync="f_filialeids"></area-list>
5
+ </div>
6
+ <div v-show="areaShow" style="width: 60%" class="binary-right">
7
+ <div class="flex">
8
+ <add-area-msg v-ref:addareamsg :areatype="areatype" :operation="operation"
9
+ :f_filialeids.sync="f_filialeids" :row="arearow"></add-area-msg>
10
+ </div>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ title: '小区管理',
18
+ components:{
19
+ },
20
+ data () {
21
+ return {
22
+ //分公司id串
23
+ width:'100%',
24
+ f_filialeids: this.$login.f.f_orgids,
25
+ areaShow:false,
26
+ areatype:'小区',
27
+ arearow:{},
28
+ style:'col-sm-2 form-group'
29
+ }
30
+ },
31
+ ready(){
32
+
33
+ },
34
+ props:{
35
+
36
+ },
37
+ methods:{
38
+ selected(obj){
39
+ this.style='col-sm-3 form-group'
40
+ if(obj.val&&obj.val.id){
41
+ console.log('对比分公司', obj.val.f_filialeid, this.f_filialeids)
42
+ if (obj.val.f_filialeid != this.f_filialeids) {
43
+ this.refresh()
44
+ return
45
+ }
46
+ this.areaShow = true
47
+ this.$refs.addareamsg.cleardara()
48
+ this.$refs.addareamsg.operation='modify'
49
+ this.$refs.addareamsg.areatype='小区'
50
+ this.$refs.addareamsg.areamodel=Object.assign({},obj.val)
51
+ if (obj.val.f_slice_area) {
52
+ this.$refs.addareamsg.areamodel.slice_area = [{
53
+ name: this.$refs.addareamsg.areamodel.f_slice_area,
54
+ code: this.$refs.addareamsg.areamodel.f_area_code
55
+ }]
56
+ }
57
+ if (obj.val.f_meter_book != null && obj.val.f_meter_book != '' && obj.val.f_meter_book instanceof Array) {
58
+ this.$refs.addareamsg.areamodel.f_meter_book = parseInt(obj.val.f_meter_book[0])
59
+ }
60
+ if (obj.val.f_meter_book != null && obj.val.f_meter_book != '' && !(obj.val.f_meter_book instanceof Array)) {
61
+ this.$refs.addareamsg.areamodel.f_meter_book = parseInt(obj.val.f_meter_book)
62
+ }
63
+ if (obj.val.f_adjustable_id != null && obj.val.f_adjustable_id != '' && obj.val.f_adjustable_id instanceof Array) {
64
+ this.$refs.addareamsg.areamodel.f_adjustable_id = parseInt(obj.val.f_adjustable_id[0])
65
+ }
66
+ if (obj.val.f_adjustable_id != null && obj.val.f_adjustable_id != '' && !(obj.val.f_adjustable_id instanceof Array)) {
67
+ this.$refs.addareamsg.areamodel.f_adjustable_id = parseInt(obj.val.f_adjustable_id)
68
+ }
69
+ // this.$refs.addareamsg.initdata(obj.val)
70
+ // this.$refs.addareamsg.initrow(obj.val)
71
+ }
72
+ },
73
+ refresh() {
74
+ this.areaShow = false
75
+ this.$refs.arealist.$refs.paged.$refs.cri.search()
76
+ }
77
+ },
78
+ events:{
79
+ 'add'(){
80
+ this.style='col-sm-3 form-group'
81
+ this.areaShow=true
82
+ this.$refs.addareamsg.cleardara()
83
+ this.$refs.addareamsg.operation='add'
84
+ this.$refs.addareamsg.areatype='小区'
85
+ this.$refs.addareamsg.initdata()
86
+ },
87
+ 'confirm' () {
88
+ this.style='col-sm-2 form-group'
89
+ this.areaShow = false
90
+ this.$refs.arealist.$refs.paged.$refs.cri.search()
91
+ },
92
+ 'cancel' () {
93
+ this.style='col-sm-2 form-group'
94
+ this.$refs.arealist.$refs.paged.$refs.cri.search()
95
+ this.areaShow = false
96
+ }
97
+ }
98
+ }
99
+ </script>
100
+
@@ -6,7 +6,15 @@ let specialComp = {
6
6
  //地址管理父组件
7
7
  'address-manage': (resolve) =>{ require(['./AddressManage'], resolve) },
8
8
  'user-address': (resolve) =>{ require(['./UserAddress'], resolve) },
9
- 'address-list': (resolve) =>{ require(['./AddressList'], resolve) }
9
+ 'address-list': (resolve) =>{ require(['./AddressList'], resolve) },
10
+
11
+
12
+ //小区添加
13
+ 'add-area-msg': (resolve) => { require(['./AddAreaMsg'], resolve) },
14
+ //小区列表
15
+ 'area-list': (resolve) => { require(['./AreaList'], resolve) },
16
+ //小区管理(包含修改表具,小区的添加)
17
+ 'area-manage': (resolve) => { require(['./AreaManage'], resolve) }
10
18
  }
11
19
  exports.specialComp = specialComp
12
20