address-client 4.0.2 → 4.0.3-yunChengV4

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.
Files changed (85) hide show
  1. package/.gradle/8.5/checksums/checksums.lock +0 -0
  2. package/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  3. package/.gradle/8.5/executionHistory/executionHistory.bin +0 -0
  4. package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
  5. package/.gradle/8.5/fileHashes/fileHashes.bin +0 -0
  6. package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  7. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  8. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  9. package/.gradle/file-system.probe +0 -0
  10. package/build/dev-server.js +13 -36
  11. package/package.json +4 -4
  12. package/src/address.js +0 -17
  13. package/src/components/AddAreaMsg.vue +466 -480
  14. package/src/components/AddStreetOrPcd.vue +17 -13
  15. package/src/components/AddressList.vue +2 -9
  16. package/src/components/AreaList.vue +2 -2
  17. package/src/components/AreaManage.vue +0 -4
  18. package/src/components/BatchOrders.vue +1 -1
  19. package/src/components/CityList.vue +1 -2
  20. package/src/components/NewAddressInfo.vue +1 -1
  21. package/src/components/StreetList.vue +1 -2
  22. package/src/components/UserAddress.vue +44 -61
  23. package/src/components/selectAddress/BatchList.vue +1 -1
  24. package/src/components/selectAddress/BatchOrders.vue +36 -37
  25. package/src/filiale/WEINAN/AddAreaMsg.vue +398 -464
  26. package/src/filiale/WEINAN/AddressList.vue +1 -1
  27. package/src/filiale/WEINAN/AreaList.vue +14 -59
  28. package/src/filiale/WEINAN/sale.js +1 -3
  29. package/src/filiale/gaomi/AddressList.vue +1 -1
  30. package/src/filiale/macheng/AddressList.vue +1 -1
  31. package/src/filiale/macheng/AreaList.vue +1 -1
  32. package/src/filiale/macheng/StreetList.vue +1 -1
  33. package/src/filiale/qianneng/AddAreaMsg.vue +0 -4
  34. package/src/filiale/qianneng/AddressList.vue +1 -1
  35. package/src/filiale/qianneng/AreaList.vue +1 -1
  36. package/src/filiale/qianneng/UserAddress.vue +45 -64
  37. package/src/filiale/qinhua/AddressList.vue +12 -10
  38. package/src/filiale/qinhua/AreaList.vue +13 -6
  39. package/src/filiale/qinhua/StreetList.vue +5 -6
  40. package/src/filiale/qinhua/UserAddress.vue +6 -6
  41. package/src/filiale/rongcheng/AddressList.vue +1 -1
  42. package/src/filiale/shanggao/AddressList.vue +1 -1
  43. package/src/filiale/shanggao/AreaList.vue +1 -1
  44. package/src/filiale/shanggao/StreetList.vue +1 -1
  45. package/src/filiale/shanxian/AddressList.vue +11 -39
  46. package/src/filiale/shanxian/AreaList.vue +4 -27
  47. package/src/filiale/shanxian/UserAddress.vue +8 -14
  48. package/src/filiale/tongchuan/AddStreetOrPcd.vue +0 -43
  49. package/src/filiale/tongchuan/AddressList.vue +1 -1
  50. package/src/filiale/tongchuan/AreaList.vue +1 -1
  51. package/src/filiale/tongchuan/CityList.vue +1 -1
  52. package/src/filiale/tongchuan/StreetList.vue +3 -10
  53. package/src/filiale/wuhai/UserAddress.vue +1 -1
  54. package/src/filiale/zhongsheng/AddressList.vue +1 -1
  55. package/src/filiale/zhongsheng/AreaList.vue +1 -1
  56. package/src/filiale/zhoukou/AddressList.vue +1 -1
  57. package/src/filiale/zhoukou/AreaList.vue +1 -1
  58. package/src/main.js +1 -1
  59. package/build/versionCheck.js +0 -31
  60. package/src/components/AddCommunityManageMsg.vue +0 -220
  61. package/src/components/AddStreetManageMsg.vue +0 -204
  62. package/src/components/AddressListLiuLi.vue +0 -17
  63. package/src/components/CommunityAreaList.vue +0 -87
  64. package/src/components/CommunityManage.vue +0 -78
  65. package/src/components/CommunityManageList.vue +0 -244
  66. package/src/components/StreetManage.vue +0 -68
  67. package/src/components/StreetManageList.vue +0 -225
  68. package/src/filiale/WEINAN/AreaManage.vue +0 -109
  69. package/src/filiale/WEINAN/AreaUserList.vue +0 -226
  70. package/src/filiale/haile/AddressList.vue +0 -615
  71. package/src/filiale/haile/sale.js +0 -8
  72. package/src/filiale/lixianV3/AreaList.vue +0 -416
  73. package/src/filiale/lixianV3/sale.js +0 -12
  74. package/src/filiale/meihekou/UserAddress.vue +0 -898
  75. package/src/filiale/meihekou/sale.js +0 -8
  76. package/src/filiale/rizhao/UserAddress.vue +0 -897
  77. package/src/filiale/rizhao/sale.js +0 -8
  78. package/src/filiale/xihu/AreaList.vue +0 -409
  79. package/src/filiale/xihu/StreetList.vue +0 -238
  80. package/src/filiale/xihu/sale.js +0 -14
  81. package/src/filiale/xinkang/AddAreaMsg.vue +0 -780
  82. package/src/filiale/xinkang/AreaList.vue +0 -413
  83. package/src/filiale/xinkang/sale.js +0 -9
  84. package/src/filiale/yangchun/AddAreaMsg.vue +0 -764
  85. package/src/filiale/yangchun/sale.js +0 -7
