manage-client 3.2.225 → 3.2.230

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