manage-client 4.1.81-linshi-yuncheng → 4.1.82

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": "manage-client",
3
- "version": "4.1.81-linshi-yuncheng",
3
+ "version": "4.1.82",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,577 +1,577 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main" @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">
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" :footer="$parent.$parent.footer"
47
- :field="$parent.$parent.getfield" :header="$parent.$parent.other"
48
- sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="fillCardQuery" template-name='补卡查询导出'
49
- :choose-col="true"></export-excel>
50
- <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
51
- :defaultfield="$parent.$parent.defaultfield"
52
- titletable="补卡记录"
53
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
54
- <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>
55
- </div>
56
- </div>
57
-
58
- <div class="row" v-show="$parent.$parent.criteriaShow">
59
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
60
- <div class="col-sm-2 form-group">
61
- <label class="font_normal_body">客户名称</label>
62
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
63
- condition="f_user_name like '%{}%'" placeholder="客户名称">
64
- </div>
65
- <div class="col-sm-2 form-group">
66
- <label class="font_normal_body">客户地址</label>
67
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
68
- condition="f_address like '%{}%'" placeholder='客户地址'>
69
- </div>
70
- <div class="col-sm-2 form-group">
71
- <label class="font_normal_body">小&emsp;&emsp;区</label>
72
- <v-select :value.sync="model.f_residential_area"
73
- class="select_list select"
74
- v-model="model.f_residential_area"
75
- style="width: 60%"
76
- multiple
77
- condition="f_residential_area in {}"
78
- :options='$parent.$parent.residentialArea' placeholder='选择小区'
79
- close-on-select>
80
-
81
- </v-select>
82
- </div>
83
- <div class="col-sm-2 form-group">
84
- <label class="font_normal_body">补卡类型</label>
85
- <v-select :value.sync="model.f_type"
86
- v-model="model.f_type"
87
- :value-single="true"
88
- :options='$parent.$parent.fillCardTypes' placeholder='请选择'
89
- condition=" f_type = '{}'"
90
- close-on-select clear-button></v-select>
91
- </div>
92
-
93
- <div class="col-sm-2 form-group">
94
- <label class="font_normal_body">卡&emsp;&emsp;号</label>
95
- <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
96
- condition="f_card_id like '%{}%'" placeholder='卡号'>
97
- </div>
98
- <div class="col-sm-2 form-group">
99
- <label class="font_normal_body">表&emsp;&emsp;号</label>
100
- <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
101
- condition="f_meternumber = '{}'" placeholder='表号'>
102
- </div>
103
- <div class="col-sm-2 form-group">
104
- <label class="font_normal_body">气表品牌</label>
105
- <v-select :value.sync="model.f_meter_brand"
106
- v-model="model.f_meter_brand"
107
- :options='$parent.$parent.meterbrands' placeholder='请选择'
108
- condition="f_meter_brand = '{}'"
109
- close-on-select></v-select>
110
- </div>
111
- <div class="col-sm-2 form-group">
112
- <label class="font_normal_body">补卡状态</label>
113
- <v-select :value.sync="model.f_state"
114
- v-model="model.f_state"
115
- :options='$parent.$parent.chargeState' placeholder='请选择'
116
- condition="f_state = '{}'"
117
- close-on-select></v-select>
118
- </div>
119
- <div class="col-sm-2 form-group">
120
- <label class="font_normal_body">付款方式</label>
121
- <v-select id="f_payment"
122
- v-model="model.f_payment"
123
- placeholder='请选择'
124
- condition="f_payment ='{}'"
125
- :value.sync="model.f_payment"
126
- :options='$parent.$parent.payments'
127
- close-on-select clear-button>
128
- </v-select>
129
- </div>
130
- </div>
131
-
132
- </div>
133
- </criteria>
134
-
135
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
136
- <template partial='head'>
137
- <tr>
138
- <th>
139
- <!-- <nobr>客户编号</nobr>-->
140
- <data-order field="f_userinfo_code" name="客户编号"
141
- :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
142
- </th>
143
- <th>
144
- <nobr>客户名称</nobr>
145
- </th>
146
- <th>
147
- <nobr>档案编号</nobr>
148
- </th>
149
- <th>
150
- <nobr>收据票号</nobr>
151
- </th>
152
- <th>
153
- <!-- <nobr>客户地址</nobr>-->
154
- <data-order field="f_address" name="客户地址"
155
- :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
156
- </th>
157
- <th>
158
- <nobr>表号</nobr>
159
- </th>
160
- <th>
161
- <nobr>小区</nobr>
162
- </th>
163
- <th>
164
- <nobr>卡号</nobr>
165
- </th>
166
- <th>
167
- <nobr>气表品牌</nobr>
168
- </th>
169
- <th>
170
- <nobr>补卡类型</nobr>
171
- </th>
172
- <th>
173
- <nobr>补卡种类</nobr>
174
- </th>
175
- <th>
176
- <nobr>补卡原因</nobr>
177
- </th>
178
- <th>
179
- <nobr>卡费</nobr>
180
- </th>
181
- <th>
182
- <!-- <nobr>补卡日期</nobr>-->
183
- <data-order field="f_operate_date" name="补卡日期"
184
- :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
185
- </th>
186
- <th>
187
- <nobr>付款方式</nobr>
188
- </th>
189
- <th>
190
- <nobr>人员</nobr>
191
- </th>
192
- <th>
193
- <nobr>部门</nobr>
194
- </th>
195
- <th>
196
- <nobr>公司</nobr>
197
- </th>
198
- <th><nobr>附件</nobr></th>
199
- </tr>
200
- </template>
201
- <template partial='body'>
202
- <td style="text-align: center;">
203
- <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
204
- </td>
205
- <td style="text-align: center;">
206
- <nobr>{{row.f_user_name}}</nobr>
207
- </td>
208
- <td style="text-align: center;">
209
- <nobr>{{row.f_olduserinfo_code}}</nobr>
210
- </td>
211
- <td style="text-align: center;">
212
- <nobr>{{row.f_bill_number}}</nobr>
213
- </td>
214
- <td style="text-align: center;">
215
- <nobr>{{row.f_address}}</nobr>
216
- </td>
217
- <td style="text-align: center;">
218
- <nobr>{{row.f_meternumber}}</nobr>
219
- </td>
220
- <td style="text-align: center;">
221
- <nobr>{{row.f_residential_area}}</nobr>
222
- </td>
223
- <td style="text-align: center;">
224
- <nobr>{{row.f_card_id}}</nobr>
225
- </td>
226
- <td style="text-align: center;">
227
- <nobr>{{row.f_meter_brand}}</nobr>
228
- </td>
229
- <td style="text-align: center;">
230
- <nobr>{{row. f_type}}</nobr>
231
- </td>
232
- <td style="text-align: center;">
233
- <nobr>{{row. f_fill_type}}</nobr>
234
- </td>
235
- <td style="text-align: center;">
236
- <nobr>{{row.f_comments}}</nobr>
237
- </td>
238
- <td style="text-align: center;">
239
- <nobr>{{row.f_cardfees}}</nobr>
240
- </td>
241
- <td style="text-align: center;">
242
- <nobr>{{row.f_operate_date}}</nobr>
243
- </td>
244
- <td style="text-align: center;">
245
- <nobr>{{row.f_payment}}</nobr>
246
- </td>
247
- <td style="text-align: center;">
248
- <nobr>{{row.f_operator}}</nobr>
249
- </td>
250
- <td style="text-align: center;">
251
- <nobr>{{row.f_depname}}</nobr>
252
- </td>
253
- <td style="text-align: center;">
254
- <nobr>{{row.f_orgname}}</nobr>
255
- </td>
256
- <td style="text-align: center;"><nobr>
257
- <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
258
- </nobr></td>
259
- </template>
260
- <template partial='foot'></template>
261
- </data-grid>
262
-
263
- </criteria-paged>
264
-
265
- <table class="table-hover">
266
- <tr style="position: relative" class="table-bordered">
267
- <td
268
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
269
- 汇总信息
270
- </td>
271
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
272
- 卡费合计:&emsp;{{sumsmodel.f_cardfees}}
273
- </td>
274
- </tr>
275
- </table>
276
- </div>
277
- <div class="flex" v-if="show">
278
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
279
- </div>
280
- </div>
281
- <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
282
- <article slot="modal-body">
283
- <upload :blodid="selected.f_userinfo_id" v-ref:upload isupload="false" takeimg="false" fusetype="补卡" :isremark="false" style="width:auto" ></upload>
284
- </article>
285
- <footer slot="modal-footer" class="modal-footer">
286
- </footer>
287
- </modal>
288
- </div>
289
- </template>
290
-
291
- <script>
292
- import {HttpResetClass, PagedList} from 'vue-client'
293
- import defaultPrint from '../config/DefaultPrint'
294
- import exportConfig from '../config/exportConfig'
295
-
296
- let readySomething = async function (self) {
297
-
298
- self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
299
- self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
300
- // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
301
- // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
302
- // await self.$refs.paged.$refs.cri.search()
303
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
304
- await self.$MagLoadParams.loadParam()
305
- self.initParams()
306
-
307
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
308
- }
309
- export default {
310
- props:['data'],
311
- title: '补卡查询',
312
- data() {
313
- return {
314
- data: {},
315
- other:[],
316
- footer:[],
317
- model: new PagedList('api/af-revenue/sql/fillCardQuery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`}, {f_cardfees: 0}),
318
- criteriaShow: false,
319
- headData: ["客户编号", "客户名称", "客户电话", "身份证号", "地址", "补卡类型", "表编号", "卡号", "气表品牌", "气表状态", "卡费", "补卡日期", "人员", "部门", "公司"],
320
- bodyData: ["f_userinfo_code", "f_user_name", "f_user_phone", "f_idnumber", "address", " f_type", "f_user_id", "f_card_id", "f_meter_brand", "f_table_state", "f_cardfees", "f_operate_date", "f_operator", "f_depname", "f_orgname"],
321
- config: {
322
- defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone', 'f_idnumber', 'f_card_id', 'f_meter_brand', 'f_operate_date', 'f_cardfees', 'f_operator']
323
- },
324
- //排序
325
- orderitem:'f_operate_date desc',
326
- orderFields: {
327
- f_operate_date: 'no'
328
- },
329
- //默认打印列
330
- defaultfield: [],
331
- orgCondtionStr: '',
332
- initres: {
333
- org:[this.$login.f.orgid],
334
- dep:[],
335
- user:[],
336
- },
337
- modelval: [],
338
- printshow: false,
339
- all: false,
340
- fields: {},
341
- thead: '',
342
- tfoot: '',
343
- showupload:false,
344
- selected:{},
345
- //小区
346
- residentialArea: [],
347
- meterbrands: [],
348
- // tablestate: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '停用', value: '停用'}],
349
-
350
- show:false,
351
- rowdata:{},
352
- //合计数据
353
- sumsmodel: {}
354
- }
355
- },
356
- ready() {
357
- this.getaddress()
358
- readySomething(this).then(() => {
359
- this.$emit('ready')
360
- }).catch((error) => {
361
- this.$emit('error', error)
362
- })
363
- },
364
- methods: {
365
- showmsg(obj){
366
- this.rowdata=obj
367
- console.log('this.rowdata', this.rowdata)
368
- this.show=true
369
- },
370
- view(row){
371
- this.showupload = true
372
- this.selected= row
373
- },
374
- getotherfooter(){
375
- // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
376
- // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
377
- this.other=[];
378
- this.footer=[];
379
- let exportdata = this.getCondition;
380
- let otherInData=[];
381
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
382
- let footerData=[],exportfield=this.getfield;
383
- footerData.push("合计");
384
- let self = this;
385
- for(var field in self.sumsmodel){
386
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
387
- }
388
- this.footer.push(footerData);
389
- this.other.push(otherInData);
390
- let date = []
391
- date.push(`起始时间:${this.$refs.paged.$refs.cri.model.startDate}`)
392
- date.push(`终止时间:${this.$refs.paged.$refs.cri.model.endDate}`)
393
- this.other.push(date)
394
- },
395
- search(){
396
- this.$refs.paged.$refs.cri.search()
397
- },
398
- cancel() {
399
- this.show = false
400
- },
401
- async selfSearch(args) {
402
- console.log("--------------------?")
403
- if (this.data) {
404
- this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
405
- this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
406
- }
407
- args.condition = `${args.condition}` + this.orgCondtionStr
408
- args.condition = args.condition.replace(/f_zones/, "f_slice_area")
409
- await this.model.search(args.condition, args.model)
410
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
411
- },
412
-
413
- initParams() {
414
- // 初始化气表品牌
415
- let brandArr = []
416
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
417
- let temp = {}
418
- temp.label = item.label
419
- temp.value = item.value.f_meter_brand
420
- brandArr.push(temp)
421
- })
422
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
423
- },
424
- async getaddress(){
425
- console.log('开始获取小区')
426
- let HttpReset = new HttpResetClass()
427
- var data = await HttpReset.load('POST', 'api/af-revenue/sql/manage_getarealist', {
428
- data: {
429
- condition: `1=1 and s.f_orgid = '${this.$login.f.orgid}'`
430
- }
431
- }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
432
- console.log('小区',data)
433
- let house = [{label: '全部', value: ''}]
434
- for (let row of data.data){
435
- console.log('开始保存小区')
436
- house.push({label: row.f_residential_area, value: row.f_residential_area})
437
- }
438
- this.residentialArea = house
439
- },
440
-
441
- clear() {
442
- //清空部门和人员
443
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
444
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].selectres = []
445
- this.$refs.paged.$refs.cri.$refs.sel.slice_area = []
446
- //部门和人员变为全选
447
- // this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
448
- // this.$refs.paged.$refs.cri.$refs.sel.$children[3].$children[0].isSelectAll = false
449
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
450
- this.$refs.paged.$refs.cri.model[key] = []
451
- })
452
- },
453
- show() {
454
- this.criteriaShow = true
455
- },
456
- hidden() {
457
- this.criteriaShow = !this.criteriaShow
458
- },
459
- getRes(condition) {
460
- this.orgCondtionStr = condition
461
- },
462
- dealmsg(val) {
463
- console.log('---------------dealmsg')
464
- // this.rowdata=val
465
- this.show=true
466
- val.model = this.model.model
467
- this.$dispatch('deal-msg', val)
468
- },
469
- stamp() {
470
- this.all = false
471
- //默认选择要打印的列
472
- this.modelval = defaultPrint.config
473
- this.fields = this.getfield
474
- console.log('所有打印字段', this.fields)
475
- this.printshow = true
476
- this.put()
477
- },
478
- put() {
479
- // 对Modelval进行排序
480
- this.sortModelval()
481
- this.thead = `<tr><th colspan=${this.modelval.length}>补卡查询统计报表</th></tr><tr>`
482
- for (let key of this.modelval) {
483
- this.thead += '<th>' + this.fields[key] + '</th>'
484
- }
485
- this.thead += '</tr>'
486
- },
487
- print() {
488
- this.$refs.print.PrintAsFile()
489
- this.printshow = false
490
- },
491
- close() {
492
- this.printshow = false
493
- this.all = false
494
- },
495
- // 对选择的列进行排序
496
- sortModelval() {
497
- let sortModel = []
498
- Object.keys(this.fields).forEach((key) => {
499
- if (this.modelval.includes(key)) {
500
- sortModel.push(key)
501
- }
502
- })
503
- this.modelval = sortModel
504
- console.log('选择的打印的字段', this.modelval)
505
- },
506
- sort (field, rule) {
507
- // 将所有排序方式设为不排序,实现相互排斥
508
- for (let key in this.orderFields) {
509
- if (key === field) {
510
- this.orderFields[key] = rule
511
- } else {
512
- this.orderFields[key] = 'no'
513
- }
514
- }
515
- // 如果新规则不排序,还原为默认排序
516
- if (rule === 'no') {
517
- this.model.paramSource.orderitem = `'${this.orderitem}'`
518
- } else {
519
- this.model.paramSource.orderitem = `'${field} ${rule}'`
520
- }
521
-
522
- this.search()
523
- },
524
- async updateParams() {
525
- await this.$MagLoadParams.loadParam(this.f_filialeid)
526
- this.initParams()
527
- },
528
- },
529
- watch: {
530
- 'all'(val) {
531
- if (val) {
532
- this.modelval = this.bodyData
533
- } else {
534
- this.modelval = defaultPrint.config
535
- this.put()
536
- }
537
- },
538
- 'modelval.length'() {
539
- this.put()
540
- },
541
- sumsmodel:{
542
- handler: function(val) {
543
- this.getotherfooter();
544
- },
545
- deep: true
546
- },
547
- 'orgCondtionStr'(val) {
548
- let res = val.match(/'(.*?)'/)
549
- console.log('正则提取:',res && res[1])
550
- if (res) {
551
- this.f_filialeid = res[1]
552
- this.updateParams()
553
- }
554
- }
555
- },
556
- computed: {
557
- getCondition() {
558
- return {
559
- condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
560
- orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"
561
- }
562
- },
563
- getfield() {
564
- return exportConfig.fillcardConfig
565
- },
566
- fillCardTypes() {
567
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补卡类型')]
568
- },
569
- chargeState() {
570
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补卡状态')]
571
- },
572
- payments() {
573
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式')]
574
- }
575
- }
576
- }
577
- </script>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @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">
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" :footer="$parent.$parent.footer"
47
+ :field="$parent.$parent.getfield" :header="$parent.$parent.other"
48
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="fillCardQuery" template-name='补卡查询导出'
49
+ :choose-col="true"></export-excel>
50
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
51
+ :defaultfield="$parent.$parent.defaultfield"
52
+ titletable="补卡记录"
53
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
54
+ <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>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="row" v-show="$parent.$parent.criteriaShow">
59
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
60
+ <div class="col-sm-2 form-group">
61
+ <label class="font_normal_body">客户名称</label>
62
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
63
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
64
+ </div>
65
+ <div class="col-sm-2 form-group">
66
+ <label class="font_normal_body">客户地址</label>
67
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
68
+ condition="f_address like '%{}%'" placeholder='客户地址'>
69
+ </div>
70
+ <div class="col-sm-2 form-group">
71
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
72
+ <v-select :value.sync="model.f_residential_area"
73
+ class="select_list select"
74
+ v-model="model.f_residential_area"
75
+ style="width: 60%"
76
+ multiple
77
+ condition="f_residential_area in {}"
78
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
79
+ close-on-select>
80
+
81
+ </v-select>
82
+ </div>
83
+ <div class="col-sm-2 form-group">
84
+ <label class="font_normal_body">补卡类型</label>
85
+ <v-select :value.sync="model.f_type"
86
+ v-model="model.f_type"
87
+ :value-single="true"
88
+ :options='$parent.$parent.fillCardTypes' placeholder='请选择'
89
+ condition=" f_type = '{}'"
90
+ close-on-select clear-button></v-select>
91
+ </div>
92
+
93
+ <div class="col-sm-2 form-group">
94
+ <label class="font_normal_body">卡&emsp;&emsp;号</label>
95
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
96
+ condition="f_card_id like '%{}%'" placeholder='卡号'>
97
+ </div>
98
+ <div class="col-sm-2 form-group">
99
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
100
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
101
+ condition="f_meternumber = '{}'" placeholder='表号'>
102
+ </div>
103
+ <div class="col-sm-2 form-group">
104
+ <label class="font_normal_body">气表品牌</label>
105
+ <v-select :value.sync="model.f_meter_brand"
106
+ v-model="model.f_meter_brand"
107
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
108
+ condition="f_meter_brand = '{}'"
109
+ close-on-select></v-select>
110
+ </div>
111
+ <div class="col-sm-2 form-group">
112
+ <label class="font_normal_body">补卡状态</label>
113
+ <v-select :value.sync="model.f_state"
114
+ v-model="model.f_state"
115
+ :options='$parent.$parent.chargeState' placeholder='请选择'
116
+ condition="f_state = '{}'"
117
+ close-on-select></v-select>
118
+ </div>
119
+ <div class="col-sm-2 form-group">
120
+ <label class="font_normal_body">付款方式</label>
121
+ <v-select id="f_payment"
122
+ v-model="model.f_payment"
123
+ placeholder='请选择'
124
+ condition="f_payment ='{}'"
125
+ :value.sync="model.f_payment"
126
+ :options='$parent.$parent.payments'
127
+ close-on-select clear-button>
128
+ </v-select>
129
+ </div>
130
+ </div>
131
+
132
+ </div>
133
+ </criteria>
134
+
135
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
136
+ <template partial='head'>
137
+ <tr>
138
+ <th>
139
+ <!-- <nobr>客户编号</nobr>-->
140
+ <data-order field="f_userinfo_code" name="客户编号"
141
+ :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
142
+ </th>
143
+ <th>
144
+ <nobr>客户名称</nobr>
145
+ </th>
146
+ <th>
147
+ <nobr>档案编号</nobr>
148
+ </th>
149
+ <th>
150
+ <nobr>收据票号</nobr>
151
+ </th>
152
+ <th>
153
+ <!-- <nobr>客户地址</nobr>-->
154
+ <data-order field="f_address" name="客户地址"
155
+ :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
156
+ </th>
157
+ <th>
158
+ <nobr>表号</nobr>
159
+ </th>
160
+ <th>
161
+ <nobr>小区</nobr>
162
+ </th>
163
+ <th>
164
+ <nobr>卡号</nobr>
165
+ </th>
166
+ <th>
167
+ <nobr>气表品牌</nobr>
168
+ </th>
169
+ <th>
170
+ <nobr>补卡类型</nobr>
171
+ </th>
172
+ <th>
173
+ <nobr>补卡种类</nobr>
174
+ </th>
175
+ <th>
176
+ <nobr>补卡原因</nobr>
177
+ </th>
178
+ <th>
179
+ <nobr>卡费</nobr>
180
+ </th>
181
+ <th>
182
+ <!-- <nobr>补卡日期</nobr>-->
183
+ <data-order field="f_operate_date" name="补卡日期"
184
+ :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
185
+ </th>
186
+ <th>
187
+ <nobr>付款方式</nobr>
188
+ </th>
189
+ <th>
190
+ <nobr>人员</nobr>
191
+ </th>
192
+ <th>
193
+ <nobr>部门</nobr>
194
+ </th>
195
+ <th>
196
+ <nobr>公司</nobr>
197
+ </th>
198
+ <th><nobr>附件</nobr></th>
199
+ </tr>
200
+ </template>
201
+ <template partial='body'>
202
+ <td style="text-align: center;">
203
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
204
+ </td>
205
+ <td style="text-align: center;">
206
+ <nobr>{{row.f_user_name}}</nobr>
207
+ </td>
208
+ <td style="text-align: center;">
209
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
210
+ </td>
211
+ <td style="text-align: center;">
212
+ <nobr>{{row.f_bill_number}}</nobr>
213
+ </td>
214
+ <td style="text-align: center;">
215
+ <nobr>{{row.f_address}}</nobr>
216
+ </td>
217
+ <td style="text-align: center;">
218
+ <nobr>{{row.f_meternumber}}</nobr>
219
+ </td>
220
+ <td style="text-align: center;">
221
+ <nobr>{{row.f_residential_area}}</nobr>
222
+ </td>
223
+ <td style="text-align: center;">
224
+ <nobr>{{row.f_card_id}}</nobr>
225
+ </td>
226
+ <td style="text-align: center;">
227
+ <nobr>{{row.f_meter_brand}}</nobr>
228
+ </td>
229
+ <td style="text-align: center;">
230
+ <nobr>{{row. f_type}}</nobr>
231
+ </td>
232
+ <td style="text-align: center;">
233
+ <nobr>{{row. f_fill_type}}</nobr>
234
+ </td>
235
+ <td style="text-align: center;">
236
+ <nobr>{{row.f_comments}}</nobr>
237
+ </td>
238
+ <td style="text-align: center;">
239
+ <nobr>{{row.f_cardfees}}</nobr>
240
+ </td>
241
+ <td style="text-align: center;">
242
+ <nobr>{{row.f_operate_date}}</nobr>
243
+ </td>
244
+ <td style="text-align: center;">
245
+ <nobr>{{row.f_payment}}</nobr>
246
+ </td>
247
+ <td style="text-align: center;">
248
+ <nobr>{{row.f_operator}}</nobr>
249
+ </td>
250
+ <td style="text-align: center;">
251
+ <nobr>{{row.f_depname}}</nobr>
252
+ </td>
253
+ <td style="text-align: center;">
254
+ <nobr>{{row.f_orgname}}</nobr>
255
+ </td>
256
+ <td style="text-align: center;"><nobr>
257
+ <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
258
+ </nobr></td>
259
+ </template>
260
+ <template partial='foot'></template>
261
+ </data-grid>
262
+
263
+ </criteria-paged>
264
+
265
+ <table class="table-hover">
266
+ <tr style="position: relative" class="table-bordered">
267
+ <td
268
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
269
+ 汇总信息
270
+ </td>
271
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
272
+ 卡费合计:&emsp;{{sumsmodel.f_cardfees}}
273
+ </td>
274
+ </tr>
275
+ </table>
276
+ </div>
277
+ <div class="flex" v-if="show">
278
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
279
+ </div>
280
+ </div>
281
+ <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
282
+ <article slot="modal-body">
283
+ <upload :blodid="selected.f_userinfo_id" v-ref:upload isupload="false" takeimg="false" fusetype="补卡" :isremark="false" style="width:auto" ></upload>
284
+ </article>
285
+ <footer slot="modal-footer" class="modal-footer">
286
+ </footer>
287
+ </modal>
288
+ </div>
289
+ </template>
290
+
291
+ <script>
292
+ import {HttpResetClass, PagedList} from 'vue-client'
293
+ import defaultPrint from '../config/DefaultPrint'
294
+ import exportConfig from '../config/exportConfig'
295
+
296
+ let readySomething = async function (self) {
297
+
298
+ self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
299
+ self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
300
+ // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
301
+ // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
302
+ // await self.$refs.paged.$refs.cri.search()
303
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
304
+ await self.$MagLoadParams.loadParam()
305
+ self.initParams()
306
+
307
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
308
+ }
309
+ export default {
310
+ props:['data'],
311
+ title: '补卡查询',
312
+ data() {
313
+ return {
314
+ data: {},
315
+ other:[],
316
+ footer:[],
317
+ model: new PagedList('api/af-revenue/sql/fillCardQuery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`}, {f_cardfees: 0}),
318
+ criteriaShow: false,
319
+ headData: ["客户编号", "客户名称", "客户电话", "身份证号", "地址", "补卡类型", "表编号", "卡号", "气表品牌", "气表状态", "卡费", "补卡日期", "人员", "部门", "公司"],
320
+ bodyData: ["f_userinfo_code", "f_user_name", "f_user_phone", "f_idnumber", "address", " f_type", "f_user_id", "f_card_id", "f_meter_brand", "f_table_state", "f_cardfees", "f_operate_date", "f_operator", "f_depname", "f_orgname"],
321
+ config: {
322
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone', 'f_idnumber', 'f_card_id', 'f_meter_brand', 'f_operate_date', 'f_cardfees', 'f_operator']
323
+ },
324
+ //排序
325
+ orderitem:'f_operate_date desc',
326
+ orderFields: {
327
+ f_operate_date: 'no'
328
+ },
329
+ //默认打印列
330
+ defaultfield: [],
331
+ orgCondtionStr: '',
332
+ initres: {
333
+ org:[this.$login.f.orgid],
334
+ dep:[],
335
+ user:[],
336
+ },
337
+ modelval: [],
338
+ printshow: false,
339
+ all: false,
340
+ fields: {},
341
+ thead: '',
342
+ tfoot: '',
343
+ showupload:false,
344
+ selected:{},
345
+ //小区
346
+ residentialArea: [],
347
+ meterbrands: [],
348
+ // tablestate: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '停用', value: '停用'}],
349
+
350
+ show:false,
351
+ rowdata:{},
352
+ //合计数据
353
+ sumsmodel: {}
354
+ }
355
+ },
356
+ ready() {
357
+ this.getaddress()
358
+ readySomething(this).then(() => {
359
+ this.$emit('ready')
360
+ }).catch((error) => {
361
+ this.$emit('error', error)
362
+ })
363
+ },
364
+ methods: {
365
+ showmsg(obj){
366
+ this.rowdata=obj
367
+ console.log('this.rowdata', this.rowdata)
368
+ this.show=true
369
+ },
370
+ view(row){
371
+ this.showupload = true
372
+ this.selected= row
373
+ },
374
+ getotherfooter(){
375
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
376
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
377
+ this.other=[];
378
+ this.footer=[];
379
+ let exportdata = this.getCondition;
380
+ let otherInData=[];
381
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
382
+ let footerData=[],exportfield=this.getfield;
383
+ footerData.push("合计");
384
+ let self = this;
385
+ for(var field in self.sumsmodel){
386
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
387
+ }
388
+ this.footer.push(footerData);
389
+ this.other.push(otherInData);
390
+ let date = []
391
+ date.push(`起始时间:${this.$refs.paged.$refs.cri.model.startDate}`)
392
+ date.push(`终止时间:${this.$refs.paged.$refs.cri.model.endDate}`)
393
+ this.other.push(date)
394
+ },
395
+ search(){
396
+ this.$refs.paged.$refs.cri.search()
397
+ },
398
+ cancel() {
399
+ this.show = false
400
+ },
401
+ async selfSearch(args) {
402
+ console.log("--------------------?")
403
+ if (this.data) {
404
+ this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
405
+ this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
406
+ }
407
+ args.condition = `${args.condition}` + this.orgCondtionStr
408
+ args.condition = args.condition.replace(/f_zones/, "f_slice_area")
409
+ await this.model.search(args.condition, args.model)
410
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
411
+ },
412
+
413
+ initParams() {
414
+ // 初始化气表品牌
415
+ let brandArr = []
416
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
417
+ let temp = {}
418
+ temp.label = item.label
419
+ temp.value = item.value.f_meter_brand
420
+ brandArr.push(temp)
421
+ })
422
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
423
+ },
424
+ async getaddress(){
425
+ console.log('开始获取小区')
426
+ let HttpReset = new HttpResetClass()
427
+ var data = await HttpReset.load('POST', 'api/af-revenue/sql/manage_getarealist', {
428
+ data: {
429
+ condition: `1=1 and s.f_orgid = '${this.$login.f.orgid}'`
430
+ }
431
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
432
+ console.log('小区',data)
433
+ let house = [{label: '全部', value: ''}]
434
+ for (let row of data.data){
435
+ console.log('开始保存小区')
436
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
437
+ }
438
+ this.residentialArea = house
439
+ },
440
+
441
+ clear() {
442
+ //清空部门和人员
443
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
444
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].selectres = []
445
+ this.$refs.paged.$refs.cri.$refs.sel.slice_area = []
446
+ //部门和人员变为全选
447
+ // this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
448
+ // this.$refs.paged.$refs.cri.$refs.sel.$children[3].$children[0].isSelectAll = false
449
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
450
+ this.$refs.paged.$refs.cri.model[key] = []
451
+ })
452
+ },
453
+ show() {
454
+ this.criteriaShow = true
455
+ },
456
+ hidden() {
457
+ this.criteriaShow = !this.criteriaShow
458
+ },
459
+ getRes(condition) {
460
+ this.orgCondtionStr = condition
461
+ },
462
+ dealmsg(val) {
463
+ console.log('---------------dealmsg')
464
+ // this.rowdata=val
465
+ this.show=true
466
+ val.model = this.model.model
467
+ this.$dispatch('deal-msg', val)
468
+ },
469
+ stamp() {
470
+ this.all = false
471
+ //默认选择要打印的列
472
+ this.modelval = defaultPrint.config
473
+ this.fields = this.getfield
474
+ console.log('所有打印字段', this.fields)
475
+ this.printshow = true
476
+ this.put()
477
+ },
478
+ put() {
479
+ // 对Modelval进行排序
480
+ this.sortModelval()
481
+ this.thead = `<tr><th colspan=${this.modelval.length}>补卡查询统计报表</th></tr><tr>`
482
+ for (let key of this.modelval) {
483
+ this.thead += '<th>' + this.fields[key] + '</th>'
484
+ }
485
+ this.thead += '</tr>'
486
+ },
487
+ print() {
488
+ this.$refs.print.PrintAsFile()
489
+ this.printshow = false
490
+ },
491
+ close() {
492
+ this.printshow = false
493
+ this.all = false
494
+ },
495
+ // 对选择的列进行排序
496
+ sortModelval() {
497
+ let sortModel = []
498
+ Object.keys(this.fields).forEach((key) => {
499
+ if (this.modelval.includes(key)) {
500
+ sortModel.push(key)
501
+ }
502
+ })
503
+ this.modelval = sortModel
504
+ console.log('选择的打印的字段', this.modelval)
505
+ },
506
+ sort (field, rule) {
507
+ // 将所有排序方式设为不排序,实现相互排斥
508
+ for (let key in this.orderFields) {
509
+ if (key === field) {
510
+ this.orderFields[key] = rule
511
+ } else {
512
+ this.orderFields[key] = 'no'
513
+ }
514
+ }
515
+ // 如果新规则不排序,还原为默认排序
516
+ if (rule === 'no') {
517
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
518
+ } else {
519
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
520
+ }
521
+
522
+ this.search()
523
+ },
524
+ async updateParams() {
525
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
526
+ this.initParams()
527
+ },
528
+ },
529
+ watch: {
530
+ 'all'(val) {
531
+ if (val) {
532
+ this.modelval = this.bodyData
533
+ } else {
534
+ this.modelval = defaultPrint.config
535
+ this.put()
536
+ }
537
+ },
538
+ 'modelval.length'() {
539
+ this.put()
540
+ },
541
+ sumsmodel:{
542
+ handler: function(val) {
543
+ this.getotherfooter();
544
+ },
545
+ deep: true
546
+ },
547
+ 'orgCondtionStr'(val) {
548
+ let res = val.match(/'(.*?)'/)
549
+ console.log('正则提取:',res && res[1])
550
+ if (res) {
551
+ this.f_filialeid = res[1]
552
+ this.updateParams()
553
+ }
554
+ }
555
+ },
556
+ computed: {
557
+ getCondition() {
558
+ return {
559
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
560
+ orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"
561
+ }
562
+ },
563
+ getfield() {
564
+ return exportConfig.fillcardConfig
565
+ },
566
+ fillCardTypes() {
567
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('补卡类型')]
568
+ },
569
+ chargeState() {
570
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('补卡状态')]
571
+ },
572
+ payments() {
573
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式')]
574
+ }
575
+ }
576
+ }
577
+ </script>