safecheck-client 3.0.34-21 → 3.0.34-22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +4 -2
  3. package/src/components/android/ImgSelfAndroid.vue +181 -181
  4. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -633
  5. package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
  6. package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
  7. package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
  8. package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -63
  9. package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
  10. package/src/filiale/baiyin/pc/PaperList.vue +790 -790
  11. package/src/filiale/baiyin/pc/PlanChooser.vue +167 -167
  12. package/src/filiale/baiyin/pc/PlanManage.vue +834 -834
  13. package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -348
  14. package/src/filiale/baiyin/pc/RoleSelector.vue +160 -160
  15. package/src/filiale/fugou/android.js +11 -11
  16. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +830 -810
  17. package/src/filiale/fugou/pc/DefectMainNew.vue +63 -63
  18. package/src/filiale/fugou/pc/DefectPaperNew.vue +1085 -1085
  19. package/src/filiale/fugou/pc/PaperDefectMain.vue +928 -928
  20. package/src/filiale/fugou/pc/PaperList.vue +911 -911
  21. package/src/filiale/fugou/pc/PlanManage.vue +1061 -1061
  22. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -447
  23. package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
  24. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2811 -2811
  25. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -784
  26. package/src/filiale/jiaxian/android.js +13 -13
  27. package/src/filiale/jiaxian/pc.js +12 -12
  28. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +476 -476
  29. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
  30. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
  31. package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
  32. package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
  33. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2845
  34. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
  35. package/src/main.js +1 -2
