sale-client 3.6.21 → 3.6.23

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 (88) hide show
  1. package/build/dev-server.js +1 -1
  2. package/package.json +2 -2
  3. package/src/components/FilesManage/FileUserFiles.vue +1014 -1014
  4. package/src/components/FilesManage/FileUserMerge.vue +203 -203
  5. package/src/components/FilesManage/UserPaperInfoTest.vue +58 -51
  6. package/src/components/FilesManageNew/FileUserFiles.vue +756 -756
  7. package/src/components/FilesManageNew/FileUserMerge.vue +202 -202
  8. package/src/components/charge/business/CardMeterCenter.vue +944 -944
  9. package/src/components/charge/business/IOTMeterCenter.vue +793 -793
  10. package/src/components/charge/business/OtherChargeNew.vue +550 -550
  11. package/src/components/charge/business/machine/MachineMeterCenter.vue +676 -676
  12. package/src/components/charge/gasloss/gasLossOperate.vue +383 -383
  13. package/src/components/newBill/CardMeterCenter.vue +902 -902
  14. package/src/components/newBill/IOTMeterCenter.vue +797 -797
  15. package/src/components/revenue/Common/EticketModal.vue +95 -90
  16. package/src/components/revenue/comprehen/Maintenance/T+MoneyDocking/moneyDocking.vue +202 -202
  17. package/src/components/revenue/comprehen/SpecialUser/BasicLiving/BasicLivingList.vue +280 -280
  18. package/src/filiale/alashan/business/CardMeterCenter.vue +897 -897
  19. package/src/filiale/ancheng/FilesManage/FileUserFiles.vue +1010 -1010
  20. package/src/filiale/ancheng/FilesManageNew/FileUserFiles.vue +763 -763
  21. package/src/filiale/chengtou/components/FilesManage/FileUserFiles.vue +1019 -1019
  22. package/src/filiale/chengtou/components/OtherChargeNew.vue +549 -549
  23. package/src/filiale/dongguan/components/FilesManage/FileUserFiles.vue +1037 -1037
  24. package/src/filiale/gaomi/components/FilesManage/FileUserFiles.vue +934 -934
  25. package/src/filiale/gehua/CardMeterCenter.vue +898 -898
  26. package/src/filiale/gehua/FileManageNew/FileUserFiles.vue +769 -769
  27. package/src/filiale/gehua/FileUserFiles.vue +1007 -1007
  28. package/src/filiale/gehua/IOTMeterCenter.vue +791 -791
  29. package/src/filiale/gehua/MachineMeterCenter.vue +685 -685
  30. package/src/filiale/gehua/OtherChargeNew.vue +558 -558
  31. package/src/filiale/guangxi/CardMeterCenter.vue +891 -891
  32. package/src/filiale/guangxi/IOTMeterCenter.vue +774 -774
  33. package/src/filiale/guangxi/MachineMeterCenter.vue +622 -622
  34. package/src/filiale/haile/MachineMeterCenter.vue +762 -762
  35. package/src/filiale/huayin/CardMeterCenter.vue +903 -903
  36. package/src/filiale/huayin/FileUserFiles.vue +1007 -1007
  37. package/src/filiale/huayin/IOTMeterCenter.vue +796 -796
  38. package/src/filiale/huayin/MachineMeterCenter.vue +680 -680
  39. package/src/filiale/jingwei/CardMeterCenter.vue +870 -870
  40. package/src/filiale/jingwei/FileUserFiles.vue +905 -905
  41. package/src/filiale/jingwei/ShowCardSellGas.vue +903 -903
  42. package/src/filiale/kelai/CardMeterCenter.vue +934 -934
  43. package/src/filiale/kelai/FileUserFiles.vue +762 -762
  44. package/src/filiale/kelai/IOTMeterCenter.vue +833 -833
  45. package/src/filiale/kelai/MachineMeterCenter.vue +705 -705
  46. package/src/filiale/konggang/FileUserFiles.vue +990 -990
  47. package/src/filiale/liaoyuan/FileUserFiles.vue +844 -844
  48. package/src/filiale/macheng/CardMeterCenter.vue +939 -939
  49. package/src/filiale/macheng/FileUserFiles.vue +930 -930
  50. package/src/filiale/meihekou/FileUserFiles.vue +995 -995
  51. package/src/filiale/ningjin/FileUserFiles.vue +1020 -1020
  52. package/src/filiale/qianneng/OtherChargeNew.vue +544 -544
  53. package/src/filiale/qianneng/eticket/EticketModal.vue +96 -91
  54. package/src/filiale/qianneng/eticket/EticketPrint.vue +377 -376
  55. package/src/filiale/qianneng/eticket/EticketRecordList.vue +309 -289
  56. package/src/filiale/qianneng/machine/MachineMeterCenter.vue +676 -676
  57. package/src/filiale/rizhao/FileUserFiles.vue +984 -984
  58. package/src/filiale/rizhao/IOTMeterCenter.vue +795 -795
  59. package/src/filiale/rongcheng/FileUserFiles.vue +881 -881
  60. package/src/filiale/rongcheng/FilesManageNew/FileUserFiles.vue +732 -732
  61. package/src/filiale/rongcheng/FilesManageNew/FileUserMerge.vue +202 -202
  62. package/src/filiale/shanggao/FileUserFiles.vue +995 -995
  63. package/src/filiale/shangluo/CardMeterCenter.vue +892 -892
  64. package/src/filiale/shangluo/IOTMeterCenter.vue +797 -797
  65. package/src/filiale/shangluo/MachineMeterCenter.vue +734 -734
  66. package/src/filiale/shanxian/OtherChargeNew.vue +561 -561
  67. package/src/filiale/shanxian/components/FilesManage/FileUserFiles.vue +1004 -1004
  68. package/src/filiale/shanxian/components/FilesManageNew/FileUserFiles.vue +756 -756
  69. package/src/filiale/shanxian/components/revenue/CardMeterCenter.vue +944 -944
  70. package/src/filiale/shaoguan/FilesManage/FileUserFiles.vue +881 -881
  71. package/src/filiale/shaoguan/FilesManageNew/FileUserFiles.vue +734 -734
  72. package/src/filiale/shexian/FilesManage/FileUserFiles.vue +991 -991
  73. package/src/filiale/tongchuan/BasicLivingList.vue +253 -253
  74. package/src/filiale/tongchuan/CardMeterCenter.vue +923 -923
  75. package/src/filiale/tongchuan/FileUserFiles.vue +1206 -1206
  76. package/src/filiale/tongchuan/bill/EticketModal.vue +90 -90
  77. package/src/filiale/tongchuan/filemanagenew/FileUserFiles.vue +842 -842
  78. package/src/filiale/wenxi/CardMeterCenter.vue +942 -942
  79. package/src/filiale/wenxi/FileUserFiles.vue +1032 -1032
  80. package/src/filiale/wenxi/IOTMeterCenter.vue +774 -774
  81. package/src/filiale/wuan/FileUserFiles.vue +1006 -1006
  82. package/src/filiale/wuhai/CardMeterCenter.vue +945 -945
  83. package/src/filiale/wuhai/IOTMeterCenter.vue +757 -757
  84. package/src/filiale/yuansheng/CardMeterCenter.vue +950 -950
  85. package/src/filiale/yuansheng/IOTMeterCenter.vue +788 -788
  86. package/src/filiale/zhongsheng/FilesManage/FileUserFiles.vue +1038 -1038
  87. package/src/filiale/zhongyi/FileUserFiles.vue +1020 -1020
  88. package/src/main.js +27 -27
