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