@@ -89,16 +89,16 @@
89
89
  class="form-control" placeholder="单位地址">
90
90
  </div>
91
91
  <div
92
- class="col-sm-6 form-group"
93
- :class="[$v.f_linkname.required ? 'has-error' : 'has-success']">
92
+ class="col-sm-6 form-group"
93
+ :class="[$v.f_linkname.required ? 'has-error' : 'has-success']">
94
94
  <label class="font_normal_body">联&ensp;系&ensp;人</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
- class="col-sm-6 form-group"
101
- :class="[$v.f_linkphone.required ? 'has-error' : 'has-success']">
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="联系电话"
@@ -116,41 +116,6 @@
116
116
  <span >默认表具信息</span>
117
117
  </div>
118
118
  <div v-if="!f_special" class="row">
119
- <div class="col-sm-6 form-group" :class="[$v.f_user_usetype.required ? 'has-error' : 'has-success']">
120
- <label for="f_user_usetype" class="font_normal_body ">用气类型</label>
121
- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_user_usetype"
122
- v-validate:f_user_usetype='{required: true }'>
123
- <v-select :value.sync="areamodel.f_user_usetype" :search="false"
124
- @change="userUseTypeChange()"
125
- :value-single="true"
126
- :options='userusetypes' placeholder='用气类型' close-on-select>
127
- </v-select>
128
- </div>
129
- <div class="col-sm-6 form-group" :class="[$v.f_use_institution.required ? 'has-error' : 'has-success']">
130
- <label for="f_use_institution" class="font_normal_body">用气机构</label>
131
- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_use_institution"
132
- v-validate:f_use_institution='{required: true }'>
133
- <v-select :value.sync="areamodel.f_use_institution" :search="false"
134
- @change="userUseInstitutionChange()" :value-single="true"
135
- :options='useinstitutions' placeholder='用气机构' close-on-select>
136
- </v-select>
137
- </div>
138
- <div class="col-sm-6 form-group" :class="[$v.f_user_usenature.required ? 'has-error' : 'has-success']">
139
- <label for="f_user_usenature" class="font_normal_body ">使用性质</label>
140
- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_user_usenature"
141
- v-validate:f_user_usenature='{required: true }'>
142
- <v-select :value.sync="areamodel.f_user_usenature" :search="false"
143
- :value-single="true"
144
- :options='userusenatures' placeholder='使用性质' close-on-select>
145
- </v-select>
146
- </div>
147
- <div class="col-sm-6 form-group" style="text-align:right;">
148
- <button class="button_clear button_spacing" v-if="!configShow" @click="changeConfig()">更多默认</button>
149
- <button class="button_clear button_spacing" v-if="configShow" @click="changeConfig()">收起更多</button>
150
- </div>
151
- </div>
152
-
153
- <div v-if="!f_special && configShow" class="row">
154
119
  <div class="col-sm-6 form-group">
155
120
  <label class="font_normal_body">用户类型</label>
156
121
  <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_user_type"
@@ -226,9 +191,9 @@
226
191
  </div>
227
192
  <div class="col-sm-6 form-group" >
228
193
  <label class="font_normal_body">抄&ensp;表&ensp;册</label>
229
- <!-- <input type="text" style="width:60%" class="input_search" v-show="false"
230
- v-validate:f_meter_book='{required: true }'
231
- v-model="areamodel.f_meter_book">-->
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">-->
232
197
  <v-select
233
198
  :value.sync="areamodel.f_meter_book" :value-single="true"
234
199
  :options='meterbooks' placeholder='抄表册'
@@ -237,24 +202,24 @@
237
202
  </div>
238
203
  <div class="col-sm-6 form-group" >
239
204
  <label class="font_normal_body">抄&ensp;表&ensp;员</label>
240
- <!-- <input type="text" style="width:60%" class="input_search"
241
- v-validate:f_inputtor='{required: true }'
242
- v-show="false" v-model="areamodel.f_inputtor">-->
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">-->
243
208
  <v-select
244
209
  :value.sync="areamodel.f_inputtor" :value-single="true"
245
210
  :options='inputtores' placeholder='抄表员'
246
211
  close-on-select >
247
212
  </v-select>
