address-client 3.2.14 → 3.2.15

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