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,732 +1,732 @@
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" v-if="!$parent.$parent.createFile">
34
- <label class="font_normal_body">客户名称</label>
35
- <input class="input_search" condition="f_user_name like '%{}%'"
36
- placeholder='客户姓名'
37
- style="width:60%" type="text" v-model="model.f_user_name">
38
- </div>
39
- <div
40
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
41
- class="form-group button-range">
42
- <!--<button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.showFileInfo()">查看批量状态-->
43
- <!--</button>-->
44
- <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.createInfoForFile()">批量建档
45
- </button>
46
- <button @click="$parent.$parent.createnewfile()" class="button_search button_spacing"
47
- style="float: right">建档
48
- </button>
49
- <button @click="search(), $parent.$parent.clean()" class="button_search button_spacing"
50
- style="float: right">查询
51
- </button>
52
- <button @click="$parent.$parent.clear()" class="button_clear button_spacing"
53
- style="float: right">清空
54
- </button>
55
- <button @click="$parent.$parent.importFile" class="button_export button_spacing"
56
- style="float: right" v-if="false">导入
57
- </button>
58
- <!-- <button class="button_search" style="width: 90px" @click=" $parent.$parent.selectaddress()">选择地址</button>-->
59
- <button @click="$parent.$parent.bulkOperations('批量销户', 'batch-cancellation')"
60
- class="button_search button_spacing"
61
- style="float: right"
62
- v-if="$parent.$parent.rows && $parent.$parent.rows.length === 1 && $parent.$parent.rows[0].f_user_state !== '正常'">
63
- 销户
64
- </button>
65
- <button @click="$parent.$parent.bulkOperations('批量启用', 'batch-enable')"
66
- class="button_search button_spacing"
67
- style="float: right"
68
- v-if="$parent.$parent.rows && $parent.$parent.rows.length === 1 && $parent.$parent.rows[0].f_user_state === '销户'">
69
- 启用
70
- </button>
71
- <div
72
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
73
- @click="$parent.$parent.hidden()"
74
- class="button_spacing"
75
- style="float: right"></div>
76
- </div>
77
- </div>
78
- <div class="row" v-if="$parent.$parent.criteriaShow">
79
- <div
80
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
81
- class="form-group"
82
- v-if="$parent.$parent.clientWidth<1600&&$parent.$parent.createFile">
83
- <label class="font_normal_body">客户编号</label>
84
- <input class="input_search" condition="f_userinfo_code = '{}'"
85
- placeholder='客户编号'
86
- style="width:60%" type="text" v-model="model.f_userinfo_code">
87
- </div>
88
- <div
89
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
90
- class="form-group" v-if="$parent.$parent.createFile">
91
- <label class="font_normal_body">客户名称</label>
92
- <input class="input_search" condition="f_user_name = '{}'"
93
- placeholder='客户姓名'
94
- style="width:60%" type="text" v-model="model.f_user_name">
95
- </div>
96
- <div
97
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
98
- class="form-group">
99
- <label class="font_normal_body">旧客户号</label>
100
- <input class="input_search" condition="f_olduserinfo_code = '{}'" placeholder='客户编号'
101
- style="width:60%"
102
- type="text"
103
- v-model="model.f_olduserinfo_code">
104
- </div>
105
- <div
106
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
107
- class="form-group">
108
- <label class="font_normal_body">用气性质</label>
109
- <v-select :options='$parent.$parent.gasproperties' :value.sync="model.f_gasproperties"
110
- close-on-select condition="f_gasproperties='{}'"
111
- placeholder='用气性质' v-model="model.f_gasproperties"></v-select>
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_user_phone = '{}'" placeholder='客户电话' style="width:60%"
118
- type="text"
119
- v-model="model.f_user_phone">
120
- </div>
121
- <div
122
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
123
- class="form-group">
124
- <label class="font_normal_body">客户地址</label>
125
- <input class="input_search" condition="f_address like '%{}%'" placeholder='客户地址' style="width:60%"
126
- type="text" v-model="model.f_address">
127
- </div>
128
- <div
129
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
130
- class="form-group">
131
- <label class="font_normal_body">客户状态</label>
132
- <v-select :options='$parent.$parent.userstates' :value.sync="model.f_user_state"
133
- close-on-select condition="f_user_state='{}'"
134
- :value-single="true"
135
- placeholder='客户状态' v-model="model.f_user_state"></v-select>
136
- </div>
137
- <div
138
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
139
- class="form-group">
140
- <label class="font_normal_body">调&ensp;压&ensp;箱</label>
141
- <v-select :options='$parent.$parent.adjustables' :search='true'
142
- :value.sync="model.f_adjustable_id"
143
- close-on-select
144
- condition="f_adjustable_id = '{}'" placeholder='调压箱'
145
- v-model='model.f_adjustable_id'></v-select>
146
- </div>
147
- <div
148
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
149
- class="form-group">
150
- <label class="font_normal_body">开户时间</label>
151
- <datepicker placeholder="开始日期" v-model="model.startDate" :value.sync="model.startDate" style="width:60%"
152
- :format="'yyyy-MM-dd'" condition="f_createfile_date >= '{}'">
153
- </datepicker>
154
- </div>
155
- <div
156
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
157
- class="form-group">
158
- <label class="font_normal_body">开户时间</label>
159
- <datepicker placeholder="结束日期" v-model="model.endDate" :value.sync="model.endDate" style="width:60%"
160
- :format="'yyyy-MM-dd'" condition="f_createfile_date <= '{}'">
161
- </datepicker>
162
- </div>
163
- <div
164
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
165
- class="form-group">
166
- <label class="font_normal_body">打印时间</label>
167
- <datepicker placeholder="开始日期" v-model="model.startPrintDate" :value.sync="model.startPrintDate" style="width:60%"
168
- :format="'yyyy-MM-dd'" condition="f_printdate >= '{}'">
169
- </datepicker>
170
- </div>
171
- <div
172
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
173
- class="form-group">
174
- <label class="font_normal_body">打印时间</label>
175
- <datepicker placeholder="结束日期" v-model="model.endPrintDate" :value.sync="model.endPrintDate" style="width:60%"
176
- :format="'yyyy-MM-dd'" condition="f_printdate <= '{}'">
177
- </datepicker>
178
- </div>
179
- <div
180
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
181
- class="form-group">
182
- <label class="font_normal_body">工业备注</label>
183
- <v-select :options='$parent.$parent.industrycomments' :value.sync="model.f_industry_comments"
184
- close-on-select condition="f_industry_comments='{}'"
185
- placeholder='气表类型' v-model="model.f_industry_comments"></v-select>
186
- </div>
187
- <!--<div-->
188
- <!--:class="{'col-sm-3':$parent.$parent.clientWidth>1600||!$parent.$parent.createFile,'col-sm-4':$parent.$parent.clientWidth<1600&&$parent.$parent.createFile}"-->
189
- <!--class="form-group">-->
190
- <!--<label class="font_normal_body">天然气使用证</label>-->
191
- <!--<v-select :options='$parent.$parent.usegas' :value.sync="model.f_send_usegas_card"-->
192
- <!--close-on-select condition="f_send_usegas_card='{}'"-->
193
- <!--placeholder='天然气使用证' v-model="model.f_send_usegas_card"></v-select>-->
194
- <!--</div>-->
195
- </div>
196
- </div>
197
- </criteria>
198
- <data-grid :model="model" class="list_area table_sy" v-ref:grid partial='list'>
199
- <template partial='head'>
200
- <tr>
201
- <th>
202
- <nobr>序号</nobr>
203
- </th>
204
- <th>
205
- <nobr>客户编号</nobr>
206
- </th>
207
- <th>
208
- <nobr>客户名称</nobr>
209
- </th>
210
- <th>
211
- <nobr>客户电话</nobr>
212
- </th>
213
- <th v-if="!$parent.$parent.$parent.isOper">
214
- <nobr>地址信息</nobr>
215
- </th>
216
- <th>
217
- <nobr>状态</nobr>
218
- </th>
219
- <th>
220
- <nobr>开户时间</nobr>
221
- </th>
222
- <!--<th>-->
223
- <!--<nobr>打印时间</nobr>-->
224
- <!--</th>-->
225
- <!--<th>-->
226
- <!--<nobr>打印状态</nobr>-->
227
- <!--</th>-->
228
- <th>
229
- <nobr>操作</nobr>
230
- </th>
231
- </tr>
232
- </template>
233
- <template partial='body'>
234
- <td style="text-align: center;">{{$index + 1}}</td>
235
- <td style="text-align: center;">{{row.f_userinfo_code}}</td>
236
- <td style="text-align: center;">{{row.f_user_name}}</td>
237
- <td style="text-align: center;">{{row.f_user_phone}}</td>
238
- <td style="text-align: center;" v-if="!$parent.$parent.$parent.isOper">{{row.f_address_detail ? row.f_address + row.f_address_detail :
239
- row.f_address}}
240
- </td>
241
- <td style="text-align: center;">{{row.f_user_state}}</td>
242
- <td style="text-align: center;">{{row.f_createfile_date}}</td>
243
- <!--<td style="text-align: center;">{{row.f_printdate}}</td>-->
244
- <!--<td style="text-align: center;">-->
245
- <!--<div>{{row.print_stats}}</div>-->
246
- <!--</td>-->
247
- <td style="text-align: center;">
248
- <button type="button" name="button" class="btn btn-link" v-if="row.f_user_state === '正常' || row.f_user_state==='预备'"
249
- @click.stop="$parent.$parent.$parent.modifyUser(row)">修正
250
- </button>
251
- </td>
252
- </template>
253
- </data-grid>
254
- </criteria-paged>
255
- </div>
256
- <div v-if="batcan || batenable">
257
- <batch-cancellation v-if="batcan" :useraccount="model.rows" @clean="batchClean"
258
- @success="batchSuccess"></batch-cancellation>
259
- <batch-enable v-if="batenable" :useraccount="model.rows" @clean="batchClean"
260
- @success="batchSuccess"></batch-enable>
261
- </div>
262
- </div>
263
- </div>
264
- <div class="binary-right" :style="{width:'70%'}" v-if="createFile">
265
- <div class="auto" style="height: 100%; margin-top: 1%" >
266
- <file-user-general-info-new :f_filialeid="f_filialeid" :row="row" :areainfo="areainfo"
267
- :haslimit="config.hasLimit" @success="renew" @clean="clean"
268
- :isedit="isedit" :configs="configs"
269
- @build-success="buildFileSuccess" v-ref:info></file-user-general-info-new>
270
- </div>
271
- </div>
272
-
273
- <modal :show.sync="show" width="500px" title="文件导入" v-ref:modal large backdrop="false">
274
- <article slot="modal-body" class="modal-body">
275
- <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
276
- action="rs/file/uploadFile" tagname="导入档案" v-ref:file :headers="headers"></file-upload>
277
- </article>
278
- <footer slot="modal-footer" class="modal-footer">
279
- </footer>
280
- </modal>
281
- <modal :show.sync="batchMeterShow" width="500px" title="文件导入" v-ref:modal large backdrop="false">
282
- <article slot="modal-body" class="modal-body">
283
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
284
- </article>
285
- <footer slot="modal-footer" class="modal-footer">
286
- </footer>
287
- </modal>
288
- <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>
289
-
290
- <work-busy :is-busy="iswork" v-show="iswork"></work-busy>
291
- </div>
292
- </template>
293
-
294
- <script>
295
- import {PagedList, HttpResetClass} from 'vue-client'
296
- import Vue from 'vue'
297
- import co from 'co'
298
- import axios from 'axios'
299
-
300
- let loadParamGem = async function (self) {
301
- await self.$getConfig(self, 'UserFiles')
302
- self.headers.username = Vue.$login.f.name
303
- self.headers.username = Vue.$login.guid()
304
- await self.$LoadParams.loadParam(self.f_filialeid)
305
- // await self.$LoadParams.loadMeterBook(self.f_filialeid)
306
- await self.search()
307
- self.initAdjustables()
308
- }
309
-
310
- let addressInfoGen = async function (self, areainfo) {
311
- areainfo.isEdit = false
312
- if (areainfo.file_num > 0 && !areainfo.f_userinfo_id) {
313
- // 完善
314
- // 将表档案信息带入,完善客户信息
315
- let getMetersInfo = await self.$resetpost('rs/logic/sale_getMeterByAddress', {
316
- data: {
317
- f_useraddress_id: areainfo.id
318
- }
319
- }, {resolveMsg: null, rejectMsg: '获取表信息出错'})
320
- areainfo.meter = getMetersInfo.data[0]
321
- }
322
- if (areainfo.file_num > 0 && areainfo.f_userinfo_id) {
323
- // 添加 将客户信息带入
324
- let getUserinfo = await self.$resetpost('rs/sql/saleSingleTable', {
325
- data: {
326
- tablename: 't_userinfo',
327
- condition: `f_userinfo_id = '${areainfo.f_userinfo_id}'`
328
- }
329
- }, {resolveMsg: null, rejectMsg: '获取档案出错'})
330
-
331
- areainfo.user = getUserinfo.data[0]
332
- }
333
- self.bulidFiles(areainfo)
334
- }
335
-
336
- export default {
337
- 'title': '预备户管理',
338
- data () {
339
- return {
340
- iswork: false,
341
- config: {
342
- createType: ['address', 'area'], // 建档方式: address-地址建档 area-小区建档
343
- hasLimit: true
344
- },
345
- model: new PagedList('rs/sql/Prepare_filemanage_getUserfies', 30, {orderitem: '"f_userinfo_id DESC"'}),
346
- row: null, // 选择一条客户信息,对其进行修改
347
- areainfo: null, // 小区批量建档使用的数据
348
- rows: [], // 客户档案选择一条时,将只显示一条信息,rows用来存放整页的数据
349
- headers: {'username': this.$login.f.name, 'blodid': this.$login.guid()},
350
- contract: [{label: '全部', value: ' is null or f_contract_id is not null'}, {
351
- label: '有',
352
- value: ' is not null'
353
- },
354
- {label: '无', value: ' is null'}],
355
- industrycomments: this.$appdata.getParam('工业备注') ? [{
356
- label: '全部',
357
- value: ''
358
- }, ...this.$appdata.getParam('工业备注')] : [],
359
- orderDefault: 'f_createfile_date desc',
360
- orderFields: {
361
- f_userinfo_id: 'no'
362
- },
363
-
364
- createFile: false,
365
-
366
- curorgid: [this.$login.f.orgid],
367
- f_filialeid: this.$login.f.orgid,
368
-
369
- // 销户启用
370
- batcan: false,
371
- batenable: false,
372
- version: '',
373
-
374
- inputtores: this.$appdata.getParam('抄表员'),
375
- adjustables: [],
376
-
377
- // 导入组件
378
- show: false,
379
-
380
- // 点击建档或修正时控制列表展示, 防止拥挤
381
- isOper: false,
382
-
383
- criteriaShow: false,
384
-
385
- gasproperties: this.$appdata.getParam('用气性质') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')] : [],
386
- f_user_state: '预备',
387
- showselectaddress: false,
388
- isedit: false,
389
- clientWidth: document.body.clientWidth,
390
- batchMeterShow: false,
391
- billData: {
392
- url: 'rs/report/userignition',
393
- bill: ''
394
- },
395
- configs: {
396
- hasPrint: false, // 默认打票
397
- hasBillManage: false // 默认不启用发票管理
398
- },
399
- printflag: false,
400
- newdata: {}
401
- }
402
- },
403
- ready () {
404
- this.$refs.paged.$refs.criteria.model.f_user_state = this.f_user_state
405
- loadParamGem(this)
406
- },
407
- compiled () {
408
- window.onresize = () => {
409
- return (() => {
410
- this.clientWidth = document.body.clientWidth
411
- })()
412
- }
413
- },
414
- methods: {
415
- close () {
416
- this.printflag = false
417
- this.clean()
418
- },
419
- async downFiles (index, row) {
420
- let param = {
421
- f_userinfo_id: row.f_userinfo_id,
422
- version: row.version,
423
- f_print_lc: '是',
424
- f_printdate: this.$login.toStandardTimeString()
425
- }
426
- await await this.$resetpost('rs/logic/updateprint', {param}, {resolveMsg: null, rejectMsg: ''})
427
- console.log('xxxxxxxxxxxxxxxxxxxxx')
428
- // 下载不同文件
429
- if (index == 0) {
430
- let url = 'rs/report/userinstall'
431
- this.billData.url = url
432
- } else {
433
- let url = 'rs/report/userignition'
434
- this.billData.url = url
435
- }
436
- this.newdata = row
437
- this.printflag = true
438
- },
439
- showFileInfo () {
440
-
441
- },
442
- closemodal () {
443
- this.batchMeterShow = false
444
- },
445
- createInfoForFile () {
446
- this.batchMeterShow = true
447
- },
448
- hidden () {
449
- this.criteriaShow = !this.criteriaShow
450
- },
451
- search () {
452
- this.$refs.paged.$refs.criteria.model.f_user_state = this.f_user_state
453
- // this.$refs.paged.$refs.criteria.search()
454
- },
455
- modifyUser (row) {
456
- this.isOper = true
457
- this.createFile = true
458
- this.isedit = true
459
- this.row = row
460
- this.areainfo = null
461
- this.row.version = row.version
462
- console.log('row.version====>', this.row.version)
463
- },
464
- clean () {
465
- this.createFile = false
466
- this.row = null
467
- this.isOper = false
468
- this.areainfo = null
469
- // this.$refs.paged.$refs.grid.select(null)
470
- this.$refs.paged.$refs.grid.model.rows = this.rows
471
- this.search()
472
- },
473
- createnewfile () {
474
- this.isOper = true
475
- this.createFile = true
476
- this.isedit = false
477
- this.row = null
478
- this.areainfo = null
479
- this.$refs.info.clearinfo()
480
- },
481
- renew () {
482
- this.row = null
483
- this.areainfo = null
484
- this.isOper = false
485
- this.$refs.info.clearinfo()
486
- this.clearCondition()
487
- this.search()
488
- this.$refs.paged.$refs.criteria.search()
489
- // 建档或修正档案成功刷新地址列表
490
- // this.$refs.info.$refs.useressential.$refs.$refs.useressential.fileaddress.$refs.paged.$refs.cri.search()
491
- },
492
- clearCondition () {
493
- Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
494
- this.$refs.paged.$refs.criteria.model[key] = ''
495
- })
496
- },
497
-
498
- bulkOperations (name, type) {
499
- if (name === '批量销户') {
500
- this.batcan = true
501
- this.batenable = false
502
- this.newArea = false
503
- } else if (name === '批量启用') {
504
- this.batenable = true
505
- this.batcan = false
506
- this.newArea = false
507
- }
508
- },
509
- batchSuccess () {
510
- this.clearCondition()
511
- this.batchClean()
512
- },
513
- batchClean () {
514
- this.batcan = false
515
- this.batenable = false
516
- this.newArea = false
517
- this.search()
518
- },
519
- buildFile (row) {
520
- // console.log('我是建档。。。', row)
521
- this.row = row
522
- },
523
- // 小区批量建档
524
- bulidFiles (row) {
525
- this.row = null
526
- this.areainfo = row
527
- // 将列表的数据清空
528
- this.$refs.paged.$refs.grid.model.rows = []
529
- },
530
- // 小区批量建档成功
531
- buildFileSuccess (data) {
532
- // console.log('建档案成功', data)
533
- this.model.rows.unshift(data)
534
- },
535
- selfSearch (args) {
536
- console.log('开始查询档案', this.f_filialeid)
537
- if (!this.f_filialeid) {
538
- this.f_filialeid = this.$login.f.orgid
539
- }
540
- args.condition = `${args.condition} and f_filialeid = '${this.f_filialeid}'`
541
- this.criteriaShow = false
542
- this.$refs.paged.$refs.grid.$el.scrollTop = 0
543
- this.model.search(args.condition, args.model)
544
- this.clean()
545
- },
546
- printok () {
547
- console.log('======================')
548
- // this.$dispatch('success')
549
- },
550
- sort (field, rule) {
551
- // 将所有排序方式设为不排序,实现相互排斥
552
- for (let key in this.orderFields) {
553
- if (key === field) {
554
- this.orderFields[key] = rule
555
- } else {
556
- this.orderFields[key] = 'no'
557
- }
558
- }
559
- // 如果新规则不排序,还原为默认排序
560
- if (rule === 'no') {
561
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
562
- } else {
563
- this.model.paramSource.orderitem = `'${field} ${rule}'`
564
- }
565
-
566
- this.search()
567
- },
568
-
569
- getLocation (row) {
570
- // 可能会存在添加,完善,建档
571
- console.log('进入', row)
572
-
573
- addressInfoGen(this, row)
574
- },
575
- areaFiles (row) {
576
- row.isEdit = true
577
- row.f_residential_area_id = row.id
578
- // row.id = null
579
- delete row.id
580
- this.bulidFiles(row)
581
- },
582
-
583
- initAdjustables () {
584
- console.log('初始化调压箱', this.$GetSaleParam)
585
- let arr = []
586
- let filter = this.$login.f.orgid
587
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
588
- let temp = {}
589
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
590
- temp.value = `${item.value.id}`
591
- arr.push(temp)
592
- })
593
- this.adjustables = [{label: '全部', value: ''}, ...arr]
594
- },
595
- importFile () {
596
- this.show = true
597
- },
598
- clear () {
599
- Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
600
- this.$refs.paged.$refs.criteria.model[key] = []
601
- })
602
- this.$refs.paged.$refs.criteria.model.f_user_state = this.f_user_state
603
- },
604
- getorg (val) {
605
- this.f_filialeid = val[0]
606
- }
607
- },
608
- computed: {
609
- userstates () {
610
- return [{label: '预备', value: '预备'}]
611
- },
612
- usegas () {
613
- return [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}]
614
- },
615
- areas () {
616
- let rs = []
617
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
618
- let temp = {
619
- label: this.$login.f.f_allArea[i].label,
620
- value: this.$login.f.f_allArea[i].label
621
- }
622
- rs.push(temp)
623
- }
624
- return [{label: '全部', value: ''}, ...rs]
625
- },
626
- firestates () {
627
- return [
628
- {label: '全部', value: ''},
629
- {label: '点火', value: '1'},
630
- {label: '未点火', value: '0'}
631
- ]
632
- },
633
- jurisdiction () {
634
- return this.$login.r
635
- }
636
- },
637
- watch: {
638
- // 每次查询将查询到的数据存储起来,供选择操作后的替换
639
- 'model.state' (val) {
640
- if (val === '正确') {
641
- this.rows = this.model.rows
642
- }
643
- },
644
- 'f_filialeid' (val) {
645
- loadParamGem(this)
646
- }
647
- },
648
- events: {
649
- FileUpload: function (file, res) {
650
- let data = {
651
- tablename: 't_userinfo',
652
- filepath: res.path
653
- }
654
- this.$resetpost('rs/logic/import', data, {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
655
- console.log('dddddddd', this)
656
- this.close()
657
- this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
658
- this.search()
659
- })
660
- },
661
- 'onFileUpload': function (file, res) {
662
- if (this.batchmoneyShow) {
663
- let param = {
664
- filepath: res.f_downloadpath,
665
- f_operator: this.$login.f.name,
666
- f_operatorid: this.$login.f.id,
667
- f_orgid: this.$login.f.orgid,
668
- f_orgname: this.$login.f.orgs,
669
- f_depid: this.$login.f.depids,
670
- f_depname: this.$login.f.deps
671
- }
672
- let http = new HttpResetClass()
673
- http.load('POST', 'rs/logic/SumSettleFileImport', {data: param}, {
674
- resolveMsg: null,
675
- rejectMsg: '上传失败'
676
- })
677
- }
678
-
679
- if (this.batchMeterShow) {
680
- this.iswork = true
681
- // 当前上传的是批量导入的档案
682
- let param = {
683
- filepath: res.f_downloadpath,
684
- f_operator: this.$login.f.name,
685
- f_operatorid: this.$login.f.id,
686
- f_orgid: this.$login.f.orgid,
687
- f_orgname: this.$login.f.orgs,
688
- f_depid: this.$login.f.depids,
689
- f_depname: this.$login.f.deps
690
- }
691
- let self = this
692
- try {
693
- axios.post('rs/logic/newPrepareSettleFileImport',
694
- {data: param}, {timeout: 10 * 60 * 1000}).then((res) => {
695
- if (res.data) {
696
- self.$showMessage(`本次上传共上传${res.data.totalsum}条数据, 成功${res.data.successnum}条,失败${res.data.errorsum}条,具体失败数据请在稽查查询错误查询中查看!!`)
697
- self.iswork = false
698
- // this.$showAlert('导入成功','success',2000)
699
- }
700
- })
701
- } catch (error) {
702
- if (error.response) {
703
- if (error.response.status == 500) {
704
- this.$showAlert('服务繁忙,请重试!!!', 'danger', 3000)
705
- } else if (error.response.status == 404) {
706
- this.$showAlert('服务运行中,请耐心等待后进行重试!!', 'danger', 3000)
707
- } else {
708
- this.$showAlert(error.response.data, 'danger', 2000)
709
- }
710
- } else if (error.request) {
711
- this.$showAlert(error.request, 'danger', 2000)
712
- } else {
713
- this.$showAlert(error.message, 'danger', 2000)
714
- }
715
- this.iswork = false
716
- }
717
- this.$refs.file.$el.querySelector('input').value = ''
718
- this.batchMeterShow = false
719
- this.search()
720
- }
721
- },
722
- 'confirmaddress' (res) {
723
- console.log('选定地址', res)
724
- }
725
- }
726
- }
727
- </script>
728
- <style>
729
- .nav-tabss ul > li > a {
730
- padding: 5px 10px;
731
- }
732
- </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" v-if="!$parent.$parent.createFile">
34
+ <label class="font_normal_body">客户名称</label>
35
+ <input class="input_search" condition="f_user_name like '%{}%'"
36
+ placeholder='客户姓名'
37
+ style="width:60%" type="text" v-model="model.f_user_name">
38
+ </div>
39
+ <div
40
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
41
+ class="form-group button-range">
42
+ <!--<button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.showFileInfo()">查看批量状态-->
43
+ <!--</button>-->
44
+ <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.createInfoForFile()">批量建档
45
+ </button>
46
+ <button @click="$parent.$parent.createnewfile()" class="button_search button_spacing"
47
+ style="float: right">建档
48
+ </button>
49
+ <button @click="search(), $parent.$parent.clean()" class="button_search button_spacing"
50
+ style="float: right">查询
51
+ </button>
52
+ <button @click="$parent.$parent.clear()" class="button_clear button_spacing"
53
+ style="float: right">清空
54
+ </button>
55
+ <button @click="$parent.$parent.importFile" class="button_export button_spacing"
56
+ style="float: right" v-if="false">导入
57
+ </button>
58
+ <!-- <button class="button_search" style="width: 90px" @click=" $parent.$parent.selectaddress()">选择地址</button>-->
59
+ <button @click="$parent.$parent.bulkOperations('批量销户', 'batch-cancellation')"
60
+ class="button_search button_spacing"
61
+ style="float: right"
62
+ v-if="$parent.$parent.rows && $parent.$parent.rows.length === 1 && $parent.$parent.rows[0].f_user_state !== '正常'">
63
+ 销户
64
+ </button>
65
+ <button @click="$parent.$parent.bulkOperations('批量启用', 'batch-enable')"
66
+ class="button_search button_spacing"
67
+ style="float: right"
68
+ v-if="$parent.$parent.rows && $parent.$parent.rows.length === 1 && $parent.$parent.rows[0].f_user_state === '销户'">
69
+ 启用
70
+ </button>
71
+ <div
72
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
73
+ @click="$parent.$parent.hidden()"
74
+ class="button_spacing"
75
+ style="float: right"></div>
76
+ </div>
77
+ </div>
78
+ <div class="row" v-if="$parent.$parent.criteriaShow">
79
+ <div
80
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
81
+ class="form-group"
82
+ v-if="$parent.$parent.clientWidth<1600&&$parent.$parent.createFile">
83
+ <label class="font_normal_body">客户编号</label>
84
+ <input class="input_search" condition="f_userinfo_code = '{}'"
85
+ placeholder='客户编号'
86
+ style="width:60%" type="text" v-model="model.f_userinfo_code">
87
+ </div>
88
+ <div
89
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
90
+ class="form-group" v-if="$parent.$parent.createFile">
91
+ <label class="font_normal_body">客户名称</label>
92
+ <input class="input_search" condition="f_user_name like '%{}%'"
93
+ placeholder='客户姓名'
94
+ style="width:60%" type="text" v-model="model.f_user_name">
95
+ </div>
96
+ <div
97
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
98
+ class="form-group">
99
+ <label class="font_normal_body">旧客户号</label>
100
+ <input class="input_search" condition="f_olduserinfo_code = '{}'" placeholder='客户编号'
101
+ style="width:60%"
102
+ type="text"
103
+ v-model="model.f_olduserinfo_code">
104
+ </div>
105
+ <div
106
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
107
+ class="form-group">
108
+ <label class="font_normal_body">用气性质</label>
109
+ <v-select :options='$parent.$parent.gasproperties' :value.sync="model.f_gasproperties"
110
+ close-on-select condition="f_gasproperties='{}'"
111
+ placeholder='用气性质' v-model="model.f_gasproperties"></v-select>
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_user_phone = '{}'" placeholder='客户电话' style="width:60%"
118
+ type="text"
119
+ v-model="model.f_user_phone">
120
+ </div>
121
+ <div
122
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
123
+ class="form-group">
124
+ <label class="font_normal_body">客户地址</label>
125
+ <input class="input_search" condition="f_address like '%{}%'" placeholder='客户地址' style="width:60%"
126
+ type="text" v-model="model.f_address">
127
+ </div>
128
+ <div
129
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
130
+ class="form-group">
131
+ <label class="font_normal_body">客户状态</label>
132
+ <v-select :options='$parent.$parent.userstates' :value.sync="model.f_user_state"
133
+ close-on-select condition="f_user_state='{}'"
134
+ :value-single="true"
135
+ placeholder='客户状态' v-model="model.f_user_state"></v-select>
136
+ </div>
137
+ <div
138
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
139
+ class="form-group">
140
+ <label class="font_normal_body">调&ensp;压&ensp;箱</label>
141
+ <v-select :options='$parent.$parent.adjustables' :search='true'
142
+ :value.sync="model.f_adjustable_id"
143
+ close-on-select
144
+ condition="f_adjustable_id = '{}'" placeholder='调压箱'
145
+ v-model='model.f_adjustable_id'></v-select>
146
+ </div>
147
+ <div
148
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
149
+ class="form-group">
150
+ <label class="font_normal_body">开户时间</label>
151
+ <datepicker placeholder="开始日期" v-model="model.startDate" :value.sync="model.startDate" style="width:60%"
152
+ :format="'yyyy-MM-dd'" condition="f_createfile_date >= '{}'">
153
+ </datepicker>
154
+ </div>
155
+ <div
156
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
157
+ class="form-group">
158
+ <label class="font_normal_body">开户时间</label>
159
+ <datepicker placeholder="结束日期" v-model="model.endDate" :value.sync="model.endDate" style="width:60%"
160
+ :format="'yyyy-MM-dd'" condition="f_createfile_date <= '{}'">
161
+ </datepicker>
162
+ </div>
163
+ <div
164
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
165
+ class="form-group">
166
+ <label class="font_normal_body">打印时间</label>
167
+ <datepicker placeholder="开始日期" v-model="model.startPrintDate" :value.sync="model.startPrintDate" style="width:60%"
168
+ :format="'yyyy-MM-dd'" condition="f_printdate >= '{}'">
169
+ </datepicker>
170
+ </div>
171
+ <div
172
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
173
+ class="form-group">
174
+ <label class="font_normal_body">打印时间</label>
175
+ <datepicker placeholder="结束日期" v-model="model.endPrintDate" :value.sync="model.endPrintDate" style="width:60%"
176
+ :format="'yyyy-MM-dd'" condition="f_printdate <= '{}'">
177
+ </datepicker>
178
+ </div>
179
+ <div
180
+ :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
181
+ class="form-group">
182
+ <label class="font_normal_body">工业备注</label>
183
+ <v-select :options='$parent.$parent.industrycomments' :value.sync="model.f_industry_comments"
184
+ close-on-select condition="f_industry_comments='{}'"
185
+ placeholder='气表类型' v-model="model.f_industry_comments"></v-select>
186
+ </div>
187
+ <!--<div-->
188
+ <!--:class="{'col-sm-3':$parent.$parent.clientWidth>1600||!$parent.$parent.createFile,'col-sm-4':$parent.$parent.clientWidth<1600&&$parent.$parent.createFile}"-->
189
+ <!--class="form-group">-->
190
+ <!--<label class="font_normal_body">天然气使用证</label>-->
191
+ <!--<v-select :options='$parent.$parent.usegas' :value.sync="model.f_send_usegas_card"-->
192
+ <!--close-on-select condition="f_send_usegas_card='{}'"-->
193
+ <!--placeholder='天然气使用证' v-model="model.f_send_usegas_card"></v-select>-->
194
+ <!--</div>-->
195
+ </div>
196
+ </div>
197
+ </criteria>
198
+ <data-grid :model="model" class="list_area table_sy" v-ref:grid partial='list'>
199
+ <template partial='head'>
200
+ <tr>
201
+ <th>
202
+ <nobr>序号</nobr>
203
+ </th>
204
+ <th>
205
+ <nobr>客户编号</nobr>
206
+ </th>
207
+ <th>
208
+ <nobr>客户名称</nobr>
209
+ </th>
210
+ <th>
211
+ <nobr>客户电话</nobr>
212
+ </th>
213
+ <th v-if="!$parent.$parent.$parent.isOper">
214
+ <nobr>地址信息</nobr>
215
+ </th>
216
+ <th>
217
+ <nobr>状态</nobr>
218
+ </th>
219
+ <th>
220
+ <nobr>开户时间</nobr>
221
+ </th>
222
+ <!--<th>-->
223
+ <!--<nobr>打印时间</nobr>-->
224
+ <!--</th>-->
225
+ <!--<th>-->
226
+ <!--<nobr>打印状态</nobr>-->
227
+ <!--</th>-->
228
+ <th>
229
+ <nobr>操作</nobr>
230
+ </th>
231
+ </tr>
232
+ </template>
233
+ <template partial='body'>
234
+ <td style="text-align: center;">{{$index + 1}}</td>
235
+ <td style="text-align: center;">{{row.f_userinfo_code}}</td>
236
+ <td style="text-align: center;">{{row.f_user_name}}</td>
237
+ <td style="text-align: center;">{{row.f_user_phone}}</td>
238
+ <td style="text-align: center;" v-if="!$parent.$parent.$parent.isOper">{{row.f_address_detail ? row.f_address + row.f_address_detail :
239
+ row.f_address}}
240
+ </td>
241
+ <td style="text-align: center;">{{row.f_user_state}}</td>
242
+ <td style="text-align: center;">{{row.f_createfile_date}}</td>
243
+ <!--<td style="text-align: center;">{{row.f_printdate}}</td>-->
244
+ <!--<td style="text-align: center;">-->
245
+ <!--<div>{{row.print_stats}}</div>-->
246
+ <!--</td>-->
247
+ <td style="text-align: center;">
248
+ <button type="button" name="button" class="btn btn-link" v-if="row.f_user_state === '正常' || row.f_user_state==='预备'"
249
+ @click.stop="$parent.$parent.$parent.modifyUser(row)">修正
250
+ </button>
251
+ </td>
252
+ </template>
253
+ </data-grid>
254
+ </criteria-paged>
255
+ </div>
256
+ <div v-if="batcan || batenable">
257
+ <batch-cancellation v-if="batcan" :useraccount="model.rows" @clean="batchClean"
258
+ @success="batchSuccess"></batch-cancellation>
259
+ <batch-enable v-if="batenable" :useraccount="model.rows" @clean="batchClean"
260
+ @success="batchSuccess"></batch-enable>
261
+ </div>
262
+ </div>
263
+ </div>
264
+ <div class="binary-right" :style="{width:'70%'}" v-if="createFile">
265
+ <div class="auto" style="height: 100%; margin-top: 1%" >
266
+ <file-user-general-info-new :f_filialeid="f_filialeid" :row="row" :areainfo="areainfo"
267
+ :haslimit="config.hasLimit" @success="renew" @clean="clean"
268
+ :isedit="isedit" :configs="configs"
269
+ @build-success="buildFileSuccess" v-ref:info></file-user-general-info-new>
270
+ </div>
271
+ </div>
272
+
273
+ <modal :show.sync="show" width="500px" title="文件导入" v-ref:modal large backdrop="false">
274
+ <article slot="modal-body" class="modal-body">
275
+ <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
276
+ action="rs/file/uploadFile" tagname="导入档案" v-ref:file :headers="headers"></file-upload>
277
+ </article>
278
+ <footer slot="modal-footer" class="modal-footer">
279
+ </footer>
280
+ </modal>
281
+ <modal :show.sync="batchMeterShow" width="500px" title="文件导入" v-ref:modal large backdrop="false">
282
+ <article slot="modal-body" class="modal-body">
283
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
284
+ </article>
285
+ <footer slot="modal-footer" class="modal-footer">
286
+ </footer>
287
+ </modal>
288
+ <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>
289
+
290
+ <work-busy :is-busy="iswork" v-show="iswork"></work-busy>
291
+ </div>
292
+ </template>
293
+
294
+ <script>
295
+ import {PagedList, HttpResetClass} from 'vue-client'
296
+ import Vue from 'vue'
297
+ import co from 'co'
298
+ import axios from 'axios'
299
+
300
+ let loadParamGem = async function (self) {
301
+ await self.$getConfig(self, 'UserFiles')
302
+ self.headers.username = Vue.$login.f.name
303
+ self.headers.username = Vue.$login.guid()
304
+ await self.$LoadParams.loadParam(self.f_filialeid)
305
+ // await self.$LoadParams.loadMeterBook(self.f_filialeid)
306
+ await self.search()
307
+ self.initAdjustables()
308
+ }
309
+
310
+ let addressInfoGen = async function (self, areainfo) {
311
+ areainfo.isEdit = false
312
+ if (areainfo.file_num > 0 && !areainfo.f_userinfo_id) {
313
+ // 完善
314
+ // 将表档案信息带入,完善客户信息
315
+ let getMetersInfo = await self.$resetpost('rs/logic/sale_getMeterByAddress', {
316
+ data: {
317
+ f_useraddress_id: areainfo.id
318
+ }
319
+ }, {resolveMsg: null, rejectMsg: '获取表信息出错'})
320
+ areainfo.meter = getMetersInfo.data[0]
321
+ }
322
+ if (areainfo.file_num > 0 && areainfo.f_userinfo_id) {
323
+ // 添加 将客户信息带入
324
+ let getUserinfo = await self.$resetpost('rs/sql/saleSingleTable', {
325
+ data: {
326
+ tablename: 't_userinfo',
327
+ condition: `f_userinfo_id = '${areainfo.f_userinfo_id}'`
328
+ }
329
+ }, {resolveMsg: null, rejectMsg: '获取档案出错'})
330
+
331
+ areainfo.user = getUserinfo.data[0]
332
+ }
333
+ self.bulidFiles(areainfo)
334
+ }
335
+
336
+ export default {
337
+ 'title': '预备户管理',
338
+ data () {
339
+ return {
340
+ iswork: false,
341
+ config: {
342
+ createType: ['address', 'area'], // 建档方式: address-地址建档 area-小区建档
343
+ hasLimit: true
344
+ },
345
+ model: new PagedList('rs/sql/Prepare_filemanage_getUserfies', 30, {orderitem: '"f_userinfo_id DESC"'}),
346
+ row: null, // 选择一条客户信息,对其进行修改
347
+ areainfo: null, // 小区批量建档使用的数据
348
+ rows: [], // 客户档案选择一条时,将只显示一条信息,rows用来存放整页的数据
349
+ headers: {'username': this.$login.f.name, 'blodid': this.$login.guid()},
350
+ contract: [{label: '全部', value: ' is null or f_contract_id is not null'}, {
351
+ label: '有',
352
+ value: ' is not null'
353
+ },
354
+ {label: '无', value: ' is null'}],
355
+ industrycomments: this.$appdata.getParam('工业备注') ? [{
356
+ label: '全部',
357
+ value: ''
358
+ }, ...this.$appdata.getParam('工业备注')] : [],
359
+ orderDefault: 'f_createfile_date desc',
360
+ orderFields: {
361
+ f_userinfo_id: 'no'
362
+ },
363
+
364
+ createFile: false,
365
+
366
+ curorgid: [this.$login.f.orgid],
367
+ f_filialeid: this.$login.f.orgid,
368
+
369
+ // 销户启用
370
+ batcan: false,
371
+ batenable: false,
372
+ version: '',
373
+
374
+ inputtores: this.$appdata.getParam('抄表员'),
375
+ adjustables: [],
376
+
377
+ // 导入组件
378
+ show: false,
379
+
380
+ // 点击建档或修正时控制列表展示, 防止拥挤
381
+ isOper: false,
382
+
383
+ criteriaShow: false,
384
+
385
+ gasproperties: this.$appdata.getParam('用气性质') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')] : [],
386
+ f_user_state: '预备',
387
+ showselectaddress: false,
388
+ isedit: false,
389
+ clientWidth: document.body.clientWidth,
390
+ batchMeterShow: false,
391
+ billData: {
392
+ url: 'rs/report/userignition',
393
+ bill: ''
394
+ },
395
+ configs: {
396
+ hasPrint: false, // 默认打票
397
+ hasBillManage: false // 默认不启用发票管理
398
+ },
399
+ printflag: false,
400
+ newdata: {}
401
+ }
402
+ },
403
+ ready () {
404
+ this.$refs.paged.$refs.criteria.model.f_user_state = this.f_user_state
405
+ loadParamGem(this)
406
+ },
407
+ compiled () {
408
+ window.onresize = () => {
409
+ return (() => {
410
+ this.clientWidth = document.body.clientWidth
411
+ })()
412
+ }
413
+ },
414
+ methods: {
415
+ close () {
416
+ this.printflag = false
417
+ this.clean()
418
+ },
419
+ async downFiles (index, row) {
420
+ let param = {
421
+ f_userinfo_id: row.f_userinfo_id,
422
+ version: row.version,
423
+ f_print_lc: '是',
424
+ f_printdate: this.$login.toStandardTimeString()
425
+ }
426
+ await await this.$resetpost('rs/logic/updateprint', {param}, {resolveMsg: null, rejectMsg: ''})
427
+ console.log('xxxxxxxxxxxxxxxxxxxxx')
428
+ // 下载不同文件
429
+ if (index == 0) {
430
+ let url = 'rs/report/userinstall'
431
+ this.billData.url = url
432
+ } else {
433
+ let url = 'rs/report/userignition'
434
+ this.billData.url = url
435
+ }
436
+ this.newdata = row
437
+ this.printflag = true
438
+ },
439
+ showFileInfo () {
440
+
441
+ },
442
+ closemodal () {
443
+ this.batchMeterShow = false
444
+ },
445
+ createInfoForFile () {
446
+ this.batchMeterShow = true
447
+ },
448
+ hidden () {
449
+ this.criteriaShow = !this.criteriaShow
450
+ },
451
+ search () {
452
+ this.$refs.paged.$refs.criteria.model.f_user_state = this.f_user_state
453
+ // this.$refs.paged.$refs.criteria.search()
454
+ },
455
+ modifyUser (row) {
456
+ this.isOper = true
457
+ this.createFile = true
458
+ this.isedit = true
459
+ this.row = row
460
+ this.areainfo = null
461
+ this.row.version = row.version
462
+ console.log('row.version====>', this.row.version)
463
+ },
464
+ clean () {
465
+ this.createFile = false
466
+ this.row = null
467
+ this.isOper = false
468
+ this.areainfo = null
469
+ // this.$refs.paged.$refs.grid.select(null)
470
+ this.$refs.paged.$refs.grid.model.rows = this.rows
471
+ this.search()
472
+ },
473
+ createnewfile () {
474
+ this.isOper = true
475
+ this.createFile = true
476
+ this.isedit = false
477
+ this.row = null
478
+ this.areainfo = null
479
+ this.$refs.info.clearinfo()
480
+ },
481
+ renew () {
482
+ this.row = null
483
+ this.areainfo = null
484
+ this.isOper = false
485
+ this.$refs.info.clearinfo()
486
+ this.clearCondition()
487
+ this.search()
488
+ this.$refs.paged.$refs.criteria.search()
489
+ // 建档或修正档案成功刷新地址列表
490
+ // this.$refs.info.$refs.useressential.$refs.$refs.useressential.fileaddress.$refs.paged.$refs.cri.search()
491
+ },
492
+ clearCondition () {
493
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
494
+ this.$refs.paged.$refs.criteria.model[key] = ''
495
+ })
496
+ },
497
+
498
+ bulkOperations (name, type) {
499
+ if (name === '批量销户') {
500
+ this.batcan = true
501
+ this.batenable = false
502
+ this.newArea = false
503
+ } else if (name === '批量启用') {
504
+ this.batenable = true
505
+ this.batcan = false
506
+ this.newArea = false
507
+ }
508
+ },
509
+ batchSuccess () {
510
+ this.clearCondition()
511
+ this.batchClean()
512
+ },
513
+ batchClean () {
514
+ this.batcan = false
515
+ this.batenable = false
516
+ this.newArea = false
517
+ this.search()
518
+ },
519
+ buildFile (row) {
520
+ // console.log('我是建档。。。', row)
521
+ this.row = row
522
+ },
523
+ // 小区批量建档
524
+ bulidFiles (row) {
525
+ this.row = null
526
+ this.areainfo = row
527
+ // 将列表的数据清空
528
+ this.$refs.paged.$refs.grid.model.rows = []
529
+ },
530
+ // 小区批量建档成功
531
+ buildFileSuccess (data) {
532
+ // console.log('建档案成功', data)
533
+ this.model.rows.unshift(data)
534
+ },
535
+ selfSearch (args) {
536
+ console.log('开始查询档案', this.f_filialeid)
537
+ if (!this.f_filialeid) {
538
+ this.f_filialeid = this.$login.f.orgid
539
+ }
540
+ args.condition = `${args.condition} and f_filialeid = '${this.f_filialeid}'`
541
+ this.criteriaShow = false
542
+ this.$refs.paged.$refs.grid.$el.scrollTop = 0
543
+ this.model.search(args.condition, args.model)
544
+ this.clean()
545
+ },
546
+ printok () {
547
+ console.log('======================')
548
+ // this.$dispatch('success')
549
+ },
550
+ sort (field, rule) {
551
+ // 将所有排序方式设为不排序,实现相互排斥
552
+ for (let key in this.orderFields) {
553
+ if (key === field) {
554
+ this.orderFields[key] = rule
555
+ } else {
556
+ this.orderFields[key] = 'no'
557
+ }
558
+ }
559
+ // 如果新规则不排序,还原为默认排序
560
+ if (rule === 'no') {
561
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
562
+ } else {
563
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
564
+ }
565
+
566
+ this.search()
567
+ },
568
+
569
+ getLocation (row) {
570
+ // 可能会存在添加,完善,建档
571
+ console.log('进入', row)
572
+
573
+ addressInfoGen(this, row)
574
+ },
575
+ areaFiles (row) {
576
+ row.isEdit = true
577
+ row.f_residential_area_id = row.id
578
+ // row.id = null
579
+ delete row.id
580
+ this.bulidFiles(row)
581
+ },
582
+
583
+ initAdjustables () {
584
+ console.log('初始化调压箱', this.$GetSaleParam)
585
+ let arr = []
586
+ let filter = this.$login.f.orgid
587
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
588
+ let temp = {}
589
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
590
+ temp.value = `${item.value.id}`
591
+ arr.push(temp)
592
+ })
593
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
594
+ },
595
+ importFile () {
596
+ this.show = true
597
+ },
598
+ clear () {
599
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
600
+ this.$refs.paged.$refs.criteria.model[key] = []
601
+ })
602
+ this.$refs.paged.$refs.criteria.model.f_user_state = this.f_user_state
603
+ },
604
+ getorg (val) {
605
+ this.f_filialeid = val[0]
606
+ }
607
+ },
608
+ computed: {
609
+ userstates () {
610
+ return [{label: '预备', value: '预备'}]
611
+ },
612
+ usegas () {
613
+ return [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}]
614
+ },
615
+ areas () {
616
+ let rs = []
617
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
618
+ let temp = {
619
+ label: this.$login.f.f_allArea[i].label,
620
+ value: this.$login.f.f_allArea[i].label
621
+ }
622
+ rs.push(temp)
623
+ }
624
+ return [{label: '全部', value: ''}, ...rs]
625
+ },
626
+ firestates () {
627
+ return [
628
+ {label: '全部', value: ''},
629
+ {label: '点火', value: '1'},
630
+ {label: '未点火', value: '0'}
631
+ ]
632
+ },
633
+ jurisdiction () {
634
+ return this.$login.r
635
+ }
636
+ },
637
+ watch: {
638
+ // 每次查询将查询到的数据存储起来,供选择操作后的替换
639
+ 'model.state' (val) {
640
+ if (val === '正确') {
641
+ this.rows = this.model.rows
642
+ }
643
+ },
644
+ 'f_filialeid' (val) {
645
+ loadParamGem(this)
646
+ }
647
+ },
648
+ events: {
649
+ FileUpload: function (file, res) {
650
+ let data = {
651
+ tablename: 't_userinfo',
652
+ filepath: res.path
653
+ }
654
+ this.$resetpost('rs/logic/import', data, {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
655
+ console.log('dddddddd', this)
656
+ this.close()
657
+ this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
658
+ this.search()
659
+ })
660
+ },
661
+ 'onFileUpload': function (file, res) {
662
+ if (this.batchmoneyShow) {
663
+ let param = {
664
+ filepath: res.f_downloadpath,
665
+ f_operator: this.$login.f.name,
666
+ f_operatorid: this.$login.f.id,
667
+ f_orgid: this.$login.f.orgid,
668
+ f_orgname: this.$login.f.orgs,
669
+ f_depid: this.$login.f.depids,
670
+ f_depname: this.$login.f.deps
671
+ }
672
+ let http = new HttpResetClass()
673
+ http.load('POST', 'rs/logic/SumSettleFileImport', {data: param}, {
674
+ resolveMsg: null,
675
+ rejectMsg: '上传失败'
676
+ })
677
+ }
678
+
679
+ if (this.batchMeterShow) {
680
+ this.iswork = true
681
+ // 当前上传的是批量导入的档案
682
+ let param = {
683
+ filepath: res.f_downloadpath,
684
+ f_operator: this.$login.f.name,
685
+ f_operatorid: this.$login.f.id,
686
+ f_orgid: this.$login.f.orgid,
687
+ f_orgname: this.$login.f.orgs,
688
+ f_depid: this.$login.f.depids,
689
+ f_depname: this.$login.f.deps
690
+ }
691
+ let self = this
692
+ try {
693
+ axios.post('rs/logic/newPrepareSettleFileImport',
694
+ {data: param}, {timeout: 10 * 60 * 1000}).then((res) => {
695
+ if (res.data) {
696
+ self.$showMessage(`本次上传共上传${res.data.totalsum}条数据, 成功${res.data.successnum}条,失败${res.data.errorsum}条,具体失败数据请在稽查查询错误查询中查看!!`)
697
+ self.iswork = false
698
+ // this.$showAlert('导入成功','success',2000)
699
+ }
700
+ })
701
+ } catch (error) {
702
+ if (error.response) {
703
+ if (error.response.status == 500) {
704
+ this.$showAlert('服务繁忙,请重试!!!', 'danger', 3000)
705
+ } else if (error.response.status == 404) {
706
+ this.$showAlert('服务运行中,请耐心等待后进行重试!!', 'danger', 3000)
707
+ } else {
708
+ this.$showAlert(error.response.data, 'danger', 2000)
709
+ }
710
+ } else if (error.request) {
711
+ this.$showAlert(error.request, 'danger', 2000)
712
+ } else {
713
+ this.$showAlert(error.message, 'danger', 2000)
714
+ }
715
+ this.iswork = false
716
+ }
717
+ this.$refs.file.$el.querySelector('input').value = ''
718
+ this.batchMeterShow = false
719
+ this.search()
720
+ }
721
+ },
722
+ 'confirmaddress' (res) {
723
+ console.log('选定地址', res)
724
+ }
725
+ }
726
+ }
727
+ </script>
728
+ <style>
729
+ .nav-tabss ul > li > a {
730
+ padding: 5px 10px;
731
+ }
732
+ </style>