manage-client 3.3.26 → 3.3.28

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.
@@ -0,0 +1,748 @@
1
+ <template>
2
+ <div id="unit" class="flex-row" >
3
+ <div class="basic-main" @keyup.enter="search" >
4
+ <div class="flex" :class="{showbottom:showbottomsum}" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label class="font_normal_body">开始日期</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="true"
16
+ condition="f_operate_date >= '{}'">
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-2 form-group">
20
+ <label class="font_normal_body">结束日期</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :format="'yyyy-MM-dd HH:mm:ss'"
25
+ :show-reset-button="true"
26
+ condition="f_operate_date <= '{}'">
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-2 form-group ">
30
+ <label class="font_normal_body">客户编号</label>
31
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
32
+ condition="f_userinfo_code like '%{}%' " placeholder="客户编号">
33
+ </div>
34
+ <div class="col-sm-2 form-group">
35
+ <label class="font_normal_body" title="旧客户编号">档案编号</label>
36
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
37
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
38
+ </div>
39
+
40
+
41
+ <!--
42
+ -->
43
+
44
+
45
+ <div class="span" style="float:right;">
46
+ <button class="button_search button_spacing" @click="search()">查询</button>
47
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
48
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
49
+
50
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
51
+ :field="$parent.$parent.getfield" :header="$parent.$parent.other"
52
+ sqlurl="rs/logic/exportfile" sql-name="changeMeterQuery" template-name='换表查询导出'
53
+ :choose-col="true">
54
+ </export-excel>
55
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
56
+ :defaultfield="$parent.$parent.defaultfield"
57
+ titletable="换表记录"
58
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
59
+ <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>
60
+ </div>
61
+ </div>
62
+ <div class="row" v-show="$parent.$parent.criteriaShow">
63
+ <res-select-group :initres="$parent.$parent.initres" :cascade =true @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
64
+ <div class="col-sm-2 form-group">
65
+ <label class="font_normal_body">客户名称</label>
66
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
67
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
68
+ </div>
69
+ <div class="col-sm-2 form-group">
70
+ <label class="font_normal_body">客户电话</label>
71
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
72
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
73
+ </div>
74
+ <div class="col-sm-2 form-group">
75
+ <label class="font_normal_body">客户地址</label>
76
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
77
+ condition="f_address like '%{}%'" placeholder='客户地址'>
78
+ </div>
79
+ <div class="col-sm-2 form-group">
80
+ <label class="font_normal_body">用户类型</label>
81
+ <v-select :value.sync="model.f_user_type"
82
+ v-model="model.f_user_type"
83
+ :options='$parent.$parent.userTypes' placeholder='请选择'
84
+ condition="f_user_type = '{}'"
85
+ close-on-select></v-select>
86
+ </div>
87
+ <div class="col-sm-2 form-group">
88
+ <label class="font_normal_body">新表品牌</label>
89
+ <v-select :value.sync="model.f_meter_brand"
90
+ v-model="model.f_meter_brand"
91
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
92
+ condition="f_meter_brand = '{}'"
93
+ close-on-select></v-select>
94
+ </div>
95
+ <div class="col-sm-2 form-group">
96
+ <label class="font_normal_body">旧表品牌</label>
97
+ <v-select :value.sync="model.f_meter_brand_old"
98
+ v-model="model.f_meter_brand_old"
99
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
100
+ condition="f_meter_brand_old = '{}'"
101
+ close-on-select></v-select>
102
+ </div>
103
+ <div class="col-sm-2 form-group">
104
+ <label class="font_normal_body">换表类型</label>
105
+ <v-select :value.sync="model.f_type"
106
+ v-model="model.f_type"
107
+ :options='$parent.$parent.changeTypes' placeholder='请选择'
108
+ condition="f_type = '{}'"
109
+ close-on-select></v-select>
110
+ </div>
111
+ <div class="col-sm-2 form-group">
112
+ <label class="font_normal_body">换&nbsp;表&nbsp;&nbsp;人</label>
113
+ <v-select :value.sync="model.f_change_operator"
114
+ v-model="model.f_change_operator"
115
+ :options='$parent.$parent.changePerson' placeholder='请选择'
116
+ condition="f_change_operator = '{}'"
117
+ close-on-select></v-select>
118
+ </div>
119
+ <div class="col-sm-2 form-group">
120
+ <label class="font_normal_body">卡&emsp;&emsp;号</label>
121
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
122
+ condition="f_card_id = '{}'" placeholder='卡号'>
123
+ </div>
124
+ <div class="col-sm-2 form-group">
125
+ <label class="font_normal_body">换表状态</label>
126
+ <v-select :value.sync="model.f_state"
127
+ v-model="model.f_state"
128
+ :options='$parent.$parent.charge_state' placeholder='请选择'
129
+ condition="f_state = '{}'"
130
+ close-on-select></v-select>
131
+ </div>
132
+ <div class="col-sm-2 form-group">
133
+ <label class="font_normal_body">旧表类型</label>
134
+ <v-select :value.sync="model.f_meter_type_old"
135
+ v-model="model.f_meter_type_old"
136
+ :options='$parent.$parent.meterClassify' placeholder='请选择'
137
+ condition="f_meter_type_old = '{}'"
138
+ close-on-select></v-select>
139
+ </div>
140
+ <div class="col-sm-2 form-group">
141
+ <label class="font_normal_body">新表类型</label>
142
+ <v-select :value.sync="model.f_meter_type"
143
+ v-model="model.f_meter_type"
144
+ :options='$parent.$parent.meterClassify' placeholder='请选择'
145
+ condition="f_meter_type = '{}'"
146
+ close-on-select></v-select>
147
+ </div>
148
+ <div class="col-sm-2 form-group">
149
+ <label class="font_normal_body">是否免费</label>
150
+ <v-select :value.sync="model.f_changemeter_fee"
151
+ v-model="model.f_changemeter_fee"
152
+ :options='$parent.$parent.changemeter_fee' placeholder='请选择'
153
+ condition="f_changemeter_fee {}"
154
+ close-on-select></v-select>
155
+ </div>
156
+ <div class="col-sm-2 form-group">
157
+ <label class="font_normal_body">付款方式</label>
158
+ <v-select id="f_payment"
159
+ v-model="model.f_payment"
160
+ placeholder='请选择'
161
+ condition="f_payment ='{}'"
162
+ :value.sync="model.f_payment"
163
+ :options='$parent.$parent.payments'
164
+ close-on-select clear-button>
165
+ </v-select>
166
+ </div>
167
+ <div class="col-sm-2 form-group">
168
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
169
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
170
+ condition="f_meternumber = '{}'" placeholder='表号'>
171
+ </div>
172
+ <div class="col-sm-2 form-group">
173
+ <label class="font_normal_body">表&ensp;封&ensp;号</label>
174
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_metertitles"
175
+ condition="f_metertitles = '{}'" placeholder='表封号'>
176
+ </div>
177
+ <div class="col-sm-2 form-group">
178
+ <label class="font_normal_body">旧&emsp;表&emsp;号</label>
179
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
180
+ condition="f_meternumber_old = '{}'" placeholder='旧表号'>
181
+ </div>
182
+ <div class="col-sm-2 form-group">
183
+ <label class="font_normal_body">旧&emsp;卡&emsp;号</label>
184
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
185
+ condition="f_card_old = '{}'" placeholder='旧卡号'>
186
+ </div>
187
+ <div class="col-sm-2 form-group">
188
+ <label class="font_normal_body">审&emsp;核&emsp;人</label>
189
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_handler"
190
+ condition="f_handler = '{}'" placeholder='旧卡号'>
191
+ </div>
192
+ <div class="col-sm-2 form-group">
193
+ <label class="font_normal_body">审核状态</label>
194
+ <v-select :value.sync="model.f_step_state"
195
+ v-model="model.f_step_state"
196
+ :options='$parent.$parent.flowState' placeholder='请选择审核状态'
197
+ condition="f_changemeter_fee {}"
198
+ close-on-select></v-select>
199
+ </div>
200
+ <div class="col-sm-2 form-group">
201
+ <label for="startGasDate" class="font_normal_body">审核日期</label>
202
+ <datepicker id="startGasDate" placeholder="开始日期" style="width:60%"
203
+ v-model="model.f_step_date"
204
+ :value.sync="model.f_step_date"
205
+ :format="'yyyy-MM-dd'"
206
+ :show-reset-button="true"
207
+ condition="f_step_date >= '{} 00:00:00'">
208
+ </datepicker>
209
+ </div>
210
+ <div class="col-sm-2 form-group">
211
+ <label for="endGasDate" class="font_normal_body">&emsp;&emsp;至&emsp;&emsp;</label>
212
+ <datepicker id="endGasDate" placeholder="结束日期" style="width:60%"
213
+ v-model="model.f_step_date"
214
+ :value.sync="model.f_step_date"
215
+ :format="'yyyy-MM-dd'"
216
+ :show-reset-button="true"
217
+ condition="f_step_date <= '{} 23:59:59'">
218
+ </datepicker>
219
+ </div>
220
+ </div>
221
+ </div>
222
+ </criteria>
223
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid @dblclick="$parent.$parent.toBusiness">
224
+ <template partial='head'>
225
+ <tr>
226
+ <th>
227
+ <!--<nobr>客户编号</nobr>-->
228
+ <data-order field="f_userinfo_code" name="客户编号"
229
+ :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
230
+ </th>
231
+ <th>
232
+ <nobr>客户名称</nobr>
233
+ </th>
234
+ <th>
235
+ <nobr>档案编号</nobr>
236
+ </th>
237
+ <th>
238
+ <nobr>付款方式</nobr>
239
+ </th>
240
+ <th>
241
+ <nobr>气表底数</nobr>
242
+ </th>
243
+ <th>
244
+ <nobr>表上余额</nobr>
245
+ </th>
246
+ <th>
247
+ <nobr>累购气量</nobr>
248
+ </th>
249
+ <th>
250
+ <nobr>累购金额</nobr>
251
+ </th>
252
+ <th>
253
+ <!--<nobr>客户地址</nobr>-->
254
+ <data-order field="f_address" name="客户地址"
255
+ :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
256
+ </th>
257
+ <th>
258
+ <nobr>换表类型</nobr>
259
+ </th>
260
+ <th>
261
+ <nobr>换表费</nobr>
262
+ </th>
263
+ <th>
264
+ <nobr>旧表号</nobr>
265
+ </th>
266
+ <th>
267
+ <nobr>新表号</nobr>
268
+ </th>
269
+ <th>
270
+ <nobr>表封号</nobr>
271
+ </th>
272
+ <th>
273
+ <nobr>旧气表品牌</nobr>
274
+ </th>
275
+ <th>
276
+ <nobr>新气表品牌</nobr>
277
+ </th>
278
+ <th>
279
+ <nobr>补气量</nobr>
280
+ </th>
281
+ <th>
282
+ <nobr>补气金额</nobr>
283
+ </th>
284
+ <th>
285
+ <nobr>订单编号</nobr>
286
+ </th>
287
+ <th>
288
+ <nobr>备注</nobr>
289
+ </th>
290
+ <th>
291
+ <nobr>换表人</nobr>
292
+ </th>
293
+ <th>
294
+ <nobr>状态</nobr>
295
+ </th>
296
+ <th>
297
+ <!-- <nobr>换表日期</nobr>-->
298
+ <data-order field="f_operate_date" name="换表日期"
299
+ :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
300
+ </th>
301
+ <th>
302
+ <nobr>人员</nobr>
303
+ </th>
304
+ <th>
305
+ <nobr>部门</nobr>
306
+ </th>
307
+ <th>
308
+ <nobr>公司</nobr>
309
+ </th>
310
+ <th><nobr>旧表类型</nobr></th>
311
+ <th><nobr>新表类型</nobr></th>
312
+ <th><nobr>用户类型</nobr></th>
313
+ <th><nobr>差额原因</nobr></th>
314
+ <th><nobr>审核人</nobr></th>
315
+ <th><nobr>审核时间</nobr></th>
316
+ <th><nobr>审核状态</nobr></th>
317
+ <th><nobr>附件</nobr></th>
318
+ </tr>
319
+ </template>
320
+ <template partial='body'>
321
+ <td style="text-align: center;"><nobr>
322
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
323
+ </nobr> </td>
324
+ <td style="text-align: center;">
325
+ <nobr>{{row.f_user_name}}</nobr>
326
+ </td>
327
+ <td style="text-align: center;">
328
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
329
+ </td>
330
+ <td style="text-align: center;">
331
+ <nobr>{{row.f_payment}}</nobr>
332
+ </td>
333
+ <td style="text-align: center;">
334
+ <nobr>{{row.f_meter_base}}</nobr>
335
+ </td>
336
+ <td style="text-align: center;">
337
+ <nobr>{{row.f_balance_amount}}</nobr>
338
+ </td>
339
+ <td style="text-align: center;">
340
+ <nobr>{{row.leigougas}}</nobr>
341
+ </td>
342
+ <td style="text-align: center;">
343
+ <nobr>{{row.leigoumoney}}</nobr>
344
+ </td>
345
+ <td style="text-align: center;">
346
+ <nobr>{{row.f_address}}</nobr>
347
+ </td>
348
+
349
+ <td style="text-align: center;">
350
+ <nobr>{{row.f_type}}</nobr>
351
+ </td>
352
+ <td style="text-align: center;">
353
+ <nobr>{{row.f_changemeter_fee}}</nobr>
354
+ </td>
355
+ <td style="text-align: center;">
356
+ <nobr>{{row.f_meternumber_old}}</nobr>
357
+ </td>
358
+ <td style="text-align: center;">
359
+ <nobr>{{row.f_meternumber}}</nobr>
360
+ </td>
361
+ <td style="text-align: center;">
362
+ <nobr>{{row.f_metertitles}}</nobr>
363
+ </td>
364
+ <td style="text-align: center;">
365
+ <nobr>{{row.f_meter_brand_old}}</nobr>
366
+ </td>
367
+ <td style="text-align: center;">
368
+ <nobr>{{row.f_meter_brand}}</nobr>
369
+ </td>
370
+ <td style="text-align: center;">
371
+ <nobr>{{row.f_remanent_gas}}</nobr>
372
+ </td>
373
+ <td style="text-align: center;">
374
+ <nobr>{{row.f_remanent_money}}</nobr>
375
+ </td>
376
+ <td style="text-align: center;">
377
+ <nobr>{{row.f_serial_number}}</nobr>
378
+ </td>
379
+ <td style="text-align: center;">
380
+ <nobr>{{row.f_comments}}</nobr>
381
+ </td>
382
+ <td style="text-align: center;">
383
+ <nobr>{{row.f_change_operator}}</nobr>
384
+ </td>
385
+ <td style="text-align: center;">
386
+ <nobr>{{row.f_state}}</nobr>
387
+ </td>
388
+ <td style="text-align: center;">
389
+ <nobr>{{row.f_operate_date}}</nobr>
390
+ </td>
391
+ <td style="text-align: center;">
392
+ <nobr>{{row.f_operator}}</nobr>
393
+ </td>
394
+ <td style="text-align: center;">
395
+ <nobr>{{row.f_depname}}</nobr>
396
+ </td>
397
+ <td style="text-align: center;">
398
+ <nobr>{{row.f_orgname}}</nobr>
399
+ </td>
400
+ <td style="text-align: center;">
401
+ <nobr>{{row.f_meter_type_old}}</nobr>
402
+ </td>
403
+ <td style="text-align: center;">
404
+ <nobr>{{row.f_meter_type}}</nobr>
405
+ </td>
406
+ <td style="text-align: center;">
407
+ <nobr>{{row.f_user_type}}</nobr>
408
+ </td>
409
+ <td style="text-align: center;">
410
+ <nobr>{{row.f_difference_reason}}</nobr>
411
+ </td>
412
+ <td style="text-align: center;">
413
+ <nobr>{{row.f_handler}}</nobr>
414
+ </td>
415
+ <td style="text-align: center;">
416
+ <nobr>{{row.f_step_state}}</nobr>
417
+ </td>
418
+ <td style="text-align: center;">
419
+ <nobr>{{row.f_step_date}}</nobr>
420
+ </td>
421
+ <td style="text-align: center;"><nobr>
422
+ <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
423
+ </nobr></td>
424
+ </template>
425
+ <template partial='foot'></template>
426
+ </data-grid>
427
+ </criteria-paged>
428
+ <table class="table-hover">
429
+ <tr style="position: relative" class="table-bordered">
430
+ <td
431
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
432
+ 汇总信息
433
+ </td>
434
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
435
+ 表上余额合计:&emsp;{{sumsmodel.f_balance_amount}}
436
+ </td>
437
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
438
+ 换表费合计:&emsp;{{sumsmodel.f_changemeter_fee}}
439
+ </td>
440
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
441
+ 补气量合计:&emsp;{{sumsmodel.f_remanent_gas}}
442
+ </td>
443
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
444
+ 补气金额合计:&emsp;{{sumsmodel.f_remanent_money}}
445
+ </td>
446
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
447
+ 户数合计:&emsp;{{sumsmodel.hushu}}
448
+ </td>
449
+ </tr>
450
+ </table>
451
+ <!--<colligate-details :showinfo="showinfo" :businesstype="businesstype" :data="data" @close-info="showinfo=false"></colligate-details>-->
452
+ <!--<modal :show.sync="printshow" v-ref:modal backdrop="false">-->
453
+ <!--<header slot="modal-header" class="modal-header text-center">-->
454
+ <!--<h4 class="modal-title">打印列选择</h4>-->
455
+ <!--<input type="checkbox" class="" id="f_generations" v-model="all">-->
456
+ <!--<label for="f_generations" class="font-size">全选</label>-->
457
+ <!--</header>-->
458
+ <!--<article slot="modal-body">-->
459
+ <!--<div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">-->
460
+ <!--<div class="col-sm-3" v-for="f in fields">-->
461
+ <!--<input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">-->
462
+ <!--<label :for="'water-owe-details-'+$index" class="font-size">{{f}}</label>-->
463
+ <!--</div>-->
464
+ <!--</div>-->
465
+ <!--</article>-->
466
+ <!--<footer slot="modal-footer" class="modal-footer">-->
467
+ <!--<center>-->
468
+ <!--<button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>-->
469
+ <!--<button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>-->
470
+ <!--<print-table :model='model' v-show="false" v-ref:print-->
471
+ <!--:top='40' :left='60' :right='40' :bottom='60'-->
472
+ <!--:thead="thead" :tfoot='tfoot' :attach="yangsen"-->
473
+ <!--:fields="modelval" :printpage="true">-->
474
+ <!--</print-table>-->
475
+ <!--</center>-->
476
+ <!--</footer>-->
477
+ <!--</modal>-->
478
+ </div>
479
+ <div class="flex" v-if="show">
480
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
481
+ </div>
482
+ </div>
483
+ <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
484
+ <article slot="modal-body">
485
+ <upload :blodid="selected.f_userinfo_id" v-ref:upload :isremark="false" fusetype="换表&清零" ></upload>
486
+ </article>
487
+ <footer slot="modal-footer" class="modal-footer">
488
+ </footer>
489
+ </modal>
490
+ </div>
491
+ </template>
492
+ <script>
493
+ import {PagedList} from 'vue-client'
494
+ import defaultPrint from './config/DefaultPrint'
495
+ import exportConfig from './config/exportConfig'
496
+ let readySomething = async function (self) {
497
+ self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
498
+ self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
499
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
500
+ // self.$refs.paged.$refs.cri.search()
501
+ await self.$MagLoadParams.loadParam()
502
+ self.initParams()
503
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
504
+ }
505
+ export default {
506
+ props:['data'],
507
+ title: '换表查询',
508
+ data() {
509
+ return {
510
+ data: {},
511
+ other:[],
512
+ footer:[],
513
+ meterbrands: [],
514
+ pricenames: [],
515
+ model: new PagedList('rs/sql/changeMeterQuery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`}, {f_balance_amount: 0,f_changemeter_fee: 0,f_remanent_money:0,f_remanent_gas:0,hushu:0}),
516
+ criteriaShow: false,
517
+ orgCondtionStr: '',
518
+ modelval: [],
519
+ printshow: false,
520
+ all: false,
521
+ fields: {},
522
+ initres: {
523
+ org:[this.$login.f.orgid],
524
+ dep:[],
525
+ user:[],
526
+ },
527
+ config: {
528
+ 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']
529
+ },
530
+ //排序
531
+ orderitem:'f_operate_date desc',
532
+ orderFields: {
533
+ f_operate_date: 'no'
534
+ },
535
+ show:false,
536
+ rowdata:{},
537
+ showupload:false,
538
+ selected:{},
539
+ thead: '',
540
+ tfoot: '',
541
+ defaultfield: [],
542
+ // tablestate: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '停用', value: '停用'}],
543
+ //合计数据
544
+ sumsmodel: {},
545
+ changemeter_fee:[
546
+ {label: '全部', value: ''},
547
+ {label: '销售', value: '> 0'},
548
+ {label: '免费', value: '= 0'}
549
+ ],
550
+ flowState: [{label: '全部', value: ''}, {label: '审核通过', value: '审核通过'}, {label: '审核未通过', value: '审核未通过'}]
551
+ }
552
+
553
+ },
554
+ ready() {
555
+ this.startDate=this.$parent.startDate
556
+ this.endDate=this.$parent.endDate
557
+ readySomething(this)
558
+ },
559
+ methods: {
560
+ view(row){
561
+ this.showupload = true
562
+ this.selected= row
563
+ console.log("11",row)
564
+ },
565
+ search(){
566
+ this.$refs.paged.$refs.cri.search()
567
+ },
568
+ cancel() {
569
+ this.show = false
570
+ },
571
+ showmsg(obj){
572
+ this.rowdata=obj
573
+ this.show=true
574
+ },
575
+ getotherfooter () {
576
+ this.other = [];
577
+ this.footer = [];
578
+ let exportdata = this.getCondition;
579
+ let otherInData = [];
580
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
581
+ let footerData = [], exportfield = this.getfield;
582
+ footerData.push("合计");
583
+ let self = this;
584
+ for (var field in self.sumsmodel) {
585
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
586
+ }
587
+ this.footer.push(footerData);
588
+ this.other.push(otherInData);
589
+ },
590
+ async initParams() {
591
+ // 初始化气表品牌
592
+ let brandArr = []
593
+ await this.$MagGetSaleParam.getGasbrand().forEach((item) => {
594
+ let temp = {}
595
+ temp.label = item.label
596
+ temp.value = item.value.f_meter_brand
597
+ brandArr.push(temp)
598
+ })
599
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
600
+ },
601
+ async selfSearch(args) {
602
+ if (this.data) {
603
+ this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
604
+ this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
605
+ }
606
+ args.condition = `${args.condition}` + this.orgCondtionStr
607
+ args.condition = args.condition.replace(/f_zones/, "f_slice_area")
608
+ await this.model.search(args.condition, args.model)
609
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
610
+
611
+ this.sumsmodel.hushu=[...new Set(this.$refs.paged.$refs.grid.model.rows.map(item => item.f_userinfo_code))].length
612
+
613
+ },
614
+ clear() {
615
+ //清空部门和人员
616
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
617
+ //部门和人员变为全选
618
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
619
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
620
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
621
+ this.$refs.paged.$refs.cri.model[key] = []
622
+ })
623
+ },
624
+ show() {
625
+ this.criteriaShow = true
626
+ },
627
+ hidden() {
628
+ this.criteriaShow = !this.criteriaShow
629
+ },
630
+ getRes(obj) {
631
+ this.orgCondtionStr = obj
632
+ },
633
+ stamp() {
634
+ this.all = false
635
+ //默认选择要打印的列
636
+ this.modelval = defaultPrint.config
637
+ this.fields = this.getfield
638
+ this.printshow = true
639
+ this.put()
640
+ },
641
+ dealmsg(val) {
642
+ val.model = this.model.model
643
+ this.$dispatch('deal-msg', val)
644
+ },
645
+ put() {
646
+ // 对Modelval进行排序
647
+ this.sortModelval()
648
+ this.thead = `<tr><th colspan=${this.modelval.length}>换表查询统计报表</th></tr><tr>`
649
+ for (let key of this.modelval) {
650
+ this.thead += '<th>' + this.fields[key] + '</th>'
651
+ }
652
+ this.thead += '</tr>'
653
+ },
654
+ print() {
655
+ this.$refs.print.PrintAsFile()
656
+ this.printshow = false
657
+ },
658
+ close() {
659
+ this.printshow = false
660
+ this.all = false
661
+ },
662
+ // 对选择的列进行排序
663
+ sortModelval() {
664
+ let sortModel = []
665
+ Object.keys(this.fields).forEach((key) => {
666
+ if (this.modelval.includes(key)) {
667
+ sortModel.push(key)
668
+ }
669
+ })
670
+ this.modelval = sortModel
671
+ console.log('选择的打印的字段', this.modelval)
672
+ },
673
+ sort (field, rule) {
674
+ // 将所有排序方式设为不排序,实现相互排斥
675
+ for (let key in this.orderFields) {
676
+ if (key === field) {
677
+ this.orderFields[key] = rule
678
+ } else {
679
+ this.orderFields[key] = 'no'
680
+ }
681
+ }
682
+ // 如果新规则不排序,还原为默认排序
683
+ if (rule === 'no') {
684
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
685
+ } else {
686
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
687
+ }
688
+
689
+ this.search()
690
+ },
691
+ },
692
+ watch: {
693
+ 'all'(val) {
694
+ if (val) {
695
+ this.modelval = this.bodyData
696
+ } else {
697
+ this.modelval = defaultPrint.config
698
+ this.put()
699
+ }
700
+ },
701
+ 'modelval.length'() {
702
+ this.put()
703
+ },
704
+ sumsmodel:{
705
+ handler: function(val) {
706
+ this.getotherfooter();
707
+ },
708
+ deep: true
709
+ }
710
+ },
711
+ computed: {
712
+ // getstart(){
713
+ // return `开始时间:${this.$refs.paged.$refs.cri.model.startDate} 结束时间:${this.$refs.paged.$refs.cri.model.endDate}`
714
+ // },
715
+ getCondition() {
716
+ return {
717
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
718
+ orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"}
719
+ },
720
+ getfield() {
721
+ return exportConfig.changemeterConfig
722
+ },
723
+ changeTypes() {
724
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('换表类型')]
725
+ },
726
+ userTypes() {
727
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
728
+ },
729
+ meterClassify() {
730
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
731
+ },
732
+ changePerson() {
733
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('换表人')]
734
+ },
735
+ charge_state() {
736
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('收费状态')]
737
+ },
738
+ payments() {
739
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式')]
740
+ }
741
+ }
742
+ }
743
+ </script>
744
+ <style scoped>
745
+ .showbottom{
746
+ height:95%
747
+ }
748
+ </style>