sale-client 3.5.209 → 3.5.210

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.209",
3
+ "version": "3.5.210",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -544,7 +544,7 @@ export default {
544
544
  f_user_name: '',
545
545
  // 用户电话
546
546
  f_user_phone: '',
547
- f_people_num: 0,
547
+ f_people_num: this.$appdata.getSingleValue('默认人口数') ? this.$appdata.getSingleValue('默认人口数') : 0,
548
548
  f_packaging: '',
549
549
  // 备用电话
550
550
  f_rent_phone: '',
@@ -0,0 +1,746 @@
1
+ <template>
2
+ <div class="auto" style="height:80%">
3
+ <validator name='v'>
4
+ <p class="bg-info text-center" style="padding: 8px;">{{usertype ? '特殊地址管理' : '民用地址管理'}}</p>
5
+ <div class="auto select-overspread form-horizontal">
6
+ <div class="form-group" v-if="!usertype&&!model.id">
7
+ <input type="radio" id="true" value="one" v-model="onedata">
8
+ <label for="one">单户</label>
9
+ <input type="radio" id="false" value="more" v-model="onedata">
10
+ <label for="more">多户</label>
11
+ </div>
12
+ <!--单个录入-->
13
+ <div v-if="onedata=='one'" class="row">
14
+ <div class="col-sm-6 form-group "
15
+ :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
16
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
17
+ <input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"
18
+ >
19
+ <v-select :value.sync="model.f_pcd_id" :value-single="true"
20
+ :options='pcdslist' placeholder='请选择'
21
+ close-on-select search="true" @change="pcdChange" :disabled="!usertype">
22
+ </v-select>
23
+ </div>
24
+
25
+ <div class="col-sm-6 form-group " v-if="!usertype"
26
+ :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
27
+ <label class="font_normal_body">街道名称</label>
28
+ <input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"
29
+ >
30
+ <v-select :value.sync="model.f_street_id" :value-single="true"
31
+ :options='streetslist' placeholder='请选择'
32
+ close-on-select search="true" :disabled="!usertype">
33
+ </v-select>
34
+ </div>
35
+ <div class="col-sm-6 form-group " v-if="usertype"
36
+ :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
37
+ <label class="font_normal_body">街道名称</label>
38
+ <input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"
39
+ >
40
+ <v-select :value.sync="model.f_street_id" :value-single="true"
41
+ :options='streetslist' placeholder='请选择'
42
+ @change="streetChange"
43
+ close-on-select search="true" :disabled="!usertype">
44
+ </v-select>
45
+ </div>
46
+ <div class="col-sm-6 form-group " v-if="!usertype"
47
+ :class="[$v.f_residential_area_id1.required ? 'has-error' : 'has-success']">
48
+ <label class="font_normal_body">小区名称</label>
49
+ <input type="text" style="width:41%" v-show="false" v-model="model.f_residential_area_id"
50
+ v-validate:f_residential_area_id1='{required: true }'>
51
+ <v-select :value.sync="model.f_residential_area_id" :value-single="true"
52
+ :options='areaslist' placeholder='请选择'
53
+ @change="areaChange"
54
+ close-on-select search="true">
55
+ </v-select>
56
+ </div>
57
+
58
+ <div class="col-sm-6 form-group " v-if="usertype">
59
+ <label class="font_normal_body">小区名称</label>
60
+ <v-select :value.sync="model.f_residential_area_id" :value-single="true"
61
+ :options='areaslist' placeholder='请选择'
62
+ @change="areaChange"
63
+ close-on-select search="true">
64
+ </v-select>
65
+ </div>
66
+
67
+ <div class="col-sm-6 form-group " :class="[$v.slice1.required ? 'has-error' : 'has-success']">
68
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
69
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"
70
+ v-validate:slice1='{required: true }'>
71
+ <v-select :value.sync="model.slice_area" v-model="model.slice_area"
72
+ :options='sliceArea' placeholder='片区/管理站' filer-key="name"
73
+ close-on-select v-ref:slice>
74
+ </v-select>
75
+ </div>
76
+ <div v-if="!usertype" class="col-sm-6 form-group "
77
+ :class="[$v.f_building.required ? 'has-error' : 'has-success']">
78
+ <label for="f_address" class="font_normal_body">楼&emsp;&emsp;号</label>
79
+ <input type="text" style="width:40%" v-model="model.f_building" class="input_search"
80
+ v-validate:f_building='{required: true }'
81
+ placeholder="楼号"/>
82
+ <input type="text" style="width:20%" v-model="model.f_building_suffix" class="input_search"
83
+ />
84
+
85
+ </div>
86
+ <div v-if="!usertype" class="col-sm-6 form-group "
87
+ :class="[$v.f_unit.required ? 'has-error' : 'has-success']">
88
+ <label for="f_address" class="font_normal_body">单&emsp;&emsp;元</label>
89
+ <input type="text" style="width:40%" v-model="model.f_unit" class="input_search" placeholder="单元" v-validate:f_unit='{required: true }'/>
90
+ <input type="text" style="width:20%" v-model="model.f_unit_suffix" class="input_search"
91
+ />
92
+ </div>
93
+ <div v-if="!usertype" class="col-sm-6 form-group "
94
+ :class="[$v.f_floor.required ? 'has-error' : 'has-success']">
95
+ <label for="f_address" class="font_normal_body">楼&emsp;&emsp;层</label>
96
+ <input type="text" style="width:40%" v-model="model.f_floor" class="input_search" v-validate:f_floor='{required: true }'
97
+ placeholder="楼层" />
98
+ <input type="text" style="width:20%" v-model="model.f_floor_suffix" class="input_search"
99
+ />
100
+ </div>
101
+ <div v-if="!usertype" class="col-sm-6 form-group "
102
+ :class="[$v.f_room.required ? 'has-error' : 'has-success']">
103
+ <label for="f_address" class="font_normal_body">门&ensp;牌&ensp;号</label>
104
+ <input type="text" style="width:40%" v-model="model.f_room" class="input_search" placeholder="门牌号"
105
+ v-validate:f_room='{required: true }'/>
106
+ <input type="text" style="width:20%" v-model="model.f_room_suffix" class="input_search"
107
+ />
108
+ </div>
109
+ <div class="col-sm-6 form-group">
110
+ <label class="font_normal_body">地址状态</label>
111
+ <v-select :value.sync="model.f_address_state" :value-single="true"
112
+ class="select_list select"
113
+ condition="f_address_state = '{}'"
114
+ :options='addresstate' placeholder='地址状态'
115
+ close-on-select>
116
+ </v-select>
117
+ </div>
118
+ <div v-if="usertype" class="col-sm-12 form-group "
119
+ :class="[$v.f_address.required ? 'has-error' : 'has-success']">
120
+ <label for="f_address" class="font_normal_body">详细地址</label>
121
+ <input type="text" style="width:80%" v-model="model.f_address" class="input_search" placeholder="详细地址"
122
+ v-validate:f_address='{required: true }'/>
123
+ </div>
124
+ <div class="col-sm-12 form-group">
125
+ <label class="font_normal_body " >备&emsp;&emsp;注</label>
126
+ <textarea class="input_textarea" rows="3" style="margin-top: 25px; width:80%;height: auto;" v-model="model.f_comments"></textarea>
127
+ </div>
128
+ <div style="text-align:right;margin-top:40px;margin-right:50px;" class="col-sm-12">
129
+ <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
130
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
131
+ </div>
132
+
133
+ </div>
134
+ <!--批量录入-->
135
+ <div v-if="onedata=='more'" class="row">
136
+ <div class="col-sm-6 form-group "
137
+ :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
138
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
139
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_pcd_id"
140
+ >
141
+ <v-select :value.sync="model.f_pcd_id" :value-single="true"
142
+ :options='pcdslist' placeholder='请选择'
143
+ close-on-select search="true" @change="pcdChange" :disabled="!usertype">
144
+ </v-select>
145
+ </div>
146
+ <div class="col-sm-6 form-group "
147
+ :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
148
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
149
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_street_id"
150
+ >
151
+ <v-select :value.sync="model.f_street_id" :value-single="true"
152
+ :options='streetslist' placeholder='请选择'
153
+ close-on-select search="true" :disabled="!usertype">
154
+ </v-select>
155
+ </div>
156
+ <div class="col-sm-6 form-group "
157
+ :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
158
+ <label class="font_normal_body">小区名称</label>
159
+ <input type="text" style="width:60%" v-show="false" v-model="model.f_residential_area_id"
160
+ v-validate:f_residential_area_id='{required: true }'>
161
+ <v-select :value.sync="model.f_residential_area_id" :value-single="true"
162
+ @change="areaChange"
163
+ :options='areaslist' placeholder='请选择'
164
+ close-on-select search="true">
165
+ </v-select>
166
+ </div>
167
+ <div class="col-sm-6 form-group " :class="[$v.slice.required ? 'has-error' : 'has-success']">
168
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
169
+ <input type="text" style="width:60%" class="input_search" v-show="false" v-model="$refs.slice.selectedItems"
170
+ v-validate:slice='{required: true }'>
171
+ <v-select :value.sync="model.slice_area" v-model="model.slice_area"
172
+ :options='sliceArea' placeholder='片区/管理站' filer-key="name"
173
+ close-on-select v-ref:slice>
174
+ </v-select>
175
+ </div>
176
+
177
+ <div class="col-sm-6 form-group "
178
+ :class="[$v.f_building_start.integernum || $v.f_building_start.dctest ?'has-error' : 'has-success']">
179
+ <label for="f_address" class="font_normal_body">起始楼号</label>
180
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
181
+ <input type="text" style="width:25%"
182
+ v-validate:f_building_start='{integernum: true ,dctest: [model.f_building_end, "<=" ]}'
183
+ v-model="model.f_building_start" class="input_search" placeholder="楼号"/>
184
+ <input type="text" style="width:17%" v-model="model.f_building_suffix" class="input_search"/>
185
+ </div>
186
+ <div class="col-sm-6 form-group "
187
+ :class="[$v.f_building_end.integernum ||$v.f_building_end.dctest ? 'has-error' : 'has-success']">
188
+ <label for="f_address" class="font_normal_body">截止楼号</label>
189
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_building_prefix" class="input_search"/>
190
+ <input type="text" style="width:25%"
191
+ v-validate:f_building_end='{integernum: true ,dctest: [model.f_building_start, ">=" ]}'
192
+ v-model="model.f_building_end" class="input_search" placeholder="楼号"/>
193
+ <input type="text" style="width:17%" v-model="model.f_building_suffix" class="input_search"
194
+ />
195
+ </div>
196
+ <div class="col-sm-6 form-group "
197
+ :class="[$v.f_unit_start.integernum || $v.f_unit_start.dctest ? 'has-error' : 'has-success']">
198
+ <label for="f_address" class="font_normal_body">起始单元</label>
199
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
200
+ <input type="text" style="width:25%"
201
+ v-validate:f_unit_start='{integernum: true ,dctest: [model.f_unit_end, "<=" ]}'
202
+ v-model="model.f_unit_start" class="input_search" placeholder="单元"/>
203
+ <input type="text" style="width:17%" v-model="model.f_unit_suffix" class="input_search" />
204
+ </div>
205
+ <div class="col-sm-6 form-group "
206
+ :class="[$v.f_unit_end.integernum ||$v.f_unit_end.dctest ? 'has-error' : 'has-success']">
207
+ <label for="f_address" class="font_normal_body">截止单元</label>
208
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_unit_prefix" class="input_search" />
209
+ <input type="text" style="width:25%"
210
+ v-validate:f_unit_end='{integernum: true ,dctest: [model.f_unit_start, ">="]}'
211
+ v-model="model.f_unit_end" class="input_search" placeholder="单元"/>
212
+ <input type="text" style="width:17%" v-model="model.f_unit_suffix" class="input_search"/>
213
+ </div>
214
+ <div class="col-sm-6 form-group "
215
+ :class="[$v.f_floor_start.integernum || $v.f_floor_start.dctest ? 'has-error' : 'has-success']">
216
+ <label for="f_address" class="font_normal_body">起始楼层</label>
217
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
218
+ <input type="text" style="width:25%"
219
+ v-validate:f_floor_start='{integernum: true,dctest: [model.f_floor_end, "<=" ] }'
220
+ v-model="model.f_floor_start" class="input_search" placeholder="楼层"/>
221
+ <input type="text" style="width:17%" v-model="model.f_floor_suffix" class="input_search"/>
222
+ </div>
223
+ <div class="col-sm-6 form-group "
224
+ :class="[$v.f_floor_end.integernum ||$v.f_floor_end.dctest ? 'has-error' : 'has-success']">
225
+ <label for="f_address" class="font_normal_body">截止楼层</label>
226
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_floor_prefix" class="input_search"/>
227
+ <input type="text" style="width:25%" v-model="model.f_floor_end"
228
+ v-validate:f_floor_end='{integernum: true,dctest: [model.f_floor_start, ">=" ] }'
229
+ class="input_search" placeholder="楼层"/>
230
+ <input type="text" style="width:17%" v-model="model.f_floor_suffix" class="input_search"/>
231
+ </div>
232
+ <div class="col-sm-6 form-group "
233
+ :class="[$v.f_room_start.integernum || $v.f_room_start.dctest ? 'has-error' : 'has-success']">
234
+ <label for="f_address" class="font_normal_body">起始门牌</label>
235
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
236
+ <input type="text" style="width:25%" v-model="model.f_room_start"
237
+ class="input_search" placeholder="门牌号"
238
+ v-validate:f_room_start='{integernum: true ,dctest: [model.f_room_end, "<=" ]}'
239
+ />
240
+ <input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
241
+ </div>
242
+ <div class="col-sm-6 form-group "
243
+ :class="[$v.f_room_end.integernum ||$v.f_room_end.dctest ? 'has-error' : 'has-success']">
244
+ <label for="f_address" class="font_normal_body">截止门牌</label>
245
+ <input type="text" style="width:15%" placeholder="前缀" v-model="model.f_room_prefix" class="input_search"/>
246
+ <input type="text" style="width:25%" v-model="model.f_room_end" class="input_search" placeholder="门牌号"
247
+ v-validate:f_room_end='{integernum: true ,dctest: [model.f_room_start, ">=" ]}'/>
248
+ <input type="text" style="width:17%" v-model="model.f_room_suffix" class="input_search"/>
249
+ </div>
250
+ <div class="col-sm-6 form-group">
251
+ <label class="font_normal_body">地址状态</label>
252
+ <v-select :value.sync="model.f_address_state" :value-single="true"
253
+ class="select_list select"
254
+ condition="f_address_state = '{}'"
255
+ :options='addresstate' placeholder='地址状态'
256
+ close-on-select>
257
+ </v-select>
258
+ </div>
259
+ <div class="col-sm-10 form-group ">
260
+ <p class="navbar-text" style="margin-left: 10%">说明: 层数输入1,门牌号输入001。产生的最终门牌号显示1001</p>
261
+ </div>
262
+ <div class="col-sm-12 form-group">
263
+ <label class="font_normal_body " style="margin-top:-20px">备&emsp;&emsp;注</label>
264
+ <textarea class="input_textarea" rows="3" style="width:80%;height: auto;" v-model="model.f_comments"></textarea>
265
+ </div>
266
+ <div class="row">
267
+ <div style="text-align:right;margin-top:20px;margin-right:50px;" class="col-sm-12">
268
+ <button class="button_search button_spacing" @click="confirmall()" :disabled='!$v.valid'>保存</button>
269
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
270
+ </div>
271
+ </div>
272
+ </div>
273
+ </div>
274
+ </validator>
275
+ </div>
276
+ </template>
277
+
278
+ <script>
279
+ import {HttpResetClass} from 'vue-client'
280
+
281
+ let getAreaConfig = async function (self) {
282
+ // 获取气价里面的配置
283
+ await self.$getConfig(self, 'UserAddress')
284
+ console.log('原地址配置', self.config)
285
+ console.log('获取地址配置', self.config)
286
+ Object.assign(self.model, self.config)
287
+ self.initdata()
288
+ }
289
+
290
+ export default {
291
+ title: '用户地址添加',
292
+ data () {
293
+ return {
294
+ // 初始化省市区数据
295
+ pcdslist: [],
296
+ // 初始化街道数据
297
+ streetslist: [],
298
+ // 初始化街道数据
299
+ areaslist: [],
300
+ config: {
301
+ f_building_suffix: '号楼',
302
+ f_unit_suffix: '单元',
303
+ f_floor_suffix: '层',
304
+ f_room_suffix: '室'
305
+ },
306
+ model: {
307
+ f_pcd_id: '',
308
+ f_street_id: '',
309
+ f_comments: '',
310
+ f_residential_area_id: '',
311
+ f_pcd: '',
312
+ f_street: '',
313
+ f_residential_area: '',
314
+ f_slice_area: '',
315
+ f_building: '',
316
+ f_building_start: '',
317
+ f_building_end: '',
318
+ f_building_suffix: '',
319
+ f_unit: '',
320
+ f_unit_start: '',
321
+ f_unit_end: '',
322
+ f_unit_suffix: '',
323
+ f_floor: '',
324
+ f_floor_start: '',
325
+ f_floor_end: '',
326
+ f_floor_suffix: '',
327
+ f_room: '',
328
+ f_room_start: '',
329
+ f_room_end: '',
330
+ f_room_suffix: '',
331
+ // 详细地址
332
+ f_address: '',
333
+ // 单位名称
334
+ f_company: '',
335
+ // 单位地址
336
+ f_company_address: ''
337
+ },
338
+ // 判读是否为单个数据录入
339
+ onedata: 'one',
340
+ // 选中所有地址
341
+ addresslist: [],
342
+ usertype: false,
343
+
344
+ // 公司信息
345
+ curorgid: [this.$login.f.orgid],
346
+
347
+ f_orgid: '',
348
+
349
+ sliceArea: []
350
+ }
351
+ },
352
+ props: ['f_filialeids', 'row', 'operation', 'usertype'],
353
+ ready () {
354
+ getAreaConfig(this)
355
+ },
356
+ methods: {
357
+ async initdata () {
358
+ this.model.f_address_state = '已通气'
359
+ this.initAreas(this.f_filialeids)
360
+ // 添加特殊地址选省市区
361
+
362
+ this.initpcds(` f_orgid = '${this.f_filialeids}'`)
363
+ this.initstreets(` f_orgid = '${this.f_filialeids}' `)
364
+ this.initareas(` f_orgid = '${this.f_filialeids}'`)
365
+ },
366
+
367
+ // 初始化片区
368
+ async initAreas (val) {
369
+ if (val) {
370
+ let getAllArea = await this.$resetpost('/rs/search', {
371
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
372
+ userid: this.$login.f.id
373
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
374
+
375
+ let arr = getAllArea.data.filter((res) => {
376
+ return res.parentid == val
377
+ })
378
+ console.log('过滤之后的片区', arr)
379
+ this.sliceArea = []
380
+ arr.forEach((res) => {
381
+ this.sliceArea.push({label: res.name, value: {name: res.name, code: res.number}})
382
+ })
383
+ }
384
+ },
385
+ // 初始化省市区,添加街道
386
+ async initpcds (pconditon) {
387
+ this.pcdslist = []
388
+ let HttpReset = new HttpResetClass()
389
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
390
+ data: {
391
+ items: '*',
392
+ tablename: 't_pcd',
393
+ orderitem: 'id',
394
+ condition: pconditon
395
+ }
396
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
397
+ let redata = []
398
+ req.data.forEach((row, n) => {
399
+ redata[n] = {
400
+ label: row.f_pcd,
401
+ value: row.id,
402
+ data: row,
403
+ id: row.id
404
+ }
405
+ })
406
+ this.pcdslist = redata
407
+ },
408
+ // 初始化街道 添加小区
409
+ async initstreets (pconditon) {
410
+ this.streetslist = []
411
+ let HttpReset = new HttpResetClass()
412
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
413
+ data: {
414
+ items: '*',
415
+ tablename: 't_street',
416
+ orderitem: 'id',
417
+ condition: pconditon
418
+ }
419
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
420
+ let redata = []
421
+ req.data.forEach((row, n) => {
422
+ redata[n] = {
423
+ label: row.f_street,
424
+ value: row.id,
425
+ data: row,
426
+ id: row.id
427
+ }
428
+ })
429
+ this.streetslist = redata
430
+ },
431
+ // 初始化小区添加小区
432
+ async initareas (pconditon) {
433
+ // if(this.usertype){
434
+ // pconditon=pconditon+` and f_special='1' `
435
+ // }
436
+ this.areaslist = []
437
+ let HttpReset = new HttpResetClass()
438
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
439
+ data: {
440
+ items: '*',
441
+ tablename: 't_area',
442
+ orderitem: 'id',
443
+ condition: pconditon
444
+ }
445
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
446
+ let redata = []
447
+ req.data.forEach((row) => {
448
+ redata.push({
449
+ label: row.f_residential_area,
450
+ value: row.id,
451
+ data: row,
452
+ id: row.id
453
+ })
454
+ })
455
+ this.areaslist = redata
456
+ },
457
+ // 省/市/区变化
458
+ async pcdChange (val) {
459
+ // 只有添加特殊地址时才级联
460
+ if (!this.usertype) {
461
+ return
462
+ }
463
+ console.log('省/市/区变化', val)
464
+ if (val) {
465
+ // 那就把[小区,街道]重新组织一下
466
+ await this.initstreets(` f_pcd_id ='${val}' `)
467
+ if (this.model.f_street_id) {
468
+ if (this.findbyid(this.streetslist, this.model.f_street_id)) {
469
+ let pcd_id = this.findbyid(this.streetslist, this.model.f_street_id).f_pcd_id
470
+ if (pcd_id != val) {
471
+ this.model.f_street_id = ''
472
+ }
473
+ } else {
474
+ this.model.f_street_id = ''
475
+ }
476
+
477
+ // 那就把[小区,街道]重新组织一下
478
+ if (this.model.f_street_id) {
479
+ await this.initareas(` f_street_id ='${this.model.f_street_id}' `)
480
+ if (this.model.f_residential_area_id) {
481
+ if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
482
+ let pcd_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_pcd_id
483
+ if (pcd_id != val) {
484
+ this.model.f_residential_area_id = ''
485
+ }
486
+ } else {
487
+ this.model.f_residential_area_id = ''
488
+ }
489
+ }
490
+ }
491
+ }
492
+ }
493
+ this.$resetValidation()
494
+ },
495
+ // 小区变化
496
+ areaChange (val) {
497
+ console.log('小区变化', val)
498
+ // 选择小区后级联出省市区和街道
499
+ let selectArea // 选中的小区数据
500
+ for (let row of this.areaslist) {
501
+ if (val == row.value) {
502
+ selectArea = row.data
503
+ break
504
+ }
505
+ }
506
+ if (selectArea) {
507
+ this.model.f_street_id = selectArea.f_street_id
508
+ this.model.f_pcd_id = selectArea.f_pcd_id
509
+ this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
510
+ this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
511
+ this.model.slice_area = [{name: selectArea.f_slice_area, code: selectArea.f_area_code}]
512
+ // 拼接地址
513
+ this.model.f_address = `${selectArea.f_street}${selectArea.f_residential_area}`
514
+ }
515
+ this.$nextTick(() => {
516
+ this.$resetValidation()
517
+ })
518
+ },
519
+ // 街道变化
520
+ async streetChange (val) {
521
+ console.log('街道变化', val)
522
+ if (this.streetslist[0]) {
523
+ var street = ''
524
+ this.streetslist.forEach((item) => {
525
+ if (item.id === val) {
526
+ street = item.label
527
+ }
528
+ })
529
+ this.model.f_address = street
530
+ }
531
+ if (val) {
532
+ // 那就把[小区]重新组织一下
533
+ await this.initareas(` f_street_id ='${val}' `)
534
+ if (this.model.f_residential_area_id) {
535
+ if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
536
+ let street_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_street_id
537
+ if (street_id != val) {
538
+ this.model.f_residential_area_id = ''
539
+ }
540
+ } else {
541
+ this.model.f_residential_area_id = ''
542
+ }
543
+ }
544
+ }
545
+ this.$resetValidation()
546
+ },
547
+
548
+ getorg (val) {
549
+ this.f_orgid = val[0]
550
+ },
551
+
552
+ // 处理批量地址信息
553
+ dealaddlist () {
554
+ try {
555
+ var resultlist = []
556
+ for (var i = parseInt(this.model.f_building_start); i <= parseInt(this.model.f_building_end); i++) {
557
+ for (var j = parseInt(this.model.f_unit_start); j <= parseInt(this.model.f_unit_end); j++) {
558
+ for (var m = parseInt(this.model.f_floor_start); m <= parseInt(this.model.f_floor_end); m++) {
559
+ for (var n = parseInt(this.model.f_room_start); n <= parseInt(this.model.f_room_end); n++) {
560
+ // 预备一个空的json
561
+ console.log('批量', this.model)
562
+ let data = Object.assign({}, this.model)
563
+ data.f_create_person = this.$login.f.name
564
+ data.f_building = data.f_building_prefix + i
565
+ data.f_unit = data.f_unit_prefix + j
566
+ data.f_floor = data.f_floor_prefix + m
567
+ // 目前房号都按两位处理 如: 101室 201室 110室
568
+ if ((n + '').length == 1) {
569
+ data.f_room = data.f_room_prefix + m + '0' + n
570
+ } else {
571
+ data.f_room = data.f_room_prefix + m + '' + n
572
+ }
573
+ data.f_filialeid = this.f_filialeids
574
+ data.f_operator = this.$login.f.name
575
+ data.f_operatorid = this.$login.f.id
576
+ data.f_orgid = this.$login.f.orgid
577
+ data.f_orgname = this.$login.f.orgs
578
+ data.f_depid = this.$login.f.depids
579
+ data.f_depname = this.$login.f.deps
580
+ data.f_pcd = this.findbyid(this.pcdslist, this.model.f_pcd_id).f_pcd
581
+ data.f_street = this.findbyid(this.streetslist, this.model.f_street_id).f_street
582
+ data.f_residential_area = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_residential_area
583
+ data.f_address = data.f_street +
584
+ data.f_residential_area +
585
+ data.f_building + data.f_building_suffix +
586
+ data.f_unit + data.f_unit_suffix +
587
+ data.f_floor + data.f_floor_suffix +
588
+ data.f_room + data.f_room_suffix
589
+ if (this.model.slice_area) {
590
+ if (this.model.slice_area.length > 0) {
591
+ data.f_slice_area = this.model.slice_area[0].name
592
+ data.f_area_code = this.model.slice_area[0].code
593
+ }
594
+ }
595
+ resultlist.push(data)
596
+ }
597
+ }
598
+ }
599
+ }
600
+ this.addresslist = resultlist
601
+ } catch (e) {
602
+ console.log(e)
603
+ this.$showAlert('输出数据有误,请检查', 'warning', 2000)
604
+ }
605
+ },
606
+ // 保存多个
607
+ async confirmall () {
608
+ this.dealaddlist()
609
+ if (this.addresslist.length > 0) {
610
+ let msg = {
611
+ resolveMsg: '地址保存成功',
612
+ rejectMsg: '地址保存失败'
613
+ }
614
+ this.$showMessage('确定要批量添加' + this.addresslist.length + '户地址吗?,如有已经存在的,将会重复添加!!!', ['confirm', 'cancel']).then((res) => {
615
+ if (res === 'confirm') {
616
+ this.$resetpost('rs/logic/address_adduserlist', {data: {addlist: this.addresslist}}, msg).then((req) => {
617
+ this.cleardara()
618
+ this.$dispatch('confirm')
619
+ })
620
+ }
621
+ })
622
+ }
623
+ },
624
+ // 保存
625
+ async confirm () {
626
+ if (this.onedata == 'one') {
627
+ await this.saveonedata()
628
+ }
629
+ this.cleardara()
630
+ this.$dispatch('confirm')
631
+ },
632
+ // 保存一户信息
633
+ async saveonedata () {
634
+ this.model.f_create_person = this.$login.f.name
635
+ this.model.f_filialeid = this.f_filialeids
636
+ this.model.f_operator = this.$login.f.name
637
+ this.model.f_operatorid = this.$login.f.id
638
+ this.model.f_orgid = this.$login.f.orgid
639
+ this.model.f_orgname = this.$login.f.orgs
640
+ this.model.f_depid = this.$login.f.depids
641
+ this.model.f_depname = this.$login.f.deps
642
+ if (this.model.slice_area) {
643
+ if (this.model.slice_area.length > 0) {
644
+ this.model.f_slice_area = this.model.slice_area[0].name
645
+ this.model.f_area_code = this.model.slice_area[0].code
646
+ }
647
+ }
648
+ if (this.usertype) {
649
+ // 非民用
650
+ this.model.f_special = '1'
651
+ this.model.f_building_suffix = ''
652
+ this.model.f_unit_suffix = ''
653
+ this.model.f_floor_suffix = ''
654
+ this.model.f_room_suffix = ''
655
+ this.model.f_pcd = this.findbyid(this.pcdslist, this.model.f_pcd_id).f_pcd
656
+ this.model.f_street = this.findbyid(this.streetslist, this.model.f_street_id).f_street
657
+ this.model.f_residential_area = this.findbyid(this.areaslist, this.model.f_residential_area_id) ? this.findbyid(this.areaslist, this.model.f_residential_area_id).f_residential_area : ''
658
+ } else {
659
+ // 民用
660
+ this.model.f_pcd = this.findbyid(this.pcdslist, this.model.f_pcd_id).f_pcd
661
+ this.model.f_street = this.findbyid(this.streetslist, this.model.f_street_id).f_street
662
+ this.model.f_residential_area = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_residential_area
663
+ this.model.f_address = this.model.f_street + this.model.f_residential_area + (this.model.f_building ? this.model.f_building + this.model.f_building_suffix : '') + (this.model.f_unit ? this.model.f_unit + this.model.f_unit_suffix : '') + (this.model.f_floor ? this.model.f_floor + this.model.f_floor_suffix : '') + this.model.f_room + this.model.f_room_suffix
664
+ }
665
+ await this.$resetpost('rs/logic/address_updateuseraddress', this.model)
666
+ },
667
+ cancel () {
668
+ this.cleardara()
669
+ this.$dispatch('cancel')
670
+ },
671
+ cleardara () {
672
+ this.model = {
673
+ f_pcd_id: '',
674
+ f_street_id: '',
675
+ f_residential_area_id: '',
676
+ f_pcd: '',
677
+ f_comments: '',
678
+ f_street: '',
679
+ f_residential_area: '',
680
+ f_slice_area: '',
681
+ f_building: '',
682
+ f_building_start: '',
683
+ f_building_end: '',
684
+ f_building_prefix: '',
685
+ f_building_suffix: this.config.f_building_suffix,
686
+ f_unit: '',
687
+ f_unit_start: '',
688
+ f_unit_end: '',
689
+ f_unit_prefix: '',
690
+ f_unit_suffix: this.config.f_unit_suffix,
691
+ f_floor: '',
692
+ f_floor_start: '',
693
+ f_floor_end: '',
694
+ f_floor_prefix: '',
695
+ f_floor_suffix: this.config.f_floor_suffix,
696
+ f_room: '',
697
+ f_room_start: '',
698
+ f_room_end: '',
699
+ f_room_prefix: '',
700
+ f_room_suffix: this.config.f_room_suffix,
701
+ // 详细地址
702
+ f_address: '',
703
+ // 单位名称
704
+ f_company: '',
705
+ // 单位地址
706
+ f_company_address: ''
707
+ }
708
+ // this.pcdslist = []
709
+ // this.streetslist = []
710
+ // this.areaslist = []
711
+ },
712
+
713
+ // 根据名字找数据
714
+ findbyid (list, name) {
715
+ var result
716
+ list.forEach((row, n) => {
717
+ if (name == row.value) {
718
+ result = row.data
719
+ }
720
+ })
721
+ return result
722
+ }
723
+ },
724
+ watch: {
725
+ // 分公司变化
726
+ 'f_filialeids' () {
727
+ if (this.model.f_filialeid) {
728
+ if (this.model.f_filialeid != this.f_filialeids) {
729
+ this.$dispatch('cancel')
730
+ }
731
+ }
732
+ this.cleardara()
733
+ this.initdata()
734
+ },
735
+ 'row' () {
736
+ this.onedata = 'one'
737
+ }
738
+ },
739
+ computed: {
740
+ // 地址状态下拉框
741
+ addresstate () {
742
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
743
+ }
744
+ }
745
+ }
746
+ </script>
@@ -16,10 +16,10 @@
16
16
  <!-- placeholder="客户电话" v-el:phone v-next-el="area">-->
17
17
  <!-- <button type="button" class="glyphicon glyphicon-plus" @click.stop="phoneManage()"></button>-->
18
18
  <!-- </div>-->
19
- <div style="" class="col-sm-4 form-group">
19
+ <div style="" class="col-sm-4 form-group" :class="[$v.f_user_phone.required ? 'has-error col' : '']">
20
20
  <label for="f_user_phone" class="font_normal_body">&ensp;客户电话</label>
21
21
  <input type="text" maxlength="11" v-model="baseinfo.base.f_user_phone"
22
- class="input_search" style="width:60%"
22
+ class="input_search" style="width:60%" v-validate:f_user_phone='{required: true }'
23
23
  placeholder="客户电话" v-el:phone v-next-el="area">
24
24
  <button type="button" class="glyphicon glyphicon-plus" @click.stop="phoneManage()"></button>
25
25
  </div>
@@ -20,6 +20,9 @@ let specialComp = {
20
20
  'charge-manage': (resolve) => { require(['./ChargeManage'], resolve) },
21
21
 
22
22
  // 档案管理新(预备户建档)
23
- 'file-user-files-new': (resolve) => { require(['./FileUserFiles'], resolve) }
23
+ 'file-user-files-new': (resolve) => { require(['./FileUserFiles'], resolve) },
24
+
25
+ // 档案管理新(预备户建档)
26
+ 'file-user-address': (resolve) => { require(['./FileUserAddress'], resolve) }
24
27
  }
25
28
  exports.specialComp = specialComp
@@ -95,6 +95,10 @@
95
95
  <input class="input-underline" style="width:60%" :value="row.total_fee" readonly>
96
96
  </div>
97
97
  <div v-if="row.f_collection_type == '按气量'">
98
+ <div class="col-sm-4">
99
+ <label class="font_normal_body_new">累购气量</label>
100
+ <input class="input-underline" style="width:60%" :value="row.f_total_gas" readonly>
101
+ </div>
98
102
  <div class="col-sm-4">
99
103
  <label class="font_normal_body_new">最后结算时间</label>
100
104
  <input class="input-underline" style="width:45%" :value="row.f_hand_date ? row.f_hand_date :'暂无'" readonly>
@@ -146,7 +150,7 @@
146
150
  </div>
147
151
  <div class="col-sm-4">
148
152
  <label class="font_normal_body_new">户累购</label>
149
- <input class="input-underline" style="width:60%" :value="row.f_total_gas" readonly>
153
+ <input class="input-underline" style="width:60%" :value="row.f_total_gas_all" readonly>
150
154
  </div>
151
155
  </div>
152
156
  <div class="auto" style="float: right;">
package/src/main.js CHANGED
@@ -1,22 +1,22 @@
1
- import Vue from 'vue'
2
- import { all } from 'vue-client'
3
- import App from './App'
4
- import { system } from 'system-clients'
5
- import sale from './sale'
6
- import { address } from 'address-client'
7
- import { ldap } from 'ldap-clients'
8
- import VueClipboard from 'vue-clipboard2'
9
- Vue.use(VueClipboard)
10
- Vue.config.silent = true
11
-
12
- all()
13
- system(false)
14
- sale('xiangyun')
15
- address()
16
- ldap()
17
- require('system-clients/src/styles/less/bootstrap.less')
18
-
19
- new Vue({
20
- el: 'body',
21
- components: { App }
22
- })
1
+ import Vue from 'vue'
2
+ import { all } from 'vue-client'
3
+ import App from './App'
4
+ import { system } from 'system-clients'
5
+ import sale from './sale'
6
+ import { address } from 'address-client'
7
+ import { ldap } from 'ldap-clients'
8
+ import VueClipboard from 'vue-clipboard2'
9
+ Vue.use(VueClipboard)
10
+ Vue.config.silent = true
11
+
12
+ all()
13
+ system(false)
14
+ sale('kelai')
15
+ address()
16
+ ldap()
17
+ require('system-clients/src/styles/less/bootstrap.less')
18
+
19
+ new Vue({
20
+ el: 'body',
21
+ components: { App }
22
+ })