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