safecheck-client 3.0.33-5 → 3.0.33-51

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 (56) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +31 -31
  3. package/src/components/paper/PaperList.vue +5 -4
  4. package/src/components/planmanage/checkUserList.vue +34 -2
  5. package/src/components/report/CheckPlanCountChartArea.vue +5 -0
  6. package/src/filiale/Util.js +5 -0
  7. package/src/filiale/bayan/android/AddPlanItem.vue +12 -3
  8. package/src/filiale/bayan/android/SafecheckOrderV.vue +4 -1
  9. package/src/filiale/bayan/android/SafecheckUserInfo.vue +532 -508
  10. package/src/filiale/dexin/android/SafecheckDevices.vue +1 -1
  11. package/src/filiale/dexin/android/WebMeterOpen.vue +1 -1
  12. package/src/filiale/dexin/android/WebMeterOpenEdit.vue +25 -37
  13. package/src/filiale/fugou/pc/AddToCheckBook.vue +56 -119
  14. package/src/filiale/fugou/pc/CheckBook.vue +2 -0
  15. package/src/filiale/fugou/pc/CheckBookEntry.vue +47 -19
  16. package/src/filiale/fugou/pc/CheckBookList.vue +2 -2
  17. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +733 -574
  18. package/src/filiale/fugou/pc/CheckBookUser.vue +102 -45
  19. package/src/filiale/fugou/pc/PlanManage.vue +62 -8
  20. package/src/filiale/fugou/pc/checkUserList.vue +222 -42
  21. package/src/filiale/hanzhong/pc/CheckHiddenDanger.vue +15 -5
  22. package/src/filiale/hanzhong/pc/CheckSafeDetail.vue +12 -2
  23. package/src/filiale/hanzhong/pc/CheckSafeStatus.vue +12 -3
  24. package/src/filiale/hanzhong/pc/CheckSearchUser.vue +13 -0
  25. package/src/filiale/hanzhong/pc/CheckUserList.vue +30 -11
  26. package/src/filiale/hanzhong/pc/CheckerSafeDetail.vue +11 -2
  27. package/src/filiale/jingyang/pc/ReportCheckItemList.vue +543 -0
  28. package/src/filiale/jingyang/pc.js +1 -0
  29. package/src/filiale/rongchuang/android/SafecheckDevices.vue +468 -748
  30. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +984 -1234
  31. package/src/filiale/rongchuang/android.js +1 -0
  32. package/src/filiale/rongchuang/pc/NewCheckpaper.vue +294 -305
  33. package/src/filiale/rongchuang/pc/PaperList.vue +812 -0
  34. package/src/filiale/rongchuang/pc.js +1 -0
  35. package/src/filiale/tongchuan/pc/checkUserList.vue +2 -2
  36. package/src/filiale/weinan/android/PaperFeedback.vue +1410 -1410
  37. package/src/filiale/weinan/android/SafecheckDevices.vue +1082 -1025
  38. package/src/filiale/weinan/android/SafecheckOrderV.vue +71 -26
  39. package/src/filiale/weinan/pc/CheckSearchUser.vue +1078 -0
  40. package/src/filiale/weinan/pc/DefectPaperNew.vue +1065 -1059
  41. package/src/filiale/weinan/pc.js +45 -44
  42. package/src/filiale/wensu/pc/CheckSearchUser.vue +2 -0
  43. package/src/filiale/wensu/pc/DefectPaperNew.vue +1148 -1148
  44. package/src/filiale/wensu/pc/checkUserList.vue +650 -650
  45. package/src/filiale/wenxi/android/SafecheckUserInfo.vue +1 -1
  46. package/src/filiale/wuhai/pc/PaperList.vue +785 -0
  47. package/src/filiale/wuhai/pc.js +1 -0
  48. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2 -2
  49. package/src/filiale/yongzhou/pc/CheckPlan.vue +59 -0
  50. package/src/filiale/yongzhou/pc/DefectPaperNew.vue +1105 -0
  51. package/src/filiale/yongzhou/pc/SelectCheckPlan.vue +364 -0
  52. package/src/filiale/yongzhou/pc/communityTypeDetailM.vue +94 -187
  53. package/src/filiale/yongzhou/pc/safeDetail.vue +212 -14
  54. package/src/filiale/yongzhou/pc.js +3 -0
  55. package/src/filiale/yunchengminsheng/pc/checkUserList.vue +18 -1
  56. package/src/main.js +1 -1
