sale-client 4.3.17 → 4.3.19

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