248
213
  </div>
249
- <!-- <div class="col-sm-6 form-group">
250
- <label class="font_normal_body">调&ensp;压&ensp;箱</label>
251
- <input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_adjustable_id">
252
- <v-select
253
- :value.sync="areamodel.f_adjustable_id" :value-single="true"
254
- :options='adjustables' placeholder='调压箱'
255
- close-on-select >
256
- </v-select>
257
- </div>-->
214
+ <!-- <div class="col-sm-6 form-group">
215
+ <label class="font_normal_body">调&ensp;压&ensp;箱</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>-->
258
223
  <div class="col-sm-6 form-group">
259
224
  <label class="font_normal_body">房屋类型</label>
260
225
  <v-select
@@ -273,7 +238,7 @@
273
238
  <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
274
239
  <button class="button_clear button_spacing" @click="cancel()">取消</button>
275
240
  </div>
276
- <!-- <div class="inp_button" type="button" @click="fileUpload()" v-show="!isupload">上传图片</div>-->
241
+ <!-- <div class="inp_button" type="button" @click="fileUpload()" v-show="!isupload">上传图片</div>-->
277
242
  </div>
278
243
  </validator>
279
244
  <modal :show.sync="showUpload" v-ref:modal backdrop="false" width="80%">
@@ -293,453 +258,422 @@
293
258
  </template>
294
259
 
295
260
  <script>
296
- import {HttpResetClass} from 'vue-client'
261
+ import {HttpResetClass} from 'vue-client'
297
262
 
298
263
 