@@ -1,651 +1,810 @@
1
1
  <template>
2
- <div class="flex-row">
3
- <div class="basic-main">
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div class="form-group col-sm-3">
9
- <label class="font_normal_body">客户编号</label>
10
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
- style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
12
- </div>
13
- <div class="form-group col-sm-3">
14
- <label class="font_normal_body">客户名称</label>
15
- <input type="text" class="input_search" v-model="model.f_user_name"
16
- style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
17
- </div>
18
- <div class="form-group col-sm-3">
19
- <label class="font_normal_body">用气性质</label>
20
- <v-select
21
- class="select select_list"
22
- :value.sync="model.f_gasproperties"
23
- v-model="model.f_gasproperties"
24
- :options='$parent.$parent.gasproperties'
25
- placeholder='请选择'
26
- condition="f_gasproperties='{}'"
27
- :search="false"
28
- close-on-select
29
- value-single
30
- >
31
- </v-select>
32
- </div>
33
- <div class="form-group col-sm-3">
34
- <button class="button_spacing button_search" @click="search()">查询</button>
35
- <div style="float: right" class="button_spacing"
36
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
37
- @click="$parent.$parent.hidden()"></div>
38
- </div>
39
-
40
- <!-- <div class="form-group col-sm-3" v-show="$parent.$parent.criteriaShow">-->
41
- <!-- <label class="font_normal_body">客户地址</label>-->
42
- <!-- <input type="text" class="input_search" v-model="model.f_address"-->
43
- <!-- style="width: 60%" placeholder="客户地址" condition="tua.f_address like '%{}%'">-->
44
- <!-- </div>-->
45
- <div class="form-group col-sm-3" v-show="$parent.$parent.criteriaShow">
46
- <label class="font_normal_body">客户类型</label>
47
- <v-select :value.sync="model.f_user_type" v-model='model.f_user_type'
48
- :value-single="true" style="width: 60%"
49
- class="select_list select"
50
- :options='$parent.$parent.userTypes' placeholder='客户类型'
51
- close-on-select
52
- condition="f_user_type ='{}'"></v-select>
53
- </div>
54
- <div class="form-group col-sm-3" v-show="$parent.$parent.criteriaShow">
55
- <label class="font_normal_body">用气类型</label>
56
- <v-select class="select_list select"
57
- placeholder='请选择' style="width: 60%"
58
- :value.sync="model.f_user_gas_type"
59
- v-model="model.f_user_gas_type"
60
- :options='$parent.$parent.userGasType'
61
- filer-key="name"
62
- close-on-select clear-button
63
- condition="f_user_gas_type='{}'"
64
- :value-single="true">
65
- </v-select>
66
- </div>
67
- <div class="form-group col-sm-3" v-show="$parent.$parent.criteriaShow">
68
- <label class="font_normal_body">用户标签</label>
69
- <v-select class="select_list select"
70
- placeholder='请选择' style="width: 60%"
71
- :value.sync="model.f_user_tags"
72
- v-model="model.f_user_tags"
73
- :options='$parent.$parent.userTags'
74
- filer-key="name"
75
- close-on-select clear-button
76
- condition="f_user_tags='{}'"
77
- :value-single="true">
78
- </v-select>
79
- </div>
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='用户姓名'>
80
16
  </div>
81
- <div class="row">
82
- <div class="col-sm-3 form-group" style="margin-bottom: 0px" v-show="$parent.$parent.criteriaShow">
83
- <label class="font_normal_body">公&emsp;&emsp;司</label>
84
- <right-tree-safe @re-res="$parent.$parent.getResm" v-model="model.f_orgid" condition="f_orgid in {}"></right-tree-safe>
85
- </div>
86
- <div class="col-sm-3 form-group" v-show="$parent.$parent.criteriaShow">
87
-
88
- <label class="font_normal_body">片区名称</label>
89
- <v-select :value.sync="model.f_check_book_id" v-model='model.f_check_book_id'
90
- :value-single="true" style="width: 60%"
91
- class="select_list select"
92
- :options='$parent.$parent.checkBooks' placeholder='片区名称'
93
- close-on-select
94
- condition="f_check_book_id ='{}'"></v-select>
95
17
 