@@ -1,810 +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">&nbsp;小&nbsp;区&nbsp;域</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">抄&nbsp;表&nbsp;员&nbsp;</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">表箱号&emsp;</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">小&emsp;区&emsp;</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">楼&emsp;号&emsp;</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">表&emsp;号&emsp;</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" :value-single="true"
174
- :options='$parent.$parent.streetslist' placeholder='请选择'
175
- condition="f_street_id = '{}'"
176
- v-model='model.f_street_id'
177
- @change="$parent.$parent.streetChange"
178
- close-on-select :search="true" >
179
- </v-select>
180
- </div>
181
- <div class="col-sm-3 form-group">
182
- <label class="font_normal_body">片区/行政村</label>
183
- <v-select :value.sync="model.f_community_id" v-model='model.f_community_id'
184
- :options='$parent.$parent.communitylist' placeholder='片区/管理站' filer-key="name"
185
- condition="f_community_id = '{}'"
186
- @change="$parent.$parent.communityChange"
187
- close-on-select v-ref:slice>
188
- </v-select>
189
- </div>
190
- <div class="col-sm-3 form-group">
191
- <label class="font_normal_body">小区/自然村</label>
192
- <v-select :value.sync="model.f_residential_area_id" :value-single="true"
193
- :options='$parent.$parent.areaslist' placeholder='请选择'
194
- condition="f_residential_area_id = '{}'"
195
- v-model='model.f_residential_area_id'
196
- close-on-select>
197
- </v-select>
198
- </div>
199
- <div class="col-sm-3 form-group">
200
- <label class="font_normal_body">开户时间</label>
201
- <datepicker
202
- :value.sync="model.f_open_date"
203
- placeholder='开户时间' style="width:60%"
204
- :disabled-days-of-week="[]"
205
- :format="'yyyy-MM-dd'"
206
- :select-month="true"
207
- v-model='model.f_open_date'
208
- :show-rest-button="reset">
209
- </datepicker>
210
- </div>
211
- </div>
212
- </div>
213
- </criteria>
214
- <data-grid class="list_area table_sy" :model="model" partial='list' v-ref:grid :optional="true">
215
- <template partial='head'>
216
- <!--<th>-->
217
- <!--<input type="checkbox" id="f_operator" v-model="$parent.$parent.$parent.all[model.pageIndex-1]"-->
218
- <!--@change="$parent.$parent.$parent.select()"/>-->
219
- <!--</th>-->
220
- <th><nobr>序号</nobr></th>
221
- <th><nobr>客户编号</nobr></th>
222
- <th><nobr>客户名称</nobr></th>
223
- <th><nobr>客户状态</nobr></th>
224
-
225
- <th><nobr>区/县</nobr></th>
226
- <th><nobr>街道/乡镇</nobr></th>
227
- <th><nobr>片区/行政村</nobr></th>
228
- <th><nobr>小区/自然村</nobr></th>
229
- <th><nobr>客户地址</nobr></th>
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
- </template>
238
- <template partial='body'>
239
- <!--<td>-->
240
- <!--<input :id="'body'+model.pageIndex" type='checkbox' @change="$parent.$parent.$parent.selectOne($event,row,$index)"-->
241
- <!--:checked="$parent.$parent.$parent.ischecked(model.pageIndex-1,$index)"/>-->
242
- <!--</td>-->
243
- <td>{{$index+1}}</td>
244
- <td>{{row.f_userinfo_code}}</td>
245
- <td>{{row.f_user_name}}</td>
246
- <td>{{row.f_user_state}}</td>
247
-
248
- <td>{{row.f_pcd}}</td>
249
- <td>{{row.f_street}}</td>
250
- <td>{{row.f_community}}</td>
251
- <td>{{row.f_residential_area}}</td>
252
- <td>{{row.f_address}}</td>
253
- <td>{{row.f_meternumber}}</td>
254
- <td>{{row.f_table_state}}</td>
255
- <td>{{row.f_check_book_name}}</td>
256
- <!-- <td>{{row.f_meter_book_sort}}</td>-->
257
- <!-- <td>{{row.f_adjustable_id}}</td>-->
258
- <td style="text-align:center">{{row.f_metertitles}}</td>
259
- <td style="text-align:center"><nobr>{{row.f_book_no}}</nobr></td>
260
- <td style="text-align:center">{{row.f_meter_base}}</td>
261
- </template>
262
- </data-grid>
263
- </criteria-paged>
264
- </div>
265
- <modal :show.sync="show" width="500px" title="文件导入" v-ref:modal large backdrop="false">
266
- <article slot="modal-body" class="modal-body">
267
- <file-upload class="my-file-uploader " name="UploadFile" style="border-radius: 2px;"
268
- action="api/af-revenue/file/uploadFile" tagname="导入表册用户" v-ref:file multiple></file-upload>
269
- </article>
270
- <footer slot="modal-footer" class="modal-footer">
271
- </footer>
272
- </modal>
273
- </template>
274
-
275
- <script>
276
- import {HttpResetClass, PagedList} from 'vue-client'
277
- import Vue from 'vue'
278
-
279
- let getAreaConfig = async function (self) {
280
- // 获取气价里面的配置
281
- await self.$getConfig(self, 'UserAddress')
282
- Object.assign(self.model, self.config)
283
- self.initdata()
284
- }
285
- let loadParamGem = async function (self) {
286
- await self.$LoadParams.loadParam()
287
- self.getfield = self.config.excelHeaders
288
- // self.$refs.paged.$refs.cri.model.f_meter_classify = ['机表']
289
- await self.initAdjustables()
290
- // await self.search()
291
- }
292
- export default {
293
- name: 'MbpeopleList',
294
- data () {
295
- return {
296
- f_filialeids: this.$login.f.orgid,
297
- // 初始化省市区数据
298
- pcdslist: [],
299
- //初始化街道数据
300
- streetslist:[],
301
- communitylist:[],
302
- areaslist: [],
303
- // 选中所有地址
304
- addresslist: [],
305
- sliceArea: [],
306
- orgCondtionStr: '',
307
- f_filialeid: this.$login.f.orgid,
308
- f_orgid: '',
309
- invoiceuse: [{label: '是', value: 'is not null'}, {label: '否', value: 'is null'}],
310
- model: new PagedList('rs/sql/mb_peopleList', 20),
311
- f_orgstr: this.$login.f.orgid,
312
- // 要操作的用户
313
- rowsdata: [],
314
- aaa: '',
315
- // 控制全选
316
- all: [],
317
- // 控制单选
318
- radio: [],
319
- show: false,
320
- meterbooks: [{label: '全部', value: ''}],
321
- criteriaShow: false,
322
- gasproperties: this.$appdata.getParam('用气性质') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')] : [],
323
- user_type: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
324
- meter_classify: this.$appdata.getParam('气表类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')] : [],
325
- table_state: this.$appdata.getParam('气表状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')] : [],
326
- f_small_areas: this.$appdata.getParam('小区域') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')] : [],
327
- user_state: [{label: '正常', value: '正常'}, {label: '预备', value: '预备'}, {label: '销户', value: '销户'}],
328
- whether_list: [{label: '全部', value: ''},{label: '已在册内', value: 'is not null'}, {label: '不在册内', value: 'is null'}],
329
- meterbrands: [],
330
- condition: '',
331
- adjustables: [],
332
- unnullrowdata: [],
333
- getfield: {},
334
- config: {
335
- // 导出列要和查询列相同
336
- excelHeaders: {
337
- 'f_userfiles_id': '系统识别号',
338
- 'f_userinfo_code': '用户编号',
339
- 'f_user_name': '用户姓名',
340
- 'f_address': '用户地址'
341
- }
342
- },
343
- curorgid: [this.$login.f.orgid]
344
- }
345
- },
346
- created () {
347
- },
348
- ready () {
349
- getAreaConfig(this)
350
- loadParamGem(this)
351
- this.getmeterbook()
352
- },
353
- methods: {
354
- async meterbook(){
355
- this.meterbooks=[]
356
- if(this.f_orgid==''){
357
- this.f_orgid=this.$login.f.orgid
358
- }
359
- 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})
360
- for(let i=0;i<res.data.length;i++){
361
- console.log("res",res.data[i])
362
- let temp=[]
363
- temp.label=res.data[i].f_check_book_name
364
- temp.value=res.data[i].id
365
- this.meterbooks.push(temp)
366
- }
367
-
368
- },
369
- invoiceuseChange (val) {
370
- // 查询已开票记录清空选项
371
- if (val == 'is not null') {
372
- this.rowsdata = []
373
- this.radio = []
374
- }
375
- },
376
-
377
- select () {
378
- let index = this.model.pageIndex - 1
379
- console.log('全选', this.all[index])
380
- if (!this.radio[index]) {
381
- this.radio.$set(index, [])
382
- }
383
- if (this.all[index]) {
384
- // 数据
385
- this.rowsdata[index] = Object.assign([], this.model.rows)
386
- // 勾选
387
- for (var i = 0; i < this.model.rows.length; i++) {
388
- this.radio[index].$set(i, true)
389
- }
390
- } else {
391
- // 数据
392
- this.rowsdata[index] = []
393
- // 不勾选
394
- for (var i = 0; i < this.model.rows.length; i++) {
395
- this.radio[index].$set(i, false)
396
- }
397
- }
398
- this.mergeRowData()
399
- },
400
- importFile () {
401
- this.show = true
402
- },
403
- async initAdjustables () {
404
- let arr = []
405
- let filter = this.$login.f.orgid
406
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
407
- let temp = {}
408
- temp.label = '[' + item.value.f_adjustable_id + ']-' + item.label
409
- temp.value = item.value.id
410
- arr.push(temp)
411
- })
412
- this.adjustables = [{label: '全部', value: ''}, ...arr]
413
- // 初始化气表品牌
414
- let brandArr = []
415
- this.$GetSaleParam.getGasbrand().forEach((item) => {
416
- let temp1 = {}
417
- temp1.label = item.label
418
- temp1.value = item.value.f_meter_brand
419
- brandArr.push(temp1)
420
- })
421
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
422
- //
423
- // // 加载安检册
424
- // console.log("------------------this.$GetSaleParam.getMeterBooks()",this.$GetSaleParam.getMeterBooks())
425
- // this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
426
- },
427
- search () {
428
- this.$refs.paged.$refs.cri.search()
429
- console.log('mbpeople this = ', this)
430
- },
431
- selfSearch (args) {
432
- let f_orgstr = this.orgCondtionStr ? this.orgCondtionStr : "and f_orgid in ('" + this.f_orgid + "')"
433
- args.condition = `${args.condition} ` + f_orgstr
434
- // args.condition += ` and f_orgid = ${this.f_orgstr}`
435
- if(args.model.f_open_date){
436
- args.condition += ` and f_open_date <='${args.model.f_open_date}' `
437
- }
438
- this.condition = args.condition
439
- this.$parent.condition = this.condition
440
- this.model.search(args.condition, args.model)
441
- },
442
- // 合并二维数组并去空
443
- mergeRowData () {
444
- console.log('!!!!!!!!!!!!!数组去空', this.rowsdata)
445
- let data = []
446
- // 合并
447
- for (let array of this.rowsdata) {
448
- data.push.apply(data, array)
449
- }
450
- // 去空
451
- // 拓展数组去空值的方法
452
- Array.prototype.removeEmpty = function () {
453
- for (var i = 0; i < this.length; i++) {
454
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
455
- this.splice(i, 1)
456
- i--
457
- }
458
- }
459
- return this
460
- }
461
- data = data.removeEmpty()
462
- this.unnullrowdata = []
463
- data.forEach((row) => {
464
- this.unnullrowdata.push(row.f_userfiles_id + '')
465
- })
466
- this.$parent.rowsdata = this.unnullrowdata
467
- // this.$parent.rowsdata = this.rowsdata
468
- },
469
- selectOne (event, row, i) {
470
- console.log('单选', event.target.checked)
471
- let index = this.model.pageIndex - 1
472
- if (!this.rowsdata[index]) {
473
- this.rowsdata[index] = []
474
- }
475
- if (!this.radio[index]) {
476
- this.radio.$set(index, [])
477
- }
478
- if (event.target.checked) {
479
- // 数据
480
- this.rowsdata[index][i] = row
481
- // 勾选
482
- this.radio[index].$set(i, true)
483
- // 判断是否全部选中
484
- var allState = true
485
- if (this.model.rows.length != this.radio[index].length) {
486
- allState = false
487
- }
488
- for (var state of this.radio[index]) {
489
- if (!state) {
490
- allState = false
491
- }
492
- }
493
- if (allState) {
494
- this.all.$set(index, true)
495
- } else {
496
- this.all.$set(index, false)
497
- }
498
- } else {
499
- // 数据
500
- this.rowsdata[index][i] = []
501
- // 不勾选
502
- this.radio[index].$set(i, false)
503
- // 任意取消一个则全选状态设为false
504
- this.all.$set(index, false)
505
- }
506
- this.mergeRowData()
507
- },
508
- getorg (val) {
509
- console.log('getorg:val=', val)
510
- console.log('getorg:this.f_orgid=', this.f_orgid)
511
- this.f_orgid = val
512
- this.f_filialeid = val[0]
513
- },
514
- async getmeterbook(){
515
- await this.meterbook()
516
- this.$emit('childre',this.meterbooks)
517
- },
518
- async initdata () {
519
- this.initAreas(this.f_filialeids)
520
- // 添加特殊地址选省市区
521
-
522
- this.initpcds(` f_orgid = '${this.f_filialeids}'`)
523
- this.initstreets(` f_orgid = '${this.f_filialeids}' `)
524
- this.initareas(` f_orgid = '${this.f_filialeids}'`)
525
- },
526
- // 初始化片区
527
- async initAreas (val) {
528
- if (val) {
529
- let getAllArea = await this.$resetpost('/rs/search', {
530
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
531
- userid: this.$login.f.id
532
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
533
-
534
- let arr = getAllArea.data.filter((res) => {
535
- return res.parentid == val
536
- })
537
- console.log('过滤之后的片区', arr)
538
- this.sliceArea = []
539
- arr.forEach((res) => {
540
- this.sliceArea.push({label: res.name, value: res.name})
541
- })
542
- }
543
- },
544
- initModel () {
545
- if (this.row) {
546
- this.cleardata()
547
- this.model = Object.assign({}, this.model, this.row)
548
- // 处理片区代码
549
- this.model.slice_area = [{
550
- name: this.model.f_slice_area,
551
- code: this.model.f_area_code
552
- }]
553
- }
554
- },
555
- // 初始化省市区,添加街道
556
- async initpcds (pconditon) {
557
- this.pcdslist = []
558
- let HttpReset = new HttpResetClass()
559
- let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
560
- data: {
561
- items: '*',
562
- tablename: 't_pcd',
563
- orderitem: 'id',
564
- condition: pconditon
565
- }
566
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
567
- let redata = []
568
- req.data.forEach((row, n) => {
569
- redata[n] = {
570
- label: row.f_pcd,
571
- value: row.id,
572
- data: row,
573
- id: row.id
574
- }
575
- })
576
- this.pcdslist = redata
577
- console.log("xxxxxxxxxxxxxx")
578
- console.log(this.pcdslist)
579
- console.log("redataxxxxxxxx")
580
- },
581
- // 初始化街道 添加小区
582
- async initstreets (pconditon) {
583
- this.streetslist = []
584
- let HttpReset = new HttpResetClass()
585
- let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
586
- data: {
587
- items: '*',
588
- tablename: 't_street',
589
- orderitem: 'id',
590
- condition: pconditon
591
- }
592
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
593
- let redata = []
594
- req.data.forEach((row, n) => {
595
- redata[n] = {
596
- label: row.f_street,
597
- value: row.id,
598
- data: row,
599
- id: row.id
600
- }
601
- })
602
- this.streetslist = redata
603
- console.log("xxxxxxxxxxxxxx")
604
- console.log(this.streetslist)
605
- console.log("redataxxxxxxxx")
606
- },
607
- // 初始化小区添加小区
608
- async initareas (pconditon) {
609
- // if(this.usertype){
610
- // pconditon=pconditon+` and f_special='1' `
611
- // }
612
- this.areaslist = []
613
- let HttpReset = new HttpResetClass()
614
- let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
615
- data: {
616
- items: '*',
617
- tablename: 't_area',
618
- orderitem: 'id',
619
- condition: pconditon
620
- }
621
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
622
- let redata = []
623
- req.data.forEach((row) => {
624
- redata.push({
625
- label: row.f_residential_area,
626
- value: row.id,
627
- data: row,
628
- id: row.id
629
- })
630
- })
631
- this.areaslist = redata
632
- },
633
- //小区变化
634
- areaChange(val){
635
- console.log("小区变化",val)
636
- // 选择小区后级联出省市区和街道
637
- let selectArea // 选中的小区数据
638
- for (let row of this.areaslist) {
639
- if (val == row.value) {
640
- selectArea = row.data
641
- break
642
- }
643
- }
644
- if (selectArea) {
645
- this.model.f_street_id = selectArea.f_street_id
646
- this.model.f_pcd_id = selectArea.f_pcd_id
647
- this.model.f_community_id = selectArea.f_community_id
648
- console.log( this.model.f_community_id)
649
-
650
- this.initstreets(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_street_id}' `)
651
- this.initpcds(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_pcd_id}' `)
652
- if(selectArea.f_community_id){
653
- this.initcommunity(` f_filialeid = '${this.f_filialeids}' and id ='${selectArea.f_community_id}' `)
654
- }
655
- // this.model.f_slice_area = selectArea.f_slice_area
656
- // 拼接地址
657
- this.model.f_address = `${selectArea.f_street}${selectArea.f_community}${selectArea.f_residential_area}`
658
- console.log( this.model.f_community_id)
659
- }
660
- this.$nextTick(() => {
661
- this.$resetValidation()
662
- })
663
- },
664
- // 片区变化 f_area_code
665
- async areasChange (val) {
666
- console.log('街道变化', val)
667
- if (this.streetslist[0]) {
668
- var street = ''
669
- this.streetslist.forEach((item) => {
670
- if (item.id === val) {
671
- street = item.label
672
- }
673
- })
674
- // this.model.f_address = street
675
- }
676
- if (val) {
677
- // 那就把[小区]重新组织一下
678
- await this.initareas(` f_area_code ='${val}' `)
679
- if (this.$refs.paged.$refs.criteria.model.f_residential_area_id) {
680
- if (this.findbyid(this.areaslist, this.$refs.paged.$refs.criteria.model.f_residential_area_id)) {
681
- let street_id = this.findbyid(this.areaslist,this.$refs.paged.$refs.criteria.model.f_residential_area_id).f_street_id
682
- if (street_id != val) {
683
- this.$refs.paged.$refs.criteria.model.f_residential_area_id = ''
684
- }
685
- } else {
686
- this.$refs.paged.$refs.criteria.model.f_residential_area_id = ''
687
- }
688
- }
689
- }
690
- },
691
- //街道变化
692
- //初始化街道 添加小区
693
- async initcommunity(pconditon){
694
- this.communitylist = []
695
- let HttpReset = new HttpResetClass()
696
- let req = await HttpReset.load('POST', 'api/af-revenue/sql/address_singleTableOrderBy', {
697
- data: {
698
- items: '*',
699
- tablename: 't_community',
700
- orderitem: 'id',
701
- condition: pconditon
702
- }
703
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
704
- let redata = []
705
- req.data.forEach((row, n) => {
706
- redata[n] = {
707
- label: row.f_community_name,
708
- value: row.id,
709
- data:row,
710
- id:row.id
711
- }
712
- })
713
- this.communitylist=redata
714
- },
715
- async streetChange(val){
716
- if(val){
717
- await this.initcommunity(` f_filialeid = '${this.f_filialeids}' and f_street_id ='${val}' `)
718
- }
719
- },
720
- async communityChange(val){
721
- console.log(val)
722
- if(val){
723
- await this.initareas(` f_filialeid = '${this.f_filialeids}' and f_community_id ='${val}' `)
724
- }
725
- }
726
- },
727
- computed: {
728
- usergastype () {
729
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
730
- },
731
- usertags () {
732
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户标签')]
733
- },
734
- ischecked () {
735
- return function (index, i) {
736
- if (!this.radio[index]) {
737
- return false
738
- }
739
- return this.radio[index][i]
740
- }
741
- },
742
- smallareas () {
743
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')]
744
- },
745
- inputtores () {
746
- // 获取抄表员
747
- console.log('获取抄表员', this.$login.f)
748
- let rs = []
749
- if (this.$login.f.f_gasman.length > 0) {
750
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
751
- let temp = {
752
- label: this.$login.f.f_gasman[i].name,
753
- value: this.$login.f.f_gasman[i].name
754
- }
755
- rs.push(temp)
756
- }
757
- }
758
- this.inputtores2 = rs
759
- return [ ...rs]
760
- }
761
- },
762
- watch: {
763
- async 'f_orgid'(){
764
- this.meterbooks=[]
765
- await this.meterbook()
766
- this.$emit('childre',this.meterbooks)
767
- },
768
- batchMeterShow () {
769
- if (this.batchMeterShow == false) {
770
- // 将选的文件清空
771
- this.$refs.file.$el.querySelector('input').value = ''
772
- }
773
- },
774
- 'f_filialeid' (val) {
775
- loadParamGem(this)
776
- }
777
- },
778
- events: {
779
- onFileUpload: function (file, res) {
780
- // let URL = res.f_downloadpath.substring(res.f_downloadpath.lastIndexOf(":\\") + 2)
781
- // res.f_downloadpath = "http://" + location.host + "/" + URL
782
- // res.f_downloadpath.replace('\\','/')
783
- this.$resetpost('api/af-revenue/logic/upLoadBookFile',
784
- {data: {
785
- condition: this.condition,
786
- filepath: res.f_downloadpath
787
- }
788
- },
789
- {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
790
- this.show = false
791
- this.$showAlert(`导入成功`, 'success', 2000)
792
- this.search()
793
- })
794
- }
795
- }
796
- }
797
- </script>
798
-
799
- <style lang="less">
800
- #MbpeopleList {
801
- tr {
802
- th {
803
- text-align: center;
804
- }
805
- td {
806
- text-align: center;
807
- }
808
- }
809
- }
810
- </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">&nbsp;小&nbsp;区&nbsp;域</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">抄&nbsp;表&nbsp;员&nbsp;</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">表箱号&emsp;</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">小&emsp;区&emsp;</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">楼&emsp;号&emsp;</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">表&emsp;号&emsp;</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>