safecheck-client 3.0.34-22 → 3.0.34-24
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/App-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.vue +55 -0
- package/src/App.vue +31 -33
- package/src/assets/123.png +0 -0
- package/src/assets/f8632d3c8c4c1cb68e99da754cab1a7.png +0 -0
- package/src/components/LoadData.vue +62 -0
- package/src/components/android/QRCode/QRCodeBinding.vue +247 -0
- package/src/components/android/QRCode/QRCodePage.vue +199 -0
- package/src/components/android/examples/SafeListExamples.vue +95 -0
- package/src/components/android/examples/UserExamples.vue +125 -0
- package/src/filiale/fugou/android.js +11 -11
- package/src/filiale/fugou/pc/CheckBookSearchUser.vue +830 -830
- package/src/filiale/fugou/pc/DefectMainNew.vue +63 -63
- package/src/filiale/fugou/pc/DefectPaperNew.vue +1085 -1085
- package/src/filiale/fugou/pc/PaperDefectMain.vue +928 -928
- package/src/filiale/fugou/pc/PaperList.vue +911 -911
- package/src/filiale/fugou/pc/PlanManage.vue +1061 -1061
- package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
- package/src/main.js +33 -32
- package/src/safecheck-android.js +4 -0
@@ -1,830 +1,830 @@
|
|
1
|
-
<template>
|
2
|
-
<div id='MbpeopleList' class="flex">
|
3
|
-
<criteria-paged :model="model" v-ref:paged>
|
4
|
-
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
|
5
|
-
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
6
|
-
<div class="row">
|
7
|
-
<div class="col-sm-3 form-group">
|
8
|
-
<label class="font_normal_body">用户编号</label>
|
9
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code"
|
10
|
-
condition="f_userinfo_code like '%{}%'" placeholder='用户编号'>
|
11
|
-
</div>
|
12
|
-
<div class="col-sm-3 form-group">
|
13
|
-
<label class="font_normal_body">用户姓名</label>
|
14
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_user_name"
|
15
|
-
condition="f_user_name like '%{}%'" placeholder='用户姓名'>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<div class="form-group button-range" style="float: right">
|
19
|
-
<button class="button_search button_spacing" @click="$parent.$parent.search()">查询</button>
|
20
|
-
<button class="button_clear button_spacing" @click="clear">清空</button>
|
21
|
-
<!-- <button class="button_export button_spacing" @click="$parent.$parent.importFile">导入</button>-->
|
22
|
-
<!-- <export-excel-->
|
23
|
-
<!-- :data="{condition:$parent.$parent.condition}"-->
|
24
|
-
<!-- :field="$parent.$parent.getfield"-->
|
25
|
-
<!-- sqlurl="api/af-revenue/logic/exportfile" sql-name="salembPeopleList" template-name='表册用户导出'-->
|
26
|
-
<!-- :choose-col="true"></export-excel>-->
|
27
|
-
<div style="float: right" class="button_spacing"
|
28
|
-
:class="{'button_shrink_top': $parent.$parent.criteriaShow,'button_shrink_bottom': !$parent.$parent.criteriaShow}"
|
29
|
-
@click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"></div>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
<div class="row" v-show="$parent.$parent.criteriaShow">
|
33
|
-
<div class="col-sm-3 form-group">
|
34
|
-
<label class="font_normal_body"> 小 区 域</label>
|
35
|
-
<v-select :value.sync="model.f_small_area" v-model="model.f_small_area"
|
36
|
-
:options='$parent.$parent.smallareas' placeholder='小区域'
|
37
|
-
close-on-select :search='true'
|
38
|
-
condition="f_small_area = '{}'"></v-select>
|
39
|
-
</div>
|
40
|
-
<div class="form-group col-sm-3">
|
41
|
-
<label class="font_normal_body">用户电话</label>
|
42
|
-
<input type="text" class="form-control" v-model="model.f_user_phone" placeholder='用户电话'
|
43
|
-
condition="f_user_phone like '%{}%'" v-next-el='yhxm' style="width: 60%"
|
44
|
-
>
|
45
|
-
</div>
|
46
|
-
<div class="form-group col-sm-3" title="参数名称:【用气类型】">
|
47
|
-
<label class="font_normal_body" >用气类型</label>
|
48
|
-
<v-select :value.sync="model.f_user_gas_type"
|
49
|
-
v-model="model.f_user_gas_type"
|
50
|
-
:multiple="true"
|
51
|
-
:options='$parent.$parent.usergastype' placeholder='请选择'
|
52
|
-
condition="f_user_gas_type in {}"
|
53
|
-
></v-select>
|
54
|
-
</div>
|
55
|
-
<div class="form-group col-sm-3" title="参数名称:【用户标签】">
|
56
|
-
<label class="font_normal_body" >用户标签</label>
|
57
|
-
<v-select :value.sync="model.f_user_tags"
|
58
|
-
v-model="model.f_user_tags"
|
59
|
-
:multiple="true"
|
60
|
-
:options='$parent.$parent.usertags' placeholder='请选择'
|
61
|
-
condition="f_user_tags in {}"
|
62
|
-
></v-select>
|
63
|
-
</div>
|
64
|
-
<div class="form-group col-sm-3">
|
65
|
-
<label class="font_normal_body">客户类型</label>
|
66
|
-
<v-select :options='$parent.$parent.user_type' :value.sync="model.f_user_type"
|
67
|
-
close-on-select condition="f_user_type='{}'"
|
68
|
-
placeholder='用户类型' v-model="model.f_user_type"></v-select>
|
69
|
-
</div>
|
70
|
-
<div class="form-group col-sm-3">
|
71
|
-
<label class="font_normal_body">客户状态</label>
|
72
|
-
<v-select :options='$parent.$parent.user_state' :value.sync="model.f_user_state"
|
73
|
-
close-on-select condition="f_user_state = '{}'"
|
74
|
-
placeholder='客户状态' v-model="model.f_user_state"></v-select>
|
75
|
-
</div>
|
76
|
-
<div class="col-sm-3 form-group">
|
77
|
-
<label class="font_normal_body">所属表册</label>
|
78
|
-
<v-select :value.sync="model.f_check_book_num" v-model="model.f_check_book_num"
|
79
|
-
:options='$parent.$parent.meterbooks' placeholder='安检册'
|
80
|
-
:value-single="true"
|
81
|
-
condition="f_check_book_name='{}'"
|
82
|
-
style="width:60%"
|
83
|
-
close-on-select></v-select>
|
84
|
-
</div>
|
85
|
-
<div class="col-sm-3 form-group">
|
86
|
-
<label class="font_normal_body">抄 表 员 </label>
|
87
|
-
<v-select :value.sync="model.f_inputtor" v-model='model.f_inputtor'
|
88
|
-
style="width:60%"
|
89
|
-
condition="f_inputtor in {}"
|
90
|
-
:options='$parent.$parent.inputtores' placeholder='抄表员'
|
91
|
-
close-on-select
|
92
|
-
v-el:cc></v-select>
|
93
|
-
</div>
|
94
|
-
<div class="col-sm-3 form-group">
|
95
|
-
<label class="font_normal_body">表箱号 </label>
|
96
|
-
<input style="width:60%" type="text" class="form-control" v-model="model.f_metertitles"
|
97
|
-
condition="f_metertitles like '%{}%'" placeholder='表箱号'
|
98
|
-
>
|
99
|
-
</div>
|
100
|
-
<div class="form-group col-sm-3">
|
101
|
-
<label class="font_normal_body">用气性质</label>
|
102
|
-
<v-select :options='$parent.$parent.gasproperties' :value.sync="model.f_gasproperties"
|
103
|
-
close-on-select condition="f_gasproperties='{}'"
|
104
|
-
placeholder='用气性质' v-model="model.f_gasproperties"></v-select>
|
105
|
-
</div>
|
106
|
-
<div class="form-group col-sm-3">
|
107
|
-
<label class="font_normal_body">气表类型</label>
|
108
|
-
<v-select :options='$parent.$parent.meter_classify' :value.sync="model.f_meter_classify"
|
109
|
-
close-on-select condition="f_meter_classify='{}'"
|
110
|
-
placeholder='气表类型' v-model="model.f_meter_classify"></v-select>
|
111
|
-
</div>
|
112
|
-
<div class="col-sm-3 form-group">
|
113
|
-
<label class="font_normal_body">气表品牌</label>
|
114
|
-
<v-select :value.sync="model.f_meter_brand"
|
115
|
-
v-model="model.f_meter_brand"
|
116
|
-
:options='$parent.$parent.meterbrands' placeholder='请选择'
|
117
|
-
condition="f_meter_brand in {}"
|
118
|
-
close-on-select></v-select>
|
119
|
-
</div>
|
120
|
-
<div class="form-group col-sm-3">
|
121
|
-
<label class="font_normal_body">气表状态</label>
|
122
|
-
<v-select :options='$parent.$parent.table_state' :value.sync="model.f_table_state"
|
123
|
-
close-on-select condition="f_table_state = '{}'"
|
124
|
-
placeholder='气表状态' v-model="model.f_table_state"></v-select>
|
125
|
-
</div>
|
126
|
-
<div class="col-sm-3 form-group">
|
127
|
-
<label class="font_normal_body">小 区 </label>
|
128
|
-
<input type="text" class="input_search" v-model="model.f_residential_area" style="width: 60%"
|
129
|
-
condition=" f_residential_area like '{}%'" placeholder="输入小区">
|
130
|
-
</div>
|
131
|
-
<div class="form-group col-sm-3">
|
132
|
-
<label class="font_normal_body">客户地址</label>
|
133
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_address"
|
134
|
-
condition="f_address like '%{}%'" placeholder='客户地址'>
|
135
|
-
</div>
|
136
|
-
<div class="col-sm-3 form-group">
|
137
|
-
<label class="font_normal_body">楼 号 </label>
|
138
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_building"
|
139
|
-
condition="f_building = '{}'" placeholder='楼号'>
|
140
|
-
</div>
|
141
|
-
<div class="form-group col-sm-3">
|
142
|
-
<label class="font_normal_body">组织机构</label>
|
143
|
-
<res-select :initresid='$parent.$parent.curorgid'
|
144
|
-
@res-select="$parent.$parent.getorg"
|
145
|
-
class="select select_list"
|
146
|
-
restype='organization' :is-mul="false"
|
147
|
-
style="width: 60%">
|
148
|
-
</res-select>
|
149
|
-
</div>
|
150
|
-
<div class="form-group col-sm-3">
|
151
|
-
<label class="font_normal_body">是否在册</label>
|
152
|
-
<v-select :options='$parent.$parent.whether_list'
|
153
|
-
:value.sync="model.f_book_name"
|
154
|
-
v-model="model.f_book_name"
|
155
|
-
close-on-select condition="f_check_book_name {}"
|
156
|
-
placeholder='是否在册' ></v-select>
|
157
|
-
</div>
|
158
|
-
<div class="col-sm-3 form-group">
|
159
|
-
<label class="font_normal_body">入户证号</label>
|
160
|
-
<input style="width:60%" type="text" class="form-control" v-model="model.f_book_no"
|
161
|
-
condition="f_book_no like '%{}%'" placeholder='入户证号'
|
162
|
-
>
|
163
|
-
</div>
|
164
|
-
<div class="col-sm-3 form-group">
|
165
|
-
<label class="font_normal_body">表 号 </label>
|
166
|
-
<input style="width:60%" type="text" class="form-control" v-model="model.f_meternumber"
|
167
|
-
condition="f_meternumber like '%{}%'" placeholder='表号'
|
168
|
-
>
|
169
|
-
</div>
|
170
|
-
|
171
|
-
<div class="col-sm-3 form-group">
|
172
|
-
<label class="font_normal_body">街道/乡镇</label>
|
173
|
-
<v-select :value.sync="model.f_street_id"
|
174
|
-
:multiple="true"
|
175
|
-
:options='$parent.$parent.streetslist' placeholder='请选择'
|
176
|
-
condition="f_street_id in {}"
|
177
|
-
v-model='model.f_street_id'
|
178
|
-
@change="$parent.$parent.streetChange"
|
179
|
-
:search="true" >
|
180
|
-
</v-select>
|
181
|
-
</div>
|
182
|
-
<div class="col-sm-3 form-group">
|
183
|
-
<label class="font_normal_body">片区/行政村</label>
|
184
|
-
<v-select :value.sync="model.f_community_id"
|
185
|
-
:multiple="true"
|
186
|
-
v-model='model.f_community_id'
|
187
|
-
:options='$parent.$parent.communitylist'
|
188
|
-
placeholder='片区/管理站' filer-key="name"
|
189
|
-
condition="f_community_id in {}"
|
190
|
-
@change="$parent.$parent.communityChange"
|
191
|
-
v-ref:slice>
|
192
|
-
</v-select>
|
193
|
-
</div>
|
194
|
-
<div class="col-sm-3 form-group">
|
195
|
-
<label class="font_normal_body">小区/自然村</label>
|
196
|
-
<v-select :value.sync="model.f_residential_area_id"
|
197
|
-
:multiple="true"
|
198
|
-
:options='$parent.$parent.areaslist' placeholder='请选择'
|
199
|
-
condition="f_residential_area_id in {}"
|
200
|
-
v-model='model.f_residential_area_id'
|
201
|
-
>
|
202
|
-
</v-select>
|
203
|
-
</div>
|
204
|
-
<div class="col-sm-3 form-group">
|
205
|
-
<label class="font_normal_body">开户时间</label>
|
206
|
-
<datepicker
|
207
|
-
:value.sync="model.f_open_date"
|
208
|
-
placeholder='开户时间' style="width:60%"
|
209
|
-
:disabled-days-of-week="[]"
|
210
|
-
:format="'yyyy-MM-dd'"
|
211
|
-
:select-month="true"
|
212
|
-
v-model='model.f_open_date'
|
213
|
-
:show-rest-button="reset">
|
214
|
-
</datepicker>
|
215
|
-
</div>
|
216
|
-
</div>
|
217
|
-
</div>
|
218
|
-
</criteria>
|
219
|
-
<data-grid class="list_area table_sy" :model="model" partial='list' v-ref:grid :optional="true">
|
220
|
-
<template partial='head'>
|
221
|
-
<!--<th>-->
|
222
|
-
<!--<input type="checkbox" id="f_operator" v-model="$parent.$parent.$parent.all[model.pageIndex-1]"-->
|
223
|
-
<!--@change="$parent.$parent.$parent.select()"/>-->
|
224
|
-
<!--</th>-->
|
225
|
-
<th><nobr>序号</nobr></th>
|
226
|
-
<th><nobr>客户编号</nobr></th>
|
227
|
-
<th><nobr>客户名称</nobr></th>
|
228
|
-
<th><nobr>客户状态</nobr></th>
|
229
|
-
|
230
|
-
<th><nobr>区/县</nobr></th>
|
231
|
-
<th><nobr>街道/乡镇</nobr></th>
|
232
|
-
<th><nobr>片区/行政村</nobr></th>
|
233
|
-
<th><nobr>小区/自然村</nobr></th>
|
234
|
-
<th><nobr>客户地址</nobr></th>
|
235
|
-
<th><nobr>表号</nobr></th>
|
236
|
-
<th><nobr>气表状态</nobr></th>
|
237
|
-
<th><nobr>所属表册</nobr></th>
|
238
|
-
<!-- <th><nobr>册内排序</nobr></th>-->
|
239
|
-
<th><nobr>表箱号</nobr></th>
|
240
|
-
<th><nobr>入户证号</nobr></th>
|
241
|
-
<th><nobr>表底数</nobr></th>
|
242
|
-
</template>
|
243
|
-
<template partial='body'>
|
244
|
-
<!--<td>-->
|
245
|
-
<!--<input :id="'body'+model.pageIndex" type='checkbox' @change="$parent.$parent.$parent.selectOne($event,row,$index)"-->
|
246
|
-
<!--:checked="$parent.$parent.$parent.ischecked(model.pageIndex-1,$index)"/>-->
|
247
|
-
<!--</td>-->
|
248
|
-
<td>{{$index+1}}</td>
|
249
|
-
<td>{{row.f_userinfo_code}}</td>
|
250
|
-
<td>{{row.f_user_name}}</td>
|
251
|
-
<td>{{row.f_user_state}}</td>
|
252
|
-
|
253
|
-
<td>{{row.f_pcd}}</td>
|
254
|
-
<td>{{row.f_street}}</td>
|
255
|
-
<td>{{row.f_community}}</td>
|
256
|
-
<td>{{row.f_residential_area}}</td>
|
257
|
-
<td>{{row.f_address}}</td>
|
258
|
-
<td>{{row.f_meternumber}}</td>
|
259
|
-
<td>{{row.f_table_state}}</td>
|
260
|
-
<td>{{row.f_check_book_name}}</td>
|
261
|
-
<!-- <td>{{row.f_meter_book_sort}}</td>-->
|
262
|
-
<!-- <td>{{row.f_adjustable_id}}</td>-->
|
263
|
-
<td style="text-align:center">{{row.f_metertitles}}</td>
|
264
|
-
<td style="text-align:center"><nobr>{{row.f_book_no}}</nobr></td>
|
265
|
-
<td style="text-align:center">{{row.f_meter_base}}</td>
|
266
|
-
</template>
|
267
|
-
</data-grid>
|
268
|
-
</criteria-paged>
|
269
|
-
</div>
|
270
|
-
<modal :show.sync="show" width="500px" title="文件导入" v-ref:modal large backdrop="false">
|
271
|
-
<article slot="modal-body" class="modal-body">
|
272
|
-
<file-upload class="my-file-uploader " name="UploadFile" style="border-radius: 2px;"
|
273
|
-
action="api/af-revenue/file/uploadFile" tagname="导入表册用户" v-ref:file multiple></file-upload>
|
274
|
-
</article>
|
275
|
-
<footer slot="modal-footer" class="modal-footer">
|
276
|
-
</footer>
|
277
|
-
</modal>
|
278
|
-
</template>
|
279
|
-
|
280
|
-
<script>
|
281
|
-
import {HttpResetClass, PagedList} from 'vue-client'
|
282
|
-
import Vue from 'vue'
|
283
|
-
|
284
|
-
let getAreaConfig = async function (self) {
|
285
|
-
// 获取气价里面的配置
|
286
|
-
await self.$getConfig(self, 'UserAddress')
|
287
|
-
Object.assign(self.model, self.config)
|
288
|
-
self.initdata()
|
289
|
-
}
|
290
|
-
let loadParamGem = async function (self) {
|
291
|
-
await self.$LoadParams.loadParam()
|
292
|
-
self.getfield = self.config.excelHeaders
|
293
|
-
// self.$refs.paged.$refs.cri.model.f_meter_classify = ['机表']
|
294
|
-
await self.initAdjustables()
|
295
|
-
// await self.search()
|
296
|
-
}
|
297
|
-
export default {
|
298
|
-
name: 'MbpeopleList',
|
299
|
-
data () {
|
300
|
-
return {
|
301
|
-
f_filialeids: this.$login.f.orgid,
|
302
|
-
// 初始化省市区数据
|
303
|
-
pcdslist: [],
|
304
|
-
//初始化街道数据
|
305
|
-
streetslist:[],
|
306
|
-
communitylist:[],
|
307
|
-
areaslist: [],
|
308
|
-
// 选中所有地址
|
309
|
-
addresslist: [],
|
310
|
-
sliceArea: [],
|
311
|
-
orgCondtionStr: '',
|
312
|
-
f_filialeid: this.$login.f.orgid,
|
313
|
-
f_orgid: '',
|
314
|
-
invoiceuse: [{label: '是', value: 'is not null'}, {label: '否', value: 'is null'}],
|
315
|
-
model: new PagedList('rs/sql/mb_peopleList', 20),
|
316
|
-
f_orgstr: this.$login.f.orgid,
|
317
|
-
// 要操作的用户
|
318
|
-
rowsdata: [],
|
319
|
-
aaa: '',
|
320
|
-
// 控制全选
|
321
|
-
all: [],
|
322
|
-
// 控制单选
|
323
|
-
radio: [],
|
324
|
-
show: false,
|
325
|
-
meterbooks: [{label: '全部', value: ''}],
|
326
|
-
criteriaShow: false,
|
327
|
-
gasproperties: this.$appdata.getParam('用气性质') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')] : [],
|
328
|
-
user_type: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
|
329
|
-
meter_classify: this.$appdata.getParam('气表类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')] : [],
|
330
|
-
table_state: this.$appdata.getParam('气表状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')] : [],
|
331
|
-
f_small_areas: this.$appdata.getParam('小区域') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')] : [],
|
332
|
-
user_state: [{label: '正常', value: '正常'}, {label: '预备', value: '预备'}, {label: '销户', value: '销户'}],
|
333
|
-
whether_list: [{label: '全部', value: ''},{label: '已在册内', value: 'is not null'}, {label: '不在册内', value: 'is null'}],
|
334
|
-
meterbrands: [],
|
335
|
-
condition: '',
|
336
|
-
adjustables: [],
|
337
|
-
unnullrowdata: [],
|
338
|
-
getfield: {},
|
339
|
-
config: {
|
340
|
-
// 导出列要和查询列相同
|
341
|
-
excelHeaders: {
|
342
|
-
'f_userfiles_id': '系统识别号',
|
343
|
-
'f_userinfo_code': '用户编号',
|
344
|
-
'f_user_name': '用户姓名',
|
345
|
-
'f_address': '用户地址'
|
346
|
-
}
|
347
|
-
},
|
348
|
-
curorgid: [this.$login.f.orgid]
|
349
|
-
}
|
350
|
-
},
|
351
|
-
created () {
|
352
|
-
},
|
353
|
-
ready () {
|
354
|
-
getAreaConfig(this)
|
355
|
-
loadParamGem(this)
|
356
|
-
this.getmeterbook()
|
357
|
-
},
|
358
|
-
methods: {
|
359
|
-
async meterbook(){
|
360
|
-
this.meterbooks=[]
|
361
|
-
if(this.f_orgid==''){
|
362
|
-
this.f_orgid=this.$login.f.orgid
|
363
|
-
}
|
364
|
-
let res=await this.$resetpost('rs/sql/tel_singleTable_OrderBy',{data:{items:' * ',tablename:'t_check_book',condition:` 1=1 `,orderitem:' id desc'}},{resolveMsg:null,rejectMsg:null})
|
365
|
-
for(let i=0;i<res.data.length;i++){
|
366
|
-
console.log("res",res.data[i])
|
367
|
-
let temp=[]
|
368
|
-
temp.label=res.data[i].f_check_book_name
|
369
|
-
temp.value=res.data[i].id
|
370
|
-
this.meterbooks.push(temp)
|
371
|
-
}
|
372
|
-
|
373
|
-
},
|
374
|
-
invoiceuseChange (val) {
|
375
|
-
// 查询已开票记录清空选项
|
376
|
-
if (val == 'is not null') {
|
377
|
-
this.rowsdata = []
|
378
|
-
this.radio = []
|
379
|
-
}
|
380
|
-
},
|
381
|
-
|
382
|
-
select () {
|
383
|
-
let index = this.model.pageIndex - 1
|
384
|
-
console.log('全选', this.all[index])
|
385
|
-
if (!this.radio[index]) {
|
386
|
-
this.radio.$set(index, [])
|
387
|
-
}
|
388
|
-
if (this.all[index]) {
|
389
|
-
// 数据
|
390
|
-
this.rowsdata[index] = Object.assign([], this.model.rows)
|
391
|
-
// 勾选
|
392
|
-
for (var i = 0; i < this.model.rows.length; i++) {
|
393
|
-
this.radio[index].$set(i, true)
|
394
|
-
}
|
395
|
-
} else {
|
396
|
-
// 数据
|
397
|
-
this.rowsdata[index] = []
|
398
|
-
// 不勾选
|
399
|
-
for (var i = 0; i < this.model.rows.length; i++) {
|
400
|
-
this.radio[index].$set(i, false)
|
401
|
-
}
|
402
|
-
}
|
403
|
-
this.mergeRowData()
|
404
|
-
},
|
405
|
-
importFile () {
|
406
|
-
this.show = true
|
407
|
-
},
|
408
|
-
async initAdjustables () {
|
409
|
-
let arr = []
|
410
|
-
let filter = this.$login.f.orgid
|
411
|
-
this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
|
412
|
-
let temp = {}
|
413
|
-
temp.label = '[' + item.value.f_adjustable_id + ']-' + item.label
|
414
|
-
temp.value = item.value.id
|
415
|
-
arr.push(temp)
|
416
|
-
})
|
417
|
-
this.adjustables = [{label: '全部', value: ''}, ...arr]
|
418
|
-
// 初始化气表品牌
|
419
|
-
let brandArr = []
|
420
|
-
this.$GetSaleParam.getGasbrand().forEach((item) => {
|
421
|
-
let temp1 = {}
|
422
|
-
temp1.label = item.label
|
423
|
-
temp1.value = item.value.f_meter_brand
|
424
|
-
brandArr.push(temp1)
|
425
|
-
})
|
426
|
-
this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
|
427
|
-
//
|
428
|
-
// // 加载安检册
|
429
|
-
// console.log("------------------this.$GetSaleParam.getMeterBooks()",this.$GetSaleParam.getMeterBooks())
|
430
|
-
// this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
|
431
|
-
},
|
432
|
-
search () {
|
433
|
-
this.$refs.paged.$refs.cri.search()
|
434
|
-
console.log('mbpeople this = ', this)
|
435
|
-
},
|
436
|
-
selfSearch (args) {
|
437
|
-
let f_orgstr = this.orgCondtionStr ? this.orgCondtionStr : "and f_orgid in ('" + this.f_orgid + "')"
|
438
|
-
args.condition = `${args.condition} ` + f_orgstr
|
439
|
-
// args.condition += ` and f_orgid = ${this.f_orgstr}`
|
440
|
-
if(args.model.f_open_date){
|
441
|
-
args.condition += ` and f_open_date <='${args.model.f_open_date}' `
|
442
|
-
}
|
443
|
-
this.condition = args.condition
|
444
|
-
this.$parent.condition = this.condition
|
445
|
-
this.model.search(args.condition, args.model)
|
446
|
-
},
|
447
|
-
// 合并二维数组并去空
|
448
|
-
mergeRowData () {
|
449
|
-
console.log('!!!!!!!!!!!!!数组去空', this.rowsdata)
|
450
|
-
let data = []
|
451
|
-
// 合并
|
452
|
-
for (let array of this.rowsdata) {
|
453
|
-
data.push.apply(data, array)
|
454
|
-
}
|
455
|
-
// 去空
|
456
|
-
// 拓展数组去空值的方法
|
457
|
-
Array.prototype.removeEmpty = function () {
|
458
|
-
for (var i = 0; i < this.length; i++) {
|
459
|
-
if (this[i] == '' || typeof (this[i]) == 'undefined') {
|
460
|
-
this.splice(i, 1)
|
461
|
-
i--
|
462
|
-
}
|
463
|
-
}
|
464
|
-
return this
|
465
|
-
}
|
466
|
-
data = data.removeEmpty()
|
467
|
-
this.unnullrowdata = []
|
468
|
-
data.forEach((row) => {
|
469
|
-
this.unnullrowdata.push(row.f_userfiles_id + '')
|
470
|
-
})
|
471
|
-
this.$parent.rowsdata = this.unnullrowdata
|
472
|
-
// this.$parent.rowsdata = this.rowsdata
|
473
|
-
},
|
474
|
-
selectOne (event, row, i) {
|
475
|
-
console.log('单选', event.target.checked)
|
476
|
-
let index = this.model.pageIndex - 1
|
477
|
-
if (!this.rowsdata[index]) {
|
478
|
-
this.rowsdata[index] = []
|
479
|
-
}
|
480
|
-
if (!this.radio[index]) {
|
481
|
-
this.radio.$set(index, [])
|
482
|
-
}
|
483
|
-
if (event.target.checked) {
|
484
|
-
// 数据
|
485
|
-
this.rowsdata[index][i] = row
|
486
|
-
// 勾选
|
487
|
-
this.radio[index].$set(i, true)
|
488
|
-
// 判断是否全部选中
|
489
|
-
var allState = true
|
490
|
-
if (this.model.rows.length != this.radio[index].length) {
|
491
|
-
allState = false
|
492
|
-
}
|
493
|
-
for (var state of this.radio[index]) {
|
494
|
-
if (!state) {
|
495
|
-
allState = false
|
496
|
-
}
|
497
|
-
}
|
498
|
-
if (allState) {
|
499
|
-
this.all.$set(index, true)
|
500
|
-
} else {
|
501
|
-
this.all.$set(index, false)
|
502
|
-
}
|
503
|
-
} else {
|
504
|
-
// 数据
|
505
|
-
this.rowsdata[index][i] = []
|
506
|
-
// 不勾选
|
507
|
-
this.radio[index].$set(i, false)
|
508
|
-
// 任意取消一个则全选状态设为false
|
509
|
-
this.all.$set(index, false)
|
510
|
-
}
|
511
|
-
this.mergeRowData()
|
512
|
-
},
|
513
|
-
getorg (val) {
|
514
|
-
console.log('getorg:val=', val)
|
515
|
-
console.log('getorg:this.f_orgid=', this.f_orgid)
|
516
|
-
this.f_orgid = val
|
517
|
-
this.f_filialeid = val[0]
|
518
|
-
},
|
519
|
-
async getmeterbook(){
|
520
|
-
await this.meterbook()
|
521
|
-
this.$emit('childre',this.meterbooks)
|
522
|
-
},
|
523
|
-
async initdata () {
|
524
|
-
this.initAreas(this.f_filialeids)
|
525
|
-
// 添加特殊地址选省市区
|
526
|
-
|
527
|
-
this.initpcds(` f_orgid = '${this.f_filialeids}'`)
|
528
|
-
this.initstreets(` f_orgid = '${this.f_filialeids}' `)
|
529
|
-
this.initareas(` f_orgid = '${this.f_filialeids}'`)
|
530
|
-
},
|
531
|
-
// 初始化片区
|
532
|
-
async initAreas (val) {
|
533
|
-
if (val) {
|
534
|
-
let getAllArea = await this.$resetpost('/rs/search', {
|
535
|
-
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
536
|
-
userid: this.$login.f.id
|
537
|
-
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
538
|
-
|
539
|
-
let arr = getAllArea.data.filter((res) => {
|
540
|
-
return res.parentid == val
|
541
|
-
})
|
542
|
-
console.log('过滤之后的片区', arr)
|
543
|
-
this.sliceArea = []
|
544
|
-
arr.forEach((res) => {
|
545
|
-
this.sliceArea.push({label: res.name, value: res.name})
|
546
|
-
})
|
547
|
-
}
|
548
|
-
},
|
549
|
-
initModel () {
|
550
|
-
if (this.row) {
|
551
|
-
this.cleardata()
|
552
|
-
this.model = Object.assign({}, this.model, this.row)
|
553
|
-
// 处理片区代码
|
554
|
-
this.model.slice_area = [{
|
555
|
-
name: this.model.f_slice_area,
|
556
|
-
code: this.model.f_area_code
|
557
|
-
}]
|
558
|
-
}
|
559
|
-
},
|
560
|
-
// 初始化省市区,添加街道
|
561
|
-
async initpcds (pconditon) {
|
562
|
-
this.pcdslist = []
|
563
|
-
let HttpReset = new HttpResetClass()
|
564
|
-
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
565
|
-
data: {
|
566
|
-
items: '*',
|
567
|
-
tablename: 't_pcd',
|
568
|
-
orderitem: 'id',
|
569
|
-
condition: pconditon
|
570
|
-
}
|
571
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
572
|
-
let redata = []
|
573
|
-
req.data.forEach((row, n) => {
|
574
|
-
redata[n] = {
|
575
|
-
label: row.f_pcd,
|
576
|
-
value: row.id,
|
577
|
-
data: row,
|
578
|
-
id: row.id
|
579
|
-
}
|
580
|
-
})
|
581
|
-
this.pcdslist = redata
|
582
|
-
console.log("xxxxxxxxxxxxxx")
|
583
|
-
console.log(this.pcdslist)
|
584
|
-
console.log("redataxxxxxxxx")
|
585
|
-
},
|
586
|
-
// 初始化街道 添加小区
|
587
|
-
async initstreets (pconditon) {
|
588
|
-
this.streetslist = []
|
589
|
-
let HttpReset = new HttpResetClass()
|
590
|
-
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
591
|
-
data: {
|
592
|
-
items: '*',
|
593
|
-
tablename: 't_street',
|
594
|
-
orderitem: 'id',
|
595
|
-
condition: pconditon
|
596
|
-
}
|
597
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
598
|
-
let redata = []
|
599
|
-
req.data.forEach((row, n) => {
|
600
|
-
redata[n] = {
|
601
|
-
label: row.f_street,
|
602
|
-
value: row.id,
|
603
|
-
data: row,
|
604
|
-
id: row.id
|
605
|
-
}
|
606
|
-
})
|
607
|
-
this.streetslist = redata
|
608
|
-
console.log("xxxxxxxxxxxxxx")
|
609
|
-
console.log(this.streetslist)
|
610
|
-
console.log("redataxxxxxxxx")
|
611
|
-
},
|
612
|
-
// 初始化小区添加小区
|
613
|
-
async initareas (pconditon) {
|
614
|
-
// if(this.usertype){
|
615
|
-
// pconditon=pconditon+` and f_special='1' `
|
616
|
-
// }
|
617
|
-
this.areaslist = []
|
618
|
-
let HttpReset = new HttpResetClass()
|
619
|
-
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
620
|
-
data: {
|
621
|
-
items: '*',
|
622
|
-
tablename: 't_area',
|
623
|
-
orderitem: 'id',
|
624
|
-
condition: pconditon
|
625
|
-
}
|
626
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
627
|
-
let redata = []
|
628
|
-
req.data.forEach((row) => {
|
629
|
-
redata.push({
|
630
|
-
label: row.f_residential_area,
|
631
|
-
value: row.id,
|
632
|
-
data: row,
|
633
|
-
id: row.id
|
634
|
-
})
|
635
|
-
})
|
636
|
-
this.areaslist = redata
|
637
|
-
},
|
638
|
-
//小区变化
|
639
|
-
areaChange(val){
|
640
|
-
console.log("小区变化",val)
|
641
|
-
// 选择小区后级联出省市区和街道
|
642
|
-
let selectArea // 选中的小区数据
|
643
|
-
for (let row of this.areaslist) {
|
644
|
-
if (val == row.value) {
|
645
|
-
selectArea = row.data
|
646
|
-
break
|
647
|
-
}
|
648
|
-
}
|
649
|
-
if (selectArea) {
|
650
|
-
this.model.f_street_id = selectArea.f_street_id
|
651
|
-
this.model.f_pcd_id = selectArea.f_pcd_id
|
652
|
-
this.model.f_community_id = selectArea.f_community_id
|
653
|
-
console.log( this.model.f_community_id)
|
654
|
-
|
655
|
-
this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
|
656
|
-
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
|
657
|
-
if(selectArea.f_community_id){
|
658
|
-
this.initcommunity(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_community_id}' `)
|
659
|
-
}
|
660
|
-
// this.model.f_slice_area = selectArea.f_slice_area
|
661
|
-
// 拼接地址
|
662
|
-
this.model.f_address = `${selectArea.f_street}${selectArea.f_community}${selectArea.f_residential_area}`
|
663
|
-
console.log( this.model.f_community_id)
|
664
|
-
}
|
665
|
-
this.$nextTick(() => {
|
666
|
-
this.$resetValidation()
|
667
|
-
})
|
668
|
-
},
|
669
|
-
// 片区变化 f_area_code
|
670
|
-
async areasChange (val) {
|
671
|
-
console.log('街道变化', val)
|
672
|
-
if (this.streetslist[0]) {
|
673
|
-
var street = ''
|
674
|
-
this.streetslist.forEach((item) => {
|
675
|
-
if (item.id === val) {
|
676
|
-
street = item.label
|
677
|
-
}
|
678
|
-
})
|
679
|
-
// this.model.f_address = street
|
680
|
-
}
|
681
|
-
if (val) {
|
682
|
-
// 那就把[小区]重新组织一下
|
683
|
-
await this.initareas(` f_area_code ='${val}' `)
|
684
|
-
if (this.$refs.paged.$refs.criteria.model.f_residential_area_id) {
|
685
|
-
if (this.findbyid(this.areaslist, this.$refs.paged.$refs.criteria.model.f_residential_area_id)) {
|
686
|
-
let street_id = this.findbyid(this.areaslist,this.$refs.paged.$refs.criteria.model.f_residential_area_id).f_street_id
|
687
|
-
if (street_id != val) {
|
688
|
-
this.$refs.paged.$refs.criteria.model.f_residential_area_id = ''
|
689
|
-
}
|
690
|
-
} else {
|
691
|
-
this.$refs.paged.$refs.criteria.model.f_residential_area_id = ''
|
692
|
-
}
|
693
|
-
}
|
694
|
-
}
|
695
|
-
},
|
696
|
-
//街道变化
|
697
|
-
//初始化街道 添加小区
|
698
|
-
async initcommunity(pconditon){
|
699
|
-
this.communitylist = []
|
700
|
-
let HttpReset = new HttpResetClass()
|
701
|
-
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
702
|
-
data: {
|
703
|
-
items: '*',
|
704
|
-
tablename: 't_community',
|
705
|
-
orderitem: 'id',
|
706
|
-
condition: pconditon
|
707
|
-
}
|
708
|
-
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
709
|
-
let redata = []
|
710
|
-
req.data.forEach((row, n) => {
|
711
|
-
redata[n] = {
|
712
|
-
label: row.f_community_name,
|
713
|
-
value: row.id,
|
714
|
-
data:row,
|
715
|
-
id:row.id
|
716
|
-
}
|
717
|
-
})
|
718
|
-
this.communitylist=redata
|
719
|
-
},
|
720
|
-
async streetChange(val) {
|
721
|
-
if (val.length > 0) {
|
722
|
-
// 使用数组来收集值
|
723
|
-
const ids = [];
|
724
|
-
for (let i = 0; i < val.length; i++) {
|
725
|
-
ids.push(val[i]);
|
726
|
-
}
|
727
|
-
// 将数组转换为逗号分隔的字符串
|
728
|
-
const strs = ids.join(',');
|
729
|
-
// 调用 initcommunity 方法时确保 SQL 语法正确
|
730
|
-
await this.initcommunity(`f_filialeid = '${this.f_filialeids}' and f_street_id in (${strs})`);
|
731
|
-
}
|
732
|
-
},
|
733
|
-
async communityChange(val){
|
734
|
-
console.log(val)
|
735
|
-
if(val.length > 0){
|
736
|
-
// 使用数组来收集值
|
737
|
-
const ids = [];
|
738
|
-
for (let i = 0; i < val.length; i++) {
|
739
|
-
ids.push(val[i]);
|
740
|
-
}
|
741
|
-
// 将数组转换为逗号分隔的字符串
|
742
|
-
const strs = ids.join(',');
|
743
|
-
await this.initareas(` f_filialeid = '${this.f_filialeids}' and f_community_id in (${strs}) `)
|
744
|
-
}
|
745
|
-
}
|
746
|
-
},
|
747
|
-
computed: {
|
748
|
-
usergastype () {
|
749
|
-
return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
|
750
|
-
},
|
751
|
-
usertags () {
|
752
|
-
return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户标签')]
|
753
|
-
},
|
754
|
-
ischecked () {
|
755
|
-
return function (index, i) {
|
756
|
-
if (!this.radio[index]) {
|
757
|
-
return false
|
758
|
-
}
|
759
|
-
return this.radio[index][i]
|
760
|
-
}
|
761
|
-
},
|
762
|
-
smallareas () {
|
763
|
-
return [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')]
|
764
|
-
},
|
765
|
-
inputtores () {
|
766
|
-
// 获取抄表员
|
767
|
-
console.log('获取抄表员', this.$login.f)
|
768
|
-
let rs = []
|
769
|
-
if (this.$login.f.f_gasman.length > 0) {
|
770
|
-
for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
|
771
|
-
let temp = {
|
772
|
-
label: this.$login.f.f_gasman[i].name,
|
773
|
-
value: this.$login.f.f_gasman[i].name
|
774
|
-
}
|
775
|
-
rs.push(temp)
|
776
|
-
}
|
777
|
-
}
|
778
|
-
this.inputtores2 = rs
|
779
|
-
return [ ...rs]
|
780
|
-
}
|
781
|
-
},
|
782
|
-
watch: {
|
783
|
-
async 'f_orgid'(){
|
784
|
-
this.meterbooks=[]
|
785
|
-
await this.meterbook()
|
786
|
-
this.$emit('childre',this.meterbooks)
|
787
|
-
},
|
788
|
-
batchMeterShow () {
|
789
|
-
if (this.batchMeterShow == false) {
|
790
|
-
// 将选的文件清空
|
791
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
792
|
-
}
|
793
|
-
},
|
794
|
-
'f_filialeid' (val) {
|
795
|
-
loadParamGem(this)
|
796
|
-
}
|
797
|
-
},
|
798
|
-
events: {
|
799
|
-
onFileUpload: function (file, res) {
|
800
|
-
// let URL = res.f_downloadpath.substring(res.f_downloadpath.lastIndexOf(":\\") + 2)
|
801
|
-
// res.f_downloadpath = "http://" + location.host + "/" + URL
|
802
|
-
// res.f_downloadpath.replace('\\','/')
|
803
|
-
this.$resetpost('api/af-revenue/logic/upLoadBookFile',
|
804
|
-
{data: {
|
805
|
-
condition: this.condition,
|
806
|
-
filepath: res.f_downloadpath
|
807
|
-
}
|
808
|
-
},
|
809
|
-
{resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
|
810
|
-
this.show = false
|
811
|
-
this.$showAlert(`导入成功`, 'success', 2000)
|
812
|
-
this.search()
|
813
|
-
})
|
814
|
-
}
|
815
|
-
}
|
816
|
-
}
|
817
|
-
</script>
|
818
|
-
|
819
|
-
<style lang="less">
|
820
|
-
#MbpeopleList {
|
821
|
-
tr {
|
822
|
-
th {
|
823
|
-
text-align: center;
|
824
|
-
}
|
825
|
-
td {
|
826
|
-
text-align: center;
|
827
|
-
}
|
828
|
-
}
|
829
|
-
}
|
830
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div id='MbpeopleList' class="flex">
|
3
|
+
<criteria-paged :model="model" v-ref:paged>
|
4
|
+
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
|
5
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-sm-3 form-group">
|
8
|
+
<label class="font_normal_body">用户编号</label>
|
9
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code"
|
10
|
+
condition="f_userinfo_code like '%{}%'" placeholder='用户编号'>
|
11
|
+
</div>
|
12
|
+
<div class="col-sm-3 form-group">
|
13
|
+
<label class="font_normal_body">用户姓名</label>
|
14
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_user_name"
|
15
|
+
condition="f_user_name like '%{}%'" placeholder='用户姓名'>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="form-group button-range" style="float: right">
|
19
|
+
<button class="button_search button_spacing" @click="$parent.$parent.search()">查询</button>
|
20
|
+
<button class="button_clear button_spacing" @click="clear">清空</button>
|
21
|
+
<!-- <button class="button_export button_spacing" @click="$parent.$parent.importFile">导入</button>-->
|
22
|
+
<!-- <export-excel-->
|
23
|
+
<!-- :data="{condition:$parent.$parent.condition}"-->
|
24
|
+
<!-- :field="$parent.$parent.getfield"-->
|
25
|
+
<!-- sqlurl="api/af-revenue/logic/exportfile" sql-name="salembPeopleList" template-name='表册用户导出'-->
|
26
|
+
<!-- :choose-col="true"></export-excel>-->
|
27
|
+
<div style="float: right" class="button_spacing"
|
28
|
+
:class="{'button_shrink_top': $parent.$parent.criteriaShow,'button_shrink_bottom': !$parent.$parent.criteriaShow}"
|
29
|
+
@click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"></div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<div class="row" v-show="$parent.$parent.criteriaShow">
|
33
|
+
<div class="col-sm-3 form-group">
|
34
|
+
<label class="font_normal_body"> 小 区 域</label>
|
35
|
+
<v-select :value.sync="model.f_small_area" v-model="model.f_small_area"
|
36
|
+
:options='$parent.$parent.smallareas' placeholder='小区域'
|
37
|
+
close-on-select :search='true'
|
38
|
+
condition="f_small_area = '{}'"></v-select>
|
39
|
+
</div>
|
40
|
+
<div class="form-group col-sm-3">
|
41
|
+
<label class="font_normal_body">用户电话</label>
|
42
|
+
<input type="text" class="form-control" v-model="model.f_user_phone" placeholder='用户电话'
|
43
|
+
condition="f_user_phone like '%{}%'" v-next-el='yhxm' style="width: 60%"
|
44
|
+
>
|
45
|
+
</div>
|
46
|
+
<div class="form-group col-sm-3" title="参数名称:【用气类型】">
|
47
|
+
<label class="font_normal_body" >用气类型</label>
|
48
|
+
<v-select :value.sync="model.f_user_gas_type"
|
49
|
+
v-model="model.f_user_gas_type"
|
50
|
+
:multiple="true"
|
51
|
+
:options='$parent.$parent.usergastype' placeholder='请选择'
|
52
|
+
condition="f_user_gas_type in {}"
|
53
|
+
></v-select>
|
54
|
+
</div>
|
55
|
+
<div class="form-group col-sm-3" title="参数名称:【用户标签】">
|
56
|
+
<label class="font_normal_body" >用户标签</label>
|
57
|
+
<v-select :value.sync="model.f_user_tags"
|
58
|
+
v-model="model.f_user_tags"
|
59
|
+
:multiple="true"
|
60
|
+
:options='$parent.$parent.usertags' placeholder='请选择'
|
61
|
+
condition="f_user_tags in {}"
|
62
|
+
></v-select>
|
63
|
+
</div>
|
64
|
+
<div class="form-group col-sm-3">
|
65
|
+
<label class="font_normal_body">客户类型</label>
|
66
|
+
<v-select :options='$parent.$parent.user_type' :value.sync="model.f_user_type"
|
67
|
+
close-on-select condition="f_user_type='{}'"
|
68
|
+
placeholder='用户类型' v-model="model.f_user_type"></v-select>
|
69
|
+
</div>
|
70
|
+
<div class="form-group col-sm-3">
|
71
|
+
<label class="font_normal_body">客户状态</label>
|
72
|
+
<v-select :options='$parent.$parent.user_state' :value.sync="model.f_user_state"
|
73
|
+
close-on-select condition="f_user_state = '{}'"
|
74
|
+
placeholder='客户状态' v-model="model.f_user_state"></v-select>
|
75
|
+
</div>
|
76
|
+
<div class="col-sm-3 form-group">
|
77
|
+
<label class="font_normal_body">所属表册</label>
|
78
|
+
<v-select :value.sync="model.f_check_book_num" v-model="model.f_check_book_num"
|
79
|
+
:options='$parent.$parent.meterbooks' placeholder='安检册'
|
80
|
+
:value-single="true"
|
81
|
+
condition="f_check_book_name='{}'"
|
82
|
+
style="width:60%"
|
83
|
+
close-on-select></v-select>
|
84
|
+
</div>
|
85
|
+
<div class="col-sm-3 form-group">
|
86
|
+
<label class="font_normal_body">抄 表 员 </label>
|
87
|
+
<v-select :value.sync="model.f_inputtor" v-model='model.f_inputtor'
|
88
|
+
style="width:60%"
|
89
|
+
condition="f_inputtor in {}"
|
90
|
+
:options='$parent.$parent.inputtores' placeholder='抄表员'
|
91
|
+
close-on-select
|
92
|
+
v-el:cc></v-select>
|
93
|
+
</div>
|
94
|
+
<div class="col-sm-3 form-group">
|
95
|
+
<label class="font_normal_body">表箱号 </label>
|
96
|
+
<input style="width:60%" type="text" class="form-control" v-model="model.f_metertitles"
|
97
|
+
condition="f_metertitles like '%{}%'" placeholder='表箱号'
|
98
|
+
>
|
99
|
+
</div>
|
100
|
+
<div class="form-group col-sm-3">
|
101
|
+
<label class="font_normal_body">用气性质</label>
|
102
|
+
<v-select :options='$parent.$parent.gasproperties' :value.sync="model.f_gasproperties"
|
103
|
+
close-on-select condition="f_gasproperties='{}'"
|
104
|
+
placeholder='用气性质' v-model="model.f_gasproperties"></v-select>
|
105
|
+
</div>
|
106
|
+
<div class="form-group col-sm-3">
|
107
|
+
<label class="font_normal_body">气表类型</label>
|
108
|
+
<v-select :options='$parent.$parent.meter_classify' :value.sync="model.f_meter_classify"
|
109
|
+
close-on-select condition="f_meter_classify='{}'"
|
110
|
+
placeholder='气表类型' v-model="model.f_meter_classify"></v-select>
|
111
|
+
</div>
|
112
|
+
<div class="col-sm-3 form-group">
|
113
|
+
<label class="font_normal_body">气表品牌</label>
|
114
|
+
<v-select :value.sync="model.f_meter_brand"
|
115
|
+
v-model="model.f_meter_brand"
|
116
|
+
:options='$parent.$parent.meterbrands' placeholder='请选择'
|
117
|
+
condition="f_meter_brand in {}"
|
118
|
+
close-on-select></v-select>
|
119
|
+
</div>
|
120
|
+
<div class="form-group col-sm-3">
|
121
|
+
<label class="font_normal_body">气表状态</label>
|
122
|
+
<v-select :options='$parent.$parent.table_state' :value.sync="model.f_table_state"
|
123
|
+
close-on-select condition="f_table_state = '{}'"
|
124
|
+
placeholder='气表状态' v-model="model.f_table_state"></v-select>
|
125
|
+
</div>
|
126
|
+
<div class="col-sm-3 form-group">
|
127
|
+
<label class="font_normal_body">小 区 </label>
|
128
|
+
<input type="text" class="input_search" v-model="model.f_residential_area" style="width: 60%"
|
129
|
+
condition=" f_residential_area like '{}%'" placeholder="输入小区">
|
130
|
+
</div>
|
131
|
+
<div class="form-group col-sm-3">
|
132
|
+
<label class="font_normal_body">客户地址</label>
|
133
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_address"
|
134
|
+
condition="f_address like '%{}%'" placeholder='客户地址'>
|
135
|
+
</div>
|
136
|
+
<div class="col-sm-3 form-group">
|
137
|
+
<label class="font_normal_body">楼 号 </label>
|
138
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_building"
|
139
|
+
condition="f_building = '{}'" placeholder='楼号'>
|
140
|
+
</div>
|
141
|
+
<div class="form-group col-sm-3">
|
142
|
+
<label class="font_normal_body">组织机构</label>
|
143
|
+
<res-select :initresid='$parent.$parent.curorgid'
|
144
|
+
@res-select="$parent.$parent.getorg"
|
145
|
+
class="select select_list"
|
146
|
+
restype='organization' :is-mul="false"
|
147
|
+
style="width: 60%">
|
148
|
+
</res-select>
|
149
|
+
</div>
|
150
|
+
<div class="form-group col-sm-3">
|
151
|
+
<label class="font_normal_body">是否在册</label>
|
152
|
+
<v-select :options='$parent.$parent.whether_list'
|
153
|
+
:value.sync="model.f_book_name"
|
154
|
+
v-model="model.f_book_name"
|
155
|
+
close-on-select condition="f_check_book_name {}"
|
156
|
+
placeholder='是否在册' ></v-select>
|
157
|
+
</div>
|
158
|
+
<div class="col-sm-3 form-group">
|
159
|
+
<label class="font_normal_body">入户证号</label>
|
160
|
+
<input style="width:60%" type="text" class="form-control" v-model="model.f_book_no"
|
161
|
+
condition="f_book_no like '%{}%'" placeholder='入户证号'
|
162
|
+
>
|
163
|
+
</div>
|
164
|
+
<div class="col-sm-3 form-group">
|
165
|
+
<label class="font_normal_body">表 号 </label>
|
166
|
+
<input style="width:60%" type="text" class="form-control" v-model="model.f_meternumber"
|
167
|
+
condition="f_meternumber like '%{}%'" placeholder='表号'
|
168
|
+
>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div class="col-sm-3 form-group">
|
172
|
+
<label class="font_normal_body">街道/乡镇</label>
|
173
|
+
<v-select :value.sync="model.f_street_id"
|
174
|
+
:multiple="true"
|
175
|
+
:options='$parent.$parent.streetslist' placeholder='请选择'
|
176
|
+
condition="f_street_id in {}"
|
177
|
+
v-model='model.f_street_id'
|
178
|
+
@change="$parent.$parent.streetChange"
|
179
|
+
:search="true" >
|
180
|
+
</v-select>
|
181
|
+
</div>
|
182
|
+
<div class="col-sm-3 form-group">
|
183
|
+
<label class="font_normal_body">片区/行政村</label>
|
184
|
+
<v-select :value.sync="model.f_community_id"
|
185
|
+
:multiple="true"
|
186
|
+
v-model='model.f_community_id'
|
187
|
+
:options='$parent.$parent.communitylist'
|
188
|
+
placeholder='片区/管理站' filer-key="name"
|
189
|
+
condition="f_community_id in {}"
|
190
|
+
@change="$parent.$parent.communityChange"
|
191
|
+
v-ref:slice>
|
192
|
+
</v-select>
|
193
|
+
</div>
|
194
|
+
<div class="col-sm-3 form-group">
|
195
|
+
<label class="font_normal_body">小区/自然村</label>
|
196
|
+
<v-select :value.sync="model.f_residential_area_id"
|
197
|
+
:multiple="true"
|
198
|
+
:options='$parent.$parent.areaslist' placeholder='请选择'
|
199
|
+
condition="f_residential_area_id in {}"
|
200
|
+
v-model='model.f_residential_area_id'
|
201
|
+
>
|
202
|
+
</v-select>
|
203
|
+
</div>
|
204
|
+
<div class="col-sm-3 form-group">
|
205
|
+
<label class="font_normal_body">开户时间</label>
|
206
|
+
<datepicker
|
207
|
+
:value.sync="model.f_open_date"
|
208
|
+
placeholder='开户时间' style="width:60%"
|
209
|
+
:disabled-days-of-week="[]"
|
210
|
+
:format="'yyyy-MM-dd'"
|
211
|
+
:select-month="true"
|
212
|
+
v-model='model.f_open_date'
|
213
|
+
:show-rest-button="reset">
|
214
|
+
</datepicker>
|
215
|
+
</div>
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
</criteria>
|
219
|
+
<data-grid class="list_area table_sy" :model="model" partial='list' v-ref:grid :optional="true">
|
220
|
+
<template partial='head'>
|
221
|
+
<!--<th>-->
|
222
|
+
<!--<input type="checkbox" id="f_operator" v-model="$parent.$parent.$parent.all[model.pageIndex-1]"-->
|
223
|
+
<!--@change="$parent.$parent.$parent.select()"/>-->
|
224
|
+
<!--</th>-->
|
225
|
+
<th><nobr>序号</nobr></th>
|
226
|
+
<th><nobr>客户编号</nobr></th>
|
227
|
+
<th><nobr>客户名称</nobr></th>
|
228
|
+
<th><nobr>客户状态</nobr></th>
|
229
|
+
|
230
|
+
<th><nobr>区/县</nobr></th>
|
231
|
+
<th><nobr>街道/乡镇</nobr></th>
|
232
|
+
<th><nobr>片区/行政村</nobr></th>
|
233
|
+
<th><nobr>小区/自然村</nobr></th>
|
234
|
+
<th><nobr>客户地址</nobr></th>
|
235
|
+
<th><nobr>表号</nobr></th>
|
236
|
+
<th><nobr>气表状态</nobr></th>
|
237
|
+
<th><nobr>所属表册</nobr></th>
|
238
|
+
<!-- <th><nobr>册内排序</nobr></th>-->
|
239
|
+
<th><nobr>表箱号</nobr></th>
|
240
|
+
<th><nobr>入户证号</nobr></th>
|
241
|
+
<th><nobr>表底数</nobr></th>
|
242
|
+
</template>
|
243
|
+
<template partial='body'>
|
244
|
+
<!--<td>-->
|
245
|
+
<!--<input :id="'body'+model.pageIndex" type='checkbox' @change="$parent.$parent.$parent.selectOne($event,row,$index)"-->
|
246
|
+
<!--:checked="$parent.$parent.$parent.ischecked(model.pageIndex-1,$index)"/>-->
|
247
|
+
<!--</td>-->
|
248
|
+
<td>{{$index+1}}</td>
|
249
|
+
<td>{{row.f_userinfo_code}}</td>
|
250
|
+
<td>{{row.f_user_name}}</td>
|
251
|
+
<td>{{row.f_user_state}}</td>
|
252
|
+
|
253
|
+
<td>{{row.f_pcd}}</td>
|
254
|
+
<td>{{row.f_street}}</td>
|
255
|
+
<td>{{row.f_community}}</td>
|
256
|
+
<td>{{row.f_residential_area}}</td>
|
257
|
+
<td>{{row.f_address}}</td>
|
258
|
+
<td>{{row.f_meternumber}}</td>
|
259
|
+
<td>{{row.f_table_state}}</td>
|
260
|
+
<td>{{row.f_check_book_name}}</td>
|
261
|
+
<!-- <td>{{row.f_meter_book_sort}}</td>-->
|
262
|
+
<!-- <td>{{row.f_adjustable_id}}</td>-->
|
263
|
+
<td style="text-align:center">{{row.f_metertitles}}</td>
|
264
|
+
<td style="text-align:center"><nobr>{{row.f_book_no}}</nobr></td>
|
265
|
+
<td style="text-align:center">{{row.f_meter_base}}</td>
|
266
|
+
</template>
|
267
|
+
</data-grid>
|
268
|
+
</criteria-paged>
|
269
|
+
</div>
|
270
|
+
<modal :show.sync="show" width="500px" title="文件导入" v-ref:modal large backdrop="false">
|
271
|
+
<article slot="modal-body" class="modal-body">
|
272
|
+
<file-upload class="my-file-uploader " name="UploadFile" style="border-radius: 2px;"
|
273
|
+
action="api/af-revenue/file/uploadFile" tagname="导入表册用户" v-ref:file multiple></file-upload>
|
274
|
+
</article>
|
275
|
+
<footer slot="modal-footer" class="modal-footer">
|
276
|
+
</footer>
|
277
|
+
</modal>
|
278
|
+
</template>
|
279
|
+
|
280
|
+
<script>
|
281
|
+
import {HttpResetClass, PagedList} from 'vue-client'
|
282
|
+
import Vue from 'vue'
|
283
|
+
|
284
|
+
let getAreaConfig = async function (self) {
|
285
|
+
// 获取气价里面的配置
|
286
|
+
await self.$getConfig(self, 'UserAddress')
|
287
|
+
Object.assign(self.model, self.config)
|
288
|
+
self.initdata()
|
289
|
+
}
|
290
|
+
let loadParamGem = async function (self) {
|
291
|
+
await self.$LoadParams.loadParam()
|
292
|
+
self.getfield = self.config.excelHeaders
|
293
|
+
// self.$refs.paged.$refs.cri.model.f_meter_classify = ['机表']
|
294
|
+
await self.initAdjustables()
|
295
|
+
// await self.search()
|
296
|
+
}
|
297
|
+
export default {
|
298
|
+
name: 'MbpeopleList',
|
299
|
+
data () {
|
300
|
+
return {
|
301
|
+
f_filialeids: this.$login.f.orgid,
|
302
|
+
// 初始化省市区数据
|
303
|
+
pcdslist: [],
|
304
|
+
//初始化街道数据
|
305
|
+
streetslist:[],
|
306
|
+
communitylist:[],
|
307
|
+
areaslist: [],
|
308
|
+
// 选中所有地址
|
309
|
+
addresslist: [],
|
310
|
+
sliceArea: [],
|
311
|
+
orgCondtionStr: '',
|
312
|
+
f_filialeid: this.$login.f.orgid,
|
313
|
+
f_orgid: '',
|
314
|
+
invoiceuse: [{label: '是', value: 'is not null'}, {label: '否', value: 'is null'}],
|
315
|
+
model: new PagedList('rs/sql/mb_peopleList', 20),
|
316
|
+
f_orgstr: this.$login.f.orgid,
|
317
|
+
// 要操作的用户
|
318
|
+
rowsdata: [],
|
319
|
+
aaa: '',
|
320
|
+
// 控制全选
|
321
|
+
all: [],
|
322
|
+
// 控制单选
|
323
|
+
radio: [],
|
324
|
+
show: false,
|
325
|
+
meterbooks: [{label: '全部', value: ''}],
|
326
|
+
criteriaShow: false,
|
327
|
+
gasproperties: this.$appdata.getParam('用气性质') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')] : [],
|
328
|
+
user_type: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
|
329
|
+
meter_classify: this.$appdata.getParam('气表类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')] : [],
|
330
|
+
table_state: this.$appdata.getParam('气表状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')] : [],
|
331
|
+
f_small_areas: this.$appdata.getParam('小区域') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')] : [],
|
332
|
+
user_state: [{label: '正常', value: '正常'}, {label: '预备', value: '预备'}, {label: '销户', value: '销户'}],
|
333
|
+
whether_list: [{label: '全部', value: ''},{label: '已在册内', value: 'is not null'}, {label: '不在册内', value: 'is null'}],
|
334
|
+
meterbrands: [],
|
335
|
+
condition: '',
|
336
|
+
adjustables: [],
|
337
|
+
unnullrowdata: [],
|
338
|
+
getfield: {},
|
339
|
+
config: {
|
340
|
+
// 导出列要和查询列相同
|
341
|
+
excelHeaders: {
|
342
|
+
'f_userfiles_id': '系统识别号',
|
343
|
+
'f_userinfo_code': '用户编号',
|
344
|
+
'f_user_name': '用户姓名',
|
345
|
+
'f_address': '用户地址'
|
346
|
+
}
|
347
|
+
},
|
348
|
+
curorgid: [this.$login.f.orgid]
|
349
|
+
}
|
350
|
+
},
|
351
|
+
created () {
|
352
|
+
},
|
353
|
+
ready () {
|
354
|
+
getAreaConfig(this)
|
355
|
+
loadParamGem(this)
|
356
|
+
this.getmeterbook()
|
357
|
+
},
|
358
|
+
methods: {
|
359
|
+
async meterbook(){
|
360
|
+
this.meterbooks=[]
|
361
|
+
if(this.f_orgid==''){
|
362
|
+
this.f_orgid=this.$login.f.orgid
|
363
|
+
}
|
364
|
+
let res=await this.$resetpost('rs/sql/tel_singleTable_OrderBy',{data:{items:' * ',tablename:'t_check_book',condition:` 1=1 `,orderitem:' id desc'}},{resolveMsg:null,rejectMsg:null})
|
365
|
+
for(let i=0;i<res.data.length;i++){
|
366
|
+
console.log("res",res.data[i])
|
367
|
+
let temp=[]
|
368
|
+
temp.label=res.data[i].f_check_book_name
|
369
|
+
temp.value=res.data[i].id
|
370
|
+
this.meterbooks.push(temp)
|
371
|
+
}
|
372
|
+
|
373
|
+
},
|
374
|
+
invoiceuseChange (val) {
|
375
|
+
// 查询已开票记录清空选项
|
376
|
+
if (val == 'is not null') {
|
377
|
+
this.rowsdata = []
|
378
|
+
this.radio = []
|
379
|
+
}
|
380
|
+
},
|
381
|
+
|
382
|
+
select () {
|
383
|
+
let index = this.model.pageIndex - 1
|
384
|
+
console.log('全选', this.all[index])
|
385
|
+
if (!this.radio[index]) {
|
386
|
+
this.radio.$set(index, [])
|
387
|
+
}
|
388
|
+
if (this.all[index]) {
|
389
|
+
// 数据
|
390
|
+
this.rowsdata[index] = Object.assign([], this.model.rows)
|
391
|
+
// 勾选
|
392
|
+
for (var i = 0; i < this.model.rows.length; i++) {
|
393
|
+
this.radio[index].$set(i, true)
|
394
|
+
}
|
395
|
+
} else {
|
396
|
+
// 数据
|
397
|
+
this.rowsdata[index] = []
|
398
|
+
// 不勾选
|
399
|
+
for (var i = 0; i < this.model.rows.length; i++) {
|
400
|
+
this.radio[index].$set(i, false)
|
401
|
+
}
|
402
|
+
}
|
403
|
+
this.mergeRowData()
|
404
|
+
},
|
405
|
+
importFile () {
|
406
|
+
this.show = true
|
407
|
+
},
|
408
|
+
async initAdjustables () {
|
409
|
+
let arr = []
|
410
|
+
let filter = this.$login.f.orgid
|
411
|
+
this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
|
412
|
+
let temp = {}
|
413
|
+
temp.label = '[' + item.value.f_adjustable_id + ']-' + item.label
|
414
|
+
temp.value = item.value.id
|
415
|
+
arr.push(temp)
|
416
|
+
})
|
417
|
+
this.adjustables = [{label: '全部', value: ''}, ...arr]
|
418
|
+
// 初始化气表品牌
|
419
|
+
let brandArr = []
|
420
|
+
this.$GetSaleParam.getGasbrand().forEach((item) => {
|
421
|
+
let temp1 = {}
|
422
|
+
temp1.label = item.label
|
423
|
+
temp1.value = item.value.f_meter_brand
|
424
|
+
brandArr.push(temp1)
|
425
|
+
})
|
426
|
+
this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
|
427
|
+
//
|
428
|
+
// // 加载安检册
|
429
|
+
// console.log("------------------this.$GetSaleParam.getMeterBooks()",this.$GetSaleParam.getMeterBooks())
|
430
|
+
// this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
|
431
|
+
},
|
432
|
+
search () {
|
433
|
+
this.$refs.paged.$refs.cri.search()
|
434
|
+
console.log('mbpeople this = ', this)
|
435
|
+
},
|
436
|
+
selfSearch (args) {
|
437
|
+
let f_orgstr = this.orgCondtionStr ? this.orgCondtionStr : "and f_orgid in ('" + this.f_orgid + "')"
|
438
|
+
args.condition = `${args.condition} ` + f_orgstr
|
439
|
+
// args.condition += ` and f_orgid = ${this.f_orgstr}`
|
440
|
+
if(args.model.f_open_date){
|
441
|
+
args.condition += ` and f_open_date <='${args.model.f_open_date}' `
|
442
|
+
}
|
443
|
+
this.condition = args.condition
|
444
|
+
this.$parent.condition = this.condition
|
445
|
+
this.model.search(args.condition, args.model)
|
446
|
+
},
|
447
|
+
// 合并二维数组并去空
|
448
|
+
mergeRowData () {
|
449
|
+
console.log('!!!!!!!!!!!!!数组去空', this.rowsdata)
|
450
|
+
let data = []
|
451
|
+
// 合并
|
452
|
+
for (let array of this.rowsdata) {
|
453
|
+
data.push.apply(data, array)
|
454
|
+
}
|
455
|
+
// 去空
|
456
|
+
// 拓展数组去空值的方法
|
457
|
+
Array.prototype.removeEmpty = function () {
|
458
|
+
for (var i = 0; i < this.length; i++) {
|
459
|
+
if (this[i] == '' || typeof (this[i]) == 'undefined') {
|
460
|
+
this.splice(i, 1)
|
461
|
+
i--
|
462
|
+
}
|
463
|
+
}
|
464
|
+
return this
|
465
|
+
}
|
466
|
+
data = data.removeEmpty()
|
467
|
+
this.unnullrowdata = []
|
468
|
+
data.forEach((row) => {
|
469
|
+
this.unnullrowdata.push(row.f_userfiles_id + '')
|
470
|
+
})
|
471
|
+
this.$parent.rowsdata = this.unnullrowdata
|
472
|
+
// this.$parent.rowsdata = this.rowsdata
|
473
|
+
},
|
474
|
+
selectOne (event, row, i) {
|
475
|
+
console.log('单选', event.target.checked)
|
476
|
+
let index = this.model.pageIndex - 1
|
477
|
+
if (!this.rowsdata[index]) {
|
478
|
+
this.rowsdata[index] = []
|
479
|
+
}
|
480
|
+
if (!this.radio[index]) {
|
481
|
+
this.radio.$set(index, [])
|
482
|
+
}
|
483
|
+
if (event.target.checked) {
|
484
|
+
// 数据
|
485
|
+
this.rowsdata[index][i] = row
|
486
|
+
// 勾选
|
487
|
+
this.radio[index].$set(i, true)
|
488
|
+
// 判断是否全部选中
|
489
|
+
var allState = true
|
490
|
+
if (this.model.rows.length != this.radio[index].length) {
|
491
|
+
allState = false
|
492
|
+
}
|
493
|
+
for (var state of this.radio[index]) {
|
494
|
+
if (!state) {
|
495
|
+
allState = false
|
496
|
+
}
|
497
|
+
}
|
498
|
+
if (allState) {
|
499
|
+
this.all.$set(index, true)
|
500
|
+
} else {
|
501
|
+
this.all.$set(index, false)
|
502
|
+
}
|
503
|
+
} else {
|
504
|
+
// 数据
|
505
|
+
this.rowsdata[index][i] = []
|
506
|
+
// 不勾选
|
507
|
+
this.radio[index].$set(i, false)
|
508
|
+
// 任意取消一个则全选状态设为false
|
509
|
+
this.all.$set(index, false)
|
510
|
+
}
|
511
|
+
this.mergeRowData()
|
512
|
+
},
|
513
|
+
getorg (val) {
|
514
|
+
console.log('getorg:val=', val)
|
515
|
+
console.log('getorg:this.f_orgid=', this.f_orgid)
|
516
|
+
this.f_orgid = val
|
517
|
+
this.f_filialeid = val[0]
|
518
|
+
},
|
519
|
+
async getmeterbook(){
|
520
|
+
await this.meterbook()
|
521
|
+
this.$emit('childre',this.meterbooks)
|
522
|
+
},
|
523
|
+
async initdata () {
|
524
|
+
this.initAreas(this.f_filialeids)
|
525
|
+
// 添加特殊地址选省市区
|
526
|
+
|
527
|
+
this.initpcds(` f_orgid = '${this.f_filialeids}'`)
|
528
|
+
this.initstreets(` f_orgid = '${this.f_filialeids}' `)
|
529
|
+
this.initareas(` f_orgid = '${this.f_filialeids}'`)
|
530
|
+
},
|
531
|
+
// 初始化片区
|
532
|
+
async initAreas (val) {
|
533
|
+
if (val) {
|
534
|
+
let getAllArea = await this.$resetpost('/rs/search', {
|
535
|
+
source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
|
536
|
+
userid: this.$login.f.id
|
537
|
+
}, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
|
538
|
+
|
539
|
+
let arr = getAllArea.data.filter((res) => {
|
540
|
+
return res.parentid == val
|
541
|
+
})
|
542
|
+
console.log('过滤之后的片区', arr)
|
543
|
+
this.sliceArea = []
|
544
|
+
arr.forEach((res) => {
|
545
|
+
this.sliceArea.push({label: res.name, value: res.name})
|
546
|
+
})
|
547
|
+
}
|
548
|
+
},
|
549
|
+
initModel () {
|
550
|
+
if (this.row) {
|
551
|
+
this.cleardata()
|
552
|
+
this.model = Object.assign({}, this.model, this.row)
|
553
|
+
// 处理片区代码
|
554
|
+
this.model.slice_area = [{
|
555
|
+
name: this.model.f_slice_area,
|
556
|
+
code: this.model.f_area_code
|
557
|
+
}]
|
558
|
+
}
|
559
|
+
},
|
560
|
+
// 初始化省市区,添加街道
|
561
|
+
async initpcds (pconditon) {
|
562
|
+
this.pcdslist = []
|
563
|
+
let HttpReset = new HttpResetClass()
|
564
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
565
|
+
data: {
|
566
|
+
items: '*',
|
567
|
+
tablename: 't_pcd',
|
568
|
+
orderitem: 'id',
|
569
|
+
condition: pconditon
|
570
|
+
}
|
571
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
572
|
+
let redata = []
|
573
|
+
req.data.forEach((row, n) => {
|
574
|
+
redata[n] = {
|
575
|
+
label: row.f_pcd,
|
576
|
+
value: row.id,
|
577
|
+
data: row,
|
578
|
+
id: row.id
|
579
|
+
}
|
580
|
+
})
|
581
|
+
this.pcdslist = redata
|
582
|
+
console.log("xxxxxxxxxxxxxx")
|
583
|
+
console.log(this.pcdslist)
|
584
|
+
console.log("redataxxxxxxxx")
|
585
|
+
},
|
586
|
+
// 初始化街道 添加小区
|
587
|
+
async initstreets (pconditon) {
|
588
|
+
this.streetslist = []
|
589
|
+
let HttpReset = new HttpResetClass()
|
590
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
591
|
+
data: {
|
592
|
+
items: '*',
|
593
|
+
tablename: 't_street',
|
594
|
+
orderitem: 'id',
|
595
|
+
condition: pconditon
|
596
|
+
}
|
597
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
598
|
+
let redata = []
|
599
|
+
req.data.forEach((row, n) => {
|
600
|
+
redata[n] = {
|
601
|
+
label: row.f_street,
|
602
|
+
value: row.id,
|
603
|
+
data: row,
|
604
|
+
id: row.id
|
605
|
+
}
|
606
|
+
})
|
607
|
+
this.streetslist = redata
|
608
|
+
console.log("xxxxxxxxxxxxxx")
|
609
|
+
console.log(this.streetslist)
|
610
|
+
console.log("redataxxxxxxxx")
|
611
|
+
},
|
612
|
+
// 初始化小区添加小区
|
613
|
+
async initareas (pconditon) {
|
614
|
+
// if(this.usertype){
|
615
|
+
// pconditon=pconditon+` and f_special='1' `
|
616
|
+
// }
|
617
|
+
this.areaslist = []
|
618
|
+
let HttpReset = new HttpResetClass()
|
619
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
|
620
|
+
data: {
|
621
|
+
items: '*',
|
622
|
+
tablename: 't_area',
|
623
|
+
orderitem: 'id',
|
624
|
+
condition: pconditon
|
625
|
+
}
|
626
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
627
|
+
let redata = []
|
628
|
+
req.data.forEach((row) => {
|
629
|
+
redata.push({
|
630
|
+
label: row.f_residential_area,
|
631
|
+
value: row.id,
|
632
|
+
data: row,
|
633
|
+
id: row.id
|
634
|
+
})
|
635
|
+
})
|
636
|
+
this.areaslist = redata
|
637
|
+
},
|
638
|
+
//小区变化
|
639
|
+
areaChange(val){
|
640
|
+
console.log("小区变化",val)
|
641
|
+
// 选择小区后级联出省市区和街道
|
642
|
+
let selectArea // 选中的小区数据
|
643
|
+
for (let row of this.areaslist) {
|
644
|
+
if (val == row.value) {
|
645
|
+
selectArea = row.data
|
646
|
+
break
|
647
|
+
}
|
648
|
+
}
|
649
|
+
if (selectArea) {
|
650
|
+
this.model.f_street_id = selectArea.f_street_id
|
651
|
+
this.model.f_pcd_id = selectArea.f_pcd_id
|
652
|
+
this.model.f_community_id = selectArea.f_community_id
|
653
|
+
console.log( this.model.f_community_id)
|
654
|
+
|
655
|
+
this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
|
656
|
+
this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
|
657
|
+
if(selectArea.f_community_id){
|
658
|
+
this.initcommunity(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_community_id}' `)
|
659
|
+
}
|
660
|
+
// this.model.f_slice_area = selectArea.f_slice_area
|
661
|
+
// 拼接地址
|
662
|
+
this.model.f_address = `${selectArea.f_street}${selectArea.f_community}${selectArea.f_residential_area}`
|
663
|
+
console.log( this.model.f_community_id)
|
664
|
+
}
|
665
|
+
this.$nextTick(() => {
|
666
|
+
this.$resetValidation()
|
667
|
+
})
|
668
|
+
},
|
669
|
+
// 片区变化 f_area_code
|
670
|
+
async areasChange (val) {
|
671
|
+
console.log('街道变化', val)
|
672
|
+
if (this.streetslist[0]) {
|
673
|
+
var street = ''
|
674
|
+
this.streetslist.forEach((item) => {
|
675
|
+
if (item.id === val) {
|
676
|
+
street = item.label
|
677
|
+
}
|
678
|
+
})
|
679
|
+
// this.model.f_address = street
|
680
|
+
}
|
681
|
+
if (val) {
|
682
|
+
// 那就把[小区]重新组织一下
|
683
|
+
await this.initareas(` f_area_code ='${val}' `)
|
684
|
+
if (this.$refs.paged.$refs.criteria.model.f_residential_area_id) {
|
685
|
+
if (this.findbyid(this.areaslist, this.$refs.paged.$refs.criteria.model.f_residential_area_id)) {
|
686
|
+
let street_id = this.findbyid(this.areaslist,this.$refs.paged.$refs.criteria.model.f_residential_area_id).f_street_id
|
687
|
+
if (street_id != val) {
|
688
|
+
this.$refs.paged.$refs.criteria.model.f_residential_area_id = ''
|
689
|
+
}
|
690
|
+
} else {
|
691
|
+
this.$refs.paged.$refs.criteria.model.f_residential_area_id = ''
|
692
|
+
}
|
693
|
+
}
|
694
|
+
}
|
695
|
+
},
|
696
|
+
//街道变化
|
697
|
+
//初始化街道 添加小区
|
698
|
+
async initcommunity(pconditon){
|
699
|
+
this.communitylist = []
|
700
|
+
let HttpReset = new HttpResetClass()
|
701
|
+
let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
|
702
|
+
data: {
|
703
|
+
items: '*',
|
704
|
+
tablename: 't_community',
|
705
|
+
orderitem: 'id',
|
706
|
+
condition: pconditon
|
707
|
+
}
|
708
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'})
|
709
|
+
let redata = []
|
710
|
+
req.data.forEach((row, n) => {
|
711
|
+
redata[n] = {
|
712
|
+
label: row.f_community_name,
|
713
|
+
value: row.id,
|
714
|
+
data:row,
|
715
|
+
id:row.id
|
716
|
+
}
|
717
|
+
})
|
718
|
+
this.communitylist=redata
|
719
|
+
},
|
720
|
+
async streetChange(val) {
|
721
|
+
if (val.length > 0) {
|
722
|
+
// 使用数组来收集值
|
723
|
+
const ids = [];
|
724
|
+
for (let i = 0; i < val.length; i++) {
|
725
|
+
ids.push(val[i]);
|
726
|
+
}
|
727
|
+
// 将数组转换为逗号分隔的字符串
|
728
|
+
const strs = ids.join(',');
|
729
|
+
// 调用 initcommunity 方法时确保 SQL 语法正确
|
730
|
+
await this.initcommunity(`f_filialeid = '${this.f_filialeids}' and f_street_id in (${strs})`);
|
731
|
+
}
|
732
|
+
},
|
733
|
+
async communityChange(val){
|
734
|
+
console.log(val)
|
735
|
+
if(val.length > 0){
|
736
|
+
// 使用数组来收集值
|
737
|
+
const ids = [];
|
738
|
+
for (let i = 0; i < val.length; i++) {
|
739
|
+
ids.push(val[i]);
|
740
|
+
}
|
741
|
+
// 将数组转换为逗号分隔的字符串
|
742
|
+
const strs = ids.join(',');
|
743
|
+
await this.initareas(` f_filialeid = '${this.f_filialeids}' and f_community_id in (${strs}) `)
|
744
|
+
}
|
745
|
+
}
|
746
|
+
},
|
747
|
+
computed: {
|
748
|
+
usergastype () {
|
749
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
|
750
|
+
},
|
751
|
+
usertags () {
|
752
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户标签')]
|
753
|
+
},
|
754
|
+
ischecked () {
|
755
|
+
return function (index, i) {
|
756
|
+
if (!this.radio[index]) {
|
757
|
+
return false
|
758
|
+
}
|
759
|
+
return this.radio[index][i]
|
760
|
+
}
|
761
|
+
},
|
762
|
+
smallareas () {
|
763
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')]
|
764
|
+
},
|
765
|
+
inputtores () {
|
766
|
+
// 获取抄表员
|
767
|
+
console.log('获取抄表员', this.$login.f)
|
768
|
+
let rs = []
|
769
|
+
if (this.$login.f.f_gasman.length > 0) {
|
770
|
+
for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
|
771
|
+
let temp = {
|
772
|
+
label: this.$login.f.f_gasman[i].name,
|
773
|
+
value: this.$login.f.f_gasman[i].name
|
774
|
+
}
|
775
|
+
rs.push(temp)
|
776
|
+
}
|
777
|
+
}
|
778
|
+
this.inputtores2 = rs
|
779
|
+
return [ ...rs]
|
780
|
+
}
|
781
|
+
},
|
782
|
+
watch: {
|
783
|
+
async 'f_orgid'(){
|
784
|
+
this.meterbooks=[]
|
785
|
+
await this.meterbook()
|
786
|
+
this.$emit('childre',this.meterbooks)
|
787
|
+
},
|
788
|
+
batchMeterShow () {
|
789
|
+
if (this.batchMeterShow == false) {
|
790
|
+
// 将选的文件清空
|
791
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
792
|
+
}
|
793
|
+
},
|
794
|
+
'f_filialeid' (val) {
|
795
|
+
loadParamGem(this)
|
796
|
+
}
|
797
|
+
},
|
798
|
+
events: {
|
799
|
+
onFileUpload: function (file, res) {
|
800
|
+
// let URL = res.f_downloadpath.substring(res.f_downloadpath.lastIndexOf(":\\") + 2)
|
801
|
+
// res.f_downloadpath = "http://" + location.host + "/" + URL
|
802
|
+
// res.f_downloadpath.replace('\\','/')
|
803
|
+
this.$resetpost('api/af-revenue/logic/upLoadBookFile',
|
804
|
+
{data: {
|
805
|
+
condition: this.condition,
|
806
|
+
filepath: res.f_downloadpath
|
807
|
+
}
|
808
|
+
},
|
809
|
+
{resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
|
810
|
+
this.show = false
|
811
|
+
this.$showAlert(`导入成功`, 'success', 2000)
|
812
|
+
this.search()
|
813
|
+
})
|
814
|
+
}
|
815
|
+
}
|
816
|
+
}
|
817
|
+
</script>
|
818
|
+
|
819
|
+
<style lang="less">
|
820
|
+
#MbpeopleList {
|
821
|
+
tr {
|
822
|
+
th {
|
823
|
+
text-align: center;
|
824
|
+
}
|
825
|
+
td {
|
826
|
+
text-align: center;
|
827
|
+
}
|
828
|
+
}
|
829
|
+
}
|
830
|
+
</style>
|