96
- </div>
97
- <div class="col-sm-3 form-group" v-show="$parent.$parent.criteriaShow">
98
- <label class="font_normal_body">是否在册</label>
99
- <v-select :value.sync="model.f_is_checkbook" v-model='model.f_is_checkbook'
100
- :value-single="true" style="width: 60%"
101
- class="select_list select"
102
- @change="$parent.$parent.changeState"
103
- :options='$parent.$parent.isCheckBook' placeholder='有无所属片区'
104
- close-on-select
105
- condition="{}"></v-select>
106
- </div>
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>
107
30
  </div>
108
31
  </div>
109
- </criteria>
110
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
111
- <template partial='head'>
112
- <tr @dblclick.stop="">
113
- <!-- <th>-->
114
- <!-- <nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>-->
115
- <!-- </th>-->
116
- <th>
117
- <nobr>客户姓名</nobr>
118
- </th>
119
- <th>
120
- <nobr>客户编号</nobr>
121
- </th>
122
- <th>
123
- <nobr>客户类型</nobr>
124
- </th>
125
- <th>
126
- <nobr>客户电话</nobr>
127
- </th>
128
- <th>
129
- <nobr>用户单位</nobr>
130
- </th>
131
- <th>
132
- <nobr>客户地址</nobr>
133
- </th>
134
- <th>
135
- <nobr>所属片区</nobr>
136
- </th>
137
- </tr>
138
- </template>
139
- <template partial='body'>
140
- <!-- <td style="text-align: center">-->
141
- <!-- <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"-->
142
- <!-- @change="$parent.$parent.$parent.checkChange(row, $event)"></input>-->
143
- <!-- </nobr>-->
144
- <!-- </td>-->
145
- <td style="text-align: center">{{ row.f_user_name }}</td>
146
- <td style="text-align: center">{{ row.f_userinfo_code }}</td>
147
- <td style="text-align: center">{{ row.f_user_type }}</td>
148
- <td style="text-align: center">{{ row.f_user_phone }}</td>
149
- <td style="text-align: center">{{ row.f_residential_area }}</td>
150
- <td style="text-align: center">{{ row.f_address }}</td>
151
- <td style="text-align: center">{{ row.f_check_book_name }}</td>
152
- </template>
153
- </data-grid>
154
- </criteria-paged>
155
- </div>
156
- <modal :show.sync="showModal" :backdrop="false">
157
- <div slot="modal-header" class="modal-header">
158
- <h4 class="modal-title">
159
- 创建片区
160
- </h4>
161
- </div>
162
- <div slot="modal-body" class="modal-body">
163
- <div v-if="true">
164
- <div class="row" style="margin-top: 10px">
165
- <!-- <label class="control-label font text-left" style="float:left;margin-left:10%;margin-top:5px">片区名称</label>-->
166
- <!-- <div class="col-xs-8 col-md-8">-->
167
- <!-- <input type="text" class="input_search" style="width: 70%;" v-model="checkBook.f_check_book_name"/>-->
168
- <!-- </div>-->
169
- <div class="col-sm-12 form-group" style="margin: 0">
170
- <role-selector-safe
171
- @re-res="getRes"
172
- role-name="安检员"
173
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
174
- :value.sync="checkBook.f_checker_name"
175
- v-model="checkBook.f_checker_name">
176
- </role-selector-safe>
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>
177
39
  </div>
178
- <div class="form-group col-sm-6" style="margin-top: 20px">
179
- <label class="font_normal_body">片区名</label>
180
- <input type="text" class="input_search" v-model="checkBook.f_check_book_name"
181
- style="width: 60%" >
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
+ >
182
45
  </div>
183
- <div class="form-group col-sm-6" style="margin-top: 20px">
184
- <label class="font_normal_body">执行日期</label>
185
- <datepicker
186
- :value.sync="checkBook.f_run_date"
187
- style="width: 60%"
188
- :format="'yyyy-MM-dd'"
189
- v-model="checkBook.f_run_date"
190
- >
191
- </datepicker>
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>
192
54
  </div>