299
- let initGen = async function (self) {
300
- await self.initdata()
301
- try {
264
+ let initGen = async function (self) {
265
+ await self.initdata()
302
266
  await self.$LoadParams.loadMeterBook(self.f_filialeids)
303
-
304
- }catch (e) {
305
-
306
- }
307
- try {
308
267
  await self.loadMeterBooks();
309
- }catch (e) {
310
-
311
268
  }
312
- }
313
269
 
314
- export default {
315
- title: '小区添加',
316
- data () {
317
- return {
318
- //初始化省市区数据
319
- pcdslist:[],
320
- showUpload:'',//上传标识位
321
- configShow: false,
322
- //初始化街道数据
323
- streetslist:[],
324
- //小区
325
- areamodel: {
326
- f_area_id: '',
327
- f_pcd_id:'',
328
- f_linkname:'',
329
- f_linkphone:'',
330
- f_street_id:'',
331
- f_slice_area:'',
332
- f_adjustable_id:'',
333
- f_residential_area:'',
334
- f_user_type:'',
335
- f_gasproperties:'',
336
- f_use_institution:'',
337
- f_user_usetype:'居民用气',
338
- f_user_usenature:'生活用气',
339
- f_meter_brand:'',
340
- f_price_name:'',
341
- f_area_address:'',
342
- f_price_type:'',
343
- f_meter_style:'',
344
- f_position:'',
345
- f_comments:''
346
- },
347
- useinstitutions:[],
348
- userusenatures:[],
349
- meterbrands: [],
350
- adjustables: [],
351
- sliceArea: [],
352
- safeCheckArea: [],
353
- gasproperties: [],
354
- meterbooks:[{label: '全部',value: ''}],
355
- housetypeoptions:[{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
356
- }
357
- },
358
- props: ['f_filialeids','f_special', 'areatype','row','operation','isupload'],
359
- ready(){
360
- initGen(this)
361
- },
362
- methods: {
363
- // 更多默认
364
- changeConfig(){
365
- this.configShow = !this.configShow
366
- },
367
- userUseInstitutionChange () {
368
- this.userusenatures = []
369
- let str = this.areamodel.f_use_institution+ '使用性质'
370
- this.userusenatures = this.$appdata.getParam(str)
371
- },
372
- userUseTypeChange () {
373
- console.log('看看进来用户用气类型变化的方法了吗???')
374
- this.useinstitutions = []
375
- let str = this.areamodel.f_user_usetype + '机构'
376
- this.useinstitutions = this.$appdata.getParam(str)
377
- },
378
- loadMeterBooks(){
379
- this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
380
- },
381
- //初始化数据
382
- async initdata(){
383
- // 初始化参数
384
- await this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
385
- await this.initSlice(this.f_filialeids)
386
- await this.initParams()
387
- // 初始化片区
388
- // await this.initstreets(` f_filialeid = '${this.f_filialeids}'`)
389
- },
390
- // 打开文件上传对话框
391
- fileUpload() {
392
- this.showUpload = true
393
- },
394
- // 关闭文件上传对话框
395
- close() {
396
- this.showUpload = false
397
- // 将选的文件清空
398
- // this.$refs.file.$el.querySelector('input').value = ''
399
- // this.load(this)
400
- },
401
- initrow(val){
402
- this.areamodel.f_meter_book = val.f_meter_book;
403
- this.areamodel.f_adjustable_id = val.f_adjustable_id;
404
- },
405
- async initParams() {
406
- try {
407
- await this.$LoadParams.loadParam(this.f_filialeids)
408
- }catch (e) {
270
+ export default {
271
+ title: '小区添加',
272
+ data () {
273
+ return {
274
+ //初始化省市区数据
275
+ pcdslist:[],
276
+ showUpload:'',//上传标识位
277
+ //初始化街道数据
278
+ streetslist:[],
279
+ //小区
280
+ areamodel: {
281
+ f_area_id: '',
282
+ f_pcd_id:'',
283
+ f_linkname:'',
284
+ f_linkphone:'',
285
+ f_street_id:'',
286
+ f_slice_area:'',
287
+ f_adjustable_id:'',
288
+ f_residential_area:'',
289
+ f_user_type:'',
290
+ f_gasproperties:'',
291
+ f_meter_brand:'',
292
+ f_price_name:'',
293
+ f_area_address:'',
294
+ f_price_type:'',
295
+ f_meter_style:'',
296
+ f_position:'',
297
+ f_comments:''
298
+ },
409
299
 
300
+ meterbrands: [],
301
+ adjustables: [],
302
+ sliceArea: [],
303
+ safeCheckArea: [],
304
+ gasproperties: [],
305
+ meterbooks:[{label: '全部',value: ''}],
306
+ housetypeoptions:[{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
410
307
  }
411
- this.initBrands()
412
- await this.initSafeCheckArea()
413
- // this.initAdjustables()
414
308
  },
309
+ props: ['f_filialeids','f_special', 'areatype','row','operation','isupload'],
310
+ ready(){
311
+
312
+ // initGen(this)
415
313
 
416
- initBrands () {
417
- let ret = []
418
- try {
419
- ret = this.$GetSaleParam.getGasbrand()
420
- } catch(e){}
421
- // let ret = this.$GetSaleParam.getGasbrand()
422
- let rs = new Array()
423
- ret.forEach((item, index) =>{
424
- rs.push({label: item.label, value: item.value.f_meter_brand})
425
- })
426
- this.meterbrands = rs
427
- },
428
- async initSafeCheckArea () {
429
- this.safeCheckArea = []
430
- let data = {
431
- items: 'id,f_check_book_name',
432
- tablename: 't_check_book',
433
- orderitem: 'id',
434
- condition: `f_orgid=${this.$login.f.orgid}`
435
- }
436
- let ret = await this.$resetpost('api/af-revenue/sql/address_singleTableOrderBy',{data: data},{resolveMsg: null, rejectMsg: null,newly:true})
437
- ret.data.forEach(item => {
438
- this.safeCheckArea.push({label: item.f_check_book_name, value: item.id})
439
- })
440
314
  },
441
- /*
442
- initAdjustables () {
443
- let filter = this.$login.f.orgid
444
- let ret = this.$GetSaleParam.getAdjustable(filter)
445
- let arr = new Array()
446
- ret.forEach((item, index) => {
447
- arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
448
- })
449
- this.adjustables = arr
450
- },*/
315
+ methods: {
316
+ loadMeterBooks(){
317
+ this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
318
+ },
319
+ //初始化数据
320
+ async initdata(){
321
+ // 初始化参数
322
+ await this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
323
+ await this.initSlice(this.f_filialeids)
324
+ await this.initParams()
325
+
326
+ // 初始化片区
451
327
 
452
- async initSlice (val) {
453
- if (val) {
454
- let getAllArea = await this.$resetpost('/rs/search', {
455
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
456
- userid: this.$login.f.id
457
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!',newly:true})
458
328
 
459
- let arr = getAllArea.data.filter((res) => {
460
- return res.parentid == val
329
+ // await this.initstreets(` f_filialeid = '${this.f_filialeids}'`)
330
+ },
331
+ // 打开文件上传对话框
332
+ fileUpload() {
333
+ this.showUpload = true
334
+ },
335
+ // 关闭文件上传对话框
336
+ close() {
337
+ this.showUpload = false
338
+ // 将选的文件清空
339
+ // this.$refs.file.$el.querySelector('input').value = ''
340
+ // this.load(this)
341
+ },
342
+ initrow(val){
343
+ this.areamodel.f_meter_book = val.f_meter_book;
344
+ this.areamodel.f_adjustable_id = val.f_adjustable_id;
345
+ },
346
+ async initParams() {
347
+ await this.$LoadParams.loadParam(this.f_filialeids)
348
+ this.initBrands()
349
+ this.initSafeCheckArea()
350
+ // this.initAdjustables()
351
+ },
352
+
353
+ initBrands () {
354
+ let ret = this.$GetSaleParam.getGasbrand()
355
+ let rs = new Array()
356
+ ret.forEach((item, index) =>{
357
+ rs.push({label: item.label, value: item.value.f_meter_brand})
461
358
  })
462
- this.sliceArea = []
463
- arr.forEach((res) => {
464
- this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
359
+ this.meterbrands = rs
360
+ },
361
+ async initSafeCheckArea () {
362
+ this.safeCheckArea = []
363
+ let data = {
364
+ items: 'id,f_check_book_name',
365
+ tablename: 't_check_book',
366
+ orderitem: 'id',
367
+ condition: `f_orgid=${this.$login.f.orgid}`
368
+ }
369
+ let ret = await this.$resetpost('api/af-revenue/sql/address_singleTableOrderBy',{data: data},{resolveMsg: null, rejectMsg: null})
370
+ ret.data.forEach(item => {
371
+ this.safeCheckArea.push({label: item.f_check_book_name, value: item.id})
465
372
  })
466
- }
467
- },
373
+ },
374
+ /*
375
+ initAdjustables () {
376
+ let filter = this.$login.f.orgid
377
+ let ret = this.$GetSaleParam.getAdjustable(filter)
378
+ let arr = new Array()
379
+ ret.forEach((item, index) => {
380
+ arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
381
+ })
382
+ this.adjustables = arr
383
+ },*/
468
384
 
469
- //初始化省市区,添加街道
470
- async initpcds(pconditon){
471
- this.pcdslist = []
472
- let HttpReset = new HttpResetClass()
473
- let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTable', {
474
- data: {
475
- items: '*',
476
- tablename: 't_pcd',
477
- condition: pconditon
478
- }
479
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
480
- let redata = []
481
- req.data.forEach((row, n) => {
482
- redata[n] = {
483
- label: row.f_pcd,
484
- value: row.id,
485
- data:row,
486
- id:row.id
385
+ async initSlice (val) {
386
+ if (val) {
387
+ let getAllArea = await this.$resetpost('/rs/search', {
388
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
389
+ userid: this.$login.f.id
390
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
391
+
392
+ let arr = getAllArea.data.filter((res) => {
393
+ return res.parentid == val
394
+ })
395
+ this.sliceArea = []
396
+ arr.forEach((res) => {
397
+ this.sliceArea.push({label: res.name, value: {name: res.name, code:res.number}})
398
+ })
487
399
  }
488
- })
489
- this.pcdslist=redata
490
- },
491
- //初始化街道 添加小区
492
- async initstreets(pconditon){
493
- this.streetslist = []
494
- let HttpReset = new HttpResetClass()
495
- let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
496
- data: {
497
- items: '*',
498
- tablename: 't_street',
499
- orderitem: 'id',
500
- condition: pconditon
400
+ },
401
+
402
+ //初始化省市区,添加街道
403
+ async initpcds(pconditon){
404
+ this.pcdslist = []
405
+ let HttpReset = new HttpResetClass()
406
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTable', {
407
+ data: {
408
+ items: '*',
409
+ tablename: 't_pcd',
410
+ condition: pconditon
411
+ }
412
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
413
+ let redata = []
414
+ req.data.forEach((row, n) => {
415
+ redata[n] = {
416
+ label: row.f_pcd,
417
+ value: row.id,
418
+ data:row,
419
+ id:row.id
420
+ }
421
+ })
422
+ this.pcdslist=redata
423
+ },
424
+ //初始化街道 添加小区
425
+ async initstreets(pconditon){
426
+ this.streetslist = []
427
+ let HttpReset = new HttpResetClass()
428
+ let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
429
+ data: {
430
+ items: '*',
431
+ tablename: 't_street',
432
+ orderitem: 'id',
433
+ condition: pconditon
434
+ }
435
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
436
+ let redata = []
437
+ req.data.forEach((row, n) => {
438
+ redata[n] = {
439
+ label: row.f_street,
440
+ value: row.id,
441
+ data:row,
442
+ id:row.id
443
+ }
444
+ })
445
+ this.streetslist=redata
446
+ },
447
+
448
+ async areaidChange () {
449
+ // 验证小区编号是否已存在
450
+
451
+ let param = {
452
+ id: this.areamodel.id,
453
+ f_area_id: this.areamodel.f_area_id,
454
+ f_filialeid: this.f_filialeids
501
455
  }
502
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
503
- let redata = []
504
- req.data.forEach((row, n) => {
505
- redata[n] = {
506
- label: row.f_street,
507
- value: row.id,
508
- data:row,
509
- id:row.id
456
+
457
+ let res = await this.$resetpost('api/af-revenue/logic/address_validateAreaID', param, {resolveMsg: null,rejectMsg: '小区编号验证失败!!'})
458
+ console.log('验证小区是否存在', res)
459
+ if (res.data) {
460
+ this.$showAlert('这个小区编号已存在!!!请核实', 'warning', 3000)
461
+ this.areamodel.f_area_id = ''
510
462
  }
511
- })
512
- this.streetslist=redata
513
- },
514
- async areaidChange () {
515
- // 验证小区编号是否已存在
516
- let param = {
517
- id: this.areamodel.id,
518
- f_area_id: this.areamodel.f_area_id,
519
- f_filialeid: this.f_filialeids
520
- }
521
- let res = await this.$resetpost('api/af-revenue/logic/address_validateAreaID', param, {resolveMsg: null,rejectMsg: '小区编号验证失败!!'})
522
- console.log('验证小区是否存在', res)
523
- if (res.data) {
524
- this.$showAlert('这个小区编号已存在!!!请核实', 'warning', 3000)
525
- this.areamodel.f_area_id = ''
526
- }
527
- },
528
- //根据名字找数据
529
- findbyid(list,name){
530
- var result
531
- list.forEach((row, n) => {
532
- if(name==row.id){
533
- result= row.data
463
+
464
+ },
465
+
466
+
467
+ //根据名字找数据
468
+ findbyid(list,name){
469
+ var result
470
+ list.forEach((row, n) => {
471
+ if(name==row.id){
472
+ result= row.data
473
+ }
474
+ })
475
+ return result
476
+ },
477
+ userTypeChange () {
478
+ this.gasproperties = []
479
+ if (this.areamodel.f_user_type) {
480
+ this.gasproperties = this.$appdata.getParam(this.areamodel.f_user_type)
534
481
  }
535
- })
536
- return result
537
- },
538
- userTypeChange () {
539
- this.gasproperties = []
540
- if (this.areamodel.f_user_type) {
541
- this.gasproperties = this.$appdata.getParam(this.areamodel.f_user_type)
542
- }
543
- },
544
- //省/市/区变化
545
- async pcdChange(val){
546
- if(val){
547
- //那就把街道数据重新组织一下
548
- await this.initstreets(` f_filialeid = '${this.f_filialeids}' and f_pcd_id ='${val}' `)
549
- if(this.areamodel.f_street_id){
550
- if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
551
- let pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
552
- if(pcd_id!=val){
482
+ },
483
+
484
+ //省/市/区变化
485
+ async pcdChange(val){
486
+ if(val){
487
+ //那就把街道数据重新组织一下
488
+ await this.initstreets(` f_filialeid = '${this.f_filialeids}' and f_pcd_id ='${val}' `)
489
+ if(this.areamodel.f_street_id){
490
+ if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
491
+ let pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
492
+ if(pcd_id!=val){
493
+ this.areamodel.f_street_id=''
494
+ }
495
+ } else {
553
496
  this.areamodel.f_street_id=''
554
497
  }
555
- } else {
556
- this.areamodel.f_street_id=''
557
- }
558
498
 
499
+ }
559
500
  }
560
- }
561
- this.$resetValidation()
562
- },
563
- //街道变化
564
- streetChange(val){
565
- if(val&&this.operation=='add'){
566
- // if(this.areamodel.f_pcd_id.length==0){
567
- if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
568
- console.log("aa",this.findbyid(this.streetslist,this.areamodel.f_street_id))
569
- console.log("bbb",this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id)
570
- this.areamodel.f_pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
501
+ this.$resetValidation()
502
+ },
503
+ //街道变化
504
+ streetChange(val){
505
+ if(val&&this.operation=='add'){
506
+ // if(this.areamodel.f_pcd_id.length==0){
507
+ if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
508
+ console.log("aa",this.findbyid(this.streetslist,this.areamodel.f_street_id))
509
+ console.log("bbb",this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id)
510
+ this.areamodel.f_pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
511
+ }
512
+ // }
571
513
  }
572
- // }
573
- }
574
- this.$resetValidation()
575
- },
576
- //保存
577
- async confirm(){
578
- await this.savearea()
579
- this.cleardara()
580
- this.$dispatch('confirm')
581
- },
582
- //保存小区
583
- async savearea(){
584
- if(this.f_special){
585
- this.areamodel.f_special='1'
586
- }
587
- this.areamodel.f_filialeid = this.f_filialeids
588
- this.areamodel.f_operator = this.$login.f.name
589
- this.areamodel.f_operatorid = this.$login.f.id
590
- this.areamodel.f_orgid = this.$login.f.orgid
591
- this.areamodel.f_orgname = this.$login.f.orgs
592
- this.areamodel.f_depid = this.$login.f.depids
593
- this.areamodel.f_depname = this.$login.f.deps
594
- if (this.areamodel.slice_area) {
595
- if (this.areamodel.slice_area.length > 0) {
596
- this.areamodel.f_slice_area = this.areamodel.slice_area[0].name
597
- this.areamodel.f_area_code = this.areamodel.slice_area[0].code
514
+ this.$resetValidation()
515
+ },
516
+ //保存
517
+ async confirm(){
518
+ await this.savearea()
519
+ this.cleardara()
520
+ this.$dispatch('confirm')
521
+ },
522
+ //保存小区
523
+ async savearea(){
524
+ if(this.f_special){
525
+ this.areamodel.f_special='1'
598
526
  }
599
- }
600
- this.areamodel.f_pcd=this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd
601
- this.areamodel.f_street=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
527
+ this.areamodel.f_filialeid = this.f_filialeids
528
+ this.areamodel.f_operator = this.$login.f.name
529
+ this.areamodel.f_operatorid = this.$login.f.id
530
+ this.areamodel.f_orgid = this.$login.f.orgid
531
+ this.areamodel.f_orgname = this.$login.f.orgs
532
+ this.areamodel.f_depid = this.$login.f.depids
533
+ this.areamodel.f_depname = this.$login.f.deps
534
+ if (this.areamodel.slice_area) {
535
+ if (this.areamodel.slice_area.length > 0) {
536
+ this.areamodel.f_slice_area = this.areamodel.slice_area[0].name
537
+ this.areamodel.f_area_code = this.areamodel.slice_area[0].code
538
+ }
539
+ }
540
+ this.areamodel.f_pcd=this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd
541
+ this.areamodel.f_street=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
602
542
 
603
- await this.$resetpost('api/af-revenue/logic/address_updatearea', this.areamodel)
604
- },
605
- cleardara(){
606
- this.areamodel= {
607
- f_area_id: '',
608
- f_pcd_id:'',
609
- f_street_id:'',
610
- f_slice_area:'',
611
- f_linkname:'',
612
- f_linkphone:'',
613
- f_adjustable_id:'',
614
- f_use_institution:'',
615
- f_user_usetype:'居民用气',
616
- f_user_usenature:'生活用气',
617
- f_residential_area:'',
618
- f_user_type:'',
619
- f_gasproperties:'',
620
- f_area_address:'',
621
- f_meter_brand:'',
622
- f_price_name:'',
623
- f_price_type:'',
624
- f_meter_style:'',
625
- f_position:'',
626
- f_comments:''
627
- }
628
- },
629
- cancel(){
630
- this.cleardara()
631
- this.$dispatch('cancel')
632
- },
633
- },
634
- watch: {
635
- 'areatype'(){
636
- this.initdata()
637
- },
638
- 'areamodel.f_pcd_id'(){
639
- // if (!this.areamodel.f_area_address) {
640
- if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id){
641
- if (this.findbyid(this.pcdslist,this.areamodel.f_pcd_id) && this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
642
- 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
543
+ await this.$resetpost('api/af-revenue/logic/address_updatearea', this.areamodel)
544
+ },
545
+ cleardara(){
546
+ this.areamodel= {
547
+ f_area_id: '',
548
+ f_pcd_id:'',
549
+ f_street_id:'',
550
+ f_slice_area:'',
551
+ f_linkname:'',
552
+ f_linkphone:'',
553
+ f_adjustable_id:'',
554
+ f_residential_area:'',
555
+ f_user_type:'',
556
+ f_gasproperties:'',
557
+ f_area_address:'',
558
+ f_meter_brand:'',
559
+ f_price_name:'',
560
+ f_price_type:'',
561
+ f_meter_style:'',
562
+ f_position:'',
563
+ f_comments:''
643
564
  }
644
- }
645
- // }
565
+ },
566
+ cancel(){
567
+ this.cleardara()
568
+ this.$dispatch('cancel')
569
+ },
646
570
  },
647
- 'areamodel.f_street_id'(){
648
- // if (!this.areamodel.f_area_address) {
649
- if (this.areamodel.f_pcd_id && this.areamodel.f_street_id) {
650
- if (this.findbyid(this.pcdslist, this.areamodel.f_pcd_id) && this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
651
- 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
571
+ watch: {
572
+ 'areatype'(){
573
+ this.initdata()
574
+ },
575
+ 'areamodel.f_pcd_id'(){
576
+ // if (!this.areamodel.f_area_address) {
577
+ if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id){
578
+ if (this.findbyid(this.pcdslist,this.areamodel.f_pcd_id) && this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
579
+ 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
580
+ }
652
581
  }
653
- }
654
- // }
655
- },
656
- 'f_filialeids'(){
657
- if (this.areamodel.f_filialeid) {
658
- if (this.areamodel.f_filialeid != this.f_filialeids) {
659
- this.$dispatch('cancel')
582
+ // }
583
+ },
584
+ 'areamodel.f_street_id'(){
585
+ // if (!this.areamodel.f_area_address) {
586
+ if (this.areamodel.f_pcd_id && this.areamodel.f_street_id) {
587
+ if (this.findbyid(this.pcdslist, this.areamodel.f_pcd_id) && this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
588
+ 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
589
+ }
660
590
  }
661
- }
662
- this.cleardara()
663
- this.initdata()
664
- }
665
- },
666
- computed: {
667
- userusetypes () {
668
- return this.$appdata.getParam('用气类型')
669
- },
670
- usertypes () {
671
- return this.$appdata.getParam('用户类型')
672
- },
673
- f_price_types () {
674
- return this.$appdata.getParam('气价类型')
675
- },
676
- meterstyle () {
677
- let ret = this.$GetSaleParam.getGasbrand()
678
- let rs = new Array()
679
- if(this.areamodel.f_meter_brand) {
680
- ret.forEach((item, index) => {
681
- if(this.areamodel.f_meter_brand == item.value.f_meter_brand) {
682
- item.value.gasmodel.forEach((item1, index) =>{
683
- rs.push({label: item1.label, value:item1.label})
684
- })
591
+ // }
592
+ },
593
+ 'f_filialeids'(){
594
+ if (this.areamodel.f_filialeid) {
595
+ if (this.areamodel.f_filialeid != this.f_filialeids) {
596
+ this.$dispatch('cancel')
685
597
  }
686
- })
687
- }
688
- return rs
689
- },
690
- pricenames () {
691
- let rs = new Array()
692
- if (this.areamodel.f_user_type && this.areamodel.f_gasproperties && this.areamodel.f_price_type) {
693
- let params = {
694
- f_user_type: this.areamodel.f_user_type,
695
- f_gasproperties: this.areamodel.f_gasproperties,
696
- f_price_type: this.areamodel.f_price_type,
697
- filter: this.f_filialeids
698
598
  }
699
- let ret = this.$GetSaleParam.getPrice(params)
700
- ret.forEach((item, index) => {
701
- rs.push({label: item.label, value: item.value.f_price_name})
702
- })
599
+ this.cleardara()
600
+ this.initdata()
703
601
  }
704
- if (rs.length == 0) {
705
- this.areamodel.f_price_name = ''
706
- }
707
- return rs
708
- },
709
- positions () {
710
- return this.$appdata.getParam('安装位置')
711
602
  },
712
- inputtores () {
713
- // 获取抄表员
714
- let rs = new Array()
715
- if (this.$login.f.f_gasman.length > 0) {
716
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
717
- let temp = {
718
- label: this.$login.f.f_gasman[i].name,
719
- value: this.$login.f.f_gasman[i].name
603
+ computed: {
604
+ usertypes () {
605
+ return this.$appdata.getParam('用户类型')
606
+ },
607
+ f_price_types () {
608
+ return this.$appdata.getParam('气价类型')
609
+ },
610
+ meterstyle () {
611
+ let ret = this.$GetSaleParam.getGasbrand()
612
+ let rs = new Array()
613
+ if(this.areamodel.f_meter_brand) {
614
+ ret.forEach((item, index) => {
615
+ if(this.areamodel.f_meter_brand == item.value.f_meter_brand) {
616
+ item.value.gasmodel.forEach((item1, index) =>{
617
+ rs.push({label: item1.label, value:item1.label})
618
+ })
619
+ }
620
+ })
621
+ }
622
+ return rs
623
+ },
624
+ pricenames () {
625
+ let rs = new Array()
626
+ if (this.areamodel.f_user_type && this.areamodel.f_gasproperties && this.areamodel.f_price_type) {
627
+ let params = {
628
+ f_user_type: this.areamodel.f_user_type,
629
+ f_gasproperties: this.areamodel.f_gasproperties,
630
+ f_price_type: this.areamodel.f_price_type,
631
+ filter: this.f_filialeids
720
632
  }
721
- rs.push(temp)
633
+ let ret = this.$GetSaleParam.getPrice(params)
634
+ ret.forEach((item, index) => {
635
+ rs.push({label: item.label, value: item.value.f_price_name})
636
+ })
722
637
  }
723
- }
724
- return rs
638
+ if (rs.length == 0) {
639
+ this.areamodel.f_price_name = ''
640
+ }
641
+ return rs
642
+ },
643
+ positions () {
644
+ return this.$appdata.getParam('安装位置')
645
+ },
646
+ inputtores () {
647
+ // 获取抄表员
648
+ let rs = new Array()
649
+ if (this.$login.f.f_gasman.length > 0) {
650
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
651
+ let temp = {
652
+ label: this.$login.f.f_gasman[i].name,
653
+ value: this.$login.f.f_gasman[i].name
654
+ }
655
+ rs.push(temp)
656
+ }
657
+ }
658
+ return rs
659
+ },
725
660
  },
726
- },
727
- }
661
+ }
728
662
  </script>
729
663
  <style>
730
- .box {
731
- width: 727px;
732
- height: 175px;
733
- border-radius: 2px;
734
- background-color: #fafafa;
735
- border: 1px solid #999999;
736
- margin-top: 13px;
737
- }
738
- .datapanel {
739
- color: #333;
740
- background-color: white;
741
- box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
742
- padding: 10px 30px 10px 30px;
743
- border-radius:15px;
744
- }
664
+ .box {
665
+ width: 727px;
666
+ height: 175px;
667
+ border-radius: 2px;
668
+ background-color: #fafafa;
669
+ border: 1px solid #999999;
670
+ margin-top: 13px;
671
+ }
672
+ .datapanel {
673
+ color: #333;
674
+ background-color: white;
675
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
676
+ padding: 10px 30px 10px 30px;
677
+ border-radius:15px;
678
+ }
745
679
  </style>