manage-client 3.2.211 → 3.2.212

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.
@@ -1,528 +1,528 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div :class="{'basic-main':!useraddressShow,'binary-left':useraddressShow}" @keyup.enter="search">
4
- <div class="flex" v-if="!show">
5
-
6
- <criteria-paged :model="model" v-ref:paged @sort="sort">
7
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
- <div class="row">
10
- <div class="col-sm-2 form-group">
11
- <label for="startDate" class="font_normal_body">开始日期</label>
12
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
13
- v-model="model.startDate"
14
- :value.sync="model.startDate"
15
- :format="'yyyy-MM-dd HH:mm:ss'"
16
- :show-reset-button="true"
17
- condition="f_operate_date >= '{}'">
18
- </datepicker>
19
- </div>
20
- <div class="col-sm-2 form-group">
21
- <label for="endDate" class="font_normal_body">结束日期</label>
22
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
23
- v-model="model.endDate"
24
- :value.sync="model.endDate"
25
- :format="'yyyy-MM-dd HH:mm:ss'"
26
- :show-reset-button="true"
27
- condition="f_operate_date <= '{}'">
28
- </datepicker>
29
- </div>
30
- <div class="col-sm-2 form-group">
31
- <label class="font_normal_body">客户编号</label>
32
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
33
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
34
- </div>
35
- <div class="col-sm-2 form-group" v-show="false">
36
- <label class="font_normal_body" title="旧客户编号">档案编号</label>
37
- <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
38
- condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
39
- </div>
40
-
41
- <div class="span" style="float:right;">
42
- <button class="button_search button_spacing" @click="search()">查询</button>
43
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
44
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
45
-
46
- <export-excel :data="$parent.$parent.getCondition"
47
- :field="$parent.$parent.getfield"
48
- :header="$parent.$parent.other"
49
- sqlurl="rs/logic/exportfile" sql-name="CancellationQuery" template-name='销户查询导出'
50
- :choose-col="true"></export-excel>
51
- <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
52
- :defaultfield="$parent.$parent.defaultfield"
53
- titletable="销户记录"
54
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
55
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
56
- </div>
57
- </div>
58
-
59
- <div class="row" v-show="$parent.$parent.criteriaShow">
60
- <res-select-group :initres="$parent.$parent.initres" :show-component="$parent.$parent.showCom" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
61
- <div class="col-sm-2 form-group">
62
- <label class="font_normal_body">客户名称</label>
63
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
64
- condition=" f_user_name like '%{}%'" placeholder='客户名称'>
65
- </div>
66
- <div class="col-sm-2 form-group" v-show="false">
67
- <label class="font_normal_body">客户地址</label>
68
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
69
- condition="f_address like '%{}%'" placeholder='客户地址'>
70
- </div>
71
- <!-- <div class="col-sm-2 form-group">-->
72
- <!-- <label class="font_normal_body">操作类型</label>-->
73
- <!-- <v-select :value.sync="model.f_operat_type"-->
74
- <!-- v-model="model.f_operat_type"-->
75
- <!-- :options='$parent.$parent.operattype' placeholder='请选择'-->
76
- <!-- condition="f_operat_type = '{}'"-->
77
- <!-- close-on-select></v-select>-->
78
- <!-- </div>-->
79
- </div>
80
- </div>
81
- </criteria>
82
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
83
- <template partial='head'>
84
- <tr>
85
- <th>
86
- <data-order field="f_userinfo_code" name="客户编号"
87
- :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
88
- </th>
89
- <th>
90
- <nobr>客户名称</nobr>
91
- </th>
92
- <th>
93
- <nobr>档案编号</nobr>
94
- </th>
95
- <th>
96
- <nobr>客户类型</nobr>
97
- </th>
98
- <th>
99
- <nobr>联系电话</nobr>
100
- </th>
101
- <th>
102
- <data-order field="f_address" name="客户地址"
103
- :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
104
- </th>
105
- <th>
106
- <nobr>表号</nobr>
107
- </th>
108
- <th>
109
- <nobr>销户原因</nobr>
110
- </th>
111
- <th>
112
- <nobr>状态</nobr>
113
- </th>
114
- <th>
115
- <data-order field="f_operate_date" name="销户日期"
116
- :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
117
- </th>
118
- <th>
119
- <nobr>操作类型</nobr>
120
- </th>
121
- <th>
122
- <nobr>人员</nobr>
123
- </th>
124
- <th>
125
- <nobr>部门</nobr>
126
- </th>
127
- <th>
128
- <nobr>公司</nobr>
129
- </th>
130
- <th>
131
- <nobr>操作</nobr>
132
- </th>
133
- <th><nobr>附件</nobr></th>
134
- </tr>
135
- </template>
136
- <template partial='body'>
137
- <td style="text-align: center;">
138
- <nobr>
139
- <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
140
- </td>
141
- <td style="text-align: center;">
142
- <nobr>{{row.f_user_name}}</nobr>
143
- </td>
144
- <td style="text-align: center;">
145
- <nobr>{{row.f_olduserinfo_code}}</nobr>
146
- </td>
147
- <td style="text-align: center;">
148
- <nobr>{{row.f_user_type}}</nobr>
149
- </td>
150
- <td style="text-align: center;">
151
- <nobr>{{row.f_user_phone}}</nobr>
152
- </td>
153
- <td style="text-align: center;">
154
- <nobr>{{row.f_address}}</nobr>
155
- </td>
156
- <td style="text-align: center;">
157
- <nobr>{{row.f_meternumber}}</nobr>
158
- </td>
159
- <td style="text-align: center;">
160
- <nobr>{{row.f_comments}}</nobr>
161
- </td>
162
- <td style="text-align: center;">
163
- <nobr>{{row.f_state}}</nobr>
164
- </td>
165
- <td style="text-align: center;">
166
- <nobr>{{row.f_operate_date}}</nobr>
167
- </td>
168
- <td style="text-align: center;">
169
- <nobr>{{row.f_operat_type}}</nobr>
170
- </td>
171
- <td style="text-align: center;">
172
- <nobr>{{row.f_operator}}</nobr>
173
- </td>
174
- <td style="text-align: center;">
175
- <nobr>{{row.f_depname}}</nobr>
176
- </td>
177
- <td style="text-align: center;">
178
- <nobr>{{row.f_orgname}}</nobr>
179
- </td>
180
- <td style="text-align: center;" v-if="row.f_state === '销户'&& row.num== 1">
181
- <nobr><a href="#" @click="$parent.$parent.$parent.enable(row)">启用</a> | <a href="#" @click="$parent.$parent.$parent.modifyAddress(row)">修改地址</a></nobr>
182
- </td>
183
- <td style="text-align: center;" v-else>
184
- </td>
185
- <td style="text-align: center;"><nobr>
186
- <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
187
- </nobr></td>
188
- </template>
189
- <template partial='foot'></template>
190
- </data-grid>
191
- </criteria-paged>
192
- <!-- <table class="table-hover">-->
193
- <!-- <tr style="position: relative" class="table-bordered">-->
194
- <!-- <td-->
195
- <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">-->
196
- <!-- 汇总信息-->
197
- <!-- </td>-->
198
- <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">合计:&emsp;{{sumsmodel.f_pregas}}</td>-->
199
- <!-- </tr>-->
200
- <!-- </table>-->
201
- </div>
202
- <div class="flex" v-if="show">
203
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
204
- </div>
205
- </div>
206
- <div class="binary-right" v-show="useraddressShow">
207
- <div class="flex">
208
- <user-address v-ref:useraddressmsg
209
- :f_filialeids.sync="f_filialeids"></user-address>
210
-
211
- <user-address-change v-if="addressId" :address_id="addressId"></user-address-change>
212
- </div>
213
- <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
214
- <article slot="modal-body">
215
- <upload :blodid="selected.f_userinfo_id" v-ref:upload isupload="false" takeimg="false" fusetype="销户" :isremark="false" style="width:auto" ></upload>
216
- </article>
217
- <footer slot="modal-footer" class="modal-footer">
218
- </footer>
219
- </modal>
220
- <modal :show.sync="enbaleShow" v-if="enbaleShow" width="50%" style="width:auto;">
221
- <article slot="modal-body" class="modal-body">
222
- <div class="auto">
223
- <validator name='v'>
224
- <form class="form-horizontal">
225
- <p class="bg-info text-center" style="padding: 8px;">启用信息</p>
226
- <div class="form-group" style="margin-top:10px;">
227
- <label for="f_reason" class=" font_normal_body">销户原因:</label>
228
- <input class="input_search" style="width:80%" v-model="enableData.f_comments" disabled="">
229
- </div>
230
- <div class="form-group" style="margin-top:10px;">
231
- <div :class="[$v.f_reason.required ? 'has-error' : 'has-success']">
232
- <label for="f_reason" class=" font_normal_body">启用原因:</label>
233
- <input class="input_search" style="width:80%" v-model="enableData.f_reason" v-validate:f_reason='{required: true }' rows="3" placeholder="请填写原因">
234
- </div>
235
- </div>
236
- </form>
237
- <div style="text-align:right;height:auto;margin-top:30px;margin-right:50px;">
238
- <button class="button_search" @click="confirmEnable()" :disabled='!$v.valid'>确认</button>
239
- <button class="button_clear" @click="clean()">取消</button>
240
- </div>
241
- </validator>
242
- </div>
243
- </article>
244
- <footer slot="modal-footer" class="modal-footer">
245
- </footer>
246
- </modal>
247
- </div>
248
- </template>
249
-
250
- <script>
251
- import {PagedList} from 'vue-client'
252
- import defaultPrint from './config/DefaultPrint'
253
- import exportConfig from './config/exportConfig'
254
-
255
- let readySomething = async function (self) {
256
- self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
257
- self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
258
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
259
- // await self.$refs.paged.$refs.cri.search()
260
- //self.$refs.paged.$refs.cri.model.f_sendsuccess = ['有效']
261
- await self.$MagLoadParams.loadParam()
262
-
263
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
264
- }
265
- export default {
266
- props:['data'],
267
- title: '销户查询',
268
- data() {
269
- return {
270
- data: {},
271
- other: [],
272
- footer: [],
273
- model: new PagedList('rs/sql/CancellationQuery', 20, {orderitem: this.orderitem?`${this.orderitem}`: " 'f_operate_date desc '"}),
274
- criteriaShow: false,
275
- headData: ["客户编号", "客户名称", "操作人", "操作日期", "销户状态", "销户原因", "同步状态"],
276
- bodyData: ["f_userinfo_id", "f_user_name", "f_operator", "f_operate_date", "f_state", "f_comments", "f_sendsuccess"],
277
- orgCondtionStr: '',
278
- show:false,
279
- f_filialeids: this.$login.f.orgid,
280
- useraddressShow: false,
281
- addressId: '',
282
- rowdata:{},
283
- enableData: {
284
- f_reason: ''
285
- },
286
- enbaleShow: false,
287
- modelval: [],
288
- printshow: false,
289
- all: false,
290
- fields: {},
291
- thead: '',
292
- showupload:false,
293
- config: {
294
- defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_type', 'f_changemeter_fee', 'f_meternumber_old', 'f_meternumber', 'f_change_operator', 'f_state', 'f_operate_date']
295
- },
296
- //排序
297
- orderitem:'f_operate_date desc',
298
- orderFields: {
299
- f_operate_date: 'no'
300
- },
301
- defaultfield: [],
302
- selected:{},
303
- tfoot: '',
304
- initres: {
305
- org:[this.$login.f.orgid],
306
- dep:[],
307
- user:[],
308
- },
309
- //合计数据
310
- sumsmodel: {},
311
- operattype:[{label: '全部', value: ''},{label: '销户', value: '销户'},{label: '销户启用', value: '销户启用'}],
312
- showCom:['company','department','operator']
313
- }
314
- },
315
- ready() {
316
- readySomething(this).then(() => {
317
- this.$emit('ready')
318
- }).catch((error) => {
319
- this.$emit('error', error)
320
- })
321
- },
322
- methods: {
323
- modifyAddress(obj) {
324
- this.addressId=obj.addrid
325
- this.useraddressShow=true
326
- this.$refs.useraddressmsg.cleardara()
327
- this.$refs.useraddressmsg.initdata()
328
- this.$refs.useraddressmsg.usertype=obj.f_user_type
329
- this.$refs.useraddressmsg.operation='modify'
330
- this.$refs.useraddressmsg.onedata='one'
331
- this.$refs.useraddressmsg.model=Object.assign({},this.$refs.useraddressmsg.model,obj)
332
- if(obj.f_special=='1'){
333
- this.$refs.useraddressmsg.usertype = true
334
- }else{
335
- this.$refs.useraddressmsg.usertype = false
336
- }
337
- if (obj.f_slice_area) {
338
- this.$refs.useraddressmsg.model.slice_area = [{
339
- name: this.$refs.useraddressmsg.model.f_slice_area,
340
- code: this.$refs.useraddressmsg.model.f_area_code
341
- }]
342
- }
343
- },
344
- enable(row) {
345
- Object.assign(this.enableData, row)
346
- this.enbaleShow = true
347
- },
348
- confirmEnable() {
349
- let data = {
350
- f_operat_type: '销户启用',
351
- f_describe: `${this.$login.f.name}对客户${this.enableData.f_user_name}进行启用`,
352
- f_user_id: this.enableData.f_user_id,
353
- f_user_name: this.enableData.f_user_name,
354
- f_state: '正常',
355
- f_comments: this.enableData.f_reason,
356
- f_operator: this.$login.f.name,
357
- f_operatorid: this.$login.f.id,
358
- f_orgid: this.$login.f.orgid,
359
- f_orgname: this.$login.f.orgs,
360
- f_depid: this.$login.f.depids,
361
- f_depname: this.$login.f.deps,
362
- f_userinfo_id : this.enableData.f_userinfo_id
363
- }
364
- this.$resetpost('rs/logic/saveSingleCancellation', data, {resolveMsg: '启用成功', rejectMsg: '启用失败'})
365
- },
366
- clean() {
367
- this.enbaleShow = false
368
- },
369
- view(row){
370
- this.showupload = true
371
- this.selected= row
372
- },
373
- getotherfooter() {
374
- // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
375
- // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
376
- this.other = [];
377
- this.footer = [];
378
- let exportdata = this.getCondition;
379
- let otherInData = [];
380
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
381
- let footerData = [], exportfield = this.getfield;
382
- footerData.push("合计");
383
- let self = this;
384
- for (var field in self.sumsmodel) {
385
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
386
- }
387
- this.footer.push(footerData);
388
- this.other.push(otherInData);
389
- },
390
- search(){
391
- this.$refs.paged.$refs.cri.search()
392
- },
393
- selfSearch(args) {
394
- if (this.data) {
395
- this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
396
- this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
397
- }
398
- args.condition = `${args.condition}` + this.orgCondtionStr
399
- this.model.search(args.condition, args.model)
400
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
401
- },
402
- clear() {
403
- //清空部门和人员
404
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
405
- //部门和人员变为全选
406
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
407
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
408
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
409
- this.$refs.paged.$refs.cri.model[key] = []
410
- })
411
- },
412
- show() {
413
- this.criteriaShow = true
414
- },
415
- hidden() {
416
- this.criteriaShow = !this.criteriaShow
417
- },
418
- getRes(obj) {
419
- this.orgCondtionStr = obj
420
- },
421
- stamp() {
422
- this.all = false
423
- //默认选择要打印的列
424
- this.modelval = defaultPrint.config
425
- this.fields = this.getfield
426
- console.log('所有打印字段', this.fields)
427
- this.printshow = true
428
- this.put()
429
- },
430
- sort (field, rule) {
431
- // 将所有排序方式设为不排序,实现相互排斥
432
- for (let key in this.orderFields) {
433
- if (key === field) {
434
- this.orderFields[key] = rule
435
- } else {
436
- this.orderFields[key] = 'no'
437
- }
438
- }
439
- // 如果新规则不排序,还原为默认排序
440
- if (rule === 'no') {
441
- this.model.paramSource.orderitem = `'${this.orderitem}'`
442
- } else {
443
- this.model.paramSource.orderitem = `'${field} ${rule}'`
444
- }
445
-
446
- this.search()
447
- },
448
-
449
- put() {
450
- // 对Modelval进行排序
451
- this.sortModelval()
452
- this.thead = `<tr><th colspan=${this.modelval.length}>销户查询报表</th></tr><tr>`
453
- for (let key of this.modelval) {
454
- this.thead += '<th>' + this.fields[key] + '</th>'
455
- }
456
- this.thead += '</tr>'
457
- },
458
- cancel() {
459
- this.show = false
460
- },
461
- dealmsg(val) {
462
- console.log('---------------dealmsg')
463
- this.rowdata=val
464
- this.show=true
465
- val.model = this.model.model
466
- this.$dispatch('deal-msg', val)
467
- },
468
- print() {
469
- this.$refs.print.PrintAsFile()
470
- this.printshow = false
471
- },
472
- close() {
473
- this.printshow = false
474
- this.all = false
475
- },
476
- // 对选择的列进行排序
477
- sortModelval() {
478
- let sortModel = []
479
- Object.keys(this.fields).forEach((key) => {
480
- if (this.modelval.includes(key)) {
481
- sortModel.push(key)
482
- }
483
- })
484
- this.modelval = sortModel
485
- console.log('选择的打印的字段', this.modelval)
486
- }
487
- },
488
- watch: {
489
- 'all'(val) {
490
- if (val) {
491
- this.modelval = this.bodyData
492
- } else {
493
- this.modelval = defaultPrint.config
494
- this.put()
495
- }
496
- },
497
- sumsmodel: {
498
- handler: function (val) {
499
- this.getotherfooter();
500
- },
501
- deep: true
502
- },
503
- 'modelval.length'() {
504
- this.put()
505
- },
506
- },
507
- computed: {
508
- getCondition() {
509
- return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
510
- orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"}
511
- },
512
- getfield() {
513
- return exportConfig.CancellationConfig
514
- }
515
- },
516
- events: {
517
- 'cancel' () {
518
- this.addressId=null
519
- this.useraddressShow = false
520
- },
521
- 'confirm' () {
522
- this.addressId=null
523
- this.useraddressShow = false
524
- this.search()
525
- },
526
- }
527
- }
528
- </script>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div :class="{'basic-main':!useraddressShow,'binary-left':useraddressShow}" @keyup.enter="search">
4
+ <div class="flex" v-if="!show">
5
+
6
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
7
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
+ <div class="row">
10
+ <div class="col-sm-2 form-group">
11
+ <label for="startDate" class="font_normal_body">开始日期</label>
12
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
13
+ v-model="model.startDate"
14
+ :value.sync="model.startDate"
15
+ :format="'yyyy-MM-dd HH:mm:ss'"
16
+ :show-reset-button="true"
17
+ condition="f_operate_date >= '{}'">
18
+ </datepicker>
19
+ </div>
20
+ <div class="col-sm-2 form-group">
21
+ <label for="endDate" class="font_normal_body">结束日期</label>
22
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
23
+ v-model="model.endDate"
24
+ :value.sync="model.endDate"
25
+ :format="'yyyy-MM-dd HH:mm:ss'"
26
+ :show-reset-button="true"
27
+ condition="f_operate_date <= '{}'">
28
+ </datepicker>
29
+ </div>
30
+ <div class="col-sm-2 form-group">
31
+ <label class="font_normal_body">客户编号</label>
32
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
33
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
34
+ </div>
35
+ <div class="col-sm-2 form-group" v-show="false">
36
+ <label class="font_normal_body" title="旧客户编号">档案编号</label>
37
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
38
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
39
+ </div>
40
+
41
+ <div class="span" style="float:right;">
42
+ <button class="button_search button_spacing" @click="search()">查询</button>
43
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
44
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
45
+
46
+ <export-excel :data="$parent.$parent.getCondition"
47
+ :field="$parent.$parent.getfield"
48
+ :header="$parent.$parent.other"
49
+ sqlurl="rs/logic/exportfile" sql-name="CancellationQuery" template-name='销户查询导出'
50
+ :choose-col="true"></export-excel>
51
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
52
+ :defaultfield="$parent.$parent.defaultfield"
53
+ titletable="销户记录"
54
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
55
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
56
+ </div>
57
+ </div>
58
+
59
+ <div class="row" v-show="$parent.$parent.criteriaShow">
60
+ <res-select-group :initres="$parent.$parent.initres" :show-component="$parent.$parent.showCom" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
61
+ <div class="col-sm-2 form-group">
62
+ <label class="font_normal_body">客户名称</label>
63
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
64
+ condition=" f_user_name like '%{}%'" placeholder='客户名称'>
65
+ </div>
66
+ <div class="col-sm-2 form-group" v-show="false">
67
+ <label class="font_normal_body">客户地址</label>
68
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
69
+ condition="f_address like '%{}%'" placeholder='客户地址'>
70
+ </div>
71
+ <!-- <div class="col-sm-2 form-group">-->
72
+ <!-- <label class="font_normal_body">操作类型</label>-->
73
+ <!-- <v-select :value.sync="model.f_operat_type"-->
74
+ <!-- v-model="model.f_operat_type"-->
75
+ <!-- :options='$parent.$parent.operattype' placeholder='请选择'-->
76
+ <!-- condition="f_operat_type = '{}'"-->
77
+ <!-- close-on-select></v-select>-->
78
+ <!-- </div>-->
79
+ </div>
80
+ </div>
81
+ </criteria>
82
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
83
+ <template partial='head'>
84
+ <tr>
85
+ <th>
86
+ <data-order field="f_userinfo_code" name="客户编号"
87
+ :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
88
+ </th>
89
+ <th>
90
+ <nobr>客户名称</nobr>
91
+ </th>
92
+ <th>
93
+ <nobr>档案编号</nobr>
94
+ </th>
95
+ <th>
96
+ <nobr>客户类型</nobr>
97
+ </th>
98
+ <th>
99
+ <nobr>联系电话</nobr>
100
+ </th>
101
+ <th>
102
+ <data-order field="f_address" name="客户地址"
103
+ :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
104
+ </th>
105
+ <th>
106
+ <nobr>表号</nobr>
107
+ </th>
108
+ <th>
109
+ <nobr>销户原因</nobr>
110
+ </th>
111
+ <th>
112
+ <nobr>状态</nobr>
113
+ </th>
114
+ <th>
115
+ <data-order field="f_operate_date" name="销户日期"
116
+ :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
117
+ </th>
118
+ <th>
119
+ <nobr>操作类型</nobr>
120
+ </th>
121
+ <th>
122
+ <nobr>人员</nobr>
123
+ </th>
124
+ <th>
125
+ <nobr>部门</nobr>
126
+ </th>
127
+ <th>
128
+ <nobr>公司</nobr>
129
+ </th>
130
+ <th>
131
+ <nobr>操作</nobr>
132
+ </th>
133
+ <th><nobr>附件</nobr></th>
134
+ </tr>
135
+ </template>
136
+ <template partial='body'>
137
+ <td style="text-align: center;">
138
+ <nobr>
139
+ <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
140
+ </td>
141
+ <td style="text-align: center;">
142
+ <nobr>{{row.f_user_name}}</nobr>
143
+ </td>
144
+ <td style="text-align: center;">
145
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
146
+ </td>
147
+ <td style="text-align: center;">
148
+ <nobr>{{row.f_user_type}}</nobr>
149
+ </td>
150
+ <td style="text-align: center;">
151
+ <nobr>{{row.f_user_phone}}</nobr>
152
+ </td>
153
+ <td style="text-align: center;">
154
+ <nobr>{{row.f_address}}</nobr>
155
+ </td>
156
+ <td style="text-align: center;">
157
+ <nobr>{{row.f_meternumber}}</nobr>
158
+ </td>
159
+ <td style="text-align: center;">
160
+ <nobr>{{row.f_comments}}</nobr>
161
+ </td>
162
+ <td style="text-align: center;">
163
+ <nobr>{{row.f_state}}</nobr>
164
+ </td>
165
+ <td style="text-align: center;">
166
+ <nobr>{{row.f_operate_date}}</nobr>
167
+ </td>
168
+ <td style="text-align: center;">
169
+ <nobr>{{row.f_operat_type}}</nobr>
170
+ </td>
171
+ <td style="text-align: center;">
172
+ <nobr>{{row.f_operator}}</nobr>
173
+ </td>
174
+ <td style="text-align: center;">
175
+ <nobr>{{row.f_depname}}</nobr>
176
+ </td>
177
+ <td style="text-align: center;">
178
+ <nobr>{{row.f_orgname}}</nobr>
179
+ </td>
180
+ <td style="text-align: center;" v-if="row.f_state === '销户'&& row.num== 1">
181
+ <nobr><a href="#" @click="$parent.$parent.$parent.enable(row)">启用</a> | <a href="#" @click="$parent.$parent.$parent.modifyAddress(row)">修改地址</a></nobr>
182
+ </td>
183
+ <td style="text-align: center;" v-else>
184
+ </td>
185
+ <td style="text-align: center;"><nobr>
186
+ <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
187
+ </nobr></td>
188
+ </template>
189
+ <template partial='foot'></template>
190
+ </data-grid>
191
+ </criteria-paged>
192
+ <!-- <table class="table-hover">-->
193
+ <!-- <tr style="position: relative" class="table-bordered">-->
194
+ <!-- <td-->
195
+ <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">-->
196
+ <!-- 汇总信息-->
197
+ <!-- </td>-->
198
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">合计:&emsp;{{sumsmodel.f_pregas}}</td>-->
199
+ <!-- </tr>-->
200
+ <!-- </table>-->
201
+ </div>
202
+ <div class="flex" v-if="show">
203
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
204
+ </div>
205
+ </div>
206
+ <div class="binary-right" v-show="useraddressShow">
207
+ <div class="flex">
208
+ <user-address v-ref:useraddressmsg
209
+ :f_filialeids.sync="f_filialeids"></user-address>
210
+
211
+ <user-address-change v-if="addressId" :address_id="addressId"></user-address-change>
212
+ </div>
213
+ <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
214
+ <article slot="modal-body">
215
+ <upload :blodid="selected.f_userinfo_id" v-ref:upload isupload="false" takeimg="false" fusetype="销户" :isremark="false" style="width:auto" ></upload>
216
+ </article>
217
+ <footer slot="modal-footer" class="modal-footer">
218
+ </footer>
219
+ </modal>
220
+ <modal :show.sync="enbaleShow" v-if="enbaleShow" width="50%" style="width:auto;">
221
+ <article slot="modal-body" class="modal-body">
222
+ <div class="auto">
223
+ <validator name='v'>
224
+ <form class="form-horizontal">
225
+ <p class="bg-info text-center" style="padding: 8px;">启用信息</p>
226
+ <div class="form-group" style="margin-top:10px;">
227
+ <label for="f_reason" class=" font_normal_body">销户原因:</label>
228
+ <input class="input_search" style="width:80%" v-model="enableData.f_comments" disabled="">
229
+ </div>
230
+ <div class="form-group" style="margin-top:10px;">
231
+ <div :class="[$v.f_reason.required ? 'has-error' : 'has-success']">
232
+ <label for="f_reason" class=" font_normal_body">启用原因:</label>
233
+ <input class="input_search" style="width:80%" v-model="enableData.f_reason" v-validate:f_reason='{required: true }' rows="3" placeholder="请填写原因">
234
+ </div>
235
+ </div>
236
+ </form>
237
+ <div style="text-align:right;height:auto;margin-top:30px;margin-right:50px;">
238
+ <button class="button_search" @click="confirmEnable()" :disabled='!$v.valid'>确认</button>
239
+ <button class="button_clear" @click="clean()">取消</button>
240
+ </div>
241
+ </validator>
242
+ </div>
243
+ </article>
244
+ <footer slot="modal-footer" class="modal-footer">
245
+ </footer>
246
+ </modal>
247
+ </div>
248
+ </template>
249
+
250
+ <script>
251
+ import {PagedList} from 'vue-client'
252
+ import defaultPrint from './config/DefaultPrint'
253
+ import exportConfig from './config/exportConfig'
254
+
255
+ let readySomething = async function (self) {
256
+ self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
257
+ self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
258
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
259
+ // await self.$refs.paged.$refs.cri.search()
260
+ //self.$refs.paged.$refs.cri.model.f_sendsuccess = ['有效']
261
+ await self.$MagLoadParams.loadParam()
262
+
263
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
264
+ }
265
+ export default {
266
+ props:['data'],
267
+ title: '销户查询',
268
+ data() {
269
+ return {
270
+ data: {},
271
+ other: [],
272
+ footer: [],
273
+ model: new PagedList('rs/sql/CancellationQuery', 20, {orderitem: this.orderitem?`${this.orderitem}`: " 'f_operate_date desc '"}),
274
+ criteriaShow: false,
275
+ headData: ["客户编号", "客户名称", "操作人", "操作日期", "销户状态", "销户原因", "同步状态"],
276
+ bodyData: ["f_userinfo_id", "f_user_name", "f_operator", "f_operate_date", "f_state", "f_comments", "f_sendsuccess"],
277
+ orgCondtionStr: '',
278
+ show:false,
279
+ f_filialeids: this.$login.f.orgid,
280
+ useraddressShow: false,
281
+ addressId: '',
282
+ rowdata:{},
283
+ enableData: {
284
+ f_reason: ''
285
+ },
286
+ enbaleShow: false,
287
+ modelval: [],
288
+ printshow: false,
289
+ all: false,
290
+ fields: {},
291
+ thead: '',
292
+ showupload:false,
293
+ config: {
294
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_type', 'f_changemeter_fee', 'f_meternumber_old', 'f_meternumber', 'f_change_operator', 'f_state', 'f_operate_date']
295
+ },
296
+ //排序
297
+ orderitem:'f_operate_date desc',
298
+ orderFields: {
299
+ f_operate_date: 'no'
300
+ },
301
+ defaultfield: [],
302
+ selected:{},
303
+ tfoot: '',
304
+ initres: {
305
+ org:[this.$login.f.orgid],
306
+ dep:[],
307
+ user:[],
308
+ },
309
+ //合计数据
310
+ sumsmodel: {},
311
+ operattype:[{label: '全部', value: ''},{label: '销户', value: '销户'},{label: '销户启用', value: '销户启用'}],
312
+ showCom:['company','department','operator']
313
+ }
314
+ },
315
+ ready() {
316
+ readySomething(this).then(() => {
317
+ this.$emit('ready')
318
+ }).catch((error) => {
319
+ this.$emit('error', error)
320
+ })
321
+ },
322
+ methods: {
323
+ modifyAddress(obj) {
324
+ this.addressId=obj.addrid
325
+ this.useraddressShow=true
326
+ this.$refs.useraddressmsg.cleardara()
327
+ this.$refs.useraddressmsg.initdata()
328
+ this.$refs.useraddressmsg.usertype=obj.f_user_type
329
+ this.$refs.useraddressmsg.operation='modify'
330
+ this.$refs.useraddressmsg.onedata='one'
331
+ this.$refs.useraddressmsg.model=Object.assign({},this.$refs.useraddressmsg.model,obj)
332
+ if(obj.f_special=='1'){
333
+ this.$refs.useraddressmsg.usertype = true
334
+ }else{
335
+ this.$refs.useraddressmsg.usertype = false
336
+ }
337
+ if (obj.f_slice_area) {
338
+ this.$refs.useraddressmsg.model.slice_area = [{
339
+ name: this.$refs.useraddressmsg.model.f_slice_area,
340
+ code: this.$refs.useraddressmsg.model.f_area_code
341
+ }]
342
+ }
343
+ },
344
+ enable(row) {
345
+ Object.assign(this.enableData, row)
346
+ this.enbaleShow = true
347
+ },
348
+ confirmEnable() {
349
+ let data = {
350
+ f_operat_type: '销户启用',
351
+ f_describe: `${this.$login.f.name}对客户${this.enableData.f_user_name}进行启用`,
352
+ f_user_id: this.enableData.f_user_id,
353
+ f_user_name: this.enableData.f_user_name,
354
+ f_state: '正常',
355
+ f_comments: this.enableData.f_reason,
356
+ f_operator: this.$login.f.name,
357
+ f_operatorid: this.$login.f.id,
358
+ f_orgid: this.$login.f.orgid,
359
+ f_orgname: this.$login.f.orgs,
360
+ f_depid: this.$login.f.depids,
361
+ f_depname: this.$login.f.deps,
362
+ f_userinfo_id : this.enableData.f_userinfo_id
363
+ }
364
+ this.$resetpost('rs/logic/saveSingleCancellation', data, {resolveMsg: '启用成功', rejectMsg: '启用失败'})
365
+ },
366
+ clean() {
367
+ this.enbaleShow = false
368
+ },
369
+ view(row){
370
+ this.showupload = true
371
+ this.selected= row
372
+ },
373
+ getotherfooter() {
374
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
375
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
376
+ this.other = [];
377
+ this.footer = [];
378
+ let exportdata = this.getCondition;
379
+ let otherInData = [];
380
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
381
+ let footerData = [], exportfield = this.getfield;
382
+ footerData.push("合计");
383
+ let self = this;
384
+ for (var field in self.sumsmodel) {
385
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
386
+ }
387
+ this.footer.push(footerData);
388
+ this.other.push(otherInData);
389
+ },
390
+ search(){
391
+ this.$refs.paged.$refs.cri.search()
392
+ },
393
+ selfSearch(args) {
394
+ if (this.data) {
395
+ this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
396
+ this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
397
+ }
398
+ args.condition = `${args.condition}` + this.orgCondtionStr
399
+ this.model.search(args.condition, args.model)
400
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
401
+ },
402
+ clear() {
403
+ //清空部门和人员
404
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
405
+ //部门和人员变为全选
406
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
407
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
408
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
409
+ this.$refs.paged.$refs.cri.model[key] = []
410
+ })
411
+ },
412
+ show() {
413
+ this.criteriaShow = true
414
+ },
415
+ hidden() {
416
+ this.criteriaShow = !this.criteriaShow
417
+ },
418
+ getRes(obj) {
419
+ this.orgCondtionStr = obj
420
+ },
421
+ stamp() {
422
+ this.all = false
423
+ //默认选择要打印的列
424
+ this.modelval = defaultPrint.config
425
+ this.fields = this.getfield
426
+ console.log('所有打印字段', this.fields)
427
+ this.printshow = true
428
+ this.put()
429
+ },
430
+ sort (field, rule) {
431
+ // 将所有排序方式设为不排序,实现相互排斥
432
+ for (let key in this.orderFields) {
433
+ if (key === field) {
434
+ this.orderFields[key] = rule
435
+ } else {
436
+ this.orderFields[key] = 'no'
437
+ }
438
+ }
439
+ // 如果新规则不排序,还原为默认排序
440
+ if (rule === 'no') {
441
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
442
+ } else {
443
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
444
+ }
445
+
446
+ this.search()
447
+ },
448
+
449
+ put() {
450
+ // 对Modelval进行排序
451
+ this.sortModelval()
452
+ this.thead = `<tr><th colspan=${this.modelval.length}>销户查询报表</th></tr><tr>`
453
+ for (let key of this.modelval) {
454
+ this.thead += '<th>' + this.fields[key] + '</th>'
455
+ }
456
+ this.thead += '</tr>'
457
+ },
458
+ cancel() {
459
+ this.show = false
460
+ },
461
+ dealmsg(val) {
462
+ console.log('---------------dealmsg')
463
+ this.rowdata=val
464
+ this.show=true
465
+ val.model = this.model.model
466
+ this.$dispatch('deal-msg', val)
467
+ },
468
+ print() {
469
+ this.$refs.print.PrintAsFile()
470
+ this.printshow = false
471
+ },
472
+ close() {
473
+ this.printshow = false
474
+ this.all = false
475
+ },
476
+ // 对选择的列进行排序
477
+ sortModelval() {
478
+ let sortModel = []
479
+ Object.keys(this.fields).forEach((key) => {
480
+ if (this.modelval.includes(key)) {
481
+ sortModel.push(key)
482
+ }
483
+ })
484
+ this.modelval = sortModel
485
+ console.log('选择的打印的字段', this.modelval)
486
+ }
487
+ },
488
+ watch: {
489
+ 'all'(val) {
490
+ if (val) {
491
+ this.modelval = this.bodyData
492
+ } else {
493
+ this.modelval = defaultPrint.config
494
+ this.put()
495
+ }
496
+ },
497
+ sumsmodel: {
498
+ handler: function (val) {
499
+ this.getotherfooter();
500
+ },
501
+ deep: true
502
+ },
503
+ 'modelval.length'() {
504
+ this.put()
505
+ },
506
+ },
507
+ computed: {
508
+ getCondition() {
509
+ return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
510
+ orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"}
511
+ },
512
+ getfield() {
513
+ return exportConfig.CancellationConfig
514
+ }
515
+ },
516
+ events: {
517
+ 'cancel' () {
518
+ this.addressId=null
519
+ this.useraddressShow = false
520
+ },
521
+ 'confirm' () {
522
+ this.addressId=null
523
+ this.useraddressShow = false
524
+ this.search()
525
+ },
526
+ }
527
+ }
528
+ </script>