193
- <div class="form-group col-sm-6" style="margin-top: 20px">
194
- <label class="font_normal_body">执行周期</label>
195
- <input type="number" class="input_search" v-model="checkBook.f_around_time"
196
- style="width: 60%" >
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>
197
63
  </div>
198
- <div class="form-group col-sm-6" style="margin-top: 20px">
199
- <label class="font_normal_body">周期单位</label>
200
- <v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
201
- :value-single="true" style="width: 60%"
202
- class="select_list select"
203
- :options='aroundUnit' placeholder=''
204
- close-on-select></v-select>
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>
205
69
  </div>
206
- </div>
207
- </div>
208
- </div>
209
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
210
- <button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
211
- <button class="button_search" @click="cancel">取消</button>
212
- </div>
213
- </modal>
214
- <modal :show.sync="showModal2" :backdrop="false">
215
- <div slot="modal-header" class="modal-header">
216
- <h4 class="modal-title">
217
- 添加用户
218
- </h4>
219
- </div>
220
- <div slot="modal-body" class="modal-body">
221
- <div v-if="true">
222
- <div class="row" style="margin-top: 10px">
223
- <div class="form-group col-sm-12" style="margin-top: 20px">
224
- <label class="font_normal_body">片&ensp;区&ensp;名</label>
225
- <v-select :value.sync="selectBook" v-model='selectBook'
226
- :value-single="true" style="width: 80%"
227
- class="select_list select"
228
- :options='checkBooks' placeholder=''
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%"
229
83
  close-on-select></v-select>
230
84
  </div>
231
- </div>
232
- </div>
233
- </div>
234
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
235
- <button class="button_search" style="margin-right: 20px" @click="ok2">确认</button>
236
- <button class="button_search" @click="cancel2">取消</button>
237
- </div>
238
- </modal>
239
- <modal :show.sync="showModal3" :backdrop="false">
240
- <div slot="modal-header" class="modal-header">
241
- <h4 class="modal-title">
242
- 调整用户
243
- </h4>
244
- </div>
245
- <div slot="modal-body" class="modal-body">
246
- <div v-if="true">
247
- <div class="row" style="margin-top: 10px;text-align: center">
248
- <div class="form-group col-sm-12" style="margin-top: 20px">
249
- <label class="font_normal_body">安&ensp;检&ensp;册</label>
250
- <v-select :value.sync="selectBook" v-model='selectBook'
251
- :value-single="true" style="width: 80%"
252
- class="select_list select"
253
- :options='checkBooks' placeholder=''
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 {}"
254
118
  close-on-select></v-select>
255
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_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>
256
211
  </div>
257
212
  </div>
258
- </div>
259
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
260
- <button class="button_search" style="margin-right: 20px" @click="ok3">确认</button>
261
- <button class="button_search" @click="cancel3">取消</button>
262
- </div>
263
- </modal>
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>
264
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_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>
265
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>
266
273
  </template>
267
274
 
268
275
  <script>
