manage-client 3.2.52 → 3.2.53

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,497 +1,497 @@
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>
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="rs/logic/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">补卡类型</label>
72
- <v-select :value.sync="model.f_type"
73
- v-model="model.f_type"
74
- :value-single="true"
75
- :options='$parent.$parent.fillCardTypes' placeholder='请选择'
76
- condition=" f_type = '{}'"
77
- close-on-select clear-button></v-select>
78
- </div>
79
-
80
- <div class="col-sm-2 form-group">
81
- <label class="font_normal_body">卡&emsp;&emsp;号</label>
82
- <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
83
- condition="f_card_id like '%{}%'" placeholder='卡号'>
84
- </div>
85
- <div class="col-sm-2 form-group">
86
- <label class="font_normal_body">表&emsp;&emsp;号</label>
87
- <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
88
- condition="f_meternumber = '{}'" placeholder='表号'>
89
- </div>
90
- <div class="col-sm-2 form-group">
91
- <label class="font_normal_body">气表品牌</label>
92
- <v-select :value.sync="model.f_meter_brand"
93
- v-model="model.f_meter_brand"
94
- :options='$parent.$parent.meterbrands' placeholder='请选择'
95
- condition="f_meter_brand = '{}'"
96
- close-on-select></v-select>
97
- </div>
98
- <div class="col-sm-2 form-group">
99
- <label class="font_normal_body">补卡状态</label>
100
- <v-select :value.sync="model.f_state"
101
- v-model="model.f_state"
102
- :options='$parent.$parent.chargeState' placeholder='请选择'
103
- condition="f_state = '{}'"
104
- close-on-select></v-select>
105
- </div>
106
- <div class="col-sm-2 form-group">
107
- <label class="font_normal_body">付款方式</label>
108
- <v-select id="f_payment"
109
- v-model="model.f_payment"
110
- placeholder='请选择'
111
- condition="f_payment ='{}'"
112
- :value.sync="model.f_payment"
113
- :options='$parent.$parent.payments'
114
- close-on-select clear-button>
115
- </v-select>
116
- </div>
117
- </div>
118
-
119
- </div>
120
- </criteria>
121
-
122
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
123
- <template partial='head'>
124
- <tr>
125
- <th>
126
- <nobr>客户编号</nobr>
127
- </th>
128
- <th>
129
- <nobr>客户名称</nobr>
130
- </th>
131
- <th>
132
- <nobr>档案编号</nobr>
133
- </th>
134
- <th>
135
- <nobr>收据票号</nobr>
136
- </th>
137
- <th>
138
- <nobr>客户地址</nobr>
139
- </th>
140
- <th>
141
- <nobr>卡号</nobr>
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
- </th>
155
- <th>
156
- <nobr>卡费</nobr>
157
- </th>
158
- <th>
159
- <nobr>补卡日期</nobr>
160
- </th>
161
- <th>
162
- <nobr>付款方式</nobr>
163
- </th>
164
- <th>
165
- <nobr>人员</nobr>
166
- </th>
167
- <th>
168
- <nobr>部门</nobr>
169
- </th>
170
- <th>
171
- <nobr>公司</nobr>
172
- </th>
173
- <th><nobr>附件</nobr></th>
174
- </tr>
175
- </template>
176
- <template partial='body'>
177
- <td style="text-align: center;">
178
- <nobr>
179
- <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
180
- </td>
181
- <td style="text-align: center;">
182
- <nobr>{{row.f_user_name}}</nobr>
183
- </td>
184
- <td style="text-align: center;">
185
- <nobr>{{row.f_olduserinfo_code}}</nobr>
186
- </td>
187
- <td style="text-align: center;">
188
- <nobr>{{row.f_bill_number}}</nobr>
189
- </td>
190
- <td style="text-align: center;">
191
- <nobr>{{row.f_address}}</nobr>
192
- </td>
193
- <td style="text-align: center;">
194
- <nobr>{{row.f_card_id}}</nobr>
195
- </td>
196
- <td style="text-align: center;">
197
- <nobr>{{row.f_meter_brand}}</nobr>
198
- </td>
199
- <td style="text-align: center;">
200
- <nobr>{{row. f_type}}</nobr>
201
- </td>
202
- <td style="text-align: center;">
203
- <nobr>{{row. f_fill_type}}</nobr>
204
- </td>
205
- <td style="text-align: center;">
206
- <nobr>{{row.f_comments}}</nobr>
207
- </td>
208
- <td style="text-align: center;">
209
- <nobr>{{row.f_cardfees}}</nobr>
210
- </td>
211
- <td style="text-align: center;">
212
- <nobr>{{row.f_operate_date}}</nobr>
213
- </td>
214
- <td style="text-align: center;">
215
- <nobr>{{row.f_payment}}</nobr>
216
- </td>
217
- <td style="text-align: center;">
218
- <nobr>{{row.f_operator}}</nobr>
219
- </td>
220
- <td style="text-align: center;">
221
- <nobr>{{row.f_depname}}</nobr>
222
- </td>
223
- <td style="text-align: center;">
224
- <nobr>{{row.f_orgname}}</nobr>
225
- </td>
226
- <td style="text-align: center;"><nobr>
227
- <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
228
- </nobr></td>
229
- </template>
230
- <template partial='foot'></template>
231
- </data-grid>
232
-
233
- </criteria-paged>
234
-
235
- <table class="table-hover">
236
- <tr style="position: relative" class="table-bordered">
237
- <td
238
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
239
- 汇总信息
240
- </td>
241
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
242
- 卡费合计:&emsp;{{sumsmodel.f_cardfees}}
243
- </td>
244
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
245
- 户数合计:&emsp;{{sumsmodel.hushu}}
246
- </td>
247
- </tr>
248
- </table>
249
- </div>
250
- <div class="flex" v-if="show">
251
- <user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>
252
- </div>
253
- </div>
254
- <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
255
- <article slot="modal-body">
256
- <upload :blodid="selected.f_userinfo_id" v-ref:upload isupload="false" takeimg="false" fusetype="补卡" :isremark="false" style="width:auto" ></upload>
257
- </article>
258
- <footer slot="modal-footer" class="modal-footer">
259
- </footer>
260
- </modal>
261
- </div>
262
- </template>
263
-
264
- <script>
265
- import {PagedList} from 'vue-client'
266
- import defaultPrint from '../config/DefaultPrint'
267
- import exportConfig from '../config/exportConfig'
268
-
269
- let readySomething = async function (self) {
270
-
271
- self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
272
- self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
273
- // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
274
- // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
275
- // await self.$refs.paged.$refs.cri.search()
276
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
277
- await self.$MagLoadParams.loadParam()
278
- self.initParams()
279
-
280
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
281
- }
282
- export default {
283
- props:['data'],
284
- title: '补卡查询',
285
- data() {
286
- return {
287
- data: {},
288
- other:[],
289
- footer:[],
290
- model: new PagedList('rs/sql/fillCardQuery', 20, {}, {f_cardfees: 0,hushu:0}),
291
- criteriaShow: false,
292
- headData: ["客户编号", "客户名称", "客户电话", "身份证号", "地址", "补卡类型", "表编号", "卡号", "气表品牌", "气表状态", "卡费", "补卡日期", "人员", "部门", "公司"],
293
- 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"],
294
- config: {
295
- 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']
296
- },
297
- //默认打印列
298
- defaultfield: [],
299
- orgCondtionStr: '',
300
- initres: {
301
- org:[this.$login.f.orgid],
302
- dep:[],
303
- user:[],
304
- },
305
- modelval: [],
306
- printshow: false,
307
- all: false,
308
- fields: {},
309
- thead: '',
310
- tfoot: '',
311
- showupload:false,
312
- selected:{},
313
-
314
- meterbrands: [],
315
- // tablestate: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '停用', value: '停用'}],
316
-
317
- show:false,
318
- rowdata:{},
319
- //合计数据
320
- sumsmodel: {}
321
- }
322
- },
323
- ready() {
324
- readySomething(this).then(() => {
325
- this.$emit('ready')
326
- }).catch((error) => {
327
- this.$emit('error', error)
328
- })
329
- },
330
- methods: {
331
- view(row){
332
- this.showupload = true
333
- this.selected= row
334
- },
335
- getotherfooter(){
336
- // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
337
- // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
338
- this.other=[];
339
- this.footer=[];
340
- let exportdata = this.getCondition;
341
- let otherInData=[];
342
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
343
- let footerData=[],exportfield=this.getfield;
344
- footerData.push("合计");
345
- let self = this;
346
- for(var field in self.sumsmodel){
347
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
348
- }
349
- this.footer.push(footerData);
350
- this.other.push(otherInData);
351
- },
352
- search(){
353
- this.$refs.paged.$refs.cri.search()
354
- },
355
- cancel() {
356
- this.show = false
357
- },
358
- async selfSearch(args) {
359
- console.log("--------------------?")
360
- if (this.data) {
361
- this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
362
- this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
363
- }
364
- args.condition = `${args.condition}` + this.orgCondtionStr
365
- await this.model.search(args.condition, args.model)
366
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
367
- this.sumsmodel.hushu=[...new Set(this.$refs.paged.$refs.grid.model.rows.map(item => item.f_userinfo_code))].length
368
- },
369
-
370
- initParams() {
371
- // 初始化气表品牌
372
- let brandArr = []
373
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
374
- let temp = {}
375
- temp.label = item.label
376
- temp.value = item.value.f_meter_brand
377
- brandArr.push(temp)
378
- })
379
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
380
- },
381
-
382
- clear() {
383
- //清空部门和人员
384
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
385
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].selectres = []
386
- this.$refs.paged.$refs.cri.$refs.sel.slice_area = []
387
- //部门和人员变为全选
388
- // this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
389
- // this.$refs.paged.$refs.cri.$refs.sel.$children[3].$children[0].isSelectAll = false
390
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
391
- this.$refs.paged.$refs.cri.model[key] = []
392
- })
393
- },
394
- show() {
395
- this.criteriaShow = true
396
- },
397
- hidden() {
398
- this.criteriaShow = !this.criteriaShow
399
- },
400
- getRes(condition) {
401
- this.orgCondtionStr = condition
402
- },
403
- dealmsg(val) {
404
- console.log('---------------dealmsg')
405
- this.rowdata=val
406
- this.show=true
407
- val.model = this.model.model
408
- this.$dispatch('deal-msg', val)
409
- },
410
- stamp() {
411
- this.all = false
412
- //默认选择要打印的列
413
- this.modelval = defaultPrint.config
414
- this.fields = this.getfield
415
- console.log('所有打印字段', this.fields)
416
- this.printshow = true
417
- this.put()
418
- },
419
- put() {
420
- // 对Modelval进行排序
421
- this.sortModelval()
422
- this.thead = `<tr><th colspan=${this.modelval.length}>补卡查询统计报表</th></tr><tr>`
423
- for (let key of this.modelval) {
424
- this.thead += '<th>' + this.fields[key] + '</th>'
425
- }
426
- this.thead += '</tr>'
427
- },
428
- print() {
429
- this.$refs.print.PrintAsFile()
430
- this.printshow = false
431
- },
432
- close() {
433
- this.printshow = false
434
- this.all = false
435
- },
436
- // 对选择的列进行排序
437
- sortModelval() {
438
- let sortModel = []
439
- Object.keys(this.fields).forEach((key) => {
440
- if (this.modelval.includes(key)) {
441
- sortModel.push(key)
442
- }
443
- })
444
- this.modelval = sortModel
445
- console.log('选择的打印的字段', this.modelval)
446
- },
447
- async updateParams() {
448
- await this.$MagLoadParams.loadParam(this.f_filialeid)
449
- this.initParams()
450
- },
451
- },
452
- watch: {
453
- 'all'(val) {
454
- if (val) {
455
- this.modelval = this.bodyData
456
- } else {
457
- this.modelval = defaultPrint.config
458
- this.put()
459
- }
460
- },
461
- 'modelval.length'() {
462
- this.put()
463
- },
464
- sumsmodel:{
465
- handler: function(val) {
466
- this.getotherfooter();
467
- },
468
- deep: true
469
- },
470
- 'orgCondtionStr'(val) {
471
- let res = val.match(/'(.*?)'/)
472
- console.log('正则提取:',res && res[1])
473
- if (res) {
474
- this.f_filialeid = res[1]
475
- this.updateParams()
476
- }
477
- }
478
- },
479
- computed: {
480
- getCondition() {
481
- return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
482
- },
483
- getfield() {
484
- return exportConfig.fillcardConfig
485
- },
486
- fillCardTypes() {
487
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补卡类型')]
488
- },
489
- chargeState() {
490
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补卡状态')]
491
- },
492
- payments() {
493
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式')]
494
- }
495
- }
496
- }
497
- </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>
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="rs/logic/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">补卡类型</label>
72
+ <v-select :value.sync="model.f_type"
73
+ v-model="model.f_type"
74
+ :value-single="true"
75
+ :options='$parent.$parent.fillCardTypes' placeholder='请选择'
76
+ condition=" f_type = '{}'"
77
+ close-on-select clear-button></v-select>
78
+ </div>
79
+
80
+ <div class="col-sm-2 form-group">
81
+ <label class="font_normal_body">卡&emsp;&emsp;号</label>
82
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
83
+ condition="f_card_id like '%{}%'" placeholder='卡号'>
84
+ </div>
85
+ <div class="col-sm-2 form-group">
86
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
87
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
88
+ condition="f_meternumber = '{}'" placeholder='表号'>
89
+ </div>
90
+ <div class="col-sm-2 form-group">
91
+ <label class="font_normal_body">气表品牌</label>
92
+ <v-select :value.sync="model.f_meter_brand"
93
+ v-model="model.f_meter_brand"
94
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
95
+ condition="f_meter_brand = '{}'"
96
+ close-on-select></v-select>
97
+ </div>
98
+ <div class="col-sm-2 form-group">
99
+ <label class="font_normal_body">补卡状态</label>
100
+ <v-select :value.sync="model.f_state"
101
+ v-model="model.f_state"
102
+ :options='$parent.$parent.chargeState' placeholder='请选择'
103
+ condition="f_state = '{}'"
104
+ close-on-select></v-select>
105
+ </div>
106
+ <div class="col-sm-2 form-group">
107
+ <label class="font_normal_body">付款方式</label>
108
+ <v-select id="f_payment"
109
+ v-model="model.f_payment"
110
+ placeholder='请选择'
111
+ condition="f_payment ='{}'"
112
+ :value.sync="model.f_payment"
113
+ :options='$parent.$parent.payments'
114
+ close-on-select clear-button>
115
+ </v-select>
116
+ </div>
117
+ </div>
118
+
119
+ </div>
120
+ </criteria>
121
+
122
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
123
+ <template partial='head'>
124
+ <tr>
125
+ <th>
126
+ <nobr>客户编号</nobr>
127
+ </th>
128
+ <th>
129
+ <nobr>客户名称</nobr>
130
+ </th>
131
+ <th>
132
+ <nobr>档案编号</nobr>
133
+ </th>
134
+ <th>
135
+ <nobr>收据票号</nobr>
136
+ </th>
137
+ <th>
138
+ <nobr>客户地址</nobr>
139
+ </th>
140
+ <th>
141
+ <nobr>卡号</nobr>
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
+ </th>
155
+ <th>
156
+ <nobr>卡费</nobr>
157
+ </th>
158
+ <th>
159
+ <nobr>补卡日期</nobr>
160
+ </th>
161
+ <th>
162
+ <nobr>付款方式</nobr>
163
+ </th>
164
+ <th>
165
+ <nobr>人员</nobr>
166
+ </th>
167
+ <th>
168
+ <nobr>部门</nobr>
169
+ </th>
170
+ <th>
171
+ <nobr>公司</nobr>
172
+ </th>
173
+ <th><nobr>附件</nobr></th>
174
+ </tr>
175
+ </template>
176
+ <template partial='body'>
177
+ <td style="text-align: center;">
178
+ <nobr>
179
+ <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
180
+ </td>
181
+ <td style="text-align: center;">
182
+ <nobr>{{row.f_user_name}}</nobr>
183
+ </td>
184
+ <td style="text-align: center;">
185
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
186
+ </td>
187
+ <td style="text-align: center;">
188
+ <nobr>{{row.f_bill_number}}</nobr>
189
+ </td>
190
+ <td style="text-align: center;">
191
+ <nobr>{{row.f_address}}</nobr>
192
+ </td>
193
+ <td style="text-align: center;">
194
+ <nobr>{{row.f_card_id}}</nobr>
195
+ </td>
196
+ <td style="text-align: center;">
197
+ <nobr>{{row.f_meter_brand}}</nobr>
198
+ </td>
199
+ <td style="text-align: center;">
200
+ <nobr>{{row. f_type}}</nobr>
201
+ </td>
202
+ <td style="text-align: center;">
203
+ <nobr>{{row. f_fill_type}}</nobr>
204
+ </td>
205
+ <td style="text-align: center;">
206
+ <nobr>{{row.f_comments}}</nobr>
207
+ </td>
208
+ <td style="text-align: center;">
209
+ <nobr>{{row.f_cardfees}}</nobr>
210
+ </td>
211
+ <td style="text-align: center;">
212
+ <nobr>{{row.f_operate_date}}</nobr>
213
+ </td>
214
+ <td style="text-align: center;">
215
+ <nobr>{{row.f_payment}}</nobr>
216
+ </td>
217
+ <td style="text-align: center;">
218
+ <nobr>{{row.f_operator}}</nobr>
219
+ </td>
220
+ <td style="text-align: center;">
221
+ <nobr>{{row.f_depname}}</nobr>
222
+ </td>
223
+ <td style="text-align: center;">
224
+ <nobr>{{row.f_orgname}}</nobr>
225
+ </td>
226
+ <td style="text-align: center;"><nobr>
227
+ <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
228
+ </nobr></td>
229
+ </template>
230
+ <template partial='foot'></template>
231
+ </data-grid>
232
+
233
+ </criteria-paged>
234
+
235
+ <table class="table-hover">
236
+ <tr style="position: relative" class="table-bordered">
237
+ <td
238
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
239
+ 汇总信息
240
+ </td>
241
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
242
+ 卡费合计:&emsp;{{sumsmodel.f_cardfees}}
243
+ </td>
244
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
245
+ 户数合计:&emsp;{{sumsmodel.hushu}}
246
+ </td>
247
+ </tr>
248
+ </table>
249
+ </div>
250
+ <div class="flex" v-if="show">
251
+ <user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>
252
+ </div>
253
+ </div>
254
+ <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
255
+ <article slot="modal-body">
256
+ <upload :blodid="selected.f_userinfo_id" v-ref:upload isupload="false" takeimg="false" fusetype="补卡" :isremark="false" style="width:auto" ></upload>
257
+ </article>
258
+ <footer slot="modal-footer" class="modal-footer">
259
+ </footer>
260
+ </modal>
261
+ </div>
262
+ </template>
263
+
264
+ <script>
265
+ import {PagedList} from 'vue-client'
266
+ import defaultPrint from '../config/DefaultPrint'
267
+ import exportConfig from '../config/exportConfig'
268
+
269
+ let readySomething = async function (self) {
270
+
271
+ self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
272
+ self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
273
+ // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
274
+ // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
275
+ // await self.$refs.paged.$refs.cri.search()
276
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
277
+ await self.$MagLoadParams.loadParam()
278
+ self.initParams()
279
+
280
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
281
+ }
282
+ export default {
283
+ props:['data'],
284
+ title: '补卡查询',
285
+ data() {
286
+ return {
287
+ data: {},
288
+ other:[],
289
+ footer:[],
290
+ model: new PagedList('rs/sql/fillCardQuery', 20, {}, {f_cardfees: 0,hushu:0}),
291
+ criteriaShow: false,
292
+ headData: ["客户编号", "客户名称", "客户电话", "身份证号", "地址", "补卡类型", "表编号", "卡号", "气表品牌", "气表状态", "卡费", "补卡日期", "人员", "部门", "公司"],
293
+ 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"],
294
+ config: {
295
+ 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']
296
+ },
297
+ //默认打印列
298
+ defaultfield: [],
299
+ orgCondtionStr: '',
300
+ initres: {
301
+ org:[this.$login.f.orgid],
302
+ dep:[],
303
+ user:[],
304
+ },
305
+ modelval: [],
306
+ printshow: false,
307
+ all: false,
308
+ fields: {},
309
+ thead: '',
310
+ tfoot: '',
311
+ showupload:false,
312
+ selected:{},
313
+
314
+ meterbrands: [],
315
+ // tablestate: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '停用', value: '停用'}],
316
+
317
+ show:false,
318
+ rowdata:{},
319
+ //合计数据
320
+ sumsmodel: {}
321
+ }
322
+ },
323
+ ready() {
324
+ readySomething(this).then(() => {
325
+ this.$emit('ready')
326
+ }).catch((error) => {
327
+ this.$emit('error', error)
328
+ })
329
+ },
330
+ methods: {
331
+ view(row){
332
+ this.showupload = true
333
+ this.selected= row
334
+ },
335
+ getotherfooter(){
336
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
337
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
338
+ this.other=[];
339
+ this.footer=[];
340
+ let exportdata = this.getCondition;
341
+ let otherInData=[];
342
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
343
+ let footerData=[],exportfield=this.getfield;
344
+ footerData.push("合计");
345
+ let self = this;
346
+ for(var field in self.sumsmodel){
347
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
348
+ }
349
+ this.footer.push(footerData);
350
+ this.other.push(otherInData);
351
+ },
352
+ search(){
353
+ this.$refs.paged.$refs.cri.search()
354
+ },
355
+ cancel() {
356
+ this.show = false
357
+ },
358
+ async selfSearch(args) {
359
+ console.log("--------------------?")
360
+ if (this.data) {
361
+ this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
362
+ this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
363
+ }
364
+ args.condition = `${args.condition}` + this.orgCondtionStr
365
+ await this.model.search(args.condition, args.model)
366
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
367
+ this.sumsmodel.hushu=[...new Set(this.$refs.paged.$refs.grid.model.rows.map(item => item.f_userinfo_code))].length
368
+ },
369
+
370
+ initParams() {
371
+ // 初始化气表品牌
372
+ let brandArr = []
373
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
374
+ let temp = {}
375
+ temp.label = item.label
376
+ temp.value = item.value.f_meter_brand
377
+ brandArr.push(temp)
378
+ })
379
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
380
+ },
381
+
382
+ clear() {
383
+ //清空部门和人员
384
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
385
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].selectres = []
386
+ this.$refs.paged.$refs.cri.$refs.sel.slice_area = []
387
+ //部门和人员变为全选
388
+ // this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
389
+ // this.$refs.paged.$refs.cri.$refs.sel.$children[3].$children[0].isSelectAll = false
390
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
391
+ this.$refs.paged.$refs.cri.model[key] = []
392
+ })
393
+ },
394
+ show() {
395
+ this.criteriaShow = true
396
+ },
397
+ hidden() {
398
+ this.criteriaShow = !this.criteriaShow
399
+ },
400
+ getRes(condition) {
401
+ this.orgCondtionStr = condition
402
+ },
403
+ dealmsg(val) {
404
+ console.log('---------------dealmsg')
405
+ this.rowdata=val
406
+ this.show=true
407
+ val.model = this.model.model
408
+ this.$dispatch('deal-msg', val)
409
+ },
410
+ stamp() {
411
+ this.all = false
412
+ //默认选择要打印的列
413
+ this.modelval = defaultPrint.config
414
+ this.fields = this.getfield
415
+ console.log('所有打印字段', this.fields)
416
+ this.printshow = true
417
+ this.put()
418
+ },
419
+ put() {
420
+ // 对Modelval进行排序
421
+ this.sortModelval()
422
+ this.thead = `<tr><th colspan=${this.modelval.length}>补卡查询统计报表</th></tr><tr>`
423
+ for (let key of this.modelval) {
424
+ this.thead += '<th>' + this.fields[key] + '</th>'
425
+ }
426
+ this.thead += '</tr>'
427
+ },
428
+ print() {
429
+ this.$refs.print.PrintAsFile()
430
+ this.printshow = false
431
+ },
432
+ close() {
433
+ this.printshow = false
434
+ this.all = false
435
+ },
436
+ // 对选择的列进行排序
437
+ sortModelval() {
438
+ let sortModel = []
439
+ Object.keys(this.fields).forEach((key) => {
440
+ if (this.modelval.includes(key)) {
441
+ sortModel.push(key)
442
+ }
443
+ })
444
+ this.modelval = sortModel
445
+ console.log('选择的打印的字段', this.modelval)
446
+ },
447
+ async updateParams() {
448
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
449
+ this.initParams()
450
+ },
451
+ },
452
+ watch: {
453
+ 'all'(val) {
454
+ if (val) {
455
+ this.modelval = this.bodyData
456
+ } else {
457
+ this.modelval = defaultPrint.config
458
+ this.put()
459
+ }
460
+ },
461
+ 'modelval.length'() {
462
+ this.put()
463
+ },
464
+ sumsmodel:{
465
+ handler: function(val) {
466
+ this.getotherfooter();
467
+ },
468
+ deep: true
469
+ },
470
+ 'orgCondtionStr'(val) {
471
+ let res = val.match(/'(.*?)'/)
472
+ console.log('正则提取:',res && res[1])
473
+ if (res) {
474
+ this.f_filialeid = res[1]
475
+ this.updateParams()
476
+ }
477
+ }
478
+ },
479
+ computed: {
480
+ getCondition() {
481
+ return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
482
+ },
483
+ getfield() {
484
+ return exportConfig.fillcardConfig
485
+ },
486
+ fillCardTypes() {
487
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('补卡类型')]
488
+ },
489
+ chargeState() {
490
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('补卡状态')]
491
+ },
492
+ payments() {
493
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式')]
494
+ }
495
+ }
496
+ }
497
+ </script>