address-client 3.2.2 → 3.2.3-zk

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