269
- import {PagedList, HttpResetClass} from 'vue-client'
270
- import * as Util from "../../../components/Util";
271
- import bus from "../../../bus";
276
+ import {HttpResetClass, PagedList} from 'vue-client'
277
+ import Vue from 'vue'
272
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
+ }
273
292
  export default {
274
- title: '片区管理',
293
+ name: 'MbpeopleList',
275
294
  data () {
276
- let model = new PagedList('rs/sql/getUserByCheckBookuser', 20)
277
295
  return {
278
- model: model,
279
- criteriaShow: false,
280
- excelHeaders: {},
281
- checkBooks: [],
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,
282
308
  f_orgid: '',
283
- bookAll: false,
284
- bookList: [],
285
- selectBook:'',
286
- userTypes: [{label: '全部', value: ''},{label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
287
- // init:false,
288
- aroundUnit: [{label: '', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
289
- isCheckBook: [{label: '全部', value: ''}, {label: '是', value: 'f_check_book_name is not null'}, {label: '否', value: 'f_check_book_name is null'}],
290
- isSearch: false,
291
- checkBook: {
292
- f_check_book_name: '',
293
- f_run_date: '',
294
- f_around_time: '',
295
- f_around_unit: '',
296
- f_create_date: Util.toStandardDateString(),
297
- f_create_person: this.$login.f.name,
298
- f_orgid: '',
299
- f_checker_name: ''
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
+ }
300
342
  },
301
- showModal: false,
302
- showModal2: false,
303
- showModal3: false,
304
- userGasType:[{label: '全部', value: ''},...this.$appdata.getParam('用气类型')],
305
- userTags:[{label: '全部', value: ''},...this.$appdata.getParam('用户标签')],
306
- gasproperties:[{label: '全部', value: ''},...this.$appdata.getParam('用气性质')],
307
- }
308
- },
309
- props: {
310
- showtype:{
311
- type: String
343
+ curorgid: [this.$login.f.orgid]
312
344
  }
313
345
  },
314
- computed: {
315
- searchData () {
316
- return {condition: this.model.condition}
317
- },
318
- bookCondition () {
319
- return this.model.condition
320
- },
321
- isCreateBook () {
322
- return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is null'
323
- },
324
- isChangeBook () {
325
- return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is not null'
326
- }
346
+ created () {
327
347
  },
328
- watch:{
329
- 'bookList'(){
330
- this.$emit('book-list',this.bookList)
331
- },
332
- 'bookAll'(val){
333
- if(!val){
334
- this.bookList=[]
335
- }
336
-
337
- this.$emit('book-all',this.bookAll)
338
- }
348
+ ready () {
349
+ getAreaConfig(this)
350
+ loadParamGem(this)
351
+ this.getmeterbook()
339
352
  },
340
353
  methods: {
341
- async ok2() {
342
- if (!this.selectBook) {
343
- this.$showMessage('请选择片区')
344
- return
345
- }
346
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
347
- let userCondition = ''
348
- if (this.bookList.length < 1) {
349
- //tag
350
- userCondition = this.bookCondition
351
- } else {
352
- //tag)
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
+ }
353
367
 
354
- userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
355
- userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
356
- //tag
357
- }
358
- let addUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
359
- FROM
360
- t_userinfo tui
361
- LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
362
- LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
363
- LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
364
- WHERE
365
- tui.f_user_state = '正常'
366
- AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
367
- AND ${userCondition}`
368
- await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: addUser}},
369
- {resolveMsg: null, rejectMsg: '添加用户失败'})
370
- this.$showMessage('添加用户成功')
371
- this.selectBook = ''
372
- this.bookAll = false
373
- this.bookList = []
374
- this.showModal2 = false
375
- this.$refs.paged.$refs.criteria.search()
376
- }
377
- },
378
- async ok3() {
379
- if (!this.selectBook) {
380
- this.$showMessage('请选择片区')
381
- return
368
+ },
369
+ invoiceuseChange (val) {
370
+ // 查询已开票记录清空选项
371
+ if (val == 'is not null') {
372
+ this.rowsdata = []
373
+ this.radio = []
382
374
  }
383
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
384
- let userCondition = ''
385
- if (this.bookList.length < 1) {
386
- //tag
387
- userCondition = this.bookCondition
388
- } else {
389
- //tag)
375
+ },
390
376
 
391
- userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
392
- userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
393
- //tag
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)
394
396
  }
395
- let upUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
396
- FROM
397
- t_userinfo tui
398
- LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
399
- LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
400
- LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
401
- WHERE
402
- tui.f_user_state = '正常'
403
- AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
404
- AND ${userCondition}`
405
- await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: upUser}},
406
- {resolveMsg: null, rejectMsg: '调整用户失败'})
407
- this.$showMessage('调整用户成功')
408
- this.selectBook = ''
409
- this.bookAll = false
410
- this.bookList = []
411
- this.showModal3 = false
412
- this.$refs.paged.$refs.criteria.search()
413
397
  }
398
+ this.mergeRowData()
414
399
  },
415
- cancel2(){
416
- this.selectBook = ''
417
- this.bookAll = false
418
- this.bookList = []
419
- this.showModal2 = false
420
- this.$refs.paged.$refs.criteria.search()
400
+ importFile () {
401
+ this.show = true
421
402
  },
422
- cancel3(){
423
- this.selectBook = ''
424
- this.bookAll = false
425
- this.bookList = []
426
- this.showModal3 = false
427
- this.$refs.paged.$refs.criteria.search()
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()]
428
426
  },
429
- addUser () {
430
- if (!this.isCreateBook) {
431
- this.$showMessage('请选择查询未划分片区的用户')
432
- return
433
- }
434
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
435
- this.showModal2 = true
436
- this.freshCheckBook()
437
- return
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}' `
438
437
  }
439
- this.$showMessage('请选择用户')
438
+ this.condition = args.condition
439
+ this.$parent.condition = this.condition
440
+ this.model.search(args.condition, args.model)
440
441
  },