@@ -1,881 +1,881 @@
1
- <template>
2
- <div id="file-user-files" class="binary">
3
- <div :class="{'basic-main': !createFile,'binary-left': createFile}" >
4
- <div class="flex" style="flex: 1;">
5
- <div style="flex: 1.2">
6
- <criteria-paged :model="model" v-ref:paged @sort="sort">
7
- <criteria @condition-changed="$parent.selfSearch" partial='criteria' v-ref:criteria>
8
- <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
9
- <div class="row">
10
- <div
11
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
12
- class="form-group">
13
- <label class="font_normal_body">组织机构</label>
14
- <res-select
15
- :initresid='$parent.$parent.curorgid'
16
- @res-select="$parent.$parent.getorg"
17
- is-mul="false"
18
- restype='organization'
19
- >
20
- </res-select>
21
- </div>
22
- <div
23
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
24
- class="form-group"
25
- v-if="$parent.$parent.clientWidth>1600">
26
- <label class="font_normal_body">客户编号</label>
27
- <input class="input_search" condition="f_userinfo_code = '{}'"
28
- placeholder='客户编号'
29
- style="width:60%" type="text" v-model="model.f_userinfo_code">
30
- </div>
31
- <div
32
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
33
- class="form-group"
34
- v-if="$parent.$parent.clientWidth<1600&&!$parent.$parent.createFile">
35
- <label class="font_normal_body">客户编号</label>
36
- <input class="input_search" condition="f_userinfo_code = '{}'"
37
- placeholder='客户编号'
38
- style="width:60%" type="text" v-model="model.f_userinfo_code">
39
- </div>
40
- <div
41
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
42
- class="form-group" v-if="!$parent.$parent.createFile">
43
- <label class="font_normal_body">客户名称</label>
44
- <input class="input_search" condition="f_user_name like '%{}%'"
45
- placeholder='客户姓名'
46
- style="width:60%" type="text" v-model="model.f_user_name">
47
- </div>
48
- <div :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
49
- class="form-group" v-if="!$parent.$parent.createFile">
50
- <label class="font_normal_body">小区域</label>
51
- <v-select :value.sync="model.f_small_area" v-model="model.f_small_area"
52
- :options='$parent.$parent.smallareas' placeholder='小区域'
53
- close-on-select :search='true'
54
- condition="f_small_area = '{}'"></v-select>
55
- </div>
56
- <div
57
- :class="{'col-sm-3':$parent.$parent.clientWidth>1600||!$parent.$parent.createFile,'col-sm-4':$parent.$parent.clientWidth<1600&&$parent.$parent.createFile}"
58
- class="form-group button-range">
59
- <!--<button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.showFileInfo()">查看批量状态-->
60
- <!--</button>-->
61
- <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.createInfoForFile()">批量建档
62
- </button>
63
- <button @click="$parent.$parent.createnewfile()" class="button_search button_spacing"
64
- style="float: right">建档
65
- </button>
66
- <button @click="search(), $parent.$parent.clean()" class="button_search button_spacing"
67
- style="float: right">查询
68
- </button>
69
- <button @click="$parent.$parent.clear()" class="button_clear button_spacing"
70
- style="float: right">清空
71
- </button>
72
- <button @click="$parent.$parent.importFile" class="button_export button_spacing"
73
- style="float: right" v-if="false">导入
74
- </button>
75
- <!-- <button class="button_search" style="width: 90px" @click=" $parent.$parent.selectaddress()">选择地址</button>-->
76
- <button @click="$parent.$parent.bulkOperations('批量销户', 'batch-cancellation')"
77
- class="button_search button_spacing"
78
- style="float: right"
79
- v-if="$parent.$parent.rows && $parent.$parent.rows.length === 1 && $parent.$parent.rows[0].f_user_state === '正常'">
80
- 销户
81
- </button>
82
- <button @click="$parent.$parent.bulkOperations('批量启用', 'batch-enable')"
83
- class="button_search button_spacing"
84
- style="float: right"
85
- v-if="$parent.$parent.rows && $parent.$parent.rows.length === 1 && $parent.$parent.rows[0].f_user_state === '销户'">
86
- 启用
87
- </button>
88
- <div
89
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
90
- @click="$parent.$parent.hidden()"
91
- class="button_spacing"
92
- style="float: right"></div>
93
- </div>
94
- </div>
95
- <div class="row" v-if="$parent.$parent.criteriaShow">
96
- <div
97
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
98
- class="form-group"
99
- v-if="$parent.$parent.clientWidth<1600&&$parent.$parent.createFile">
100
- <label class="font_normal_body">客户编号</label>
101
- <input class="input_search" condition="f_userinfo_code = '{}'"
102
- placeholder='客户编号'
103
- style="width:60%" type="text" v-model="model.f_userinfo_code">
104
- </div>
105
- <div
106
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
107
- class="form-group" v-if="$parent.$parent.createFile">
108
- <label class="font_normal_body">客户名称</label>
109
- <input class="input_search" condition="f_user_name = '{}'"
110
- placeholder='客户姓名'
111
- style="width:60%" type="text" v-model="model.f_user_name">
112
- </div>
113
- <div
114
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
115
- class="form-group">
116
- <label class="font_normal_body">旧客户号</label>
117
- <input class="input_search" condition="f_olduserinfo_code = '{}'" placeholder='客户编号'
118
- style="width:60%"
119
- type="text"
120
- v-model="model.f_olduserinfo_code">
121
- </div>
122
- <div
123
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
124
- class="form-group">
125
- <label class="font_normal_body">用户类型</label>
126
- <v-select :options='$parent.$parent.user_type' :value.sync="model.f_user_type"
127
- close-on-select condition="f_user_type='{}'"
128
- placeholder='用户类型' v-model="model.f_user_type"></v-select>
129
- </div>
130
- <div
131
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
132
- class="form-group">
133
- <label class="font_normal_body">用气性质</label>
134
- <v-select :options='$parent.$parent.gasproperties' :value.sync="model.f_gasproperties"
135
- close-on-select condition="f_gasproperties='{}'"
136
- placeholder='用气性质' v-model="model.f_gasproperties"></v-select>
137
- </div>
138
- <div
139
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
140
- class="form-group">
141
- <label class="font_normal_body">气表类型</label>
142
- <v-select :options='$parent.$parent.meter_classify' :value.sync="model.f_meter_classify"
143
- close-on-select condition="f_meter_classify='{}'"
144
- placeholder='气表类型' v-model="model.f_meter_classify"></v-select>
145
- </div>
146
- <div class="form-group" :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}">
147
- <label class="font_normal_body">气表品牌</label>
148
- <v-select :value.sync="model.f_meter_brand" multiple
149
- v-model="model.f_meter_brand"
150
- :options='$parent.$parent.meterbrands' placeholder='请选择'
151
- condition="f_meter_brand in {}"
152
- close-on-select></v-select>
153
- </div>
154
- <!-- <div-->
155
- <!-- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"-->
156
- <!-- class="form-group">-->
157
- <!-- <label class="font_normal_body">气表品牌</label>-->
158
- <!-- <v-select :options='$parent.$parent.meter_brand' :value.sync="model.f_meter_brand"-->
159
- <!-- close-on-select condition="f_meter_brand='{}'"-->
160
- <!-- placeholder='气表品牌' v-model="model.f_meter_brand"></v-select>-->
161
- <!-- </div>-->
162
- <div
163
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
164
- class="form-group">
165
- <label class="font_normal_body">客户电话</label>
166
- <input class="input_search" condition="f_user_phone = '{}'" placeholder='客户电话' style="width:60%"
167
- type="text"
168
- v-model="model.f_user_phone">
169
- </div>
170
- <div
171
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
172
- class="form-group">
173
- <label class="font_normal_body">客户地址</label>
174
- <input class="input_search" condition="f_address like '%{}%'" placeholder='客户地址' style="width:60%"
175
- type="text" v-model="model.f_address">
176
- </div>
177
- <div
178
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
179
- class="form-group">
180
- <label class="font_normal_body">客户状态</label>
181
- <v-select :options='$parent.$parent.userstates' :value.sync="model.f_user_state"
182
- close-on-select condition="f_user_state='{}'"
183
- placeholder='客户状态' v-model="model.f_user_state"></v-select>
184
- </div>
185
- <div
186
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
187
- class="form-group">
188
- <label class="font_normal_body">发卡状态</label>
189
- <v-select :options='$parent.$parent.f_whether_hairpin' :value.sync="model.f_whether_hairpin"
190
- close-on-select condition="f_whether_hairpin = '{}'"
191
- placeholder='发卡状态' v-model="model.f_whether_hairpin"></v-select>
192
- </div>
193
- <div
194
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
195
- class="form-group">
196
- <label class="font_normal_body">用&nbsp;&nbsp;气&nbsp;点</label>
197
- <input class="input_search" condition="f_userfiles_address like '%{}%'" placeholder='用气点名称' style="width:60%"
198
- type="text" v-model="model.f_userfiles_address">
199
- </div>
200
- <div
201
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
202
- class="form-group">
203
- <label class="font_normal_body" style="width: auto">天然气证</label>
204
- <v-select :options='$parent.$parent.usegas' :value.sync="model.f_send_usegas_card"
205
- close-on-select condition="f_send_usegas_card='{}'"
206
- placeholder='天然气使用证' v-model="model.f_send_usegas_card"></v-select>
207
- </div>
208
- <div
209
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
210
- class="form-group">
211
- <label class="font_normal_body">调&ensp;压&ensp;箱</label>
212
- <v-select :options='$parent.$parent.adjustables' :search='true'
213
- :value.sync="model.f_adjustable_id"
214
- close-on-select
215
- condition="f_adjustable_id = '{}'" placeholder='调压箱'
216
- v-model='model.f_adjustable_id'></v-select>
217
- </div>
218
- <div
219
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
220
- class="form-group">
221
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;区域&nbsp;&nbsp;&nbsp;</label>
222
- <v-select :value.sync="model.f_street"
223
- class="select_list select"
224
- enter-push
225
- multiple = "true"
226
- condition="f_street in {}"
227
- v-model="model.f_street"
228
- style="width: 60%"
229
- :options='$parent.$parent.street' placeholder='选择区域'
230
- close-on-select>
231
-
232
- </v-select>
233
- </div>
234
- <div
235
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
236
- class="form-group">
237
- <label class="font_normal_body">使用类型</label>
238
- <v-select :options='$parent.$parent.useoptions' :search='true'
239
- :value.sync="model.f_usetype"
240
- close-on-select
241
- condition="f_usetype = '{}'" placeholder='使用类型'
242
- v-model='model.f_usetype'></v-select>
243
- </div>
244
- <div
245
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
246
- class="form-group">
247
- <label class="font_normal_body">用户等级</label>
248
- <v-select :options='$parent.$parent.userlevel' :search='true'
249
- :value.sync="model.userlevel"
250
- close-on-select
251
- condition="f_user_level = '{}'" placeholder='用户等级'
252
- v-model='model.userlevel'></v-select>
253
- </div>
254
- <div
255
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
256
- class="form-group">
257
- <label class="font_normal_body">工业备注</label>
258
- <v-select :options='$parent.$parent.industrycomments' :value.sync="model.f_gongye_type"
259
- close-on-select condition="f_gongye_type='{}'"
260
- placeholder='工业备注' v-model="model.f_gongye_type"></v-select>
261
- </div>
262
- <div
263
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
264
- class="form-group">
265
- <label class="font_normal_body">地址状态</label>
266
- <v-select :options='$parent.$parent.f_address_states' :search='true'
267
- :value.sync="model.f_address_state"
268
- close-on-select
269
- condition="f_address_state = '{}'" placeholder='地址状态'
270
- v-model='model.f_address_state'></v-select>
271
- </div>
272
- </div>
273
- </div>
274
- </criteria>
275
- <data-grid :model="model" class="list_area table_sy" v-ref:grid partial='list'>
276
- <template partial='head'>
277
- <tr>
278
- <th>
279
- <nobr>序号</nobr>
280
- </th>
281
- <th>
282
- <nobr>客户编号</nobr>
283
- </th>
284
- <th>
285
- <nobr>客户名称</nobr>
286
- </th>
287
- <th>
288
- <nobr>客户电话</nobr>
289
- </th>
290
- <th v-if="!$parent.$parent.$parent.isOper">
291
- <nobr>地址信息</nobr>
292
- </th>
293
- <th>
294
- <nobr>用户类型</nobr>
295
- </th>
296
- <th>
297
- <nobr>用气性质</nobr>
298
- </th>
299
- <th>
300
- <nobr>气表类型</nobr>
301
- </th>
302
- <th>
303
- <nobr>气表品牌</nobr>
304
- </th>
305
- <th>
306
- <nobr>发卡状态</nobr>
307
- </th>
308
- <th>
309
- <nobr>通气时间</nobr>
310
- </th>
311
- <th>
312
- <nobr>状态</nobr>
313
- </th>
314
- <th>
315
- <nobr>建档日期</nobr>
316
- </th>
317
- <th>
318
- <nobr>地址状态</nobr>
319
- </th>
320
- <!--<th>-->
321
- <!--<nobr v-if="this.$login.r.includes('通知单打印')||this.$login.r.includes('流程表打印') ">下载</nobr>-->
322
- <!--</th>-->
323
- <th>
324
- <nobr>操作</nobr>
325
- </th>
326
- </tr>
327
- </template>
328
- <template partial='body'>
329
- <td style="text-align: center;">{{$index + 1}}</td>
330
- <td style="text-align: center;">{{row.f_userinfo_code}}</td>
331
- <td style="text-align: center;">{{row.f_user_name}}</td>
332
- <td style="text-align: center;">{{row.f_user_phone}}</td>
333
- <td style="text-align: center;" v-if="!$parent.$parent.$parent.isOper">{{row.f_address_detail ? row.f_address + row.f_address_detail :
334
- row.f_address}}
335
- </td>
336
- <td style="text-align: center;">{{row.f_user_type}}</td>
337
- <td style="text-align: center;">{{row.f_gasproperties}}</td>
338
- <td style="text-align: center;">{{row.f_meter_classify}}</td>
339
- <td style="text-align: center;">{{row.f_meter_brand}}</td>
340
- <td style="text-align: center;">{{row.f_whether_hairpin}}</td>
341
- <td style="text-align: center;">{{row.f_gas_date}}</td>
342
- <td style="text-align: center;">{{row.f_user_state}}</td>
343
- <td style="text-align: center;">{{row.f_createfile_date}}</td>
344
- <td style="text-align: center;">{{row.f_address_state}}</td>
345
- <td style="text-align: center;">
346
- <button type="button" name="button" class="btn btn-link" v-if="row.f_user_state === '正常' || row.f_user_state==='预备'"
347
- @click.stop="$parent.$parent.$parent.modifyUser(row)">修正
348
- </button>
349
- </td>
350
- </template>
351
- </data-grid>
352
- </criteria-paged>
353
- </div>
354
-
355
- <modal v-if="batcan || batenable" :show.sync="batcan || batenable" width="800px" v-ref:modal large backdrop="false">
356
- <article slot="modal-body" class="modal-body">
357
- <batch-cancellation v-if="batcan" :useraccount="model.rows" @clean="batchClean"
358
- @success="batchSuccess"></batch-cancellation>
359
- <batch-enable v-if="batenable" :useraccount="model.rows" @clean="batchClean"
360
- @success="batchSuccess"></batch-enable>
361
- </article>
362
- <footer slot="modal-footer" class="modal-footer">
363
- </footer>
364
- </modal>
365
-
366
-
367
- </div>
368
- </div>
369
- <div class="binary-right" :style="{width:'70%'}" v-if="createFile">
370
- <div class="auto" style="height: 100%; margin-top: 1%" >
371
- <file-user-general-info :f_filialeid="f_filialeid" :row="row" :areainfo="areainfo"
372
- :haslimit="config.hasLimit" @success="renew" @clean="clean"
373
- :isedit="isedit"
374
- @build-success="buildFileSuccess" v-ref:info></file-user-general-info>
375
- </div>
376
- </div>
377
-
378
- <modal :show.sync="show" width="500px" title="文件导入" v-ref:modal large backdrop="false">
379
- <article slot="modal-body" class="modal-body">
380
- <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
381
- action="rs/file/uploadFile" tagname="导入档案" v-ref:file :headers="headers"></file-upload>
382
- </article>
383
- <footer slot="modal-footer" class="modal-footer">
384
- </footer>
385
- </modal>
386
- <modal :show.sync="batchMeterShow" width="500px" title="文件导入" v-ref:modal large backdrop="false">
387
- <article slot="modal-body" class="modal-body">
388
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
389
- </article>
390
- <footer slot="modal-footer" class="modal-footer">
391
- </footer>
392
- </modal>
393
-
394
- <modal :show.sync="resshow" width="500px" title="建档成功" v-ref:modal large backdrop="false">
395
- <article slot="modal-body" class="modal-body" style="height: 70px">
396
- <div>
397
- <label class="font_normal_body" style="line-height: 20px">客户编号</label>
398
- <input class="input_search" condition="f_userinfo_code = '{}'"
399
- placeholder='客户编号' disabled
400
- type="text" v-model="resdata">
401
- </div>
402
- </article>
403
- <footer slot="modal-footer" class="modal-footer">
404
- <button class="button_search button_spacing" type="button" @click="doCopy()">复制</button>
405
- <button class="button_search button_spacing" type="button" @click="close2()">取消</button>
406
- </footer>
407
- </modal>
408
- <!--<user-flow-sheet :show="printflag" :bill-config='configs' :bill-data='billData' :data='newdata' v-on:toggle="close" @printok="printok" v-ref:printbill></user-flow-sheet>-->
409
-
410
- <work-busy :is-busy="iswork" v-show="iswork"></work-busy>
411
- </div>
412
- </template>
413
-
414
- <script>
415
- import {PagedList, HttpResetClass} from 'vue-client'
416
- import Vue from 'vue'
417
- import co from 'co'
418
- import axios from 'axios'
419
-
420
- let loadParamGem = async function (self) {
421
- await self.$getConfig(self, 'UserFiles')
422
- self.headers.username = Vue.$login.f.name
423
- self.headers.username = Vue.$login.guid()
424
- await self.$LoadParams.loadParam(self.f_filialeid)
425
- // await self.$LoadParams.loadMeterBook(self.f_filialeid)
426
- await self.search()
427
- await self.getaddress()
428
- self.initAdjustables()
429
- }
430
-
431
- let addressInfoGen = async function (self, areainfo) {
432
- areainfo.isEdit = false
433
- if (areainfo.file_num > 0 && !areainfo.f_userinfo_id) {
434
- // 完善
435
- // 将表档案信息带入,完善客户信息
436
- let getMetersInfo = await self.$resetpost('rs/logic/sale_getMeterByAddress', {
437
- data: {
438
- f_useraddress_id: areainfo.id
439
- }
440
- }, {resolveMsg: null, rejectMsg: '获取表信息出错'})
441
- areainfo.meter = getMetersInfo.data[0]
442
- }
443
- if (areainfo.file_num > 0 && areainfo.f_userinfo_id) {
444
- // 添加 将客户信息带入
445
- let getUserinfo = await self.$resetpost('rs/sql/saleSingleTable', {
446
- data: {
447
- tablename: 't_userinfo',
448
- condition: `f_userinfo_id = '${areainfo.f_userinfo_id}'`
449
- }
450
- }, {resolveMsg: null, rejectMsg: '获取档案出错'})
451
-
452
- areainfo.user = getUserinfo.data[0]
453
- }
454
- self.bulidFiles(areainfo)
455
- }
456
-
457
- export default {
458
- 'title': '档案信息',
459
- data () {
460
- return {
461
- iswork: false,
462
- config: {
463
- createType: ['address', 'area'], // 建档方式: address-地址建档 area-小区建档
464
- hasLimit: true
465
- },
466
- model: new PagedList('rs/sql/filemanage_getUserfies', 30, {orderitem: '"f_userinfo_id DESC"'}),
467
- row: null, // 选择一条客户信息,对其进行修改
468
- areainfo: null, // 小区批量建档使用的数据
469
- rows: [], // 客户档案选择一条时,将只显示一条信息,rows用来存放整页的数据
470
- headers: {'username': this.$login.f.name, 'blodid': this.$login.guid()},
471
- contract: [{label: '全部', value: ' is null or f_contract_id is not null'}, {
472
- label: '有',
473
- value: ' is not null'
474
- },
475
- {label: '无', value: ' is null'}],
476
- orderDefault: 'f_createfile_date desc',
477
- orderFields: {
478
- f_userinfo_id: 'no'
479
- },
480
-
481
- createFile: false,
482
-
483
- curorgid: [this.$login.f.orgid],
484
- f_filialeid: this.$login.f.orgid,
485
-
486
- // 销户启用
487
- batcan: false,
488
- batenable: false,
489
- version: '',
490
-
491
- inputtores: this.$appdata.getParam('抄表员'),
492
- adjustables: [],
493
-
494
- // 导入组件
495
- show: false,
496
-
497
- // 点击建档或修正时控制列表展示, 防止拥挤
498
- isOper: false,
499
-
500
- criteriaShow: false,
501
- industrycomments: this.$appdata.getParam('工业备注') ? [{
502
- label: '全部',
503
- value: ''
504
- }, ...this.$appdata.getParam('工业备注')] : [],
505
- gasproperties: this.$appdata.getParam('用气性质') ? [{
506
- label: '全部',
507
- value: ''
508
- }, ...this.$appdata.getParam('用气性质')] : [],
509
- user_type: this.$appdata.getParam('用户类型') ? [{
510
- label: '全部',
511
- value: ''
512
- }, ...this.$appdata.getParam('用户类型')] : [],
513
- meter_classify: this.$appdata.getParam('气表类型') ? [{
514
- label: '全部',
515
- value: ''
516
- }, ...this.$appdata.getParam('气表类型')] : [],
517
- meterbrands: [],
518
- f_whether_hairpin: this.$appdata.getParam('发卡状态') ? [{
519
- label: '全部',
520
- value: ''
521
- }, ...this.$appdata.getParam('发卡状态')] : [],
522
- showselectaddress: false,
523
- isedit: false,
524
- clientWidth: document.body.clientWidth,
525
- batchMeterShow: false,
526
- billData: {
527
- url: 'rs/report/userignition',
528
- bill: ''
529
- },
530
- configs: {
531
- hasPrint: false, // 默认打票
532
- hasBillManage: false // 默认不启用发票管理
533
- },
534
- printflag: false,
535
- newdata: {},
536
- resdata: '',
537
- street: [],
538
- resshow: false,
539
- useoptions: this.$appdata.getParam('使用类型'),
540
- f_address_states:[{lable:'全部',value:''},...this.$appdata.getParam('地址状态')],
541
- userlevel: this.$appdata.getParam('用户等级') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')] : []
542
- }
543
- },
544
- ready () {
545
- loadParamGem(this)
546
- },
547
- compiled () {
548
- window.onresize = () => {
549
- return (() => {
550
- this.clientWidth = document.body.clientWidth
551
- })()
552
- }
553
- },
554
- methods: {
555
- async doCopy () {
556
- await this.$copyText(this.resdata)
557
- this.resshow = false
558
- this.$showAlert(`内容已复制到剪切板!`, 'success', 2000)
559
- },
560
- async getaddress () {
561
- let street = await this.$resetpost('rs/sql/manage_getstreetlist', {
562
- data: {
563
- condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
564
- }
565
- }, {resolveMsg: null, rejectMsg: '获取区域失败!'})
566
- console.log('区域', street)
567
- let abc = []
568
- for (let row of street.data) {
569
- console.log('开始保存区域')
570
- abc.push({label: row.f_street, value: row.f_street})
571
- }
572
- this.street = abc
573
- },
574
- close () {
575
- this.printflag = false
576
- this.clean()
577
- },
578
- close2 () {
579
- this.resshow = false
580
- },
581
- closemodal () {
582
- this.batchMeterShow = false
583
- },
584
- createInfoForFile () {
585
- this.batchMeterShow = true
586
- },
587
- hidden () {
588
- this.criteriaShow = !this.criteriaShow
589
- },
590
- search () {
591
- // this.$refs.paged.$refs.criteria.search()
592
- },
593
- modifyUser (row) {
594
- this.isOper = true
595
- this.createFile = true
596
- this.isedit = true
597
- this.row = row
598
- this.areainfo = null
599
- this.row.version = row.version
600
- },
601
- clean () {
602
- this.createFile = false
603
- this.row = null
604
- this.isOper = false
605
- this.areainfo = null
606
- // this.$refs.paged.$refs.grid.select(null)
607
- this.$refs.paged.$refs.grid.model.rows = this.rows
608
- },
609
- createnewfile () {
610
- this.isOper = true
611
- this.createFile = true
612
- this.isedit = false
613
- this.row = null
614
- this.areainfo = null
615
- this.$refs.info.clearinfo()
616
- },
617
- renew () {
618
- this.row = null
619
- this.areainfo = null
620
- this.isOper = false
621
- this.$refs.info.clearinfo()
622
- this.clearCondition()
623
- this.search()
624
- // 建档或修正档案成功刷新地址列表
625
- this.$refs.addressfiles.$refs.paged.$refs.cri.search()
626
- },
627
- clearCondition () {
628
- Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
629
- this.$refs.paged.$refs.criteria.model[key] = ''
630
- })
631
- },
632
-
633
- bulkOperations (name, type) {
634
- if (name === '批量销户') {
635
- this.batcan = true
636
- this.batenable = false
637
- this.newArea = false
638
- } else if (name === '批量启用') {
639
- this.batenable = true
640
- this.batcan = false
641
- this.newArea = false
642
- }
643
- },
644
- batchSuccess () {
645
- this.clearCondition()
646
- this.batchClean()
647
- },
648
- batchClean () {
649
- this.batcan = false
650
- this.batenable = false
651
- this.newArea = false
652
- this.search()
653
- },
654
- buildFile (row) {
655
- // console.log('我是建档。。。', row)
656
- this.row = row
657
- },
658
- // 小区批量建档
659
- bulidFiles (row) {
660
- this.row = null
661
- this.areainfo = row
662
- // 将列表的数据清空
663
- this.$refs.paged.$refs.grid.model.rows = []
664
- },
665
- // 小区批量建档成功
666
- buildFileSuccess (data) {
667
- // console.log('建档案成功', data)
668
- this.model.rows.unshift(data)
669
- },
670
- selfSearch (args) {
671
- console.log('开始查询档案', this.f_filialeid)
672
- if (!this.f_filialeid) {
673
- this.f_filialeid = this.$login.f.orgid
674
- }
675
- args.condition = `${args.condition} and f_filialeid = '${this.f_filialeid}'`
676
- this.criteriaShow = false
677
- this.$refs.paged.$refs.grid.$el.scrollTop = 0
678
- this.model.search(args.condition, args.model)
679
- this.clean()
680
- },
681
- // printok () {
682
- // console.log("======================")
683
- // //this.$dispatch('success')
684
- // },
685
- sort (field, rule) {
686
- // 将所有排序方式设为不排序,实现相互排斥
687
- for (let key in this.orderFields) {
688
- if (key === field) {
689
- this.orderFields[key] = rule
690
- } else {
691
- this.orderFields[key] = 'no'
692
- }
693
- }
694
- // 如果新规则不排序,还原为默认排序
695
- if (rule === 'no') {
696
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
697
- } else {
698
- this.model.paramSource.orderitem = `'${field} ${rule}'`
699
- }
700
-
701
- this.search()
702
- },
703
-
704
- getLocation (row) {
705
- // 可能会存在添加,完善,建档
706
- addressInfoGen(this, row)
707
- },
708
- areaFiles (row) {
709
- row.isEdit = true
710
- row.f_residential_area_id = row.id
711
- // row.id = null
712
- delete row.id
713
- this.bulidFiles(row)
714
- },
715
- initAdjustables () {
716
- console.log('初始化调压箱', this.$GetSaleParam)
717
- let arr = []
718
- let filter = this.$login.f.orgid
719
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
720
- let temp = {}
721
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
722
- temp.value = `${item.value.id}`
723
- arr.push(temp)
724
- })
725
- this.adjustables = [{label: '全部', value: ''}, ...arr]
726
- // 初始化气表品牌
727
- let brandArr = []
728
- this.$GetSaleParam.getGasbrand().forEach((item) => {
729
- let temp1 = {}
730
- temp1.label = item.label
731
- temp1.value = item.value.f_meter_brand
732
- brandArr.push(temp1)
733
- })
734
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
735
- },
736
- importFile () {
737
- this.show = true
738
- },
739
- clear () {
740
- Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
741
- this.$refs.paged.$refs.criteria.model[key] = []
742
- })
743
- },
744
- getorg (val) {
745
- this.f_filialeid = val[0]
746
- }
747
- },
748
- computed: {
749
- smallareas () {
750
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')]
751
- },
752
- userstates () {
753
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('客户状态')]
754
- },
755
- usegas () {
756
- return [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}]
757
- },
758
- areas () {
759
- let rs = []
760
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
761
- let temp = {
762
- label: this.$login.f.f_allArea[i].label,
763
- value: this.$login.f.f_allArea[i].label
764
- }
765
- rs.push(temp)
766
- }
767
- return [{label: '全部', value: ''}, ...rs]
768
- },
769
- firestates () {
770
- return [
771
- {label: '全部', value: ''},
772
- {label: '点火', value: '1'},
773
- {label: '未点火', value: '0'}
774
- ]
775
- },
776
- jurisdiction () {
777
- return this.$login.r
778
- }
779
- },
780
- watch: {
781
- // 每次查询将查询到的数据存储起来,供选择操作后的替换
782
- 'model.state' (val) {
783
- if (val === '正确') {
784
- this.rows = this.model.rows
785
- }
786
- },
787
- 'f_filialeid' (val) {
788
- loadParamGem(this)
789
- }
790
- },
791
- events: {
792
- FileUpload: function (file, res) {
793
- let data = {
794
- tablename: 't_userinfo',
795
- filepath: res.path
796
- }
797
- this.$resetpost('rs/logic/import', data, {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
798
- this.close()
799
- this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
800
- this.search()
801
- })
802
- },
803
- 'onFileUpload': async function (file, res) {
804
- if (this.batchMeterShow) {
805
- this.iswork = true
806
- // 当前上传的是批量导入的档案
807
- let param = {
808
- filepath: res.f_downloadpath,
809
- f_operator: this.$login.f.name,
810
- f_operatorid: this.$login.f.id,
811
- f_orgid: this.$login.f.orgid,
812
- f_orgname: this.$login.f.orgs,
813
- f_depid: this.$login.f.depids,
814
- f_depname: this.$login.f.deps
815
- }
816
- let self = this
817
- try {
818
- await axios.post('rs/logic/newSettleFileImport',
819
- {data: param}, {timeout: 10 * 60 * 1000}).then((res) => {
820
- if (res.data) {
821
- self.$showMessage(`本次上传共上传${res.data.totalsum}条数据, 成功${res.data.successnum}条,失败${res.data.errorsum}条,具体失败数据请在稽查查询错误查询中查看!!`)
822
- self.iswork = false
823
- // this.$showAlert('导入成功','success',2000)
824
- }
825
- })
826
- } catch (error) {
827
- if (error.response) {
828
- if (error.response.status == 500) {
829
- this.$showAlert('服务繁忙,请重试!!!', 'danger', 3000)
830
- } else if (error.response.status == 404) {
831
- this.$showAlert('服务运行中,请耐心等待后进行重试!!', 'danger', 3000)
832
- } else {
833
- this.$showAlert(error.response.data, 'danger', 2000)
834
- }
835
- console.log(error.response.data)
836
- console.log(error.response.status)
837
- console.log(error.response.headers)
838
- } else if (error.request) {
839
- console.log(error.request)
840
- this.$showAlert(error.request, 'danger', 2000)
841
- } else {
842
- console.log('Error', error.message)
843
- this.$showAlert(error.message, 'danger', 2000)
844
- }
845
- this.iswork = false
846
- }
847
- this.batchMeterShow = false
848
- // this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
849
- this.search()
850
- } else {
851
- let data = {
852
- tablename: 't_userinfo',
853
- filepath: res.f_downloadpath,
854
- f_operator: this.$login.f.name,
855
- f_operatorid: this.$login.f.id,
856
- f_orgid: this.$login.f.orgid,
857
- f_orgname: this.$login.f.orgs,
858
- f_depid: this.$login.f.depids,
859
- f_depname: this.$login.f.deps
860
- }
861
- this.$resetpost('rs/logic/sale_userfilesImp', {data: data}, {
862
- resolveMsg: null,
863
- rejectMsg: '上传失败'
864
- }).then((res) => {
865
- this.show = false
866
- this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
867
- this.search()
868
- })
869
- }
870
- },
871
- 'confirmaddress' (res) {
872
- console.log('选定地址', res)
873
- }
874
- }
875
- }
876
- </script>
877
- <style>
878
- .nav-tabss ul > li > a {
879
- padding: 5px 10px;
880
- }
881
- </style>
1
+ <template>
2
+ <div id="file-user-files" class="binary">
3
+ <div :class="{'basic-main': !createFile,'binary-left': createFile}" >
4
+ <div class="flex" style="flex: 1;">
5
+ <div style="flex: 1.2">
6
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
7
+ <criteria @condition-changed="$parent.selfSearch" partial='criteria' v-ref:criteria>
8
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
9
+ <div class="row">
10
+ <div
11
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
12
+ class="form-group">
13
+ <label class="font_normal_body">组织机构</label>
14
+ <res-select
15
+ :initresid='$parent.$parent.curorgid'
16
+ @res-select="$parent.$parent.getorg"
17
+ is-mul="false"
18
+ restype='organization'
19
+ >
20
+ </res-select>
21
+ </div>
22
+ <div
23
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
24
+ class="form-group"
25
+ v-if="$parent.$parent.clientWidth>1600">
26
+ <label class="font_normal_body">客户编号</label>
27
+ <input class="input_search" condition="f_userinfo_code = '{}'"
28
+ placeholder='客户编号'
29
+ style="width:60%" type="text" v-model="model.f_userinfo_code">
30
+ </div>
31
+ <div
32
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
33
+ class="form-group"
34
+ v-if="$parent.$parent.clientWidth<1600&&!$parent.$parent.createFile">
35
+ <label class="font_normal_body">客户编号</label>
36
+ <input class="input_search" condition="f_userinfo_code = '{}'"
37
+ placeholder='客户编号'
38
+ style="width:60%" type="text" v-model="model.f_userinfo_code">
39
+ </div>
40
+ <div
41
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
42
+ class="form-group" v-if="!$parent.$parent.createFile">
43
+ <label class="font_normal_body">客户名称</label>
44
+ <input class="input_search" condition="f_user_name like '%{}%'"
45
+ placeholder='客户姓名'
46
+ style="width:60%" type="text" v-model="model.f_user_name">
47
+ </div>
48
+ <div :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
49
+ class="form-group" v-if="!$parent.$parent.createFile">
50
+ <label class="font_normal_body">小区域</label>
51
+ <v-select :value.sync="model.f_small_area" v-model="model.f_small_area"
52
+ :options='$parent.$parent.smallareas' placeholder='小区域'
53
+ close-on-select :search='true'
54
+ condition="f_small_area = '{}'"></v-select>
55
+ </div>
56
+ <div
57
+ :class="{'col-sm-3':$parent.$parent.clientWidth>1600||!$parent.$parent.createFile,'col-sm-4':$parent.$parent.clientWidth<1600&&$parent.$parent.createFile}"
58
+ class="form-group button-range">
59
+ <!--<button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.showFileInfo()">查看批量状态-->
60
+ <!--</button>-->
61
+ <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.createInfoForFile()">批量建档
62
+ </button>
63
+ <button @click="$parent.$parent.createnewfile()" class="button_search button_spacing"
64
+ style="float: right">建档
65
+ </button>
66
+ <button @click="search(), $parent.$parent.clean()" class="button_search button_spacing"
67
+ style="float: right">查询
68
+ </button>
69
+ <button @click="$parent.$parent.clear()" class="button_clear button_spacing"
70
+ style="float: right">清空
71
+ </button>
72
+ <button @click="$parent.$parent.importFile" class="button_export button_spacing"
73
+ style="float: right" v-if="false">导入
74
+ </button>
75
+ <!-- <button class="button_search" style="width: 90px" @click=" $parent.$parent.selectaddress()">选择地址</button>-->
76
+ <button @click="$parent.$parent.bulkOperations('批量销户', 'batch-cancellation')"
77
+ class="button_search button_spacing"
78
+ style="float: right"
79
+ v-if="$parent.$parent.rows && $parent.$parent.rows.length === 1 && $parent.$parent.rows[0].f_user_state === '正常'">
80
+ 销户
81
+ </button>
82
+ <button @click="$parent.$parent.bulkOperations('批量启用', 'batch-enable')"
83
+ class="button_search button_spacing"
84
+ style="float: right"
85
+ v-if="$parent.$parent.rows && $parent.$parent.rows.length === 1 && $parent.$parent.rows[0].f_user_state === '销户'">
86
+ 启用
87
+ </button>
88
+ <div
89
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
90
+ @click="$parent.$parent.hidden()"
91
+ class="button_spacing"
92
+ style="float: right"></div>
93
+ </div>
94
+ </div>
95
+ <div class="row" v-if="$parent.$parent.criteriaShow">
96
+ <div
97
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
98
+ class="form-group"
99
+ v-if="$parent.$parent.clientWidth<1600&&$parent.$parent.createFile">
100
+ <label class="font_normal_body">客户编号</label>
101
+ <input class="input_search" condition="f_userinfo_code = '{}'"
102
+ placeholder='客户编号'
103
+ style="width:60%" type="text" v-model="model.f_userinfo_code">
104
+ </div>
105
+ <div
106
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
107
+ class="form-group" v-if="$parent.$parent.createFile">
108
+ <label class="font_normal_body">客户名称</label>
109
+ <input class="input_search" condition="f_user_name like '%{}%'"
110
+ placeholder='客户姓名'
111
+ style="width:60%" type="text" v-model="model.f_user_name">
112
+ </div>
113
+ <div
114
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
115
+ class="form-group">
116
+ <label class="font_normal_body">旧客户号</label>
117
+ <input class="input_search" condition="f_olduserinfo_code = '{}'" placeholder='客户编号'
118
+ style="width:60%"
119
+ type="text"
120
+ v-model="model.f_olduserinfo_code">
121
+ </div>
122
+ <div
123
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
124
+ class="form-group">
125
+ <label class="font_normal_body">用户类型</label>
126
+ <v-select :options='$parent.$parent.user_type' :value.sync="model.f_user_type"
127
+ close-on-select condition="f_user_type='{}'"
128
+ placeholder='用户类型' v-model="model.f_user_type"></v-select>
129
+ </div>
130
+ <div
131
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
132
+ class="form-group">
133
+ <label class="font_normal_body">用气性质</label>
134
+ <v-select :options='$parent.$parent.gasproperties' :value.sync="model.f_gasproperties"
135
+ close-on-select condition="f_gasproperties='{}'"
136
+ placeholder='用气性质' v-model="model.f_gasproperties"></v-select>
137
+ </div>
138
+ <div
139
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
140
+ class="form-group">
141
+ <label class="font_normal_body">气表类型</label>
142
+ <v-select :options='$parent.$parent.meter_classify' :value.sync="model.f_meter_classify"
143
+ close-on-select condition="f_meter_classify='{}'"
144
+ placeholder='气表类型' v-model="model.f_meter_classify"></v-select>
145
+ </div>
146
+ <div class="form-group" :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}">
147
+ <label class="font_normal_body">气表品牌</label>
148
+ <v-select :value.sync="model.f_meter_brand" multiple
149
+ v-model="model.f_meter_brand"
150
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
151
+ condition="f_meter_brand in {}"
152
+ close-on-select></v-select>
153
+ </div>
154
+ <!-- <div-->
155
+ <!-- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"-->
156
+ <!-- class="form-group">-->
157
+ <!-- <label class="font_normal_body">气表品牌</label>-->
158
+ <!-- <v-select :options='$parent.$parent.meter_brand' :value.sync="model.f_meter_brand"-->
159
+ <!-- close-on-select condition="f_meter_brand='{}'"-->
160
+ <!-- placeholder='气表品牌' v-model="model.f_meter_brand"></v-select>-->
161
+ <!-- </div>-->
162
+ <div
163
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
164
+ class="form-group">
165
+ <label class="font_normal_body">客户电话</label>
166
+ <input class="input_search" condition="f_user_phone = '{}'" placeholder='客户电话' style="width:60%"
167
+ type="text"
168
+ v-model="model.f_user_phone">
169
+ </div>
170
+ <div
171
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
172
+ class="form-group">
173
+ <label class="font_normal_body">客户地址</label>
174
+ <input class="input_search" condition="f_address like '%{}%'" placeholder='客户地址' style="width:60%"
175
+ type="text" v-model="model.f_address">
176
+ </div>
177
+ <div
178
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
179
+ class="form-group">
180
+ <label class="font_normal_body">客户状态</label>
181
+ <v-select :options='$parent.$parent.userstates' :value.sync="model.f_user_state"
182
+ close-on-select condition="f_user_state='{}'"
183
+ placeholder='客户状态' v-model="model.f_user_state"></v-select>
184
+ </div>
185
+ <div
186
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
187
+ class="form-group">
188
+ <label class="font_normal_body">发卡状态</label>
189
+ <v-select :options='$parent.$parent.f_whether_hairpin' :value.sync="model.f_whether_hairpin"
190
+ close-on-select condition="f_whether_hairpin = '{}'"
191
+ placeholder='发卡状态' v-model="model.f_whether_hairpin"></v-select>
192
+ </div>
193
+ <div
194
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
195
+ class="form-group">
196
+ <label class="font_normal_body">用&nbsp;&nbsp;气&nbsp;点</label>
197
+ <input class="input_search" condition="f_userfiles_address like '%{}%'" placeholder='用气点名称' style="width:60%"
198
+ type="text" v-model="model.f_userfiles_address">
199
+ </div>
200
+ <div
201
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
202
+ class="form-group">
203
+ <label class="font_normal_body" style="width: auto">天然气证</label>
204
+ <v-select :options='$parent.$parent.usegas' :value.sync="model.f_send_usegas_card"
205
+ close-on-select condition="f_send_usegas_card='{}'"
206
+ placeholder='天然气使用证' v-model="model.f_send_usegas_card"></v-select>
207
+ </div>
208
+ <div
209
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
210
+ class="form-group">
211
+ <label class="font_normal_body">调&ensp;压&ensp;箱</label>
212
+ <v-select :options='$parent.$parent.adjustables' :search='true'
213
+ :value.sync="model.f_adjustable_id"
214
+ close-on-select
215
+ condition="f_adjustable_id = '{}'" placeholder='调压箱'
216
+ v-model='model.f_adjustable_id'></v-select>
217
+ </div>
218
+ <div
219
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
220
+ class="form-group">
221
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;区域&nbsp;&nbsp;&nbsp;</label>
222
+ <v-select :value.sync="model.f_street"
223
+ class="select_list select"
224
+ enter-push
225
+ multiple = "true"
226
+ condition="f_street in {}"
227
+ v-model="model.f_street"
228
+ style="width: 60%"
229
+ :options='$parent.$parent.street' placeholder='选择区域'
230
+ close-on-select>
231
+
232
+ </v-select>
233
+ </div>
234
+ <div
235
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
236
+ class="form-group">
237
+ <label class="font_normal_body">使用类型</label>
238
+ <v-select :options='$parent.$parent.useoptions' :search='true'
239
+ :value.sync="model.f_usetype"
240
+ close-on-select
241
+ condition="f_usetype = '{}'" placeholder='使用类型'
242
+ v-model='model.f_usetype'></v-select>
243
+ </div>
244
+ <div
245
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
246
+ class="form-group">
247
+ <label class="font_normal_body">用户等级</label>
248
+ <v-select :options='$parent.$parent.userlevel' :search='true'
249
+ :value.sync="model.userlevel"
250
+ close-on-select
251
+ condition="f_user_level = '{}'" placeholder='用户等级'
252
+ v-model='model.userlevel'></v-select>
253
+ </div>
254
+ <div
255
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
256
+ class="form-group">
257
+ <label class="font_normal_body">工业备注</label>
258
+ <v-select :options='$parent.$parent.industrycomments' :value.sync="model.f_gongye_type"
259
+ close-on-select condition="f_gongye_type='{}'"
260
+ placeholder='工业备注' v-model="model.f_gongye_type"></v-select>
261
+ </div>
262
+ <div
263
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
264
+ class="form-group">
265
+ <label class="font_normal_body">地址状态</label>
266
+ <v-select :options='$parent.$parent.f_address_states' :search='true'
267
+ :value.sync="model.f_address_state"
268
+ close-on-select
269
+ condition="f_address_state = '{}'" placeholder='地址状态'
270
+ v-model='model.f_address_state'></v-select>
271
+ </div>
272
+ </div>
273
+ </div>
274
+ </criteria>
275
+ <data-grid :model="model" class="list_area table_sy" v-ref:grid partial='list'>
276
+ <template partial='head'>
277
+ <tr>
278
+ <th>
279
+ <nobr>序号</nobr>
280
+ </th>
281
+ <th>
282
+ <nobr>客户编号</nobr>
283
+ </th>
284
+ <th>
285
+ <nobr>客户名称</nobr>
286
+ </th>
287
+ <th>
288
+ <nobr>客户电话</nobr>
289
+ </th>
290
+ <th v-if="!$parent.$parent.$parent.isOper">
291
+ <nobr>地址信息</nobr>
292
+ </th>
293
+ <th>
294
+ <nobr>用户类型</nobr>
295
+ </th>
296
+ <th>
297
+ <nobr>用气性质</nobr>
298
+ </th>
299
+ <th>
300
+ <nobr>气表类型</nobr>
301
+ </th>
302
+ <th>
303
+ <nobr>气表品牌</nobr>
304
+ </th>
305
+ <th>
306
+ <nobr>发卡状态</nobr>
307
+ </th>
308
+ <th>
309
+ <nobr>通气时间</nobr>
310
+ </th>
311
+ <th>
312
+ <nobr>状态</nobr>
313
+ </th>
314
+ <th>
315
+ <nobr>建档日期</nobr>
316
+ </th>
317
+ <th>
318
+ <nobr>地址状态</nobr>
319
+ </th>
320
+ <!--<th>-->
321
+ <!--<nobr v-if="this.$login.r.includes('通知单打印')||this.$login.r.includes('流程表打印') ">下载</nobr>-->
322
+ <!--</th>-->
323
+ <th>
324
+ <nobr>操作</nobr>
325
+ </th>
326
+ </tr>
327
+ </template>
328
+ <template partial='body'>
329
+ <td style="text-align: center;">{{$index + 1}}</td>
330
+ <td style="text-align: center;">{{row.f_userinfo_code}}</td>
331
+ <td style="text-align: center;">{{row.f_user_name}}</td>
332
+ <td style="text-align: center;">{{row.f_user_phone}}</td>
333
+ <td style="text-align: center;" v-if="!$parent.$parent.$parent.isOper">{{row.f_address_detail ? row.f_address + row.f_address_detail :
334
+ row.f_address}}
335
+ </td>
336
+ <td style="text-align: center;">{{row.f_user_type}}</td>
337
+ <td style="text-align: center;">{{row.f_gasproperties}}</td>
338
+ <td style="text-align: center;">{{row.f_meter_classify}}</td>
339
+ <td style="text-align: center;">{{row.f_meter_brand}}</td>
340
+ <td style="text-align: center;">{{row.f_whether_hairpin}}</td>
341
+ <td style="text-align: center;">{{row.f_gas_date}}</td>
342
+ <td style="text-align: center;">{{row.f_user_state}}</td>
343
+ <td style="text-align: center;">{{row.f_createfile_date}}</td>
344
+ <td style="text-align: center;">{{row.f_address_state}}</td>
345
+ <td style="text-align: center;">
346
+ <button type="button" name="button" class="btn btn-link" v-if="row.f_user_state === '正常' || row.f_user_state==='预备'"
347
+ @click.stop="$parent.$parent.$parent.modifyUser(row)">修正
348
+ </button>
349
+ </td>
350
+ </template>
351
+ </data-grid>
352
+ </criteria-paged>
353
+ </div>
354
+
355
+ <modal v-if="batcan || batenable" :show.sync="batcan || batenable" width="800px" v-ref:modal large backdrop="false">
356
+ <article slot="modal-body" class="modal-body">
357
+ <batch-cancellation v-if="batcan" :useraccount="model.rows" @clean="batchClean"
358
+ @success="batchSuccess"></batch-cancellation>
359
+ <batch-enable v-if="batenable" :useraccount="model.rows" @clean="batchClean"
360
+ @success="batchSuccess"></batch-enable>
361
+ </article>
362
+ <footer slot="modal-footer" class="modal-footer">
363
+ </footer>
364
+ </modal>
365
+
366
+
367
+ </div>
368
+ </div>
369
+ <div class="binary-right" :style="{width:'70%'}" v-if="createFile">
370
+ <div class="auto" style="height: 100%; margin-top: 1%" >
371
+ <file-user-general-info :f_filialeid="f_filialeid" :row="row" :areainfo="areainfo"
372
+ :haslimit="config.hasLimit" @success="renew" @clean="clean"
373
+ :isedit="isedit"
374
+ @build-success="buildFileSuccess" v-ref:info></file-user-general-info>
375
+ </div>
376
+ </div>
377
+
378
+ <modal :show.sync="show" width="500px" title="文件导入" v-ref:modal large backdrop="false">
379
+ <article slot="modal-body" class="modal-body">
380
+ <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
381
+ action="rs/file/uploadFile" tagname="导入档案" v-ref:file :headers="headers"></file-upload>
382
+ </article>
383
+ <footer slot="modal-footer" class="modal-footer">
384
+ </footer>
385
+ </modal>
386
+ <modal :show.sync="batchMeterShow" width="500px" title="文件导入" v-ref:modal large backdrop="false">
387
+ <article slot="modal-body" class="modal-body">
388
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
389
+ </article>
390
+ <footer slot="modal-footer" class="modal-footer">
391
+ </footer>
392
+ </modal>
393
+
394
+ <modal :show.sync="resshow" width="500px" title="建档成功" v-ref:modal large backdrop="false">
395
+ <article slot="modal-body" class="modal-body" style="height: 70px">
396
+ <div>
397
+ <label class="font_normal_body" style="line-height: 20px">客户编号</label>
398
+ <input class="input_search" condition="f_userinfo_code = '{}'"
399
+ placeholder='客户编号' disabled
400
+ type="text" v-model="resdata">
401
+ </div>
402
+ </article>
403
+ <footer slot="modal-footer" class="modal-footer">
404
+ <button class="button_search button_spacing" type="button" @click="doCopy()">复制</button>
405
+ <button class="button_search button_spacing" type="button" @click="close2()">取消</button>
406
+ </footer>
407
+ </modal>
408
+ <!--<user-flow-sheet :show="printflag" :bill-config='configs' :bill-data='billData' :data='newdata' v-on:toggle="close" @printok="printok" v-ref:printbill></user-flow-sheet>-->
409
+
410
+ <work-busy :is-busy="iswork" v-show="iswork"></work-busy>
411
+ </div>
412
+ </template>
413
+
414
+ <script>
415
+ import {PagedList, HttpResetClass} from 'vue-client'
416
+ import Vue from 'vue'
417
+ import co from 'co'
418
+ import axios from 'axios'
419
+
420
+ let loadParamGem = async function (self) {
421
+ await self.$getConfig(self, 'UserFiles')
422
+ self.headers.username = Vue.$login.f.name
423
+ self.headers.username = Vue.$login.guid()
424
+ await self.$LoadParams.loadParam(self.f_filialeid)
425
+ // await self.$LoadParams.loadMeterBook(self.f_filialeid)
426
+ await self.search()
427
+ await self.getaddress()
428
+ self.initAdjustables()
429
+ }
430
+
431
+ let addressInfoGen = async function (self, areainfo) {
432
+ areainfo.isEdit = false
433
+ if (areainfo.file_num > 0 && !areainfo.f_userinfo_id) {
434
+ // 完善
435
+ // 将表档案信息带入,完善客户信息
436
+ let getMetersInfo = await self.$resetpost('rs/logic/sale_getMeterByAddress', {
437
+ data: {
438
+ f_useraddress_id: areainfo.id
439
+ }
440
+ }, {resolveMsg: null, rejectMsg: '获取表信息出错'})
441
+ areainfo.meter = getMetersInfo.data[0]
442
+ }
443
+ if (areainfo.file_num > 0 && areainfo.f_userinfo_id) {
444
+ // 添加 将客户信息带入
445
+ let getUserinfo = await self.$resetpost('rs/sql/saleSingleTable', {
446
+ data: {
447
+ tablename: 't_userinfo',
448
+ condition: `f_userinfo_id = '${areainfo.f_userinfo_id}'`
449
+ }
450
+ }, {resolveMsg: null, rejectMsg: '获取档案出错'})
451
+
452
+ areainfo.user = getUserinfo.data[0]
453
+ }
454
+ self.bulidFiles(areainfo)
455
+ }
456
+
457
+ export default {
458
+ 'title': '档案信息',
459
+ data () {
460
+ return {
461
+ iswork: false,
462
+ config: {
463
+ createType: ['address', 'area'], // 建档方式: address-地址建档 area-小区建档
464
+ hasLimit: true
465
+ },
466
+ model: new PagedList('rs/sql/filemanage_getUserfies', 30, {orderitem: '"f_userinfo_id DESC"'}),
467
+ row: null, // 选择一条客户信息,对其进行修改
468
+ areainfo: null, // 小区批量建档使用的数据
469
+ rows: [], // 客户档案选择一条时,将只显示一条信息,rows用来存放整页的数据
470
+ headers: {'username': this.$login.f.name, 'blodid': this.$login.guid()},
471
+ contract: [{label: '全部', value: ' is null or f_contract_id is not null'}, {
472
+ label: '有',
473
+ value: ' is not null'
474
+ },
475
+ {label: '无', value: ' is null'}],
476
+ orderDefault: 'f_createfile_date desc',
477
+ orderFields: {
478
+ f_userinfo_id: 'no'
479
+ },
480
+
481
+ createFile: false,
482
+
483
+ curorgid: [this.$login.f.orgid],
484
+ f_filialeid: this.$login.f.orgid,
485
+
486
+ // 销户启用
487
+ batcan: false,
488
+ batenable: false,
489
+ version: '',
490
+
491
+ inputtores: this.$appdata.getParam('抄表员'),
492
+ adjustables: [],
493
+
494
+ // 导入组件
495
+ show: false,
496
+
497
+ // 点击建档或修正时控制列表展示, 防止拥挤
498
+ isOper: false,
499
+
500
+ criteriaShow: false,
501
+ industrycomments: this.$appdata.getParam('工业备注') ? [{
502
+ label: '全部',
503
+ value: ''
504
+ }, ...this.$appdata.getParam('工业备注')] : [],
505
+ gasproperties: this.$appdata.getParam('用气性质') ? [{
506
+ label: '全部',
507
+ value: ''
508
+ }, ...this.$appdata.getParam('用气性质')] : [],
509
+ user_type: this.$appdata.getParam('用户类型') ? [{
510
+ label: '全部',
511
+ value: ''
512
+ }, ...this.$appdata.getParam('用户类型')] : [],
513
+ meter_classify: this.$appdata.getParam('气表类型') ? [{
514
+ label: '全部',
515
+ value: ''
516
+ }, ...this.$appdata.getParam('气表类型')] : [],
517
+ meterbrands: [],
518
+ f_whether_hairpin: this.$appdata.getParam('发卡状态') ? [{
519
+ label: '全部',
520
+ value: ''
521
+ }, ...this.$appdata.getParam('发卡状态')] : [],
522
+ showselectaddress: false,
523
+ isedit: false,
524
+ clientWidth: document.body.clientWidth,
525
+ batchMeterShow: false,
526
+ billData: {
527
+ url: 'rs/report/userignition',
528
+ bill: ''
529
+ },
530
+ configs: {
531
+ hasPrint: false, // 默认打票
532
+ hasBillManage: false // 默认不启用发票管理
533
+ },
534
+ printflag: false,
535
+ newdata: {},
536
+ resdata: '',
537
+ street: [],
538
+ resshow: false,
539
+ useoptions: this.$appdata.getParam('使用类型'),
540
+ f_address_states:[{lable:'全部',value:''},...this.$appdata.getParam('地址状态')],
541
+ userlevel: this.$appdata.getParam('用户等级') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')] : []
542
+ }
543
+ },
544
+ ready () {
545
+ loadParamGem(this)
546
+ },
547
+ compiled () {
548
+ window.onresize = () => {
549
+ return (() => {
550
+ this.clientWidth = document.body.clientWidth
551
+ })()
552
+ }
553
+ },
554
+ methods: {
555
+ async doCopy () {
556
+ await this.$copyText(this.resdata)
557
+ this.resshow = false
558
+ this.$showAlert(`内容已复制到剪切板!`, 'success', 2000)
559
+ },
560
+ async getaddress () {
561
+ let street = await this.$resetpost('rs/sql/manage_getstreetlist', {
562
+ data: {
563
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
564
+ }
565
+ }, {resolveMsg: null, rejectMsg: '获取区域失败!'})
566
+ console.log('区域', street)
567
+ let abc = []
568
+ for (let row of street.data) {
569
+ console.log('开始保存区域')
570
+ abc.push({label: row.f_street, value: row.f_street})
571
+ }
572
+ this.street = abc
573
+ },
574
+ close () {
575
+ this.printflag = false
576
+ this.clean()
577
+ },
578
+ close2 () {
579
+ this.resshow = false
580
+ },
581
+ closemodal () {
582
+ this.batchMeterShow = false
583
+ },
584
+ createInfoForFile () {
585
+ this.batchMeterShow = true
586
+ },
587
+ hidden () {
588
+ this.criteriaShow = !this.criteriaShow
589
+ },
590
+ search () {
591
+ // this.$refs.paged.$refs.criteria.search()
592
+ },
593
+ modifyUser (row) {
594
+ this.isOper = true
595
+ this.createFile = true
596
+ this.isedit = true
597
+ this.row = row
598
+ this.areainfo = null
599
+ this.row.version = row.version
600
+ },
601
+ clean () {
602
+ this.createFile = false
603
+ this.row = null
604
+ this.isOper = false
605
+ this.areainfo = null
606
+ // this.$refs.paged.$refs.grid.select(null)
607
+ this.$refs.paged.$refs.grid.model.rows = this.rows
608
+ },
609
+ createnewfile () {
610
+ this.isOper = true
611
+ this.createFile = true
612
+ this.isedit = false
613
+ this.row = null
614
+ this.areainfo = null
615
+ this.$refs.info.clearinfo()
616
+ },
617
+ renew () {
618
+ this.row = null
619
+ this.areainfo = null
620
+ this.isOper = false
621
+ this.$refs.info.clearinfo()
622
+ this.clearCondition()
623
+ this.search()
624
+ // 建档或修正档案成功刷新地址列表
625
+ this.$refs.addressfiles.$refs.paged.$refs.cri.search()
626
+ },
627
+ clearCondition () {
628
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
629
+ this.$refs.paged.$refs.criteria.model[key] = ''
630
+ })
631
+ },
632
+
633
+ bulkOperations (name, type) {
634
+ if (name === '批量销户') {
635
+ this.batcan = true
636
+ this.batenable = false
637
+ this.newArea = false
638
+ } else if (name === '批量启用') {
639
+ this.batenable = true
640
+ this.batcan = false
641
+ this.newArea = false
642
+ }
643
+ },
644
+ batchSuccess () {
645
+ this.clearCondition()
646
+ this.batchClean()
647
+ },
648
+ batchClean () {
649
+ this.batcan = false
650
+ this.batenable = false
651
+ this.newArea = false
652
+ this.search()
653
+ },
654
+ buildFile (row) {
655
+ // console.log('我是建档。。。', row)
656
+ this.row = row
657
+ },
658
+ // 小区批量建档
659
+ bulidFiles (row) {
660
+ this.row = null
661
+ this.areainfo = row
662
+ // 将列表的数据清空
663
+ this.$refs.paged.$refs.grid.model.rows = []
664
+ },
665
+ // 小区批量建档成功
666
+ buildFileSuccess (data) {
667
+ // console.log('建档案成功', data)
668
+ this.model.rows.unshift(data)
669
+ },
670
+ selfSearch (args) {
671
+ console.log('开始查询档案', this.f_filialeid)
672
+ if (!this.f_filialeid) {
673
+ this.f_filialeid = this.$login.f.orgid
674
+ }
675
+ args.condition = `${args.condition} and f_filialeid = '${this.f_filialeid}'`
676
+ this.criteriaShow = false
677
+ this.$refs.paged.$refs.grid.$el.scrollTop = 0
678
+ this.model.search(args.condition, args.model)
679
+ this.clean()
680
+ },
681
+ // printok () {
682
+ // console.log("======================")
683
+ // //this.$dispatch('success')
684
+ // },
685
+ sort (field, rule) {
686
+ // 将所有排序方式设为不排序,实现相互排斥
687
+ for (let key in this.orderFields) {
688
+ if (key === field) {
689
+ this.orderFields[key] = rule
690
+ } else {
691
+ this.orderFields[key] = 'no'
692
+ }
693
+ }
694
+ // 如果新规则不排序,还原为默认排序
695
+ if (rule === 'no') {
696
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
697
+ } else {
698
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
699
+ }
700
+
701
+ this.search()
702
+ },
703
+
704
+ getLocation (row) {
705
+ // 可能会存在添加,完善,建档
706
+ addressInfoGen(this, row)
707
+ },
708
+ areaFiles (row) {
709
+ row.isEdit = true
710
+ row.f_residential_area_id = row.id
711
+ // row.id = null
712
+ delete row.id
713
+ this.bulidFiles(row)
714
+ },
715
+ initAdjustables () {
716
+ console.log('初始化调压箱', this.$GetSaleParam)
717
+ let arr = []
718
+ let filter = this.$login.f.orgid
719
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
720
+ let temp = {}
721
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
722
+ temp.value = `${item.value.id}`
723
+ arr.push(temp)
724
+ })
725
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
726
+ // 初始化气表品牌
727
+ let brandArr = []
728
+ this.$GetSaleParam.getGasbrand().forEach((item) => {
729
+ let temp1 = {}
730
+ temp1.label = item.label
731
+ temp1.value = item.value.f_meter_brand
732
+ brandArr.push(temp1)
733
+ })
734
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
735
+ },
736
+ importFile () {
737
+ this.show = true
738
+ },
739
+ clear () {
740
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
741
+ this.$refs.paged.$refs.criteria.model[key] = []
742
+ })
743
+ },
744
+ getorg (val) {
745
+ this.f_filialeid = val[0]
746
+ }
747
+ },
748
+ computed: {
749
+ smallareas () {
750
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')]
751
+ },
752
+ userstates () {
753
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('客户状态')]
754
+ },
755
+ usegas () {
756
+ return [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}]
757
+ },
758
+ areas () {
759
+ let rs = []
760
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
761
+ let temp = {
762
+ label: this.$login.f.f_allArea[i].label,
763
+ value: this.$login.f.f_allArea[i].label
764
+ }
765
+ rs.push(temp)
766
+ }
767
+ return [{label: '全部', value: ''}, ...rs]
768
+ },
769
+ firestates () {
770
+ return [
771
+ {label: '全部', value: ''},
772
+ {label: '点火', value: '1'},
773
+ {label: '未点火', value: '0'}
774
+ ]
775
+ },
776
+ jurisdiction () {
777
+ return this.$login.r
778
+ }
779
+ },
780
+ watch: {
781
+ // 每次查询将查询到的数据存储起来,供选择操作后的替换
782
+ 'model.state' (val) {
783
+ if (val === '正确') {
784
+ this.rows = this.model.rows
785
+ }
786
+ },
787
+ 'f_filialeid' (val) {
788
+ loadParamGem(this)
789
+ }
790
+ },
791
+ events: {
792
+ FileUpload: function (file, res) {
793
+ let data = {
794
+ tablename: 't_userinfo',
795
+ filepath: res.path
796
+ }
797
+ this.$resetpost('rs/logic/import', data, {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
798
+ this.close()
799
+ this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
800
+ this.search()
801
+ })
802
+ },
803
+ 'onFileUpload': async function (file, res) {
804
+ if (this.batchMeterShow) {
805
+ this.iswork = true
806
+ // 当前上传的是批量导入的档案
807
+ let param = {
808
+ filepath: res.f_downloadpath,
809
+ f_operator: this.$login.f.name,
810
+ f_operatorid: this.$login.f.id,
811
+ f_orgid: this.$login.f.orgid,
812
+ f_orgname: this.$login.f.orgs,
813
+ f_depid: this.$login.f.depids,
814
+ f_depname: this.$login.f.deps
815
+ }
816
+ let self = this
817
+ try {
818
+ await axios.post('rs/logic/newSettleFileImport',
819
+ {data: param}, {timeout: 10 * 60 * 1000}).then((res) => {
820
+ if (res.data) {
821
+ self.$showMessage(`本次上传共上传${res.data.totalsum}条数据, 成功${res.data.successnum}条,失败${res.data.errorsum}条,具体失败数据请在稽查查询错误查询中查看!!`)
822
+ self.iswork = false
823
+ // this.$showAlert('导入成功','success',2000)
824
+ }
825
+ })
826
+ } catch (error) {
827
+ if (error.response) {
828
+ if (error.response.status == 500) {
829
+ this.$showAlert('服务繁忙,请重试!!!', 'danger', 3000)
830
+ } else if (error.response.status == 404) {
831
+ this.$showAlert('服务运行中,请耐心等待后进行重试!!', 'danger', 3000)
832
+ } else {
833
+ this.$showAlert(error.response.data, 'danger', 2000)
834
+ }
835
+ console.log(error.response.data)
836
+ console.log(error.response.status)
837
+ console.log(error.response.headers)
838
+ } else if (error.request) {
839
+ console.log(error.request)
840
+ this.$showAlert(error.request, 'danger', 2000)
841
+ } else {
842
+ console.log('Error', error.message)
843
+ this.$showAlert(error.message, 'danger', 2000)
844
+ }
845
+ this.iswork = false
846
+ }
847
+ this.batchMeterShow = false
848
+ // this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
849
+ this.search()
850
+ } else {
851
+ let data = {
852
+ tablename: 't_userinfo',
853
+ filepath: res.f_downloadpath,
854
+ f_operator: this.$login.f.name,
855
+ f_operatorid: this.$login.f.id,
856
+ f_orgid: this.$login.f.orgid,
857
+ f_orgname: this.$login.f.orgs,
858
+ f_depid: this.$login.f.depids,
859
+ f_depname: this.$login.f.deps
860
+ }
861
+ this.$resetpost('rs/logic/sale_userfilesImp', {data: data}, {
862
+ resolveMsg: null,
863
+ rejectMsg: '上传失败'
864
+ }).then((res) => {
865
+ this.show = false
866
+ this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
867
+ this.search()
868
+ })
869
+ }
870
+ },
871
+ 'confirmaddress' (res) {
872
+ console.log('选定地址', res)
873
+ }
874
+ }
875
+ }
876
+ </script>
877
+ <style>
878
+ .nav-tabss ul > li > a {
879
+ padding: 5px 10px;
880
+ }
881
+ </style>