address-client 3.2.86 → 3.2.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +74 -74
- package/package.json +1 -1
- package/src/App.vue +60 -16
- package/src/filiale/WEINAN/AddAreaMsg.vue +444 -413
- package/src/filiale/qianneng/UserAddress.vue +1126 -1125
- package/src/main.js +1 -1
|
@@ -89,16 +89,16 @@
|
|
|
89
89
|
class="form-control" placeholder="单位地址">
|
|
90
90
|
</div>
|
|
91
91
|
<div
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
class="col-sm-6 form-group"
|
|
93
|
+
:class="[$v.f_linkname.required ? 'has-error' : 'has-success']">
|
|
94
94
|
<label class="font_normal_body">联 系 人</label>
|
|
95
95
|
<input type="text" style="width:60%" class="input_search" v-model="areamodel.f_linkname"
|
|
96
96
|
class="form-control" placeholder="联系人"
|
|
97
97
|
v-validate:f_linkname='{required: true }'>
|
|
98
98
|
</div>
|
|
99
99
|
<div
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
class="col-sm-6 form-group"
|
|
101
|
+
:class="[$v.f_linkphone.required ? 'has-error' : 'has-success']">
|
|
102
102
|
<label class="font_normal_body">联系电话</label>
|
|
103
103
|
<input type="text" style="width:60%" class="input_search" v-model="areamodel.f_linkphone"
|
|
104
104
|
class="form-control" placeholder="联系电话"
|
|
@@ -191,9 +191,9 @@
|
|
|
191
191
|
</div>
|
|
192
192
|
<div class="col-sm-6 form-group" >
|
|
193
193
|
<label class="font_normal_body">抄 表 册</label>
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
<!-- <input type="text" style="width:60%" class="input_search" v-show="false"
|
|
195
|
+
v-validate:f_meter_book='{required: true }'
|
|
196
|
+
v-model="areamodel.f_meter_book">-->
|
|
197
197
|
<v-select
|
|
198
198
|
:value.sync="areamodel.f_meter_book" :value-single="true"
|
|
199
199
|
:options='meterbooks' placeholder='抄表册'
|
|
@@ -202,24 +202,24 @@
|
|
|
202
202
|
</div>
|
|
203
203
|
<div class="col-sm-6 form-group" >
|
|
204
204
|
<label class="font_normal_body">抄 表 员</label>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
<!-- <input type="text" style="width:60%" class="input_search"
|
|
206
|
+
v-validate:f_inputtor='{required: true }'
|
|
207
|
+
v-show="false" v-model="areamodel.f_inputtor">-->
|
|
208
208
|
<v-select
|
|
209
209
|
:value.sync="areamodel.f_inputtor" :value-single="true"
|
|
210
210
|
:options='inputtores' placeholder='抄表员'
|
|
211
211
|
close-on-select >
|
|
212
212
|
</v-select>
|
|
213
213
|
</div>
|
|
214
|
-
<!-- <div class="col-sm-6 form-group">
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
214
|
+
<!-- <div class="col-sm-6 form-group">
|
|
215
|
+
<label class="font_normal_body">调 压 箱</label>
|
|
216
|
+
<input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_adjustable_id">
|
|
217
|
+
<v-select
|
|
218
|
+
:value.sync="areamodel.f_adjustable_id" :value-single="true"
|
|
219
|
+
:options='adjustables' placeholder='调压箱'
|
|
220
|
+
close-on-select >
|
|
221
|
+
</v-select>
|
|
222
|
+
</div>-->
|
|
223
223
|
<div class="col-sm-6 form-group">
|
|
224
224
|
<label class="font_normal_body">房屋类型</label>
|
|
225
225
|
<v-select
|
|
@@ -228,6 +228,28 @@
|
|
|
228
228
|
close-on-select >
|
|
229
229
|
</v-select>
|
|
230
230
|
</div>
|
|
231
|
+
<div class="col-sm-6 form-group">
|
|
232
|
+
<label for="f_user_usetype" class="font_normal_body ">用气类型</label>
|
|
233
|
+
<v-select :value.sync="areamodel.f_user_usetype" :search="false"
|
|
234
|
+
@change="userUseTypeChange()"
|
|
235
|
+
:value-single="true"
|
|
236
|
+
:options='userusetypes' placeholder='用气类型' close-on-select>
|
|
237
|
+
</v-select>
|
|
238
|
+
</div>
|
|
239
|
+
<div class="col-sm-6 form-group">
|
|
240
|
+
<label for="f_use_institution" class="font_normal_body">用气机构</label>
|
|
241
|
+
<v-select :value.sync="areamodel.f_use_institution" :search="false"
|
|
242
|
+
@change="userUseInstitutionChange()" :value-single="true"
|
|
243
|
+
:options='useinstitutions' placeholder='用气机构' close-on-select>
|
|
244
|
+
</v-select>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="col-sm-6 form-group">
|
|
247
|
+
<label for="f_user_usenature" class="font_normal_body ">使用性质</label>
|
|
248
|
+
<v-select :value.sync="areamodel.f_user_usenature" :search="false"
|
|
249
|
+
:value-single="true"
|
|
250
|
+
:options='userusenatures' placeholder='使用性质' close-on-select>
|
|
251
|
+
</v-select>
|
|
252
|
+
</div>
|
|
231
253
|
</div>
|
|
232
254
|
<div v-if="f_special" class="col-sm-6 form-group">
|
|
233
255
|
<br/>
|
|
@@ -238,7 +260,7 @@
|
|
|
238
260
|
<button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
|
|
239
261
|
<button class="button_clear button_spacing" @click="cancel()">取消</button>
|
|
240
262
|
</div>
|
|
241
|
-
<!-- <div class="inp_button" type="button" @click="fileUpload()" v-show="!isupload">上传图片</div>-->
|
|
263
|
+
<!-- <div class="inp_button" type="button" @click="fileUpload()" v-show="!isupload">上传图片</div>-->
|
|
242
264
|
</div>
|
|
243
265
|
</validator>
|
|
244
266
|
<modal :show.sync="showUpload" v-ref:modal backdrop="false" width="80%">
|
|
@@ -258,439 +280,448 @@
|
|
|
258
280
|
</template>
|
|
259
281
|
|
|
260
282
|
<script>
|
|
261
|
-
|
|
283
|
+
import {HttpResetClass} from 'vue-client'
|
|
262
284
|
|
|
263
285
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
286
|
+
let initGen = async function (self) {
|
|
287
|
+
await self.initdata()
|
|
288
|
+
try {
|
|
289
|
+
await self.$LoadParams.loadMeterBook(self.f_filialeids)
|
|
268
290
|
|
|
269
|
-
|
|
291
|
+
}catch (e) {
|
|
270
292
|
|
|
271
|
-
|
|
272
|
-
|
|
293
|
+
}
|
|
294
|
+
try {
|
|
273
295
|
await self.loadMeterBooks();
|
|
274
|
-
|
|
296
|
+
}catch (e) {
|
|
275
297
|
|
|
276
|
-
}
|
|
277
298
|
}
|
|
299
|
+
}
|
|
278
300
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
301
|
+
export default {
|
|
302
|
+
title: '小区添加',
|
|
303
|
+
data () {
|
|
304
|
+
return {
|
|
305
|
+
//初始化省市区数据
|
|
306
|
+
pcdslist:[],
|
|
307
|
+
showUpload:'',//上传标识位
|
|
308
|
+
//初始化街道数据
|
|
309
|
+
streetslist:[],
|
|
310
|
+
//小区
|
|
311
|
+
areamodel: {
|
|
312
|
+
f_area_id: '',
|
|
313
|
+
f_pcd_id:'',
|
|
314
|
+
f_linkname:'',
|
|
315
|
+
f_linkphone:'',
|
|
316
|
+
f_street_id:'',
|
|
317
|
+
f_slice_area:'',
|
|
318
|
+
f_adjustable_id:'',
|
|
319
|
+
f_residential_area:'',
|
|
320
|
+
f_user_type:'',
|
|
321
|
+
f_gasproperties:'',
|
|
322
|
+
f_use_institution:'',
|
|
323
|
+
f_user_usetype:'',
|
|
324
|
+
f_user_usenature:'',
|
|
325
|
+
f_meter_brand:'',
|
|
326
|
+
f_price_name:'',
|
|
327
|
+
f_area_address:'',
|
|
328
|
+
f_price_type:'',
|
|
329
|
+
f_meter_style:'',
|
|
330
|
+
f_position:'',
|
|
331
|
+
f_comments:''
|
|
332
|
+
},
|
|
333
|
+
useinstitutions:[],
|
|
334
|
+
userusenatures:[],
|
|
335
|
+
meterbrands: [],
|
|
336
|
+
adjustables: [],
|
|
337
|
+
sliceArea: [],
|
|
338
|
+
safeCheckArea: [],
|
|
339
|
+
gasproperties: [],
|
|
340
|
+
meterbooks:[{label: '全部',value: ''}],
|
|
341
|
+
housetypeoptions:[{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
props: ['f_filialeids','f_special', 'areatype','row','operation','isupload'],
|
|
345
|
+
ready(){
|
|
346
|
+
initGen(this)
|
|
347
|
+
},
|
|
348
|
+
methods: {
|
|
349
|
+
userUseInstitutionChange () {
|
|
350
|
+
this.userusenatures = []
|
|
351
|
+
let str = this.areamodel.f_use_institution+ '使用性质'
|
|
352
|
+
this.userusenatures = this.$appdata.getParam(str)
|
|
353
|
+
},
|
|
354
|
+
userUseTypeChange () {
|
|
355
|
+
console.log('看看进来用户用气类型变化的方法了吗???')
|
|
356
|
+
this.useinstitutions = []
|
|
357
|
+
let str = this.areamodel.f_user_usetype + '机构'
|
|
358
|
+
this.useinstitutions = this.$appdata.getParam(str)
|
|
359
|
+
},
|
|
360
|
+
loadMeterBooks(){
|
|
361
|
+
this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
|
|
362
|
+
},
|
|
363
|
+
//初始化数据
|
|
364
|
+
async initdata(){
|
|
365
|
+
// 初始化参数
|
|
366
|
+
await this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
|
|
367
|
+
await this.initSlice(this.f_filialeids)
|
|
368
|
+
await this.initParams()
|
|
369
|
+
// 初始化片区
|
|
370
|
+
// await this.initstreets(` f_filialeid = '${this.f_filialeids}'`)
|
|
371
|
+
},
|
|
372
|
+
// 打开文件上传对话框
|
|
373
|
+
fileUpload() {
|
|
374
|
+
this.showUpload = true
|
|
375
|
+
},
|
|
376
|
+
// 关闭文件上传对话框
|
|
377
|
+
close() {
|
|
378
|
+
this.showUpload = false
|
|
379
|
+
// 将选的文件清空
|
|
380
|
+
// this.$refs.file.$el.querySelector('input').value = ''
|
|
381
|
+
// this.load(this)
|
|
382
|
+
},
|
|
383
|
+
initrow(val){
|
|
384
|
+
this.areamodel.f_meter_book = val.f_meter_book;
|
|
385
|
+
this.areamodel.f_adjustable_id = val.f_adjustable_id;
|
|
386
|
+
},
|
|
387
|
+
async initParams() {
|
|
388
|
+
try {
|
|
389
|
+
await this.$LoadParams.loadParam(this.f_filialeids)
|
|
390
|
+
}catch (e) {
|
|
308
391
|
|
|
309
|
-
meterbrands: [],
|
|
310
|
-
adjustables: [],
|
|
311
|
-
sliceArea: [],
|
|
312
|
-
safeCheckArea: [],
|
|
313
|
-
gasproperties: [],
|
|
314
|
-
meterbooks:[{label: '全部',value: ''}],
|
|
315
|
-
housetypeoptions:[{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
|
|
316
392
|
}
|
|
393
|
+
this.initBrands()
|
|
394
|
+
await this.initSafeCheckArea()
|
|
395
|
+
// this.initAdjustables()
|
|
317
396
|
},
|
|
318
|
-
props: ['f_filialeids','f_special', 'areatype','row','operation','isupload'],
|
|
319
|
-
ready(){
|
|
320
|
-
|
|
321
|
-
initGen(this)
|
|
322
397
|
|
|
398
|
+
initBrands () {
|
|
399
|
+
let ret = []
|
|
400
|
+
try {
|
|
401
|
+
ret = this.$GetSaleParam.getGasbrand()
|
|
402
|
+
} catch(e){}
|
|
403
|
+
// let ret = this.$GetSaleParam.getGasbrand()
|
|
404
|
+
let rs = new Array()
|
|
405
|
+
ret.forEach((item, index) =>{
|
|
406
|
+
rs.push({label: item.label, value: item.value.f_meter_brand})
|
|
407
|
+
})
|
|
408
|
+
this.meterbrands = rs
|
|
323
409
|
},
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
// 将选的文件清空
|
|
348
|
-
// this.$refs.file.$el.querySelector('input').value = ''
|
|
349
|
-
// this.load(this)
|
|
350
|
-
},
|
|
351
|
-
initrow(val){
|
|
352
|
-
this.areamodel.f_meter_book = val.f_meter_book;
|
|
353
|
-
this.areamodel.f_adjustable_id = val.f_adjustable_id;
|
|
354
|
-
},
|
|
355
|
-
async initParams() {
|
|
356
|
-
try {
|
|
357
|
-
await this.$LoadParams.loadParam(this.f_filialeids)
|
|
358
|
-
}catch (e) {
|
|
410
|
+
async initSafeCheckArea () {
|
|
411
|
+
this.safeCheckArea = []
|
|
412
|
+
let data = {
|
|
413
|
+
items: 'id,f_check_book_name',
|
|
414
|
+
tablename: 't_check_book',
|
|
415
|
+
orderitem: 'id',
|
|
416
|
+
condition: `f_orgid=${this.$login.f.orgid}`
|
|
417
|
+
}
|
|
418
|
+
let ret = await this.$resetpost('rs/sql/address_singleTableOrderBy',{data: data},{resolveMsg: null, rejectMsg: null,newly:true})
|
|
419
|
+
ret.data.forEach(item => {
|
|
420
|
+
this.safeCheckArea.push({label: item.f_check_book_name, value: item.id})
|
|
421
|
+
})
|
|
422
|
+
},
|
|
423
|
+
/*
|
|
424
|
+
initAdjustables () {
|
|
425
|
+
let filter = this.$login.f.orgid
|
|
426
|
+
let ret = this.$GetSaleParam.getAdjustable(filter)
|
|
427
|
+
let arr = new Array()
|
|
428
|
+
ret.forEach((item, index) => {
|
|
429
|
+
arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
|
|
430
|
+
})
|
|
431
|
+
this.adjustables = arr
|
|
432
|
+
},*/
|
|
359
433
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
await this
|
|
363
|
-
|
|
364
|
-
|
|
434
|
+
async initSlice (val) {
|
|
435
|
+
if (val) {
|
|
436
|
+
let getAllArea = await this.$resetpost('/rs/search', {
|
|
437
|
+
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
|
438
|
+
userid: this.$login.f.id
|
|
439
|
+
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!',newly:true})
|
|
365
440
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
try {
|
|
369
|
-
ret = this.$GetSaleParam.getGasbrand()
|
|
370
|
-
} catch(e){}
|
|
371
|
-
// let ret = this.$GetSaleParam.getGasbrand()
|
|
372
|
-
let rs = new Array()
|
|
373
|
-
ret.forEach((item, index) =>{
|
|
374
|
-
rs.push({label: item.label, value: item.value.f_meter_brand})
|
|
441
|
+
let arr = getAllArea.data.filter((res) => {
|
|
442
|
+
return res.parentid == val
|
|
375
443
|
})
|
|
376
|
-
this.
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
this.safeCheckArea = []
|
|
380
|
-
let data = {
|
|
381
|
-
items: 'id,f_check_book_name',
|
|
382
|
-
tablename: 't_check_book',
|
|
383
|
-
orderitem: 'id',
|
|
384
|
-
condition: `f_orgid=${this.$login.f.orgid}`
|
|
385
|
-
}
|
|
386
|
-
let ret = await this.$resetpost('rs/sql/address_singleTableOrderBy',{data: data},{resolveMsg: null, rejectMsg: null,newly:true})
|
|
387
|
-
ret.data.forEach(item => {
|
|
388
|
-
this.safeCheckArea.push({label: item.f_check_book_name, value: item.id})
|
|
444
|
+
this.sliceArea = []
|
|
445
|
+
arr.forEach((res) => {
|
|
446
|
+
this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
|
|
389
447
|
})
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
initAdjustables () {
|
|
393
|
-
let filter = this.$login.f.orgid
|
|
394
|
-
let ret = this.$GetSaleParam.getAdjustable(filter)
|
|
395
|
-
let arr = new Array()
|
|
396
|
-
ret.forEach((item, index) => {
|
|
397
|
-
arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
|
|
398
|
-
})
|
|
399
|
-
this.adjustables = arr
|
|
400
|
-
},*/
|
|
401
|
-
|
|
402
|
-
async initSlice (val) {
|
|
403
|
-
if (val) {
|
|
404
|
-
let getAllArea = await this.$resetpost('/rs/search', {
|
|
405
|
-
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
|
406
|
-
userid: this.$login.f.id
|
|
407
|
-
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!',newly:true})
|
|
448
|
+
}
|
|
449
|
+
},
|
|
408
450
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
451
|
+
//初始化省市区,添加街道
|
|
452
|
+
async initpcds(pconditon){
|
|
453
|
+
this.pcdslist = []
|
|
454
|
+
let HttpReset = new HttpResetClass()
|
|
455
|
+
let req = await HttpReset.load('POST', 'rs/sql/address_singleTable', {
|
|
456
|
+
data: {
|
|
457
|
+
items: '*',
|
|
458
|
+
tablename: 't_pcd',
|
|
459
|
+
condition: pconditon
|
|
416
460
|
}
|
|
417
|
-
},
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
items: '*',
|
|
426
|
-
tablename: 't_pcd',
|
|
427
|
-
condition: pconditon
|
|
428
|
-
}
|
|
429
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
430
|
-
let redata = []
|
|
431
|
-
req.data.forEach((row, n) => {
|
|
432
|
-
redata[n] = {
|
|
433
|
-
label: row.f_pcd,
|
|
434
|
-
value: row.id,
|
|
435
|
-
data:row,
|
|
436
|
-
id:row.id
|
|
437
|
-
}
|
|
438
|
-
})
|
|
439
|
-
this.pcdslist=redata
|
|
440
|
-
},
|
|
441
|
-
//初始化街道 添加小区
|
|
442
|
-
async initstreets(pconditon){
|
|
443
|
-
this.streetslist = []
|
|
444
|
-
let HttpReset = new HttpResetClass()
|
|
445
|
-
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
446
|
-
data: {
|
|
447
|
-
items: '*',
|
|
448
|
-
tablename: 't_street',
|
|
449
|
-
orderitem: 'id',
|
|
450
|
-
condition: pconditon
|
|
451
|
-
}
|
|
452
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
453
|
-
let redata = []
|
|
454
|
-
req.data.forEach((row, n) => {
|
|
455
|
-
redata[n] = {
|
|
456
|
-
label: row.f_street,
|
|
457
|
-
value: row.id,
|
|
458
|
-
data:row,
|
|
459
|
-
id:row.id
|
|
460
|
-
}
|
|
461
|
-
})
|
|
462
|
-
this.streetslist=redata
|
|
463
|
-
},
|
|
464
|
-
|
|
465
|
-
async areaidChange () {
|
|
466
|
-
// 验证小区编号是否已存在
|
|
467
|
-
|
|
468
|
-
let param = {
|
|
469
|
-
id: this.areamodel.id,
|
|
470
|
-
f_area_id: this.areamodel.f_area_id,
|
|
471
|
-
f_filialeid: this.f_filialeids
|
|
461
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
462
|
+
let redata = []
|
|
463
|
+
req.data.forEach((row, n) => {
|
|
464
|
+
redata[n] = {
|
|
465
|
+
label: row.f_pcd,
|
|
466
|
+
value: row.id,
|
|
467
|
+
data:row,
|
|
468
|
+
id:row.id
|
|
472
469
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
470
|
+
})
|
|
471
|
+
this.pcdslist=redata
|
|
472
|
+
},
|
|
473
|
+
//初始化街道 添加小区
|
|
474
|
+
async initstreets(pconditon){
|
|
475
|
+
this.streetslist = []
|
|
476
|
+
let HttpReset = new HttpResetClass()
|
|
477
|
+
let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
478
|
+
data: {
|
|
479
|
+
items: '*',
|
|
480
|
+
tablename: 't_street',
|
|
481
|
+
orderitem: 'id',
|
|
482
|
+
condition: pconditon
|
|
479
483
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
if(name==row.id){
|
|
489
|
-
result= row.data
|
|
490
|
-
}
|
|
491
|
-
})
|
|
492
|
-
return result
|
|
493
|
-
},
|
|
494
|
-
userTypeChange () {
|
|
495
|
-
this.gasproperties = []
|
|
496
|
-
if (this.areamodel.f_user_type) {
|
|
497
|
-
this.gasproperties = this.$appdata.getParam(this.areamodel.f_user_type)
|
|
484
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
485
|
+
let redata = []
|
|
486
|
+
req.data.forEach((row, n) => {
|
|
487
|
+
redata[n] = {
|
|
488
|
+
label: row.f_street,
|
|
489
|
+
value: row.id,
|
|
490
|
+
data:row,
|
|
491
|
+
id:row.id
|
|
498
492
|
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
493
|
+
})
|
|
494
|
+
this.streetslist=redata
|
|
495
|
+
},
|
|
496
|
+
async areaidChange () {
|
|
497
|
+
// 验证小区编号是否已存在
|
|
498
|
+
let param = {
|
|
499
|
+
id: this.areamodel.id,
|
|
500
|
+
f_area_id: this.areamodel.f_area_id,
|
|
501
|
+
f_filialeid: this.f_filialeids
|
|
502
|
+
}
|
|
503
|
+
let res = await this.$resetpost('rs/logic/address_validateAreaID', param, {resolveMsg: null,rejectMsg: '小区编号验证失败!!'})
|
|
504
|
+
console.log('验证小区是否存在', res)
|
|
505
|
+
if (res.data) {
|
|
506
|
+
this.$showAlert('这个小区编号已存在!!!请核实', 'warning', 3000)
|
|
507
|
+
this.areamodel.f_area_id = ''
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
//根据名字找数据
|
|
511
|
+
findbyid(list,name){
|
|
512
|
+
var result
|
|
513
|
+
list.forEach((row, n) => {
|
|
514
|
+
if(name==row.id){
|
|
515
|
+
result= row.data
|
|
517
516
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
517
|
+
})
|
|
518
|
+
return result
|
|
519
|
+
},
|
|
520
|
+
userTypeChange () {
|
|
521
|
+
this.gasproperties = []
|
|
522
|
+
if (this.areamodel.f_user_type) {
|
|
523
|
+
this.gasproperties = this.$appdata.getParam(this.areamodel.f_user_type)
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
//省/市/区变化
|
|
527
|
+
async pcdChange(val){
|
|
528
|
+
if(val){
|
|
529
|
+
//那就把街道数据重新组织一下
|
|
530
|
+
await this.initstreets(` f_filialeid = '${this.f_filialeids}' and f_pcd_id ='${val}' `)
|
|
531
|
+
if(this.areamodel.f_street_id){
|
|
524
532
|
if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
this.$resetValidation()
|
|
532
|
-
},
|
|
533
|
-
//保存
|
|
534
|
-
async confirm(){
|
|
535
|
-
await this.savearea()
|
|
536
|
-
this.cleardara()
|
|
537
|
-
this.$dispatch('confirm')
|
|
538
|
-
},
|
|
539
|
-
//保存小区
|
|
540
|
-
async savearea(){
|
|
541
|
-
if(this.f_special){
|
|
542
|
-
this.areamodel.f_special='1'
|
|
543
|
-
}
|
|
544
|
-
this.areamodel.f_filialeid = this.f_filialeids
|
|
545
|
-
this.areamodel.f_operator = this.$login.f.name
|
|
546
|
-
this.areamodel.f_operatorid = this.$login.f.id
|
|
547
|
-
this.areamodel.f_orgid = this.$login.f.orgid
|
|
548
|
-
this.areamodel.f_orgname = this.$login.f.orgs
|
|
549
|
-
this.areamodel.f_depid = this.$login.f.depids
|
|
550
|
-
this.areamodel.f_depname = this.$login.f.deps
|
|
551
|
-
if (this.areamodel.slice_area) {
|
|
552
|
-
if (this.areamodel.slice_area.length > 0) {
|
|
553
|
-
this.areamodel.f_slice_area = this.areamodel.slice_area[0].name
|
|
554
|
-
this.areamodel.f_area_code = this.areamodel.slice_area[0].code
|
|
533
|
+
let pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
|
|
534
|
+
if(pcd_id!=val){
|
|
535
|
+
this.areamodel.f_street_id=''
|
|
536
|
+
}
|
|
537
|
+
} else {
|
|
538
|
+
this.areamodel.f_street_id=''
|
|
555
539
|
}
|
|
556
|
-
}
|
|
557
|
-
this.areamodel.f_pcd=this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd
|
|
558
|
-
this.areamodel.f_street=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
|
|
559
540
|
|
|
560
|
-
await this.$resetpost('rs/logic/address_updatearea', this.areamodel)
|
|
561
|
-
},
|
|
562
|
-
cleardara(){
|
|
563
|
-
this.areamodel= {
|
|
564
|
-
f_area_id: '',
|
|
565
|
-
f_pcd_id:'',
|
|
566
|
-
f_street_id:'',
|
|
567
|
-
f_slice_area:'',
|
|
568
|
-
f_linkname:'',
|
|
569
|
-
f_linkphone:'',
|
|
570
|
-
f_adjustable_id:'',
|
|
571
|
-
f_residential_area:'',
|
|
572
|
-
f_user_type:'',
|
|
573
|
-
f_gasproperties:'',
|
|
574
|
-
f_area_address:'',
|
|
575
|
-
f_meter_brand:'',
|
|
576
|
-
f_price_name:'',
|
|
577
|
-
f_price_type:'',
|
|
578
|
-
f_meter_style:'',
|
|
579
|
-
f_position:'',
|
|
580
|
-
f_comments:''
|
|
581
541
|
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
this.cleardara()
|
|
585
|
-
this.$dispatch('cancel')
|
|
586
|
-
},
|
|
542
|
+
}
|
|
543
|
+
this.$resetValidation()
|
|
587
544
|
},
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
this.areamodel.f_area_address = this.areamodel.f_area_address? 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
|
|
597
|
-
}
|
|
545
|
+
//街道变化
|
|
546
|
+
streetChange(val){
|
|
547
|
+
if(val&&this.operation=='add'){
|
|
548
|
+
// if(this.areamodel.f_pcd_id.length==0){
|
|
549
|
+
if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
|
|
550
|
+
console.log("aa",this.findbyid(this.streetslist,this.areamodel.f_street_id))
|
|
551
|
+
console.log("bbb",this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id)
|
|
552
|
+
this.areamodel.f_pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
|
|
598
553
|
}
|
|
599
554
|
// }
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
555
|
+
}
|
|
556
|
+
this.$resetValidation()
|
|
557
|
+
},
|
|
558
|
+
//保存
|
|
559
|
+
async confirm(){
|
|
560
|
+
await this.savearea()
|
|
561
|
+
this.cleardara()
|
|
562
|
+
this.$dispatch('confirm')
|
|
563
|
+
},
|
|
564
|
+
//保存小区
|
|
565
|
+
async savearea(){
|
|
566
|
+
if(this.f_special){
|
|
567
|
+
this.areamodel.f_special='1'
|
|
568
|
+
}
|
|
569
|
+
this.areamodel.f_filialeid = this.f_filialeids
|
|
570
|
+
this.areamodel.f_operator = this.$login.f.name
|
|
571
|
+
this.areamodel.f_operatorid = this.$login.f.id
|
|
572
|
+
this.areamodel.f_orgid = this.$login.f.orgid
|
|
573
|
+
this.areamodel.f_orgname = this.$login.f.orgs
|
|
574
|
+
this.areamodel.f_depid = this.$login.f.depids
|
|
575
|
+
this.areamodel.f_depname = this.$login.f.deps
|
|
576
|
+
if (this.areamodel.slice_area) {
|
|
577
|
+
if (this.areamodel.slice_area.length > 0) {
|
|
578
|
+
this.areamodel.f_slice_area = this.areamodel.slice_area[0].name
|
|
579
|
+
this.areamodel.f_area_code = this.areamodel.slice_area[0].code
|
|
607
580
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
581
|
+
}
|
|
582
|
+
this.areamodel.f_pcd=this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd
|
|
583
|
+
this.areamodel.f_street=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
|
|
584
|
+
|
|
585
|
+
await this.$resetpost('rs/logic/address_updatearea', this.areamodel)
|
|
586
|
+
},
|
|
587
|
+
cleardara(){
|
|
588
|
+
this.areamodel= {
|
|
589
|
+
f_area_id: '',
|
|
590
|
+
f_pcd_id:'',
|
|
591
|
+
f_street_id:'',
|
|
592
|
+
f_slice_area:'',
|
|
593
|
+
f_linkname:'',
|
|
594
|
+
f_linkphone:'',
|
|
595
|
+
f_adjustable_id:'',
|
|
596
|
+
f_use_institution:'',
|
|
597
|
+
f_user_usetype:'',
|
|
598
|
+
f_user_usenature:'',
|
|
599
|
+
f_residential_area:'',
|
|
600
|
+
f_user_type:'',
|
|
601
|
+
f_gasproperties:'',
|
|
602
|
+
f_area_address:'',
|
|
603
|
+
f_meter_brand:'',
|
|
604
|
+
f_price_name:'',
|
|
605
|
+
f_price_type:'',
|
|
606
|
+
f_meter_style:'',
|
|
607
|
+
f_position:'',
|
|
608
|
+
f_comments:''
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
cancel(){
|
|
612
|
+
this.cleardara()
|
|
613
|
+
this.$dispatch('cancel')
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
watch: {
|
|
617
|
+
'areatype'(){
|
|
618
|
+
this.initdata()
|
|
619
|
+
},
|
|
620
|
+
'areamodel.f_pcd_id'(){
|
|
621
|
+
// if (!this.areamodel.f_area_address) {
|
|
622
|
+
if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id){
|
|
623
|
+
if (this.findbyid(this.pcdslist,this.areamodel.f_pcd_id) && this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
|
|
624
|
+
this.areamodel.f_area_address = this.areamodel.f_area_address? 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
|
|
615
625
|
}
|
|
616
|
-
this.cleardara()
|
|
617
|
-
this.initdata()
|
|
618
626
|
}
|
|
627
|
+
// }
|
|
619
628
|
},
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
return this.$appdata.getParam('气价类型')
|
|
626
|
-
},
|
|
627
|
-
meterstyle () {
|
|
628
|
-
let ret = this.$GetSaleParam.getGasbrand()
|
|
629
|
-
let rs = new Array()
|
|
630
|
-
if(this.areamodel.f_meter_brand) {
|
|
631
|
-
ret.forEach((item, index) => {
|
|
632
|
-
if(this.areamodel.f_meter_brand == item.value.f_meter_brand) {
|
|
633
|
-
item.value.gasmodel.forEach((item1, index) =>{
|
|
634
|
-
rs.push({label: item1.label, value:item1.label})
|
|
635
|
-
})
|
|
636
|
-
}
|
|
637
|
-
})
|
|
629
|
+
'areamodel.f_street_id'(){
|
|
630
|
+
// if (!this.areamodel.f_area_address) {
|
|
631
|
+
if (this.areamodel.f_pcd_id && this.areamodel.f_street_id) {
|
|
632
|
+
if (this.findbyid(this.pcdslist, this.areamodel.f_pcd_id) && this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
|
|
633
|
+
this.areamodel.f_area_address = this.areamodel.f_area_address? 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
|
|
638
634
|
}
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
f_gasproperties: this.areamodel.f_gasproperties,
|
|
647
|
-
f_price_type: this.areamodel.f_price_type,
|
|
648
|
-
filter: this.f_filialeids
|
|
649
|
-
}
|
|
650
|
-
let ret = this.$GetSaleParam.getPrice(params)
|
|
651
|
-
ret.forEach((item, index) => {
|
|
652
|
-
rs.push({label: item.label, value: item.value.f_price_name})
|
|
653
|
-
})
|
|
635
|
+
}
|
|
636
|
+
// }
|
|
637
|
+
},
|
|
638
|
+
'f_filialeids'(){
|
|
639
|
+
if (this.areamodel.f_filialeid) {
|
|
640
|
+
if (this.areamodel.f_filialeid != this.f_filialeids) {
|
|
641
|
+
this.$dispatch('cancel')
|
|
654
642
|
}
|
|
655
|
-
|
|
656
|
-
|
|
643
|
+
}
|
|
644
|
+
this.cleardara()
|
|
645
|
+
this.initdata()
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
computed: {
|
|
649
|
+
userusetypes () {
|
|
650
|
+
return this.$appdata.getParam('用气类型')
|
|
651
|
+
},
|
|
652
|
+
usertypes () {
|
|
653
|
+
return this.$appdata.getParam('用户类型')
|
|
654
|
+
},
|
|
655
|
+
f_price_types () {
|
|
656
|
+
return this.$appdata.getParam('气价类型')
|
|
657
|
+
},
|
|
658
|
+
meterstyle () {
|
|
659
|
+
let ret = this.$GetSaleParam.getGasbrand()
|
|
660
|
+
let rs = new Array()
|
|
661
|
+
if(this.areamodel.f_meter_brand) {
|
|
662
|
+
ret.forEach((item, index) => {
|
|
663
|
+
if(this.areamodel.f_meter_brand == item.value.f_meter_brand) {
|
|
664
|
+
item.value.gasmodel.forEach((item1, index) =>{
|
|
665
|
+
rs.push({label: item1.label, value:item1.label})
|
|
666
|
+
})
|
|
667
|
+
}
|
|
668
|
+
})
|
|
669
|
+
}
|
|
670
|
+
return rs
|
|
671
|
+
},
|
|
672
|
+
pricenames () {
|
|
673
|
+
let rs = new Array()
|
|
674
|
+
if (this.areamodel.f_user_type && this.areamodel.f_gasproperties && this.areamodel.f_price_type) {
|
|
675
|
+
let params = {
|
|
676
|
+
f_user_type: this.areamodel.f_user_type,
|
|
677
|
+
f_gasproperties: this.areamodel.f_gasproperties,
|
|
678
|
+
f_price_type: this.areamodel.f_price_type,
|
|
679
|
+
filter: this.f_filialeids
|
|
657
680
|
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
681
|
+
let ret = this.$GetSaleParam.getPrice(params)
|
|
682
|
+
ret.forEach((item, index) => {
|
|
683
|
+
rs.push({label: item.label, value: item.value.f_price_name})
|
|
684
|
+
})
|
|
685
|
+
}
|
|
686
|
+
if (rs.length == 0) {
|
|
687
|
+
this.areamodel.f_price_name = ''
|
|
688
|
+
}
|
|
689
|
+
return rs
|
|
690
|
+
},
|
|
691
|
+
positions () {
|
|
692
|
+
return this.$appdata.getParam('安装位置')
|
|
693
|
+
},
|
|
694
|
+
inputtores () {
|
|
695
|
+
// 获取抄表员
|
|
696
|
+
let rs = new Array()
|
|
697
|
+
if (this.$login.f.f_gasman.length > 0) {
|
|
698
|
+
for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
|
|
699
|
+
let temp = {
|
|
700
|
+
label: this.$login.f.f_gasman[i].name,
|
|
701
|
+
value: this.$login.f.f_gasman[i].name
|
|
673
702
|
}
|
|
703
|
+
rs.push(temp)
|
|
674
704
|
}
|
|
675
|
-
|
|
676
|
-
|
|
705
|
+
}
|
|
706
|
+
return rs
|
|
677
707
|
},
|
|
678
|
-
}
|
|
708
|
+
},
|
|
709
|
+
}
|
|
679
710
|
</script>
|
|
680
711
|
<style>
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
712
|
+
.box {
|
|
713
|
+
width: 727px;
|
|
714
|
+
height: 175px;
|
|
715
|
+
border-radius: 2px;
|
|
716
|
+
background-color: #fafafa;
|
|
717
|
+
border: 1px solid #999999;
|
|
718
|
+
margin-top: 13px;
|
|
719
|
+
}
|
|
720
|
+
.datapanel {
|
|
721
|
+
color: #333;
|
|
722
|
+
background-color: white;
|
|
723
|
+
box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
|
|
724
|
+
padding: 10px 30px 10px 30px;
|
|
725
|
+
border-radius:15px;
|
|
726
|
+
}
|
|
696
727
|
</style>
|