441
- upUser () {
442
- if (!this.isChangeBook) {
443
- this.$showMessage('请选择查询已划分片区的用户')
444
- return
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)
445
449
  }
446
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
447
- this.showModal3 = true
448
- this.freshCheckBook()
449
- return
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
450
460
  }
451
- this.$showMessage('请选择用户')
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
452
468
  },
453
- async delUser () {
454
- if (!this.isChangeBook) {
455
- this.$showMessage('请选择查询已划分片区的用户')
456
- return
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, [])
457
477
  }
458
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
459
- let userCondition= ''
460
- if (this.bookList.length < 1) {
461
- //tag
462
- userCondition = this.bookCondition
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)
463
495
  } else {
464
- //tag)
465
-
466
- userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
467
- userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
468
- //tag
496
+ this.all.$set(index, false)
469
497
  }
470
- let delUser= `update t_user_address set f_check_book_id =null
471
- FROM
472
- t_userinfo tui
473
- LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
474
- LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
475
- LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
476
- WHERE
477
- tui.f_user_state = '正常'
478
- AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
479
- AND ${userCondition}`
480
- await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: delUser}},
481
- {resolveMsg: null, rejectMsg: '删除片区失败'})
482
- this.$showMessage('从片区删除所选用户成功')
483
- this.selectBook = ''
484
- this.bookAll = false
485
- this.bookList = []
486
- this.showModal3 = false
487
- this.$refs.paged.$refs.criteria.search()
488
- return
498
+ } else {
499
+ // 数据
500
+ this.rowsdata[index][i] = []
501
+ // 不勾选
502
+ this.radio[index].$set(i, false)
503
+ // 任意取消一个则全选状态设为false
504
+ this.all.$set(index, false)
489
505
  }
490
- this.$showMessage('请选择用户')
506
+ this.mergeRowData()
491
507
  },
492
- beforeCreateBook () {
493
- if (!this.isCreateBook) {
494
- this.$showMessage('请选择查询未划分片区的用户')
495
- return
496
- }
497
- if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
498
- this.showModal = true
499
- return
500
- }
501
- this.$showMessage('请选择用户')
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]
502
513
  },
503
- ok () {
504
- //tag)
505
- let condition = ''
506
- if (!this.checkBook.f_check_book_name) {
507
- return this.$showMessage('请填写册名')
508
- }
509
- if (!this.checkBook.f_checker_name) {
510
- return this.$showMessage('请选择安检员')
511
- }
512
- if (!this.checkBook.f_around_time || !this.checkBook.f_around_unit) {
513
- return this.$showMessage('请选填写周期信息')
514
- }
515
- if (!this.checkBook.f_run_date) {
516
- return this.$showMessage('执行日期')
517
- }
518
- if (this.bookList.length < 1) {
519
- //tag
520
- condition = this.bookCondition
521
- } else {
522
- //tag)
514
+ async getmeterbook(){
515
+ await this.meterbook()
516
+ this.$emit('childre',this.meterbooks)
517
+ },
518
+ async initdata () {
519
+ this.initAreas(this.f_filialeids)
520
+ // 添加特殊地址选省市区
523
521
 
524
- condition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
525
- condition = 'tui.f_userinfo_id in (' + condition + ')'
526
- //tag
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
+ })
527
542
  }
528
- let data = {
529
- checkBook: this.checkBook,
530
- sqlStr: condition
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
+ }]
531
553
  }
532
- new HttpResetClass().load('post', 'rs/logic/AddCheckBook', {data}).then(res => {
533
- //tag)
534
- if (res.data.id) {
535
- this.$showMessage('创建成功')
536
- this.showModal = false
537
- this.isSearch = false
538
- this.bookList = []
539
- this.bookAll = false
540
- this.freshCheckBook()
541
- this.$refs.paged.$refs.criteria.search()
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
542
574
  }
543
575
  })
