address-client 3.2.107 → 3.2.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/AddAreaMsg.vue +486 -463
- package/src/components/UserAddress.vue +7 -9
package/package.json
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<validator name='v'>
|
|
4
4
|
<div class="form-horizontal select-overspread container-fluid" style="overflow-y: auto">
|
|
5
5
|
<div class="row auto">
|
|
6
|
-
<div class="col-sm-12 bg-info text-center"
|
|
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>
|
|
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
11
|
</div>
|
|
12
12
|
<div v-if="areatype != '楼栋'">
|
|
13
13
|
<!--基本小区(单位)信息-->
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
<div class="col-sm-6 form-group"
|
|
29
29
|
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
|
|
30
30
|
<label class="font_normal_body">省 市 区</label>
|
|
31
|
-
<input type="text" class="input_search" class="input_search" style="width:60%" v-show="false"
|
|
31
|
+
<input type="text" class="input_search" class="input_search" style="width:60%" v-show="false"
|
|
32
|
+
v-model="areamodel.f_pcd_id"
|
|
32
33
|
v-validate:f_pcd_id='{required: true }'>
|
|
33
34
|
<v-select
|
|
34
35
|
:value.sync="areamodel.f_pcd_id" :value-single="true"
|
|
@@ -47,19 +48,26 @@
|
|
|
47
48
|
close-on-select search="true" @change="streetChange">
|
|
48
49
|
</v-select>
|
|
49
50
|
</div>
|
|
51
|
+
<div class="col-sm-6 form-group">
|
|
52
|
+
<label class="font_normal_body">片  区</label>
|
|
53
|
+
<v-select :value.sync="areamodel.slice_area" v-model="areamodel.slice_area"
|
|
54
|
+
:options='sliceArea' placeholder='片区/管理站' filer-key="name"
|
|
55
|
+
close-on-select v-ref:slice>
|
|
56
|
+
</v-select>
|
|
57
|
+
</div>
|
|
50
58
|
<!--小区(特殊)信息-->
|
|
51
59
|
<div v-if="!f_special"
|
|
52
60
|
class="col-sm-6 form-group"
|
|
53
61
|
:class="[$v.f_residential_area.required ? 'has-error' : 'has-success']">
|
|
54
62
|
<label class="font_normal_body">小区名称</label>
|
|
55
|
-
<input type="text" style="width:60%" class="input_search"
|
|
63
|
+
<input type="text" style="width:60%" class="input_search" v-model="areamodel.f_residential_area"
|
|
56
64
|
class="form-control" placeholder="小区名称"
|
|
57
65
|
v-validate:f_residential_area='{required: true }'>
|
|
58
66
|
</div>
|
|
59
67
|
<div v-if="!f_special"
|
|
60
68
|
class="col-sm-12 form-group">
|
|
61
69
|
<label class="font_normal_body">小区地址</label>
|
|
62
|
-
<input type="text" style="width:80%" class="input_search"
|
|
70
|
+
<input type="text" style="width:80%" class="input_search" v-model="areamodel.f_area_address"
|
|
63
71
|
class="form-control" placeholder="小区地址">
|
|
64
72
|
</div>
|
|
65
73
|
<!--单位(特殊)信息-->
|
|
@@ -67,21 +75,21 @@
|
|
|
67
75
|
class="col-sm-6 form-group"
|
|
68
76
|
:class="[$v.f_residential_area.required ? 'has-error' : 'has-success']">
|
|
69
77
|
<label class="font_normal_body">单位名称</label>
|
|
70
|
-
<input type="text" style="width:60%" class="input_search"
|
|
78
|
+
<input type="text" style="width:60%" class="input_search" v-model="areamodel.f_residential_area"
|
|
71
79
|
class="form-control" placeholder="单位名称"
|
|
72
80
|
v-validate:f_residential_area='{required: true }'>
|
|
73
81
|
</div>
|
|
74
82
|
<div v-if="f_special"
|
|
75
83
|
class="col-sm-12 form-group">
|
|
76
84
|
<label class="font_normal_body">单位地址</label>
|
|
77
|
-
<input type="text" style="width:60%" class="input_search"
|
|
85
|
+
<input type="text" style="width:60%" class="input_search" v-model="areamodel.f_area_address"
|
|
78
86
|
class="form-control" placeholder="单位地址">
|
|
79
87
|
</div>
|
|
80
88
|
<div v-if="f_special"
|
|
81
89
|
class="col-sm-6 form-group"
|
|
82
90
|
:class="[$v.f_linkname.required ? 'has-error' : 'has-success']">
|
|
83
91
|
<label class="font_normal_body">联 系 人</label>
|
|
84
|
-
<input type="text" style="width:60%" class="input_search"
|
|
92
|
+
<input type="text" style="width:60%" class="input_search" v-model="areamodel.f_linkname"
|
|
85
93
|
class="form-control" placeholder="联系人"
|
|
86
94
|
v-validate:f_linkname='{required: true }'>
|
|
87
95
|
</div>
|
|
@@ -89,74 +97,82 @@
|
|
|
89
97
|
class="col-sm-6 form-group"
|
|
90
98
|
:class="[$v.f_linkphone.required ? 'has-error' : 'has-success']">
|
|
91
99
|
<label class="font_normal_body">联系电话</label>
|
|
92
|
-
<input type="text" style="width:60%" class="input_search"
|
|
100
|
+
<input type="text" style="width:60%" class="input_search" v-model="areamodel.f_linkphone"
|
|
93
101
|
class="form-control" placeholder="联系电话"
|
|
94
102
|
v-validate:f_linkphone='{required: true }'>
|
|
95
103
|
</div>
|
|
96
104
|
<div class="col-sm-12 form-group">
|
|
97
|
-
<label
|
|
98
|
-
<textarea class="input_textarea" rows="3" style="margin-top:20px;width:80%;height: auto;"
|
|
105
|
+
<label class="font_normal_body " style="">备  注</label>
|
|
106
|
+
<textarea class="input_textarea" rows="3" style="margin-top:20px;width:80%;height: auto;"
|
|
107
|
+
v-model="areamodel.f_comments"></textarea>
|
|
99
108
|
</div>
|
|
100
109
|
<div class="col-sm-12 form-group">
|
|
101
110
|
<br/>
|
|
102
111
|
</div>
|
|
103
112
|
<!--表具信息-->
|
|
104
|
-
<div v-if="!f_special" class="col-sm-12 bg-info text-center"
|
|
105
|
-
|
|
113
|
+
<div v-if="!f_special" class="col-sm-12 bg-info text-center"
|
|
114
|
+
style="padding: 8px;font-size: 18px;font-weight: bold">
|
|
115
|
+
<span>默认表具信息</span>
|
|
106
116
|
</div>
|
|
107
117
|
<div v-if="!f_special" class="row">
|
|
108
118
|
<div class="col-sm-6 form-group">
|
|
109
119
|
<label class="font_normal_body">用户类型</label>
|
|
110
|
-
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
120
|
+
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
121
|
+
v-model="areamodel.f_user_type">
|
|
111
122
|
<v-select
|
|
112
123
|
:value.sync="areamodel.f_user_type" :value-single="true"
|
|
113
124
|
:options='usertypes' placeholder='用户类型' @change="userTypeChange"
|
|
114
|
-
close-on-select
|
|
125
|
+
close-on-select>
|
|
115
126
|
</v-select>
|
|
116
127
|
</div>
|
|
117
128
|
<div class="col-sm-6 form-group">
|
|
118
129
|
<label class="font_normal_body">用气性质</label>
|
|
119
|
-
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
130
|
+
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
131
|
+
v-model="areamodel.f_gasproperties">
|
|
120
132
|
<v-select
|
|
121
133
|
:value.sync="areamodel.f_gasproperties" :value-single="true"
|
|
122
134
|
:options='gasproperties' placeholder='用气性质'
|
|
123
|
-
close-on-select
|
|
135
|
+
close-on-select>
|
|
124
136
|
</v-select>
|
|
125
137
|
</div>
|
|
126
138
|
<div class="col-sm-6 form-group">
|
|
127
139
|
<label class="font_normal_body">气价类型</label>
|
|
128
|
-
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
140
|
+
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
141
|
+
v-model="areamodel.f_price_type">
|
|
129
142
|
<v-select
|
|
130
143
|
:value.sync="areamodel.f_price_type" :value-single="true"
|
|
131
144
|
:options='f_price_types' placeholder='气价类型'
|
|
132
|
-
close-on-select
|
|
145
|
+
close-on-select>
|
|
133
146
|
</v-select>
|
|
134
147
|
</div>
|
|
135
148
|
<div class="col-sm-6 form-group">
|
|
136
149
|
<label class="font_normal_body">气价名称</label>
|
|
137
|
-
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
150
|
+
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
151
|
+
v-model="areamodel.f_price_name">
|
|
138
152
|
<v-select
|
|
139
153
|
:value.sync="areamodel.f_price_name" :value-single="true"
|
|
140
154
|
:options='pricenames' placeholder='气价名称'
|
|
141
|
-
close-on-select
|
|
155
|
+
close-on-select>
|
|
142
156
|
</v-select>
|
|
143
157
|
</div>
|
|
144
158
|
<div class="col-sm-6 form-group">
|
|
145
159
|
<label class="font_normal_body">气表品牌</label>
|
|
146
|
-
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
160
|
+
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
161
|
+
v-model="areamodel.f_meter_brand">
|
|
147
162
|
<v-select
|
|
148
163
|
:value.sync="areamodel.f_meter_brand" :value-single="true"
|
|
149
164
|
:options='meterbrands' placeholder='气表品牌'
|
|
150
|
-
close-on-select
|
|
165
|
+
close-on-select>
|
|
151
166
|
</v-select>
|
|
152
167
|
</div>
|
|
153
168
|
<div class="col-sm-6 form-group">
|
|
154
169
|
<label class="font_normal_body">气表型号</label>
|
|
155
|
-
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
170
|
+
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
171
|
+
v-model="areamodel.f_meter_style">
|
|
156
172
|
<v-select
|
|
157
173
|
:value.sync="areamodel.f_meter_style" :value-single="true"
|
|
158
174
|
:options='meterstyle' placeholder='气表型号'
|
|
159
|
-
close-on-select
|
|
175
|
+
close-on-select>
|
|
160
176
|
</v-select>
|
|
161
177
|
</div>
|
|
162
178
|
<div class="col-sm-6 form-group" :class="[$v.f_meter_type.required ? 'has-error' : 'has-success']">
|
|
@@ -174,17 +190,18 @@
|
|
|
174
190
|
<v-select
|
|
175
191
|
:value.sync="areamodel.f_meter_book" :value-single="true"
|
|
176
192
|
:options='meterbooks' placeholder='抄表册'
|
|
177
|
-
close-on-select
|
|
193
|
+
close-on-select>
|
|
178
194
|
</v-select>
|
|
179
195
|
</div>
|
|
180
|
-
<div class="col-sm-6 form-group" v-if="!isMachine"
|
|
196
|
+
<div class="col-sm-6 form-group" v-if="!isMachine"
|
|
197
|
+
:class="[$v.f_meter_book.required ? 'has-error' : 'has-success']">
|
|
181
198
|
<label class="font_normal_body">抄 表 册</label>
|
|
182
199
|
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
183
200
|
v-model="areamodel.f_meter_book">
|
|
184
201
|
<v-select
|
|
185
202
|
:value.sync="areamodel.f_meter_book" :value-single="true"
|
|
186
203
|
:options='meterbooks' placeholder='抄表册'
|
|
187
|
-
close-on-select
|
|
204
|
+
close-on-select>
|
|
188
205
|
</v-select>
|
|
189
206
|
</div>
|
|
190
207
|
<div class="col-sm-6 form-group" :class="[$v.f_inputtor.required ? 'has-error' : 'has-success']">
|
|
@@ -194,7 +211,7 @@
|
|
|
194
211
|
<v-select
|
|
195
212
|
:value.sync="areamodel.f_inputtor" :value-single="true"
|
|
196
213
|
:options='inputtores' placeholder='抄表员'
|
|
197
|
-
close-on-select
|
|
214
|
+
close-on-select>
|
|
198
215
|
</v-select>
|
|
199
216
|
</div>
|
|
200
217
|
<div class="col-sm-6 form-group" :class="[$v.f_adjustable_id.required ? 'has-error' : 'has-success']">
|
|
@@ -204,26 +221,26 @@
|
|
|
204
221
|
<v-select
|
|
205
222
|
:value.sync="areamodel.f_adjustable_id" :value-single="true"
|
|
206
223
|
:options='adjustables' placeholder='调压箱'
|
|
207
|
-
close-on-select
|
|
224
|
+
close-on-select>
|
|
208
225
|
</v-select>
|
|
209
226
|
</div>
|
|
210
227
|
<div class="col-sm-6 form-group" :class="[$v.f_house_type.required ? 'has-error' : 'has-success']">
|
|
211
228
|
<label class="font_normal_body">房屋类型</label>
|
|
212
229
|
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
213
|
-
v-model="areamodel.f_house_type"
|
|
230
|
+
v-model="areamodel.f_house_type">
|
|
214
231
|
<v-select
|
|
215
232
|
:value.sync="areamodel.f_house_type" :value-single="true"
|
|
216
233
|
:options='housetypeoptions' placeholder='房屋类型'
|
|
217
|
-
close-on-select
|
|
234
|
+
close-on-select>
|
|
218
235
|
</v-select>
|
|
219
236
|
</div>
|
|
220
237
|
<div class="col-sm-6 form-group" :class="[$v.f_position.required ? 'has-error' : 'has-success']">
|
|
221
238
|
<label class="font_normal_body">安装位置</label>
|
|
222
|
-
<input type="text" style="width:60%" class="input_search" v-show="false"
|
|
239
|
+
<input type="text" style="width:60%" class="input_search" v-show="false" v-model="areamodel.f_position">
|
|
223
240
|
<v-select
|
|
224
241
|
:value.sync="areamodel.f_position" :value-single="true"
|
|
225
242
|
:options='positions' placeholder='安装位置'
|
|
226
|
-
close-on-select
|
|
243
|
+
close-on-select>
|
|
227
244
|
</v-select>
|
|
228
245
|
</div>
|
|
229
246
|
</div>
|
|
@@ -232,7 +249,8 @@
|
|
|
232
249
|
</div>
|
|
233
250
|
</div>
|
|
234
251
|
<div v-if="areatype == '楼栋'">
|
|
235
|
-
<div
|
|
252
|
+
<div class="col-sm-6 form-group "
|
|
253
|
+
:class="[$v.f_residential_area_id1.required ? 'has-error' : 'has-success']">
|
|
236
254
|
<label class="font_normal_body">小区名称</label>
|
|
237
255
|
<input type="text" style="width:41%" v-show="false" v-model="buildingmodel.f_residential_area_id"
|
|
238
256
|
v-validate:f_residential_area_id1='{required: true }'>
|
|
@@ -253,7 +271,8 @@
|
|
|
253
271
|
<button class="button_clear button_spacing" @click="cancel()">取消</button>
|
|
254
272
|
</div>
|
|
255
273
|
<div v-if="areatype == '楼栋'" class="row" style="margin-top:40px;height: 580px;">
|
|
256
|
-
<building-list v-ref:buildinglist @select-changed="selected" :areaslist="areaslist"
|
|
274
|
+
<building-list v-ref:buildinglist @select-changed="selected" :areaslist="areaslist"
|
|
275
|
+
:f_filialeids.sync="f_filialeids"></building-list>
|
|
257
276
|
</div>
|
|
258
277
|
</div>
|
|
259
278
|
</validator>
|
|
@@ -261,474 +280,478 @@
|
|
|
261
280
|
</template>
|
|
262
281
|
|
|
263
282
|
<script>
|
|
264
|
-
|
|
283
|
+
import {HttpResetClass} from 'vue-client'
|
|
265
284
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
},
|
|
282
|
-
//初始化省市区数据
|
|
283
|
-
pcdslist:[],
|
|
284
|
-
//初始化街道数据
|
|
285
|
-
streetslist:[],
|
|
286
|
-
//小区
|
|
287
|
-
areamodel: {
|
|
288
|
-
f_area_id: '',
|
|
289
|
-
f_pcd_id:'',
|
|
290
|
-
f_linkname:'',
|
|
291
|
-
f_linkphone:'',
|
|
292
|
-
f_street_id:'',
|
|
293
|
-
f_slice_area:'',
|
|
294
|
-
f_adjustable_id:'',
|
|
295
|
-
f_residential_area:'',
|
|
296
|
-
f_user_type:'',
|
|
297
|
-
f_gasproperties:'',
|
|
298
|
-
f_meter_brand:'',
|
|
299
|
-
f_price_name:'',
|
|
300
|
-
f_area_address:'',
|
|
301
|
-
f_price_type:'',
|
|
302
|
-
f_meter_style:'',
|
|
303
|
-
f_position:'',
|
|
304
|
-
f_comments:'',
|
|
305
|
-
f_meter_type: ''
|
|
306
|
-
},
|
|
307
|
-
// 初始化小区数据
|
|
308
|
-
areaslist:[],
|
|
309
|
-
// 楼栋
|
|
310
|
-
buildingmodel: {
|
|
311
|
-
f_residential_area: '',
|
|
312
|
-
f_residential_area_id: '',
|
|
313
|
-
f_building: ''
|
|
314
|
-
},
|
|
315
|
-
meterbrands: [],
|
|
316
|
-
adjustables: [],
|
|
317
|
-
sliceArea: [],
|
|
318
|
-
gasproperties: [],
|
|
319
|
-
meterbooks:[{label: '全部',value: ''}],
|
|
320
|
-
housetypeoptions:[{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
|
|
321
|
-
isMachine: true
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
props: ['f_filialeids','f_special', 'areatype','row','operation'],
|
|
325
|
-
ready(){
|
|
326
|
-
initGen(this)
|
|
327
|
-
},
|
|
328
|
-
methods: {
|
|
329
|
-
loadMeterBooks(){
|
|
330
|
-
this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
|
|
331
|
-
},
|
|
332
|
-
//初始化数据
|
|
333
|
-
async initdata(){
|
|
334
|
-
// 初始化参数
|
|
335
|
-
await this.initParams()
|
|
336
|
-
if (this.areatype == '楼栋') {
|
|
337
|
-
this.initareas(` f_orgid = '${this.f_filialeids}'`)
|
|
338
|
-
}
|
|
339
|
-
// 初始化片区
|
|
340
|
-
await this.initSlice(this.f_filialeids)
|
|
341
|
-
await this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
|
|
285
|
+
let initGen = async function (self) {
|
|
286
|
+
await self.$getConfig(self, 'UserArea')
|
|
287
|
+
console.log('原地址配置', self.config)
|
|
288
|
+
console.log('获取地址配置', self.config)
|
|
289
|
+
// Object.assign(self.model, self.config)
|
|
290
|
+
await self.initdata()
|
|
291
|
+
await self.$LoadParams.loadMeterBook(self.f_filialeids)
|
|
292
|
+
await self.loadMeterBooks();
|
|
293
|
+
}
|
|
294
|
+
export default {
|
|
295
|
+
title: '小区添加',
|
|
296
|
+
data() {
|
|
297
|
+
return {
|
|
298
|
+
config: {
|
|
299
|
+
hasnumber: false,
|
|
342
300
|
},
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
301
|
+
//初始化省市区数据
|
|
302
|
+
pcdslist: [],
|
|
303
|
+
//初始化街道数据
|
|
304
|
+
streetslist: [],
|
|
305
|
+
//小区
|
|
306
|
+
areamodel: {
|
|
307
|
+
f_area_id: '',
|
|
308
|
+
f_pcd_id: '',
|
|
309
|
+
f_linkname: '',
|
|
310
|
+
f_linkphone: '',
|
|
311
|
+
f_street_id: '',
|
|
312
|
+
f_slice_area: '',
|
|
313
|
+
f_adjustable_id: '',
|
|
314
|
+
f_residential_area: '',
|
|
315
|
+
f_user_type: '',
|
|
316
|
+
f_gasproperties: '',
|
|
317
|
+
f_meter_brand: '',
|
|
318
|
+
f_price_name: '',
|
|
319
|
+
f_area_address: '',
|
|
320
|
+
f_price_type: '',
|
|
321
|
+
f_meter_style: '',
|
|
322
|
+
f_position: '',
|
|
323
|
+
f_comments: '',
|
|
324
|
+
f_meter_type: ''
|
|
346
325
|
},
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
326
|
+
// 初始化小区数据
|
|
327
|
+
areaslist: [],
|
|
328
|
+
// 楼栋
|
|
329
|
+
buildingmodel: {
|
|
330
|
+
f_residential_area: '',
|
|
331
|
+
f_residential_area_id: '',
|
|
332
|
+
f_building: ''
|
|
351
333
|
},
|
|
334
|
+
meterbrands: [],
|
|
335
|
+
adjustables: [],
|
|
336
|
+
sliceArea: [],
|
|
337
|
+
gasproperties: [],
|
|
338
|
+
meterbooks: [{label: '全部', value: ''}],
|
|
339
|
+
housetypeoptions: [{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
|
|
340
|
+
isMachine: true
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
props: ['f_filialeids', 'f_special', 'areatype', 'row', 'operation'],
|
|
344
|
+
ready() {
|
|
345
|
+
initGen(this)
|
|
346
|
+
},
|
|
347
|
+
methods: {
|
|
348
|
+
loadMeterBooks() {
|
|
349
|
+
this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
|
|
350
|
+
},
|
|
351
|
+
//初始化数据
|
|
352
|
+
async initdata() {
|
|
353
|
+
// 初始化参数
|
|
354
|
+
await this.initParams()
|
|
355
|
+
if (this.areatype == '楼栋') {
|
|
356
|
+
this.initareas(` f_orgid = '${this.f_filialeids}'`)
|
|
357
|
+
}
|
|
358
|
+
// 初始化片区
|
|
359
|
+
await this.initSlice(this.f_filialeids)
|
|
360
|
+
await this.initpcds(` f_filialeid = '${this.f_filialeids}'`)
|
|
361
|
+
},
|
|
362
|
+
initrow(val) {
|
|
363
|
+
this.areamodel.f_meter_book = val.f_meter_book;
|
|
364
|
+
this.areamodel.f_adjustable_id = val.f_adjustable_id;
|
|
365
|
+
},
|
|
366
|
+
async initParams() {
|
|
367
|
+
await this.$LoadParams.loadParam(this.f_filialeids)
|
|
368
|
+
this.initBrands()
|
|
369
|
+
this.initAdjustables()
|
|
370
|
+
},
|
|
352
371
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
372
|
+
initBrands() {
|
|
373
|
+
let ret = this.$GetSaleParam.getGasbrand()
|
|
374
|
+
let rs = new Array()
|
|
375
|
+
ret.forEach((item, index) => {
|
|
376
|
+
rs.push({label: item.label, value: item.value.f_meter_brand})
|
|
377
|
+
})
|
|
378
|
+
this.meterbrands = rs
|
|
379
|
+
},
|
|
361
380
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
381
|
+
initAdjustables() {
|
|
382
|
+
let filter = this.$login.f.orgid
|
|
383
|
+
let ret = this.$GetSaleParam.getAdjustable(filter)
|
|
384
|
+
let arr = new Array()
|
|
385
|
+
ret.forEach((item, index) => {
|
|
386
|
+
arr.push({label: `[${item.value.f_adjustable_id}]-${item.label}`, value: item.value.id})
|
|
387
|
+
})
|
|
388
|
+
this.adjustables = arr
|
|
389
|
+
},
|
|
371
390
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
391
|
+
async initSlice(val) {
|
|
392
|
+
if (val) {
|
|
393
|
+
let getAllArea = await this.$resetpost('/rs/search', {
|
|
394
|
+
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
|
395
|
+
userid: this.$login.f.id
|
|
396
|
+
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
|
378
397
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
398
|
+
let arr = getAllArea.data.filter((res) => {
|
|
399
|
+
return res.parentid == val
|
|
400
|
+
})
|
|
401
|
+
this.sliceArea = []
|
|
402
|
+
arr.forEach((res) => {
|
|
403
|
+
this.sliceArea.push({label: res.name, value: {name: res.name, code: res.number}})
|
|
404
|
+
})
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
//初始化小区添加小区
|
|
408
|
+
async initareas(pconditon) {
|
|
409
|
+
// if(this.usertype){
|
|
410
|
+
// pconditon=pconditon+` and f_special='1' `
|
|
411
|
+
// }
|
|
412
|
+
this.areaslist = []
|
|
413
|
+
let HttpReset = new HttpResetClass()
|
|
414
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
415
|
+
data: {
|
|
416
|
+
items: '*',
|
|
417
|
+
tablename: 't_area',
|
|
418
|
+
orderitem: 'id',
|
|
419
|
+
condition: pconditon
|
|
386
420
|
}
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
|
396
|
-
data: {
|
|
397
|
-
items: '*',
|
|
398
|
-
tablename: 't_area',
|
|
399
|
-
orderitem: 'id',
|
|
400
|
-
condition: pconditon
|
|
401
|
-
}
|
|
402
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
403
|
-
let redata = []
|
|
404
|
-
req.data.forEach((row) => {
|
|
405
|
-
redata.push({
|
|
406
|
-
label: '['+row.f_street+']'+row.f_residential_area,
|
|
407
|
-
value: row.id,
|
|
408
|
-
data: row,
|
|
409
|
-
id: row.id
|
|
410
|
-
})
|
|
421
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
422
|
+
let redata = []
|
|
423
|
+
req.data.forEach((row) => {
|
|
424
|
+
redata.push({
|
|
425
|
+
label: '[' + row.f_street + ']' + row.f_residential_area,
|
|
426
|
+
value: row.id,
|
|
427
|
+
data: row,
|
|
428
|
+
id: row.id
|
|
411
429
|
})
|
|
412
|
-
|
|
413
|
-
|
|
430
|
+
})
|
|
431
|
+
this.areaslist = redata
|
|
432
|
+
},
|
|
414
433
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
434
|
+
//初始化省市区,添加街道
|
|
435
|
+
async initpcds(pconditon) {
|
|
436
|
+
this.pcdslist = []
|
|
437
|
+
let HttpReset = new HttpResetClass()
|
|
438
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
|
439
|
+
data: {
|
|
440
|
+
items: '*',
|
|
441
|
+
tablename: 't_pcd',
|
|
442
|
+
orderitem: 'id',
|
|
443
|
+
condition: pconditon
|
|
444
|
+
}
|
|
445
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
446
|
+
let redata = []
|
|
447
|
+
req.data.forEach((row, n) => {
|
|
448
|
+
redata[n] = {
|
|
449
|
+
label: row.f_pcd,
|
|
450
|
+
value: row.id,
|
|
451
|
+
data: row,
|
|
452
|
+
id: row.id
|
|
453
|
+
}
|
|
454
|
+
})
|
|
455
|
+
this.pcdslist = redata
|
|
437
456
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
457
|
+
},
|
|
458
|
+
//初始化街道 添加小区
|
|
459
|
+
async initstreets(pconditon) {
|
|
460
|
+
this.streetslist = []
|
|
461
|
+
let HttpReset = new HttpResetClass()
|
|
462
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
|
463
|
+
data: {
|
|
464
|
+
items: '*',
|
|
465
|
+
tablename: 't_street',
|
|
466
|
+
orderitem: 'id',
|
|
467
|
+
condition: pconditon
|
|
468
|
+
}
|
|
469
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
|
470
|
+
let redata = []
|
|
471
|
+
req.data.forEach((row, n) => {
|
|
472
|
+
redata[n] = {
|
|
473
|
+
label: row.f_street,
|
|
474
|
+
value: row.id,
|
|
475
|
+
data: row,
|
|
476
|
+
id: row.id
|
|
477
|
+
}
|
|
478
|
+
})
|
|
479
|
+
this.streetslist = redata
|
|
480
|
+
},
|
|
481
|
+
async areaidChangeHasnumber() {
|
|
482
|
+
console.log(this.areamodel.f_area_id.length)
|
|
483
|
+
if (this.areamodel.f_area_id.length != 2) {
|
|
484
|
+
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
485
|
+
this.areamodel.f_area_id = ''
|
|
486
|
+
} else {
|
|
487
|
+
let res = await this.$resetpost('api/af-revenue/sql/address_singleTableOrderBy', {
|
|
444
488
|
data: {
|
|
445
489
|
items: '*',
|
|
446
|
-
tablename: '
|
|
490
|
+
tablename: 't_area',
|
|
447
491
|
orderitem: 'id',
|
|
448
|
-
condition:
|
|
492
|
+
condition: `f_area_id = '${this.areamodel.f_area_id}' and f_orgid = '${this.$login.f.orgid}'`
|
|
449
493
|
}
|
|
450
|
-
}, {resolveMsg: null, rejectMsg:
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
value: row.id,
|
|
456
|
-
data:row,
|
|
457
|
-
id:row.id
|
|
458
|
-
}
|
|
459
|
-
})
|
|
460
|
-
this.streetslist=redata
|
|
461
|
-
},
|
|
462
|
-
async areaidChangeHasnumber(){
|
|
463
|
-
console.log(this.areamodel.f_area_id.length)
|
|
464
|
-
if (this.areamodel.f_area_id.length != 2){
|
|
465
|
-
this.$showAlert('请输入正确的位数', 'warning', 2000)
|
|
466
|
-
this.areamodel.f_area_id = ''
|
|
467
|
-
}else{
|
|
468
|
-
let res =await this.$resetpost('api/af-revenue/sql/address_singleTableOrderBy', {
|
|
469
|
-
data: {
|
|
470
|
-
items: '*',
|
|
471
|
-
tablename: 't_area',
|
|
472
|
-
orderitem: 'id',
|
|
473
|
-
condition: `f_area_id = '${this.areamodel.f_area_id}' and f_orgid = '${this.$login.f.orgid}'`
|
|
474
|
-
}
|
|
475
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
476
|
-
if (res.data.length>0){
|
|
477
|
-
if (res.data[0].id != this.areamodel.id) {
|
|
478
|
-
this.$showAlert('当前编号已存在', 'warning', 2000)
|
|
479
|
-
this.areamodel.f_area_id = ''
|
|
480
|
-
}
|
|
494
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
495
|
+
if (res.data.length > 0) {
|
|
496
|
+
if (res.data[0].id != this.areamodel.id) {
|
|
497
|
+
this.$showAlert('当前编号已存在', 'warning', 2000)
|
|
498
|
+
this.areamodel.f_area_id = ''
|
|
481
499
|
}
|
|
482
500
|
}
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
async areaidChange() {
|
|
504
|
+
// 验证小区编号是否已存在
|
|
486
505
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
506
|
+
let param = {
|
|
507
|
+
id: this.areamodel.id,
|
|
508
|
+
f_area_id: this.areamodel.f_area_id,
|
|
509
|
+
f_filialeid: this.f_filialeids
|
|
510
|
+
}
|
|
492
511
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
512
|
+
let res = await this.$resetpost('api/af-revenue/logic/address_validateAreaID', param, {
|
|
513
|
+
resolveMsg: null,
|
|
514
|
+
rejectMsg: '小区编号验证失败!!'
|
|
515
|
+
})
|
|
516
|
+
console.log('验证小区是否存在', res)
|
|
517
|
+
if (res.data) {
|
|
518
|
+
this.$showAlert('这个小区编号已存在!!!请核实', 'warning', 3000)
|
|
519
|
+
this.areamodel.f_area_id = ''
|
|
520
|
+
}
|
|
499
521
|
|
|
500
|
-
|
|
522
|
+
},
|
|
501
523
|
|
|
502
524
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
})
|
|
511
|
-
return result
|
|
512
|
-
},
|
|
513
|
-
userTypeChange () {
|
|
514
|
-
this.gasproperties = []
|
|
515
|
-
if (this.areamodel.f_user_type) {
|
|
516
|
-
this.gasproperties = this.$appdata.getParam(this.areamodel.f_user_type)
|
|
525
|
+
//根据名字找数据
|
|
526
|
+
findbyid(list, name) {
|
|
527
|
+
var result
|
|
528
|
+
list.forEach((row, n) => {
|
|
529
|
+
if (name == row.id) {
|
|
530
|
+
result = row.data
|
|
517
531
|
}
|
|
518
|
-
}
|
|
532
|
+
})
|
|
533
|
+
return result
|
|
534
|
+
},
|
|
535
|
+
userTypeChange() {
|
|
536
|
+
this.gasproperties = []
|
|
537
|
+
if (this.areamodel.f_user_type) {
|
|
538
|
+
this.gasproperties = this.$appdata.getParam(this.areamodel.f_user_type)
|
|
539
|
+
}
|
|
540
|
+
},
|
|
519
541
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
531
|
-
} else {
|
|
532
|
-
this.areamodel.f_street_id=''
|
|
542
|
+
//省/市/区变化
|
|
543
|
+
async pcdChange(val) {
|
|
544
|
+
if (val) {
|
|
545
|
+
//那就把街道数据重新组织一下
|
|
546
|
+
await this.initstreets(` f_filialeid = '${this.f_filialeids}' and f_pcd_id ='${val}' `)
|
|
547
|
+
if (this.areamodel.f_street_id) {
|
|
548
|
+
if (this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
|
|
549
|
+
let pcd_id = this.findbyid(this.streetslist, this.areamodel.f_street_id).f_pcd_id
|
|
550
|
+
if (pcd_id != val) {
|
|
551
|
+
this.areamodel.f_street_id = ''
|
|
533
552
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
}
|
|
537
|
-
this.$resetValidation()
|
|
538
|
-
},
|
|
539
|
-
//街道变化
|
|
540
|
-
streetChange(val){
|
|
541
|
-
if(val&&this.operation=='add'){
|
|
542
|
-
// if(this.areamodel.f_pcd_id.length==0){
|
|
543
|
-
if (this.findbyid(this.streetslist,this.areamodel.f_street_id)) {
|
|
544
|
-
this.areamodel.f_pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
|
|
545
|
-
}
|
|
546
|
-
// }
|
|
547
|
-
}
|
|
548
|
-
this.$resetValidation()
|
|
549
|
-
},
|
|
550
|
-
//保存
|
|
551
|
-
async confirm(){
|
|
552
|
-
if(this.areatype=='楼栋'){
|
|
553
|
-
await this.savebuilding()
|
|
554
|
-
} else {
|
|
555
|
-
await this.savearea()
|
|
556
|
-
this.cleardara()
|
|
557
|
-
this.$dispatch('confirm')
|
|
558
|
-
}
|
|
559
|
-
},
|
|
560
|
-
// 保存楼栋
|
|
561
|
-
async savebuilding () {
|
|
562
|
-
this.buildingmodel.f_residential_area = this.$refs.areaselect.selectedItems
|
|
563
|
-
this.buildingmodel.f_filialeid = this.f_filialeids
|
|
564
|
-
this.buildingmodel.f_operator = this.$login.f.name
|
|
565
|
-
this.buildingmodel.f_operatorid = this.$login.f.id
|
|
566
|
-
this.buildingmodel.f_orgid = this.$login.f.orgid
|
|
567
|
-
this.buildingmodel.f_orgname = this.$login.f.orgs
|
|
568
|
-
this.buildingmodel.f_depid = this.$login.f.depids
|
|
569
|
-
this.buildingmodel.f_depname = this.$login.f.deps
|
|
570
|
-
await this.$resetpost('api/af-revenue/logic/address_savebuilding', this.buildingmodel)
|
|
571
|
-
this.$refs.buildinglist.search()
|
|
572
|
-
},
|
|
573
|
-
//保存小区
|
|
574
|
-
async savearea(){
|
|
575
|
-
if(this.f_special){
|
|
576
|
-
this.areamodel.f_special='1'
|
|
577
|
-
}
|
|
578
|
-
this.areamodel.f_filialeid = this.f_filialeids
|
|
579
|
-
this.areamodel.f_operator = this.$login.f.name
|
|
580
|
-
this.areamodel.f_operatorid = this.$login.f.id
|
|
581
|
-
this.areamodel.f_orgid = this.$login.f.orgid
|
|
582
|
-
this.areamodel.f_orgname = this.$login.f.orgs
|
|
583
|
-
this.areamodel.f_depid = this.$login.f.depids
|
|
584
|
-
this.areamodel.f_depname = this.$login.f.deps
|
|
585
|
-
if (this.areamodel.slice_area) {
|
|
586
|
-
if (this.areamodel.slice_area.length > 0) {
|
|
587
|
-
this.areamodel.f_slice_area = this.areamodel.slice_area[0].name
|
|
588
|
-
this.areamodel.f_area_code = this.areamodel.slice_area[0].code
|
|
553
|
+
} else {
|
|
554
|
+
this.areamodel.f_street_id = ''
|
|
589
555
|
}
|
|
590
|
-
}
|
|
591
|
-
this.areamodel.f_pcd=this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd
|
|
592
|
-
this.areamodel.f_street=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
|
|
593
556
|
|
|
594
|
-
await this.$resetpost('api/af-revenue/logic/address_updatearea', this.areamodel)
|
|
595
|
-
},
|
|
596
|
-
cleardara(){
|
|
597
|
-
this.areamodel= {
|
|
598
|
-
f_area_id: '',
|
|
599
|
-
f_pcd_id:'',
|
|
600
|
-
f_street_id:'',
|
|
601
|
-
f_slice_area:'',
|
|
602
|
-
f_linkname:'',
|
|
603
|
-
f_linkphone:'',
|
|
604
|
-
f_adjustable_id:'',
|
|
605
|
-
f_residential_area:'',
|
|
606
|
-
f_user_type:'',
|
|
607
|
-
f_gasproperties:'',
|
|
608
|
-
f_area_address:'',
|
|
609
|
-
f_meter_brand:'',
|
|
610
|
-
f_price_name:'',
|
|
611
|
-
f_price_type:'',
|
|
612
|
-
f_meter_style:'',
|
|
613
|
-
f_position:'',
|
|
614
|
-
f_comments:'',
|
|
615
|
-
f_meter_type: ''
|
|
616
557
|
}
|
|
617
|
-
}
|
|
618
|
-
|
|
558
|
+
}
|
|
559
|
+
this.$resetValidation()
|
|
560
|
+
},
|
|
561
|
+
//街道变化
|
|
562
|
+
streetChange(val) {
|
|
563
|
+
if (val && this.operation == 'add') {
|
|
564
|
+
// if(this.areamodel.f_pcd_id.length==0){
|
|
565
|
+
if (this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
|
|
566
|
+
this.areamodel.f_pcd_id = this.findbyid(this.streetslist, this.areamodel.f_street_id).f_pcd_id
|
|
567
|
+
}
|
|
568
|
+
// }
|
|
569
|
+
}
|
|
570
|
+
this.$resetValidation()
|
|
571
|
+
},
|
|
572
|
+
//保存
|
|
573
|
+
async confirm() {
|
|
574
|
+
if (this.areatype == '楼栋') {
|
|
575
|
+
await this.savebuilding()
|
|
576
|
+
} else {
|
|
577
|
+
await this.savearea()
|
|
619
578
|
this.cleardara()
|
|
620
|
-
this.$dispatch('
|
|
621
|
-
}
|
|
579
|
+
this.$dispatch('confirm')
|
|
580
|
+
}
|
|
622
581
|
},
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
582
|
+
// 保存楼栋
|
|
583
|
+
async savebuilding() {
|
|
584
|
+
this.buildingmodel.f_residential_area = this.$refs.areaselect.selectedItems
|
|
585
|
+
this.buildingmodel.f_filialeid = this.f_filialeids
|
|
586
|
+
this.buildingmodel.f_operator = this.$login.f.name
|
|
587
|
+
this.buildingmodel.f_operatorid = this.$login.f.id
|
|
588
|
+
this.buildingmodel.f_orgid = this.$login.f.orgid
|
|
589
|
+
this.buildingmodel.f_orgname = this.$login.f.orgs
|
|
590
|
+
this.buildingmodel.f_depid = this.$login.f.depids
|
|
591
|
+
this.buildingmodel.f_depname = this.$login.f.deps
|
|
592
|
+
await this.$resetpost('api/af-revenue/logic/address_savebuilding', this.buildingmodel)
|
|
593
|
+
this.$refs.buildinglist.search()
|
|
594
|
+
},
|
|
595
|
+
//保存小区
|
|
596
|
+
async savearea() {
|
|
597
|
+
if (this.f_special) {
|
|
598
|
+
this.areamodel.f_special = '1'
|
|
599
|
+
}
|
|
600
|
+
this.areamodel.f_filialeid = this.f_filialeids
|
|
601
|
+
this.areamodel.f_operator = this.$login.f.name
|
|
602
|
+
this.areamodel.f_operatorid = this.$login.f.id
|
|
603
|
+
this.areamodel.f_orgid = this.$login.f.orgid
|
|
604
|
+
this.areamodel.f_orgname = this.$login.f.orgs
|
|
605
|
+
this.areamodel.f_depid = this.$login.f.depids
|
|
606
|
+
this.areamodel.f_depname = this.$login.f.deps
|
|
607
|
+
if (this.areamodel.slice_area) {
|
|
608
|
+
if (this.areamodel.slice_area.length > 0) {
|
|
609
|
+
this.areamodel.f_slice_area = this.areamodel.slice_area[0].name
|
|
610
|
+
this.areamodel.f_area_code = this.areamodel.slice_area[0].code
|
|
636
611
|
}
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
612
|
+
}
|
|
613
|
+
this.areamodel.f_pcd = this.findbyid(this.pcdslist, this.areamodel.f_pcd_id).f_pcd
|
|
614
|
+
this.areamodel.f_street = this.findbyid(this.streetslist, this.areamodel.f_street_id).f_street
|
|
615
|
+
|
|
616
|
+
await this.$resetpost('api/af-revenue/logic/address_updatearea', this.areamodel)
|
|
617
|
+
},
|
|
618
|
+
cleardara() {
|
|
619
|
+
this.areamodel = {
|
|
620
|
+
f_area_id: '',
|
|
621
|
+
f_pcd_id: '',
|
|
622
|
+
f_street_id: '',
|
|
623
|
+
f_slice_area: '',
|
|
624
|
+
f_linkname: '',
|
|
625
|
+
f_linkphone: '',
|
|
626
|
+
f_adjustable_id: '',
|
|
627
|
+
f_residential_area: '',
|
|
628
|
+
f_user_type: '',
|
|
629
|
+
f_gasproperties: '',
|
|
630
|
+
f_area_address: '',
|
|
631
|
+
f_meter_brand: '',
|
|
632
|
+
f_price_name: '',
|
|
633
|
+
f_price_type: '',
|
|
634
|
+
f_meter_style: '',
|
|
635
|
+
f_position: '',
|
|
636
|
+
f_comments: '',
|
|
637
|
+
f_meter_type: ''
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
cancel() {
|
|
641
|
+
this.cleardara()
|
|
642
|
+
this.$dispatch('cancel')
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
watch: {
|
|
646
|
+
'areamodel.f_meter_type'(val) {
|
|
647
|
+
if (val === '机表')
|
|
648
|
+
this.isMachine = false
|
|
649
|
+
},
|
|
650
|
+
'areatype'() {
|
|
651
|
+
this.initdata()
|
|
652
|
+
},
|
|
653
|
+
'areamodel.f_pcd_id'() {
|
|
654
|
+
if (this.areamodel.f_pcd_id && this.areamodel.f_street_id) {
|
|
655
|
+
if (this.findbyid(this.pcdslist, this.areamodel.f_pcd_id) && this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
|
|
656
|
+
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
|
|
643
657
|
}
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
'areamodel.f_street_id'() {
|
|
661
|
+
if (this.areamodel.f_pcd_id && this.areamodel.f_street_id) {
|
|
662
|
+
if (this.findbyid(this.pcdslist, this.areamodel.f_pcd_id) && this.findbyid(this.streetslist, this.areamodel.f_street_id)) {
|
|
663
|
+
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
|
|
650
664
|
}
|
|
651
|
-
this.cleardara()
|
|
652
|
-
this.initdata()
|
|
653
665
|
}
|
|
654
666
|
},
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
usertypes () {
|
|
660
|
-
return this.$appdata.getParam('用户类型')
|
|
661
|
-
},
|
|
662
|
-
f_price_types () {
|
|
663
|
-
return this.$appdata.getParam('气价类型')
|
|
664
|
-
},
|
|
665
|
-
meterstyle () {
|
|
666
|
-
let ret = this.$GetSaleParam.getGasbrand()
|
|
667
|
-
let rs = new Array()
|
|
668
|
-
if(this.areamodel.f_meter_brand) {
|
|
669
|
-
ret.forEach((item, index) => {
|
|
670
|
-
if(this.areamodel.f_meter_brand == item.value.f_meter_brand) {
|
|
671
|
-
item.value.gasmodel.forEach((item1, index) =>{
|
|
672
|
-
rs.push({label: item1.label, value:item1.label})
|
|
673
|
-
})
|
|
674
|
-
}
|
|
675
|
-
})
|
|
667
|
+
'f_filialeids'() {
|
|
668
|
+
if (this.areamodel.f_filialeid) {
|
|
669
|
+
if (this.areamodel.f_filialeid != this.f_filialeids) {
|
|
670
|
+
this.$dispatch('cancel')
|
|
676
671
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
672
|
+
}
|
|
673
|
+
this.cleardara()
|
|
674
|
+
this.initdata()
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
computed: {
|
|
678
|
+
metertypes() {
|
|
679
|
+
return this.$appdata.getParam('气表类型')
|
|
680
|
+
},
|
|
681
|
+
usertypes() {
|
|
682
|
+
return this.$appdata.getParam('用户类型')
|
|
683
|
+
},
|
|
684
|
+
f_price_types() {
|
|
685
|
+
return this.$appdata.getParam('气价类型')
|
|
686
|
+
},
|
|
687
|
+
meterstyle() {
|
|
688
|
+
let ret = this.$GetSaleParam.getGasbrand()
|
|
689
|
+
let rs = new Array()
|
|
690
|
+
if (this.areamodel.f_meter_brand) {
|
|
691
|
+
ret.forEach((item, index) => {
|
|
692
|
+
if (this.areamodel.f_meter_brand == item.value.f_meter_brand) {
|
|
693
|
+
item.value.gasmodel.forEach((item1, index) => {
|
|
694
|
+
rs.push({label: item1.label, value: item1.label})
|
|
695
|
+
})
|
|
687
696
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
697
|
+
})
|
|
698
|
+
}
|
|
699
|
+
return rs
|
|
700
|
+
},
|
|
701
|
+
pricenames() {
|
|
702
|
+
let rs = new Array()
|
|
703
|
+
if (this.areamodel.f_user_type && this.areamodel.f_gasproperties && this.areamodel.f_price_type) {
|
|
704
|
+
let params = {
|
|
705
|
+
f_user_type: this.areamodel.f_user_type,
|
|
706
|
+
f_gasproperties: this.areamodel.f_gasproperties,
|
|
707
|
+
f_price_type: this.areamodel.f_price_type,
|
|
708
|
+
filter: this.f_filialeids
|
|
695
709
|
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
710
|
+
let ret = this.$GetSaleParam.getPrice(params)
|
|
711
|
+
ret.forEach((item, index) => {
|
|
712
|
+
rs.push({label: item.label, value: item.value.f_price_name})
|
|
713
|
+
})
|
|
714
|
+
}
|
|
715
|
+
if (rs.length == 0) {
|
|
716
|
+
this.areamodel.f_price_name = ''
|
|
717
|
+
}
|
|
718
|
+
return rs
|
|
719
|
+
},
|
|
720
|
+
positions() {
|
|
721
|
+
return this.$appdata.getParam('安装位置')
|
|
722
|
+
},
|
|
723
|
+
inputtores() {
|
|
724
|
+
// 获取抄表员
|
|
725
|
+
let rs = new Array()
|
|
726
|
+
if (this.$login.f.f_gasman.length > 0) {
|
|
727
|
+
for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
|
|
728
|
+
let temp = {
|
|
729
|
+
label: this.$login.f.f_gasman[i].name,
|
|
730
|
+
value: this.$login.f.f_gasman[i].name
|
|
711
731
|
}
|
|
732
|
+
rs.push(temp)
|
|
712
733
|
}
|
|
713
|
-
return rs
|
|
714
734
|
}
|
|
735
|
+
return rs
|
|
715
736
|
}
|
|
716
737
|
}
|
|
738
|
+
}
|
|
717
739
|
</script>
|
|
718
740
|
<style>
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
741
|
+
.box {
|
|
742
|
+
width: 727px;
|
|
743
|
+
height: 175px;
|
|
744
|
+
border-radius: 2px;
|
|
745
|
+
background-color: #fafafa;
|
|
746
|
+
border: 1px solid #999999;
|
|
747
|
+
margin-top: 13px;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.datapanel {
|
|
751
|
+
color: #333;
|
|
752
|
+
background-color: white;
|
|
753
|
+
box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
|
|
754
|
+
padding: 10px 30px 10px 30px;
|
|
755
|
+
border-radius: 15px;
|
|
756
|
+
}
|
|
734
757
|
</style>
|
|
@@ -74,15 +74,13 @@
|
|
|
74
74
|
</v-select>
|
|
75
75
|
</div>
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<!-- </v-select>-->
|
|
85
|
-
<!-- </div>-->
|
|
77
|
+
<div class="col-sm-6 form-group ">
|
|
78
|
+
<label class="font_normal_body">片  区</label>
|
|
79
|
+
<v-select :value.sync="model.f_slice_area" v-model="model.f_slice_area" :value-single="true"
|
|
80
|
+
:options='sliceArea' placeholder='片区/管理站' filer-key="name"
|
|
81
|
+
close-on-select v-ref:slice>
|
|
82
|
+
</v-select>
|
|
83
|
+
</div>
|
|
86
84
|
<div class="col-sm-6 form-group " v-if="!usertype">
|
|
87
85
|
<label class="font_normal_body">地区类型</label>
|
|
88
86
|
<v-select
|