576
+ this.pcdslist = redata
577
+ console.log("xxxxxxxxxxxxxx")
578
+ console.log(this.pcdslist)
579
+ console.log("redataxxxxxxxx")
544
580
  },
545
- changeState (val) {
546
- //tag
547
- //tag
548
- this.bookAll = false
549
- this.bookList = []
550
- if (this.$refs.paged.$refs.criteria.model.f_orgid){
551
- this.$refs.paged.$refs.criteria.search()
552
- }
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")
553
606
  },
554
- cancel () {
555
- this.bookAll = false
556
- this.bookList = []
557
- this.showModal = false
558
- this.$refs.paged.$refs.criteria.search()
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
559
632
  },
560
- checkModel (row) {
561
- if (this.bookAll) {
562
- //tag)
563
- return true
564
- } else {
565
- // this.bookList = []
566
- if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
567
- return true
568
- } else {
569
- return false
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
570
642
  }
571
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
+ })
572
663
  },
573
- checkChange (row, e) {
574
- //tag
575
- if (e.target.checked) {
576
- this.bookList.push(row.f_userinfo_id)
577
- } else {
578
- this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
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
+ }
579
689
  }
580
- // //tag)
581
690
  },
582
- getRes (obj) {
583
- this.checkBook.f_orgid = obj.resids[0]
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
584
714
  },
585
- getResm (obj) {
586
- this.$refs.paged.$refs.criteria.model.f_orgid = this.$login.convertToIn(obj.resids)
715
+ async streetChange(val){
716
+ if(val){
717
+ await this.initcommunity(` f_filialeid = '${this.f_filialeids}' and f_street_id ='${val}' `)
718
+ }
587
719
  },
588
- hidden () {
589
- this.criteriaShow = !this.criteriaShow
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('用气类型')]
590
730
  },
591
- selfSearch (args) {
592
- this.isSearch = true
593
- this.bookAll = false
594
- this.bookList = []
595
-
596
- console.log("查询66666666666666666")
597
- this.$emit('book-condition',args.condition)
598
- // if (this.$refs.paged.$refs.criteria.model.f_orgid){
599
- // args.condition += `f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`
600
- // }
601
- args.condition += ` and f_user_type = '${this.showtype}' `
602
- this.model.search(args.condition, args.model)
731
+ usertags () {
732
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户标签')]
603
733
  },
604
- freshCheckBook () {
605
- this.checkBooks = []
606
- new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
607
- data: {
608
- items: 'id,f_check_book_name,f_check_book_type',
609
- tablename: 't_check_book',
610
- condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`:'1=1',
611
- orderitem: 'id desc'
734
+ ischecked () {
735
+ return function (index, i) {
736
+ if (!this.radio[index]) {
737
+ return false
612
738
  }
613
- }, {resolveMsg: null, rejectMsg: null}).then(res => {
614
- this.checkBooks.push({label: '全部', value: ''})
615
- res.data.forEach(ress => {
616
- console.log("片区类型",ress)
617
- if(ress.f_check_book_type ==='用户'){
618
- this.checkBooks.push({
619
- label: ress.f_check_book_name,
620
- value: ress.id
621
- })
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
622
754
  }
623
-
624
- })
625
- })
755
+ rs.push(temp)
756
+ }
757
+ }
758
+ this.inputtores2 = rs
759
+ return [ ...rs]
626
760
  }
627
761
  },
628
- beforeDestroy() {
629
- //tag
630
- bus.$off('fresh-user')
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
+ }
631
777
  },
632
- ready () {
633
- bus.$on('fresh-user',()=>{
634
- console.log("进入方法")
635
- this.bookAll = false
636
- this.bookList = []
637
- this.$refs.paged.$refs.criteria.search()
638
- })
639
- this.$refs.paged.$refs.criteria.model.f_is_checkbook = 'f_check_book_name is null'
640
- //tag
641
- // this.init=true
642
- this.freshCheckBook()
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
+ }
643
795
  }
644
796
  }
645
797
  </script>
646
- <style scoped>
647
- /*.btn-group > .btn:first-child {*/
648
- /* margin-left: 0;*/
649
- /* width: 100%;*/
650
- /*}*/
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
+ }
651
810
  </style>