manage-client 3.2.66 → 3.2.67

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,931 +1,937 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main" @keyup.enter="search">
4
- <div class="flex">
5
- <div style="flex:1;" class="flex" v-if="!show">
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 class="font_normal_body">客户编号</label>
12
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
13
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
14
- </div>
15
- <div class="col-sm-2 form-group">
16
- <label class="font_normal_body">客户名称</label>
17
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
18
- condition="f_user_name like '%{}%'" placeholder="客户名称">
19
- </div>
20
- <div class="col-sm-2 form-group">
21
- <label class="font_normal_body" title="旧客户编号">档案编号</label>
22
- <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
23
- condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
24
- </div>
25
- <div class="col-sm-2 form-group">
26
- <label class="font_normal_body">客户电话</label>
27
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
28
- condition="f_user_phone like '%{}%'" placeholder="客户电话">
29
- </div>
30
- <div class="span" style="float:right;">
31
- <button class="button_search button_spacing" v-show="false" @click="$parent.$parent.ReadIDCard()">读取身份证</button>
32
- <read-card v-if="!$filialeInfo || $filialeInfo!=='rongcheng'" :is-single.sync="$parent.$parent.isSingleUser" @read-info="$parent.$parent.cardBtn" v-ref:readcard></read-card>
33
- <button class="button_search button_spacing" @click="search()">查询</button>
34
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
35
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
36
-
37
- <export-excel :data="$parent.$parent.getCondition"
38
- :field="$parent.$parent.getExportField"
39
- :footer="$parent.$parent.footer"
40
- :header="$parent.$parent.other"
41
- v-if="$parent.$parent.authArr.includes('档案查询导出')"
42
- sqlurl="rs/logic/exportfile" sql-name="meterQuery" template-name='表具查询导出'
43
- :choose-col="true"></export-excel>
44
- <print-data :sum-field="$parent.$parent.getExportField" :model="$parent.model" :field="$parent.$parent.getExportField"
45
- :defaultfield="$parent.$parent.defaultfield"
46
- titletable="客户查询"
47
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
48
-
49
-
50
- <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>
51
- </div>
52
- </div>
53
- <div class="row" v-show="$parent.$parent.criteriaShow">
54
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"></res-select-group>
55
-
56
-
57
- <div class="col-sm-2 form-group">
58
- <label class="font_normal_body">客户地址</label>
59
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
60
- condition="f_address like '%{}%'" placeholder='客户地址'>
61
- </div>
62
- <div class="col-sm-2 form-group" v-if="!$filialeInfo || $filialeInfo!=='rongcheng'">
63
- <label class="font_normal_body">用气点</label>
64
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userfiles_address"
65
- condition="f_userfiles_address like '%{}%'" placeholder='用气点'>
66
- </div>
67
- <div class="col-sm-2 form-group">
68
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;表号&nbsp;&nbsp;&nbsp;</label>
69
- <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
70
- condition="f_meternumber like '%{}%'" placeholder='表号'>
71
- </div>
72
-
73
- <div class="col-sm-2 form-group">
74
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;卡号&nbsp;&nbsp;&nbsp;</label>
75
- <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
76
- condition="f_card_id like '%{}%'" placeholder='卡号'>
77
- </div>
78
-
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
- :options='$parent.$parent.usertypes'
83
- @change="$parent.$parent.userTypeChange()"
84
- placeholder='请选择' v-model="model.f_user_type"
85
- condition="f_user_type = '{}'"
86
- close-on-select></v-select>
87
- </div>
88
- <div class="col-sm-2 form-group" >
89
- <label for="f_usetype" class="font_normal_body">二次挂表</label>
90
- <v-select :value.sync="model.issecondtype" v-model="model.issecondtype"
91
- condition="f_usetype {}"
92
- :options='$parent.$parent.issecond' placeholder='请选择'
93
- close-on-select></v-select>
94
- </div>
95
- <div class="col-sm-2 form-group" >
96
- <label for="f_usetype" class="font_normal_body" title="参数:使用类型">使用类型</label>
97
- <v-select :value.sync="model.f_usetype" v-model="model.f_usetype"
98
- condition="f_usetype = '{}'"
99
- :options='$parent.$parent.usetype' placeholder='请选择'
100
- close-on-select></v-select>
101
- </div>
102
- <div class="col-sm-2 form-group">
103
- <label class="font_normal_body">用气性质</label>
104
- <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
105
- :options='$parent.$parent.gasproperties' placeholder='请选择'
106
- condition="f_gasproperties = '{}'"
107
- close-on-select></v-select>
108
- </div>
109
- <div class="col-sm-2 form-group">
110
- <label class="font_normal_body">气价类型</label>
111
- <v-select :value.sync="model.pricetype" v-model="model.pricetype"
112
- placeholder='气价类型' :options="$parent.$parent.pricetypes"
113
- condition="f_price_type = '{}'"
114
- close-on-select v-ref:type>
115
- </v-select>
116
- </div>
117
- <div class="col-sm-2 form-group">
118
- <label class="font_normal_body">气价名称</label>
119
- <v-select :value.sync="model.f_price_name"
120
- v-model="model.f_price_name"
121
- :options="$parent.$parent.getPricenames"
122
- placeholder='请选择'
123
- condition="f_price_name = '{}'"
124
- close-on-select></v-select>
125
- </div>
126
- <div class="col-sm-2 form-group">
127
- <label class="font_normal_body">气表分类</label>
128
- <v-select :value.sync="model.f_meter_classify"
129
- v-model="model.f_meter_classify"
130
- :options='$parent.$parent.metertypes' placeholder='请选择'
131
- condition="f_meter_classify = '{}'"
132
- close-on-select></v-select>
133
- </div>
134
- <div class="col-sm-2 form-group">
135
- <label class="font_normal_body">气表品牌</label>
136
- <v-select :value.sync="model.f_meter_brand"
137
- v-model="model.f_meter_brand"
138
- :options='$parent.$parent.meterbrands' placeholder='请选择'
139
- condition="f_meter_brand = '{}'"
140
- close-on-select></v-select>
141
- </div>
142
- <div class="col-sm-2 form-group">
143
- <label class="font_normal_body">气表型号</label>
144
- <v-select :value.sync="model.f_meter_style"
145
- v-model="model.f_meter_style"
146
- :options='$parent.$parent.meterstyle[model.f_meter_brand]' placeholder='请选择'
147
- condition="f_meter_style = '{}'"
148
- close-on-select></v-select>
149
- </div>
150
- <div class="col-sm-2 form-group">
151
- <label class="font_normal_body">气表状态</label>
152
- <v-select :value.sync="model.f_table_state"
153
- v-model="model.f_table_state"
154
- :options='$parent.$parent.tablestate' placeholder='请选择'
155
- condition="f_table_state = '{}'"
156
- close-on-select></v-select>
157
- </div>
158
- <div class="col-sm-2 form-group">
159
- <label class="font_normal_body">使用状态</label>
160
- <v-select :value.sync="model.f_usestate"
161
- v-model="model.f_usestate"
162
- :options='$parent.$parent.usestate' placeholder='请选择'
163
- condition="f_usestate = '{}'"
164
- close-on-select></v-select>
165
- </div>
166
- <div class="col-sm-2 form-group">
167
- <label for="startDate" class="font_normal_body">建表日期</label>
168
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
169
- v-model="model.startDate"
170
- :value.sync="model.startDate"
171
- :format="'yyyy-MM-dd'"
172
- :show-reset-button="true"
173
- condition="f_input_date >= '{} 00:00:00'">
174
- </datepicker>
175
- </div>
176
- <div class="col-sm-2 form-group">
177
- <label for="endDate" class="font_normal_body">建表日期</label>
178
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
179
- v-model="model.endDate"
180
- :value.sync="model.endDate"
181
- :format="'yyyy-MM-dd'"
182
- :show-reset-button="true"
183
- condition="f_input_date <= '{} 23:59:59'">
184
- </datepicker>
185
- </div>
186
- <div class="col-sm-2 form-group">
187
- <label for="startDate" class="font_normal_body">通气日期</label>
188
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
189
- v-model="model.startTQDate"
190
- :value.sync="model.startTQDate"
191
- :format="'yyyy-MM-dd'"
192
- :show-reset-button="true"
193
- condition="f_gas_date >= '{} 00:00:00'">
194
- </datepicker>
195
- </div>
196
- <div class="col-sm-2 form-group">
197
- <label for="endDate" class="font_normal_body">通气日期</label>
198
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
199
- v-model="model.endTQDate"
200
- :value.sync="model.endTQDate"
201
- :format="'yyyy-MM-dd'"
202
- :show-reset-button="true"
203
- condition="f_gas_date <= '{} 23:59:59'">
204
- </datepicker>
205
- </div>
206
- <div class="col-sm-2 form-group">
207
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;壁挂炉</label>
208
- <v-select :value.sync="model.isbgl" v-model="model.isbgl"
209
- :options='$parent.$parent.bgl' placeholder='请选择'
210
- condition="isbgl = '{}'"
211
- close-on-select></v-select>
212
- </div>
213
- <div class="col-sm-2 form-group" v-if="!$filialeInfo || $filialeInfo!=='rongcheng'">
214
- <label class="font_normal_body">用户等级</label>
215
- <v-select :value.sync="model.f_user_grade"
216
- v-model="model.f_user_grade"
217
- :options='$parent.$parent.usergrade' placeholder='请选择'
218
- condition="f_user_grade = '{}'"
219
- close-on-select></v-select>
220
- </div>
221
- <!--表册片区-->
222
- <div class="col-sm-2 form-group">
223
- <label class="font_normal_body">表册片区</label>
224
- <v-select :value.sync="model.f_book_slice_area" v-model="model.f_book_slice_area"
225
- :options='$parent.$parent.bookSlice' placeholder='片区/表册'
226
- style="width:60%"
227
- close-on-select
228
- condition="f_book_slice_area = '{}'"></v-select>
229
- </div>
230
- <div class="col-sm-2 form-group">
231
- <label class="font_normal_body" >抄&nbsp;&nbsp;表&nbsp;员</label>
232
- <v-select :value.sync="model.f_inputtor"
233
- v-model="model.f_inputtor"
234
- :options='$parent.$parent.inputtores' placeholder='请选择'
235
- condition="f_inputtor = '{}'"
236
- close-on-select :value-single="true" :search="false">
237
- </v-select>
238
- </div>
239
- <div class="col-sm-2 form-group">
240
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
241
- <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
242
- :options='$parent.$parent.meterbooks' placeholder='抄表册'
243
- style="width:60%"
244
- close-on-select
245
- condition="f_meter_book_num = '{}'"></v-select>
246
- </div>
247
-
248
- </div>
249
- </div>
250
- </criteria>
251
-
252
- <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy" :classname="$parent.classname">
253
- <template partial='head'>
254
- <tr>
255
- <th>
256
- <nobr>客户编号</nobr>
257
- </th>
258
- <th>
259
- <nobr>客户名称</nobr>
260
- </th>
261
- <th>
262
- <nobr>档案编号</nobr>
263
- </th>
264
- <th>
265
- <nobr>客户电话</nobr>
266
- </th>
267
- <th>
268
- <nobr>身份证号</nobr>
269
- </th>
270
- <th>
271
- <nobr>客户地址</nobr>
272
- </th>
273
- <th>
274
- <nobr>表册片区</nobr>
275
- </th>
276
- <th>
277
- <nobr>表上余额</nobr>
278
- </th>
279
- <th>
280
- <nobr>客户类型</nobr>
281
- </th>
282
- <th>
283
- <nobr>使用类型</nobr>
284
- </th>
285
- <th>
286
- <nobr>用气性质</nobr>
287
- </th>
288
- <th>
289
- <nobr>表号</nobr>
290
- </th>
291
- <th>
292
- <nobr>卡号</nobr>
293
- </th>
294
-
295
-
296
- <th>
297
- <nobr>气价名称</nobr>
298
- </th>
299
- <th>
300
- <nobr>气价详情</nobr>
301
- </th>
302
- <th>
303
- <nobr>气表品牌</nobr>
304
- </th>
305
- <th>
306
- <nobr>气表型号</nobr>
307
- </th>
308
- <th>
309
- <nobr>户管员</nobr>
310
- </th>
311
- <th>
312
- <nobr>通气人</nobr>
313
- </th>
314
- <th>
315
- <nobr>通气时间</nobr>
316
- </th>
317
- <th>
318
- <nobr>建表时间</nobr>
319
- </th>
320
- <th>
321
- <nobr>气表状态</nobr>
322
- </th>
323
- <th>
324
- <nobr>是否壁挂炉</nobr>
325
- </th>
326
- </tr>
327
- </template>
328
- <template partial='body'>
329
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;"><nobr>
330
- <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
331
- </nobr> </td>
332
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
333
- <nobr>{{row.f_user_name}}</nobr>
334
- </td>
335
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
336
- <nobr>{{row.f_olduserinfo_code}}</nobr>
337
- </td>
338
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
339
- <nobr>{{row.f_user_phone}}</nobr>
340
- </td>
341
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
342
- <nobr>{{row.idnumber}}</nobr>
343
- </td>
344
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
345
- <nobr>{{row.f_address}}</nobr>
346
- </td>
347
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
348
- <nobr>{{row.f_book_slice_area}}</nobr>
349
- </td>
350
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
351
- <nobr>{{row.f_balance_amount}}</nobr>
352
- </td>
353
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
354
- <nobr>{{row.f_user_type}}</nobr>
355
- </td>
356
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
357
- <nobr>{{row.f_usetype}}</nobr>
358
- </td>
359
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
360
- <nobr>{{row.f_gasproperties}}</nobr>
361
- </td>
362
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
363
- <nobr>{{row.f_meternumber}}</nobr>
364
- </td>
365
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
366
- <nobr>{{row.f_card_id}}</nobr>
367
- </td>
368
-
369
-
370
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
371
- <nobr>{{row.f_price_name}}</nobr>
372
- </td>
373
- <th :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
374
- <nobr>{{row.value}}</nobr>
375
- </th>
376
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
377
- <nobr>{{row.f_meter_brand}}</nobr>
378
- </td>
379
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
380
- <nobr>{{row.f_meter_style}}</nobr>
381
- </td>
382
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
383
- <nobr>{{row.f_inputtor}}</nobr>
384
- </td>
385
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
386
- <nobr>{{row.f_gas_person}}</nobr>
387
- </td>
388
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
389
- <nobr>{{row.f_gas_date}}</nobr>
390
- </td>
391
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
392
- <nobr>{{row.f_input_date}}</nobr>
393
- </td>
394
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
395
- <nobr>{{row.f_table_state}}</nobr>
396
- </td>
397
- <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
398
- <nobr>{{row.isbgl}}</nobr>
399
- </td>
400
- </template>
401
- <template partial='foot'>
402
- </template>
403
- </data-grid>
404
- </criteria-paged>
405
-
406
- <table class="table-hover">
407
- <tr style="position: relative" class="table-bordered">
408
- <td
409
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
410
- 汇总信息
411
- </td>
412
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
413
- 表上余额合计&emsp;{{sumsmodel.f_balance_amount}}
414
- </td>
415
- </tr>
416
- </table>
417
-
418
- <!--<modal :show.sync="printshow" v-ref:modal backdrop="false">-->
419
- <!--<header slot="modal-header" class="modal-header text-center">-->
420
- <!--<h4 class="modal-title">打印列选择</h4>-->
421
- <!--<input type="checkbox" class="" id="f_generations" v-model="all">-->
422
- <!--<label for="f_generations" class="font-size">全选</label>-->
423
- <!--</header>-->
424
- <!--<article slot="modal-body">-->
425
- <!--<div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">-->
426
- <!--<div class="col-sm-3" v-for="f in fields">-->
427
- <!--<input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">-->
428
- <!--<label :for="'water-owe-details-'+$index" class="font-size">{{f}}</label>-->
429
- <!--</div>-->
430
- <!--</div>-->
431
- <!--</article>-->
432
- <!--<footer slot="modal-footer" class="modal-footer">-->
433
- <!--<center>-->
434
- <!--<button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>-->
435
- <!--<button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>-->
436
- <!--<print-table :model='model' v-show="false" v-ref:print-->
437
- <!--:top='40' :left='60' :right='40' :bottom='60'-->
438
- <!--:thead="thead" :tfoot='tfoot' :attach="yangsen"-->
439
- <!--:fields="modelval" :printpage="true">-->
440
- <!--</print-table>-->
441
- <!--</center>-->
442
- <!--</footer>-->
443
- <!--</modal>-->
444
- </div>
445
- <div class="flex" v-if="show">
446
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
447
- </div>
448
- </div>
449
- </div>
450
- </div>
451
- <high-meter-idcard :show.sync="false" v-ref:highcard ></high-meter-idcard>
452
- </template>
453
-
454
- <script>
455
- import {PagedList} from 'vue-client'
456
- import exportConfig from '../config/exportConfig'
457
- let cardBtnGen = async function (self, val) {
458
- self.cardInfo = val.data
459
-
460
- // 判断读卡是否需要卡密码
461
- console.log('读卡上的信息', self.cardInfo)
462
-
463
- if (self.cardInfo.NewParam) {
464
- if (self.cardInfo.NewParam.error) {
465
- if (self.cardInfo.NewParam.error === '0001') {
466
- // 需要重新读卡并传卡密码
467
- if (self.model.rows.length == 1 && self.model.rows[0].f_alias === self.cardInfo.Factory) {
468
- self.readCardParam = self.model.rows[0].f_card_password
469
- self.cardInfo = await self.$refs.paged.$refs.cri.$refs.readcard.readCard2(self.model.rows[0].f_card_password)
470
- } else {
471
- self.$showAlert('此卡需要先获取客户信息。请通过条件查询该客户信息之后进行读卡!!', 'warning', 2000)
472
- return
473
- }
474
- }
475
- }
476
- }
477
- self.card=self.cardInfo.CardID
478
- self.search()
479
- }
480
-
481
- let readySomething = async function (self) {
482
- self.$MagGetSaleParam.initinputtor();
483
- self.getinputtores();
484
- self.initmeterbook();
485
- // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
486
- // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
487
- // await self.$refs.paged.$refs.cri.search()
488
- await self.$MagLoadParams.loadParam()
489
- self.initParams()
490
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
491
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
492
- }
493
-
494
- export default {
495
- title: '表具查询',
496
- data() {
497
- return {
498
- IdCardInfo:'',
499
- card:'',
500
- isSingleUser: null,
501
- other:[],
502
- footer:[],
503
- model: new PagedList('rs/sql/meterQuery', 20, {}, {f_balance_amount: 0}),
504
- criteriaShow: false,
505
- orgCondtionStr: '',
506
-
507
- modelval: [],
508
- printshow: false,
509
- all: false,
510
- fields: {},
511
- thead: '',
512
- tfoot: '',
513
- initres: {
514
- org:[this.$login.f.orgid],
515
- dep:[],
516
- user:[],
517
- },
518
- show:false,
519
- rowdata:{},
520
- meterbrands: [],
521
- // 气表型号
522
- meterstyle: {},
523
- //默认打印列
524
- defaultfield: [],
525
- config: {
526
- defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone']
527
- },
528
- pricenames: [],
529
- gasproperties:[],
530
- inputtouPerson: [],
531
- meterbooks:[{label: '全部',value: ''}], //抄表册
532
- inputtores:[{label: '全部',value: ''}],
533
- prices: [],
534
- //合计数据
535
- sumsmodel: {},
536
- //表册片区
537
- bookSlice:[{label: '全部',value: ''}],
538
- inputtores:[{label: '全部',value: ''}], //抄表员
539
- f_filialeid: this.$login.f.f_orgid,
540
- allorgid:[],
541
- tempfalg :false,
542
- lastorgstr:'',
543
- issecond: [{label:'是',value:" = '二次挂表'"},{label:'否',value:" <> '二次挂表'"}],
544
- usetype:this.$appdata.getParam('使用类型')
545
- }
546
- },
547
- ready() {
548
- console.log("===========",this.$filialeInfo)
549
- readySomething(this).then(() => {
550
- this.$emit('ready')
551
- }).catch((error) => {
552
- this.$emit('error', error)
553
- })
554
- },
555
- methods: {
556
- ReadIDCard(){
557
- this.$refs.highcard.sendMsg(this.$refs.highcard.CLT_MSG.READ_IDCARD, (msg) => {
558
- console.log('======',msg)
559
- if(msg.err !== 0){ return}
560
- this.IdCardInfo=msg.strID
561
- })
562
- console.log(this.IdCardInfo)
563
- if(this.IdCardInfo) {
564
- this.search()
565
- }else{
566
- alert("读取失败,找不到用户信息")
567
- }
568
- },
569
- cardBtn (val) {
570
- // this.clear()
571
- cardBtnGen(this, val)
572
- },
573
- async initmeterbook(orgstr){
574
- if(orgstr == null ){
575
- orgstr = this.f_filialeid;
576
- }
577
- //获取新的抄表册,先去清理所有的抄表册
578
- this.$GetSaleParam.meterbooks = [];
579
- //开始加载新的抄表册
580
- await this.$LoadParams.loadMeterBook(orgstr)
581
- this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
582
- },
583
- async getinputtores () {
584
- // 获取抄表员
585
- let rs = []
586
- if (this.$login.f.f_gasman.length > 0) {
587
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
588
- let temp = {
589
- label: this.$login.f.f_gasman[i].name,
590
- value: this.$login.f.f_gasman[i].name
591
- }
592
- rs.push(temp)
593
- }
594
- }
595
- this.inputtores = [{label: '全部', value: ''}, ...rs]
596
- },
597
- getotherfooter () {
598
- // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
599
- // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
600
- this.other = [];
601
- this.footer = [];
602
- let exportdata = this.getCondition;
603
- let otherInData = [];
604
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
605
- let footerData = [], exportfield = this.getExportField;
606
- footerData.push("合计");
607
- let self = this;
608
- for (var field in self.sumsmodel) {
609
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
610
- }
611
- this.footer.push(footerData);
612
- this.other.push(otherInData);
613
- },
614
- search(){
615
- this.$refs.paged.$refs.cri.search()
616
- },
617
- cancel() {
618
- this.show = false
619
- },
620
- showmsg(obj){
621
- this.rowdata=obj
622
- this.show=true
623
- },
624
- selfSearch(args) {
625
- //抄表员查询条件
626
- this.inputtouPerson = this.$refs.paged.$refs.cri.model.f_inputtor
627
- if(this.inputtouPerson.length !== 0){
628
- let str = JSON.stringify(this.inputtouPerson)
629
- str = str.replace(/"/g,`'`)
630
- str = str.replace(/\[/g,``)
631
- str = str.replace(/\]/g,``)
632
- console.log("=====抄表员model22222222222绑定====",str)
633
- //查询多个抄表员时条件
634
- args.condition += ` and f_inputtor in ( ${str} )`
635
- }
636
- if (!this.orgCondtionStr) {
637
- args.condition = `${args.condition}` + " and f_orgid = " + this.$login.f.orgid
638
- } else {
639
- args.condition = `${args.condition}` + this.orgCondtionStr
640
- }
641
- if(this.card!=''){
642
- args.condition +=` and f_card_id='${this.card}'`
643
- }
644
- if(this.IdCardInfo!=''){
645
- args.condition+=` and f_idnumber='${this.IdCardInfo}'`
646
- }
647
- this.model.search(args.condition, args.model)
648
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums;
649
- this.card=''
650
- this.IdCardInfo=''
651
- },
652
- clear() {
653
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
654
- this.$refs.paged.$refs.cri.model[key] = []
655
- })
656
- },
657
- hidden() {
658
- this.criteriaShow = !this.criteriaShow
659
- },
660
- async getRes(condition) {
661
- this.orgCondtionStr = condition
662
-
663
- },
664
- stamp() {
665
- this.all = false
666
- //默认选择要打印的列
667
- this.modelval = defaultPrint.config
668
- this.fields = this.getfield
669
- console.log('所有打印字段', this.fields)
670
- this.printshow = true
671
- this.put()
672
- },
673
- put() {
674
- // 对Modelval进行排序
675
- this.sortModelval()
676
- this.thead = `<tr><th colspan=${this.modelval.length}>表具查询统计报表</th></tr><tr>`
677
- for (let key of this.modelval) {
678
- this.thead += '<th>' + this.fields[key] + '</th>'
679
- }
680
- this.thead += '</tr>'
681
- },
682
- print() {
683
- this.$refs.print.PrintAsFile()
684
- this.printshow = false
685
- },
686
- close() {
687
- this.printshow = false
688
- this.all = false
689
- },
690
- userTypeChange () {
691
- this.gasproperties=[]
692
- if(this.$refs.paged.$refs.cri.model !==null) {
693
- this.$refs.paged.$refs.cri.model.f_gasproperties=''
694
- this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
695
- }
696
- else{
697
- this.gasproperties =[{label: '全部', value: ''}]
698
- }
699
- },
700
- initParams() {
701
- // 初始化气表品牌
702
- let brandArr = []
703
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
704
- let temp = {}
705
- temp.label = item.label
706
- temp.value = item.value.f_meter_brand
707
- brandArr.push(temp)
708
- // 取出对应气表型号
709
- let styleArr = []
710
- for (let row of item.value.gasmodel) {
711
- styleArr.push({label: row.label,value: row.value.f_meter_style})
712
- }
713
- this.meterstyle[temp.value] = styleArr
714
- })
715
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
716
- //初始化气表价格
717
- this.prices = this.$MagGetSaleParam.getPrices();
718
- },
719
- // 对选择的列进行排序
720
- sortModelval() {
721
- let sortModel = []
722
- Object.keys(this.fields).forEach((key) => {
723
- if (this.modelval.includes(key)) {
724
- sortModel.push(key)
725
- }
726
- })
727
- this.modelval = sortModel
728
- console.log('选择的打印的字段', this.modelval)
729
- },
730
- async updateParams() {
731
- await this.$MagLoadParams.loadParam(this.f_filialeid)
732
- this.inputtores = [];
733
- this.inputtores.push({label: "全部", value: ""})
734
- this.initSlice(this.f_filialeid)
735
- if(this.allorgid!=null){
736
- this.allorgid.forEach((res)=>{
737
- this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
738
- })
739
- }
740
- },
741
- async initSlice (val) {
742
- if (val) {
743
- let getAllArea = await this.$resetpost('/rs/search', {
744
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
745
- userid: this.$login.f.id
746
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
747
- let arr = getAllArea.data.filter((res) => {
748
- return res.parentid == val
749
- })
750
- this.bookSlice = []
751
- console.log('过滤之后的片区-------------------', arr)
752
- arr.forEach((res) => {
753
- this.bookSlice.push({label: res.name, value: res.name})
754
- })
755
- }
756
- },
757
- },
758
- watch: {
759
- 'model.rows.length' () {
760
- this.isSingleUser = this.model.rows
761
- },
762
- 'all'(val) {
763
- if (val) {
764
- this.modelval = this.bodyData
765
- } else {
766
- this.modelval = defaultPrint.config
767
- this.put()
768
- }
769
- },
770
- sumsmodel:{
771
- handler: function(val) {
772
- this.getotherfooter();
773
- },
774
- deep: true
775
- },
776
- 'modelval.length'() {
777
- this.put()
778
- },
779
- async 'orgCondtionStr'(val) {
780
- //更新抄表册
781
- this.meterbooks = [{label: '全部',value: ''}];
782
- if(this.lastorgstr != val){
783
- this.tempfalg = true;
784
- this.lastorgstr = val;
785
- }
786
- if(this.tempfalg && val != null && val!='' && val.indexOf("(")>-1){
787
- this.tempfalg = false;
788
- let a = val.substring(val.indexOf("(")+2)
789
- await this.initmeterbook(a.substring(0,a.indexOf(")")-1));
790
- }
791
- let res = val.match(/'(.*?)'/)
792
- console.log('正则提取:',res && res[1])
793
- if (res) {
794
- this.f_filialeid = res[1]
795
- if(res.input !=null){
796
- let resorgid = res.input.substring(res.input.indexOf("'"));
797
- if(resorgid!= null && resorgid!=''){
798
- resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
799
- // resorgid = resorgid.replaceAll("'","");
800
- resorgid = resorgid.replace(/'/g,"");
801
- this.allorgid = resorgid.split(",")
802
- }
803
- }
804
- this.updateParams()
805
- }
806
- },
807
- },
808
- computed: {
809
- authArr () {
810
- return this.$login.r ? this.$login.r : []
811
- },
812
- getPricenames() {
813
- let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
814
- let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
815
- let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
816
- // console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
817
- if(this.$refs.paged.$refs.cri.model !==null) {
818
- let rs = []
819
- let priceArr = []
820
- if ( pricetype.length >0) {
821
- let params = {
822
- f_price_type: pricetype[0],
823
- filter: this.f_filialeid,
824
- prices: this.prices
825
- }
826
- this.$MagGetSaleParam.getPrice(params).forEach((item) => {
827
- let temp = {}
828
- temp.label = item.label
829
- temp.value = item.value.f_price_name
830
- priceArr.push(temp)
831
- })
832
- rs = [{label: '全部', value: ''}, ...priceArr]
833
- }
834
- if (rs.length === 0) {
835
- console.log('rs读出来是空')
836
- this.$refs.paged.$refs.cri.model.f_price_name = ''
837
- }
838
- return rs
839
- }
840
- },
841
- getCondition() {
842
- return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
843
- },
844
- getfield() {
845
- let data = {}
846
- this.bodyData.forEach((value, index) => {
847
- data[this.bodyData[index]] = this.headData[index]
848
- })
849
- //合计字段打印
850
- this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
851
- if (this.sumsmodel) {
852
- Object.keys(this.sumsmodel).forEach((key) => {
853
- this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
854
- })
855
- } else {
856
- this.tfoot += '暂无'
857
- }
858
- this.tfoot += '</th></tr>'
859
- return data
860
- },
861
- getExportField() {
862
- return exportConfig.meterConfig
863
- },
864
- areas() {
865
- let rs = []
866
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
867
- let temp = {
868
- label: this.$login.f.f_allArea[i].label,
869
- value: this.$login.f.f_allArea[i].label
870
- }
871
- rs.push(temp)
872
- }
873
- return [{label: '全部', value: ''}, ...rs]
874
- },
875
- sliceArea() {
876
- let rs = []
877
- if (this.$refs.paged.$refs.cri.model.f_area.length > 0) {
878
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
879
- if (this.$login.f.f_allArea[i].label === this.$refs.paged.$refs.cri.model.f_area[0]) {
880
- rs = this.$login.f.f_allArea[i].value
881
- }
882
- }
883
- }
884
- return [{label: '全部', value: ''}, ...rs]
885
- },
886
- usertypes() {
887
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
888
- },
889
- // gasproperties() {
890
- // return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
891
- // },
892
-
893
- metertypes() {
894
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
895
- },
896
- // meterbrands() {
897
- // let arr = []
898
- // this.$MagGetSaleParam.getGasbrand().forEach((item) => {
899
- // let temp = {}
900
- // temp.label = item.label
901
- // temp.value = item.value.f_meter_brand
902
- // arr.push(temp)
903
- // })
904
- // return [{label: '全部', value: ''}, ...arr]
905
- // },
906
- pricetypes() {
907
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
908
- },
909
- tablestate() {
910
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')]
911
- },
912
- bgl(){
913
- return [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}]
914
- },
915
- usergrade(){
916
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')]
917
- },
918
- usestate(){
919
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用状态')]
920
- }
921
- }
922
- }
923
- </script>
924
- <style>
925
- .back-red{ /* 红色背景 */
926
- background-color: #F6C6CE;
927
- }
928
- .back-blue{ /* 蓝色背景 */
929
-
930
- }
931
- </style>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex">
5
+ <div style="flex:1;" class="flex" v-if="!show">
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 class="font_normal_body">客户编号</label>
12
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
13
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
14
+ </div>
15
+ <div class="col-sm-2 form-group">
16
+ <label class="font_normal_body">客户名称</label>
17
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
18
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
19
+ </div>
20
+ <div class="col-sm-2 form-group">
21
+ <label class="font_normal_body" title="旧客户编号">档案编号</label>
22
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
23
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
24
+ </div>
25
+ <div class="col-sm-2 form-group">
26
+ <label class="font_normal_body">客户电话</label>
27
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
28
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
29
+ </div>
30
+ <div class="span" style="float:right;">
31
+ <button class="button_search button_spacing" v-show="false" @click="$parent.$parent.ReadIDCard()">读取身份证</button>
32
+ <read-card v-if="!$filialeInfo || $filialeInfo!=='rongcheng'" :is-single.sync="$parent.$parent.isSingleUser" @read-info="$parent.$parent.cardBtn" v-ref:readcard></read-card>
33
+ <button class="button_search button_spacing" @click="search()">查询</button>
34
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
35
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
36
+
37
+ <export-excel :data="$parent.$parent.getCondition"
38
+ :field="$parent.$parent.getExportField"
39
+ :footer="$parent.$parent.footer"
40
+ :header="$parent.$parent.other"
41
+ v-if="$parent.$parent.authArr.includes('档案查询导出')"
42
+ sqlurl="rs/logic/exportfile" sql-name="meterQuery" template-name='表具查询导出'
43
+ :choose-col="true"></export-excel>
44
+ <print-data :sum-field="$parent.$parent.getExportField" :model="$parent.model" :field="$parent.$parent.getExportField"
45
+ :defaultfield="$parent.$parent.defaultfield"
46
+ titletable="客户查询"
47
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
48
+
49
+
50
+ <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>
51
+ </div>
52
+ </div>
53
+ <div class="row" v-show="$parent.$parent.criteriaShow">
54
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"></res-select-group>
55
+
56
+
57
+ <div class="col-sm-2 form-group">
58
+ <label class="font_normal_body">客户地址</label>
59
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
60
+ condition="f_address like '%{}%'" placeholder='客户地址'>
61
+ </div>
62
+ <div class="col-sm-2 form-group" v-if="!$filialeInfo || $filialeInfo!=='rongcheng'">
63
+ <label class="font_normal_body">用气点</label>
64
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userfiles_address"
65
+ condition="f_userfiles_address like '%{}%'" placeholder='用气点'>
66
+ </div>
67
+ <div class="col-sm-2 form-group">
68
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;表号&nbsp;&nbsp;&nbsp;</label>
69
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
70
+ condition="f_meternumber like '%{}%'" placeholder='表号'>
71
+ </div>
72
+
73
+ <div class="col-sm-2 form-group">
74
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;卡号&nbsp;&nbsp;&nbsp;</label>
75
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
76
+ condition="f_card_id like '%{}%'" placeholder='卡号'>
77
+ </div>
78
+
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
+ :options='$parent.$parent.usertypes'
83
+ @change="$parent.$parent.userTypeChange()"
84
+ placeholder='请选择' v-model="model.f_user_type"
85
+ condition="f_user_type = '{}'"
86
+ close-on-select></v-select>
87
+ </div>
88
+ <div class="col-sm-2 form-group" >
89
+ <label for="f_usetype" class="font_normal_body">二次挂表</label>
90
+ <v-select :value.sync="model.issecondtype" v-model="model.issecondtype"
91
+ condition="f_usetype {}"
92
+ :options='$parent.$parent.issecond' placeholder='请选择'
93
+ close-on-select></v-select>
94
+ </div>
95
+ <div class="col-sm-2 form-group" >
96
+ <label for="f_usetype" class="font_normal_body" title="参数:使用类型">使用类型</label>
97
+ <v-select :value.sync="model.f_usetype" v-model="model.f_usetype"
98
+ condition="f_usetype = '{}'"
99
+ :options='$parent.$parent.usetype' placeholder='请选择'
100
+ close-on-select></v-select>
101
+ </div>
102
+ <div class="col-sm-2 form-group">
103
+ <label class="font_normal_body">用气性质</label>
104
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
105
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
106
+ condition="f_gasproperties = '{}'"
107
+ close-on-select></v-select>
108
+ </div>
109
+ <div class="col-sm-2 form-group">
110
+ <label class="font_normal_body">气价类型</label>
111
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
112
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
113
+ condition="f_price_type = '{}'"
114
+ close-on-select v-ref:type>
115
+ </v-select>
116
+ </div>
117
+ <div class="col-sm-2 form-group">
118
+ <label class="font_normal_body">气价名称</label>
119
+ <v-select :value.sync="model.f_price_name"
120
+ v-model="model.f_price_name"
121
+ :options="$parent.$parent.getPricenames"
122
+ placeholder='请选择'
123
+ condition="f_price_name = '{}'"
124
+ close-on-select></v-select>
125
+ </div>
126
+ <div class="col-sm-2 form-group">
127
+ <label class="font_normal_body">气表分类</label>
128
+ <v-select :value.sync="model.f_meter_classify"
129
+ v-model="model.f_meter_classify"
130
+ :options='$parent.$parent.metertypes' placeholder='请选择'
131
+ condition="f_meter_classify = '{}'"
132
+ close-on-select></v-select>
133
+ </div>
134
+ <div class="col-sm-2 form-group">
135
+ <label class="font_normal_body">气表品牌</label>
136
+ <v-select :value.sync="model.f_meter_brand"
137
+ v-model="model.f_meter_brand"
138
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
139
+ condition="f_meter_brand = '{}'"
140
+ close-on-select></v-select>
141
+ </div>
142
+ <div class="col-sm-2 form-group">
143
+ <label class="font_normal_body">气表型号</label>
144
+ <v-select :value.sync="model.f_meter_style"
145
+ v-model="model.f_meter_style"
146
+ :options='$parent.$parent.meterstyle[model.f_meter_brand]' placeholder='请选择'
147
+ condition="f_meter_style = '{}'"
148
+ close-on-select></v-select>
149
+ </div>
150
+ <div class="col-sm-2 form-group">
151
+ <label class="font_normal_body">气表状态</label>
152
+ <v-select :value.sync="model.f_table_state"
153
+ v-model="model.f_table_state"
154
+ :options='$parent.$parent.tablestate' placeholder='请选择'
155
+ condition="f_table_state = '{}'"
156
+ close-on-select></v-select>
157
+ </div>
158
+ <div class="col-sm-2 form-group">
159
+ <label class="font_normal_body">使用状态</label>
160
+ <v-select :value.sync="model.f_usestate"
161
+ v-model="model.f_usestate"
162
+ :options='$parent.$parent.usestate' placeholder='请选择'
163
+ condition="f_usestate = '{}'"
164
+ close-on-select></v-select>
165
+ </div>
166
+ <div class="col-sm-2 form-group">
167
+ <label for="startDate" class="font_normal_body">建表日期</label>
168
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
169
+ v-model="model.startDate"
170
+ :value.sync="model.startDate"
171
+ :format="'yyyy-MM-dd'"
172
+ :show-reset-button="true"
173
+ condition="f_input_date >= '{} 00:00:00'">
174
+ </datepicker>
175
+ </div>
176
+ <div class="col-sm-2 form-group">
177
+ <label for="endDate" class="font_normal_body">建表日期</label>
178
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
179
+ v-model="model.endDate"
180
+ :value.sync="model.endDate"
181
+ :format="'yyyy-MM-dd'"
182
+ :show-reset-button="true"
183
+ condition="f_input_date <= '{} 23:59:59'">
184
+ </datepicker>
185
+ </div>
186
+ <div class="col-sm-2 form-group">
187
+ <label for="startDate" class="font_normal_body">通气日期</label>
188
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
189
+ v-model="model.startTQDate"
190
+ :value.sync="model.startTQDate"
191
+ :format="'yyyy-MM-dd'"
192
+ :show-reset-button="true"
193
+ condition="f_gas_date >= '{} 00:00:00'">
194
+ </datepicker>
195
+ </div>
196
+ <div class="col-sm-2 form-group">
197
+ <label for="endDate" class="font_normal_body">通气日期</label>
198
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
199
+ v-model="model.endTQDate"
200
+ :value.sync="model.endTQDate"
201
+ :format="'yyyy-MM-dd'"
202
+ :show-reset-button="true"
203
+ condition="f_gas_date <= '{} 23:59:59'">
204
+ </datepicker>
205
+ </div>
206
+ <div class="col-sm-2 form-group">
207
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;壁挂炉</label>
208
+ <v-select :value.sync="model.isbgl" v-model="model.isbgl"
209
+ :options='$parent.$parent.bgl' placeholder='请选择'
210
+ condition="isbgl = '{}'"
211
+ close-on-select></v-select>
212
+ </div>
213
+ <div class="col-sm-2 form-group" v-if="!$filialeInfo || $filialeInfo!=='rongcheng'">
214
+ <label class="font_normal_body">用户等级</label>
215
+ <v-select :value.sync="model.f_user_grade"
216
+ v-model="model.f_user_grade"
217
+ :options='$parent.$parent.usergrade' placeholder='请选择'
218
+ condition="f_user_grade = '{}'"
219
+ close-on-select></v-select>
220
+ </div>
221
+ <!--表册片区-->
222
+ <div class="col-sm-2 form-group">
223
+ <label class="font_normal_body">表册片区</label>
224
+ <v-select :value.sync="model.f_book_slice_area" v-model="model.f_book_slice_area"
225
+ :options='$parent.$parent.bookSlice' placeholder='片区/表册'
226
+ style="width:60%"
227
+ close-on-select
228
+ condition="f_book_slice_area = '{}'"></v-select>
229
+ </div>
230
+ <div class="col-sm-2 form-group">
231
+ <label class="font_normal_body" >抄&nbsp;&nbsp;表&nbsp;员</label>
232
+ <v-select :value.sync="model.f_inputtor"
233
+ v-model="model.f_inputtor"
234
+ :options='$parent.$parent.inputtores' placeholder='请选择'
235
+ condition="f_inputtor = '{}'"
236
+ close-on-select :value-single="true" :search="false">
237
+ </v-select>
238
+ </div>
239
+ <div class="col-sm-2 form-group">
240
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
241
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
242
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
243
+ style="width:60%"
244
+ close-on-select
245
+ condition="f_meter_book_num = '{}'"></v-select>
246
+ </div>
247
+
248
+ </div>
249
+ </div>
250
+ </criteria>
251
+
252
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy" :classname="$parent.classname">
253
+ <template partial='head'>
254
+ <tr>
255
+ <th>
256
+ <nobr>客户编号</nobr>
257
+ </th>
258
+ <th>
259
+ <nobr>客户名称</nobr>
260
+ </th>
261
+ <th>
262
+ <nobr>档案编号</nobr>
263
+ </th>
264
+ <th>
265
+ <nobr>客户电话</nobr>
266
+ </th>
267
+ <th>
268
+ <nobr>备用电话</nobr>
269
+ </th>
270
+ <th>
271
+ <nobr>身份证号</nobr>
272
+ </th>
273
+ <th>
274
+ <nobr>客户地址</nobr>
275
+ </th>
276
+ <th>
277
+ <nobr>表册片区</nobr>
278
+ </th>
279
+ <th>
280
+ <nobr>表上余额</nobr>
281
+ </th>
282
+ <th>
283
+ <nobr>客户类型</nobr>
284
+ </th>
285
+ <th>
286
+ <nobr>使用类型</nobr>
287
+ </th>
288
+ <th>
289
+ <nobr>用气性质</nobr>
290
+ </th>
291
+ <th>
292
+ <nobr>表号</nobr>
293
+ </th>
294
+ <th>
295
+ <nobr>卡号</nobr>
296
+ </th>
297
+
298
+
299
+ <th>
300
+ <nobr>气价名称</nobr>
301
+ </th>
302
+ <th>
303
+ <nobr>气价详情</nobr>
304
+ </th>
305
+ <th>
306
+ <nobr>气表品牌</nobr>
307
+ </th>
308
+ <th>
309
+ <nobr>气表型号</nobr>
310
+ </th>
311
+ <th>
312
+ <nobr>户管员</nobr>
313
+ </th>
314
+ <th>
315
+ <nobr>通气人</nobr>
316
+ </th>
317
+ <th>
318
+ <nobr>通气时间</nobr>
319
+ </th>
320
+ <th>
321
+ <nobr>建表时间</nobr>
322
+ </th>
323
+ <th>
324
+ <nobr>气表状态</nobr>
325
+ </th>
326
+ <th>
327
+ <nobr>是否壁挂炉</nobr>
328
+ </th>
329
+ </tr>
330
+ </template>
331
+ <template partial='body'>
332
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;"><nobr>
333
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
334
+ </nobr> </td>
335
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
336
+ <nobr>{{row.f_user_name}}</nobr>
337
+ </td>
338
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
339
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
340
+ </td>
341
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
342
+ <nobr>{{row.f_user_phone}}</nobr>
343
+ </td>
344
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
345
+ <nobr>{{row.f_rent_phone}}</nobr>
346
+ </td>
347
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
348
+ <nobr>{{row.idnumber}}</nobr>
349
+ </td>
350
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
351
+ <nobr>{{row.f_address}}</nobr>
352
+ </td>
353
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
354
+ <nobr>{{row.f_book_slice_area}}</nobr>
355
+ </td>
356
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
357
+ <nobr>{{row.f_balance_amount}}</nobr>
358
+ </td>
359
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
360
+ <nobr>{{row.f_user_type}}</nobr>
361
+ </td>
362
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
363
+ <nobr>{{row.f_usetype}}</nobr>
364
+ </td>
365
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
366
+ <nobr>{{row.f_gasproperties}}</nobr>
367
+ </td>
368
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
369
+ <nobr>{{row.f_meternumber}}</nobr>
370
+ </td>
371
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
372
+ <nobr>{{row.f_card_id}}</nobr>
373
+ </td>
374
+
375
+
376
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
377
+ <nobr>{{row.f_price_name}}</nobr>
378
+ </td>
379
+ <th :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
380
+ <nobr>{{row.value}}</nobr>
381
+ </th>
382
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
383
+ <nobr>{{row.f_meter_brand}}</nobr>
384
+ </td>
385
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
386
+ <nobr>{{row.f_meter_style}}</nobr>
387
+ </td>
388
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
389
+ <nobr>{{row.f_inputtor}}</nobr>
390
+ </td>
391
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
392
+ <nobr>{{row.f_gas_person}}</nobr>
393
+ </td>
394
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
395
+ <nobr>{{row.f_gas_date}}</nobr>
396
+ </td>
397
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
398
+ <nobr>{{row.f_input_date}}</nobr>
399
+ </td>
400
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
401
+ <nobr>{{row.f_table_state}}</nobr>
402
+ </td>
403
+ <td :class="row.f_table_state !== '正常'? 'back-red' : 'back-blue'" style="text-align: center;">
404
+ <nobr>{{row.isbgl}}</nobr>
405
+ </td>
406
+ </template>
407
+ <template partial='foot'>
408
+ </template>
409
+ </data-grid>
410
+ </criteria-paged>
411
+
412
+ <table class="table-hover">
413
+ <tr style="position: relative" class="table-bordered">
414
+ <td
415
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
416
+ 汇总信息
417
+ </td>
418
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
419
+ 表上余额合计&emsp;{{sumsmodel.f_balance_amount}}
420
+ </td>
421
+ </tr>
422
+ </table>
423
+
424
+ <!--<modal :show.sync="printshow" v-ref:modal backdrop="false">-->
425
+ <!--<header slot="modal-header" class="modal-header text-center">-->
426
+ <!--<h4 class="modal-title">打印列选择</h4>-->
427
+ <!--<input type="checkbox" class="" id="f_generations" v-model="all">-->
428
+ <!--<label for="f_generations" class="font-size">全选</label>-->
429
+ <!--</header>-->
430
+ <!--<article slot="modal-body">-->
431
+ <!--<div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">-->
432
+ <!--<div class="col-sm-3" v-for="f in fields">-->
433
+ <!--<input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">-->
434
+ <!--<label :for="'water-owe-details-'+$index" class="font-size">{{f}}</label>-->
435
+ <!--</div>-->
436
+ <!--</div>-->
437
+ <!--</article>-->
438
+ <!--<footer slot="modal-footer" class="modal-footer">-->
439
+ <!--<center>-->
440
+ <!--<button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>-->
441
+ <!--<button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>-->
442
+ <!--<print-table :model='model' v-show="false" v-ref:print-->
443
+ <!--:top='40' :left='60' :right='40' :bottom='60'-->
444
+ <!--:thead="thead" :tfoot='tfoot' :attach="yangsen"-->
445
+ <!--:fields="modelval" :printpage="true">-->
446
+ <!--</print-table>-->
447
+ <!--</center>-->
448
+ <!--</footer>-->
449
+ <!--</modal>-->
450
+ </div>
451
+ <div class="flex" v-if="show">
452
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
453
+ </div>
454
+ </div>
455
+ </div>
456
+ </div>
457
+ <high-meter-idcard :show.sync="false" v-ref:highcard ></high-meter-idcard>
458
+ </template>
459
+
460
+ <script>
461
+ import {PagedList} from 'vue-client'
462
+ import exportConfig from '../config/exportConfig'
463
+ let cardBtnGen = async function (self, val) {
464
+ self.cardInfo = val.data
465
+
466
+ // 判断读卡是否需要卡密码
467
+ console.log('读卡上的信息', self.cardInfo)
468
+
469
+ if (self.cardInfo.NewParam) {
470
+ if (self.cardInfo.NewParam.error) {
471
+ if (self.cardInfo.NewParam.error === '0001') {
472
+ // 需要重新读卡并传卡密码
473
+ if (self.model.rows.length == 1 && self.model.rows[0].f_alias === self.cardInfo.Factory) {
474
+ self.readCardParam = self.model.rows[0].f_card_password
475
+ self.cardInfo = await self.$refs.paged.$refs.cri.$refs.readcard.readCard2(self.model.rows[0].f_card_password)
476
+ } else {
477
+ self.$showAlert('此卡需要先获取客户信息。请通过条件查询该客户信息之后进行读卡!!', 'warning', 2000)
478
+ return
479
+ }
480
+ }
481
+ }
482
+ }
483
+ self.card=self.cardInfo.CardID
484
+ self.search()
485
+ }
486
+
487
+ let readySomething = async function (self) {
488
+ self.$MagGetSaleParam.initinputtor();
489
+ self.getinputtores();
490
+ self.initmeterbook();
491
+ // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
492
+ // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
493
+ // await self.$refs.paged.$refs.cri.search()
494
+ await self.$MagLoadParams.loadParam()
495
+ self.initParams()
496
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
497
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
498
+ }
499
+
500
+ export default {
501
+ title: '表具查询',
502
+ data() {
503
+ return {
504
+ IdCardInfo:'',
505
+ card:'',
506
+ isSingleUser: null,
507
+ other:[],
508
+ footer:[],
509
+ model: new PagedList('rs/sql/meterQuery', 20, {}, {f_balance_amount: 0}),
510
+ criteriaShow: false,
511
+ orgCondtionStr: '',
512
+
513
+ modelval: [],
514
+ printshow: false,
515
+ all: false,
516
+ fields: {},
517
+ thead: '',
518
+ tfoot: '',
519
+ initres: {
520
+ org:[this.$login.f.orgid],
521
+ dep:[],
522
+ user:[],
523
+ },
524
+ show:false,
525
+ rowdata:{},
526
+ meterbrands: [],
527
+ // 气表型号
528
+ meterstyle: {},
529
+ //默认打印列
530
+ defaultfield: [],
531
+ config: {
532
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone']
533
+ },
534
+ pricenames: [],
535
+ gasproperties:[],
536
+ inputtouPerson: [],
537
+ meterbooks:[{label: '全部',value: ''}], //抄表册
538
+ inputtores:[{label: '全部',value: ''}],
539
+ prices: [],
540
+ //合计数据
541
+ sumsmodel: {},
542
+ //表册片区
543
+ bookSlice:[{label: '全部',value: ''}],
544
+ inputtores:[{label: '全部',value: ''}], //抄表员
545
+ f_filialeid: this.$login.f.f_orgid,
546
+ allorgid:[],
547
+ tempfalg :false,
548
+ lastorgstr:'',
549
+ issecond: [{label:'是',value:" = '二次挂表'"},{label:'否',value:" <> '二次挂表'"}],
550
+ usetype:this.$appdata.getParam('使用类型')
551
+ }
552
+ },
553
+ ready() {
554
+ console.log("===========",this.$filialeInfo)
555
+ readySomething(this).then(() => {
556
+ this.$emit('ready')
557
+ }).catch((error) => {
558
+ this.$emit('error', error)
559
+ })
560
+ },
561
+ methods: {
562
+ ReadIDCard(){
563
+ this.$refs.highcard.sendMsg(this.$refs.highcard.CLT_MSG.READ_IDCARD, (msg) => {
564
+ console.log('======',msg)
565
+ if(msg.err !== 0){ return}
566
+ this.IdCardInfo=msg.strID
567
+ })
568
+ console.log(this.IdCardInfo)
569
+ if(this.IdCardInfo) {
570
+ this.search()
571
+ }else{
572
+ alert("读取失败,找不到用户信息")
573
+ }
574
+ },
575
+ cardBtn (val) {
576
+ // this.clear()
577
+ cardBtnGen(this, val)
578
+ },
579
+ async initmeterbook(orgstr){
580
+ if(orgstr == null ){
581
+ orgstr = this.f_filialeid;
582
+ }
583
+ //获取新的抄表册,先去清理所有的抄表册
584
+ this.$GetSaleParam.meterbooks = [];
585
+ //开始加载新的抄表册
586
+ await this.$LoadParams.loadMeterBook(orgstr)
587
+ this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
588
+ },
589
+ async getinputtores () {
590
+ // 获取抄表员
591
+ let rs = []
592
+ if (this.$login.f.f_gasman.length > 0) {
593
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
594
+ let temp = {
595
+ label: this.$login.f.f_gasman[i].name,
596
+ value: this.$login.f.f_gasman[i].name
597
+ }
598
+ rs.push(temp)
599
+ }
600
+ }
601
+ this.inputtores = [{label: '全部', value: ''}, ...rs]
602
+ },
603
+ getotherfooter () {
604
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
605
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
606
+ this.other = [];
607
+ this.footer = [];
608
+ let exportdata = this.getCondition;
609
+ let otherInData = [];
610
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
611
+ let footerData = [], exportfield = this.getExportField;
612
+ footerData.push("合计");
613
+ let self = this;
614
+ for (var field in self.sumsmodel) {
615
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
616
+ }
617
+ this.footer.push(footerData);
618
+ this.other.push(otherInData);
619
+ },
620
+ search(){
621
+ this.$refs.paged.$refs.cri.search()
622
+ },
623
+ cancel() {
624
+ this.show = false
625
+ },
626
+ showmsg(obj){
627
+ this.rowdata=obj
628
+ this.show=true
629
+ },
630
+ selfSearch(args) {
631
+ //抄表员查询条件
632
+ this.inputtouPerson = this.$refs.paged.$refs.cri.model.f_inputtor
633
+ if(this.inputtouPerson.length !== 0){
634
+ let str = JSON.stringify(this.inputtouPerson)
635
+ str = str.replace(/"/g,`'`)
636
+ str = str.replace(/\[/g,``)
637
+ str = str.replace(/\]/g,``)
638
+ console.log("=====抄表员model22222222222绑定====",str)
639
+ //查询多个抄表员时条件
640
+ args.condition += ` and f_inputtor in ( ${str} )`
641
+ }
642
+ if (!this.orgCondtionStr) {
643
+ args.condition = `${args.condition}` + " and f_orgid = " + this.$login.f.orgid
644
+ } else {
645
+ args.condition = `${args.condition}` + this.orgCondtionStr
646
+ }
647
+ if(this.card!=''){
648
+ args.condition +=` and f_card_id='${this.card}'`
649
+ }
650
+ if(this.IdCardInfo!=''){
651
+ args.condition+=` and f_idnumber='${this.IdCardInfo}'`
652
+ }
653
+ this.model.search(args.condition, args.model)
654
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums;
655
+ this.card=''
656
+ this.IdCardInfo=''
657
+ },
658
+ clear() {
659
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
660
+ this.$refs.paged.$refs.cri.model[key] = []
661
+ })
662
+ },
663
+ hidden() {
664
+ this.criteriaShow = !this.criteriaShow
665
+ },
666
+ async getRes(condition) {
667
+ this.orgCondtionStr = condition
668
+
669
+ },
670
+ stamp() {
671
+ this.all = false
672
+ //默认选择要打印的列
673
+ this.modelval = defaultPrint.config
674
+ this.fields = this.getfield
675
+ console.log('所有打印字段', this.fields)
676
+ this.printshow = true
677
+ this.put()
678
+ },
679
+ put() {
680
+ // 对Modelval进行排序
681
+ this.sortModelval()
682
+ this.thead = `<tr><th colspan=${this.modelval.length}>表具查询统计报表</th></tr><tr>`
683
+ for (let key of this.modelval) {
684
+ this.thead += '<th>' + this.fields[key] + '</th>'
685
+ }
686
+ this.thead += '</tr>'
687
+ },
688
+ print() {
689
+ this.$refs.print.PrintAsFile()
690
+ this.printshow = false
691
+ },
692
+ close() {
693
+ this.printshow = false
694
+ this.all = false
695
+ },
696
+ userTypeChange () {
697
+ this.gasproperties=[]
698
+ if(this.$refs.paged.$refs.cri.model !==null) {
699
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
700
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
701
+ }
702
+ else{
703
+ this.gasproperties =[{label: '全部', value: ''}]
704
+ }
705
+ },
706
+ initParams() {
707
+ // 初始化气表品牌
708
+ let brandArr = []
709
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
710
+ let temp = {}
711
+ temp.label = item.label
712
+ temp.value = item.value.f_meter_brand
713
+ brandArr.push(temp)
714
+ // 取出对应气表型号
715
+ let styleArr = []
716
+ for (let row of item.value.gasmodel) {
717
+ styleArr.push({label: row.label,value: row.value.f_meter_style})
718
+ }
719
+ this.meterstyle[temp.value] = styleArr
720
+ })
721
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
722
+ //初始化气表价格
723
+ this.prices = this.$MagGetSaleParam.getPrices();
724
+ },
725
+ // 对选择的列进行排序
726
+ sortModelval() {
727
+ let sortModel = []
728
+ Object.keys(this.fields).forEach((key) => {
729
+ if (this.modelval.includes(key)) {
730
+ sortModel.push(key)
731
+ }
732
+ })
733
+ this.modelval = sortModel
734
+ console.log('选择的打印的字段', this.modelval)
735
+ },
736
+ async updateParams() {
737
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
738
+ this.inputtores = [];
739
+ this.inputtores.push({label: "全部", value: ""})
740
+ this.initSlice(this.f_filialeid)
741
+ if(this.allorgid!=null){
742
+ this.allorgid.forEach((res)=>{
743
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
744
+ })
745
+ }
746
+ },
747
+ async initSlice (val) {
748
+ if (val) {
749
+ let getAllArea = await this.$resetpost('/rs/search', {
750
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
751
+ userid: this.$login.f.id
752
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
753
+ let arr = getAllArea.data.filter((res) => {
754
+ return res.parentid == val
755
+ })
756
+ this.bookSlice = []
757
+ console.log('过滤之后的片区-------------------', arr)
758
+ arr.forEach((res) => {
759
+ this.bookSlice.push({label: res.name, value: res.name})
760
+ })
761
+ }
762
+ },
763
+ },
764
+ watch: {
765
+ 'model.rows.length' () {
766
+ this.isSingleUser = this.model.rows
767
+ },
768
+ 'all'(val) {
769
+ if (val) {
770
+ this.modelval = this.bodyData
771
+ } else {
772
+ this.modelval = defaultPrint.config
773
+ this.put()
774
+ }
775
+ },
776
+ sumsmodel:{
777
+ handler: function(val) {
778
+ this.getotherfooter();
779
+ },
780
+ deep: true
781
+ },
782
+ 'modelval.length'() {
783
+ this.put()
784
+ },
785
+ async 'orgCondtionStr'(val) {
786
+ //更新抄表册
787
+ this.meterbooks = [{label: '全部',value: ''}];
788
+ if(this.lastorgstr != val){
789
+ this.tempfalg = true;
790
+ this.lastorgstr = val;
791
+ }
792
+ if(this.tempfalg && val != null && val!='' && val.indexOf("(")>-1){
793
+ this.tempfalg = false;
794
+ let a = val.substring(val.indexOf("(")+2)
795
+ await this.initmeterbook(a.substring(0,a.indexOf(")")-1));
796
+ }
797
+ let res = val.match(/'(.*?)'/)
798
+ console.log('正则提取:',res && res[1])
799
+ if (res) {
800
+ this.f_filialeid = res[1]
801
+ if(res.input !=null){
802
+ let resorgid = res.input.substring(res.input.indexOf("'"));
803
+ if(resorgid!= null && resorgid!=''){
804
+ resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
805
+ // resorgid = resorgid.replaceAll("'","");
806
+ resorgid = resorgid.replace(/'/g,"");
807
+ this.allorgid = resorgid.split(",")
808
+ }
809
+ }
810
+ this.updateParams()
811
+ }
812
+ },
813
+ },
814
+ computed: {
815
+ authArr () {
816
+ return this.$login.r ? this.$login.r : []
817
+ },
818
+ getPricenames() {
819
+ let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
820
+ let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
821
+ let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
822
+ // console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
823
+ if(this.$refs.paged.$refs.cri.model !==null) {
824
+ let rs = []
825
+ let priceArr = []
826
+ if ( pricetype.length >0) {
827
+ let params = {
828
+ f_price_type: pricetype[0],
829
+ filter: this.f_filialeid,
830
+ prices: this.prices
831
+ }
832
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
833
+ let temp = {}
834
+ temp.label = item.label
835
+ temp.value = item.value.f_price_name
836
+ priceArr.push(temp)
837
+ })
838
+ rs = [{label: '全部', value: ''}, ...priceArr]
839
+ }
840
+ if (rs.length === 0) {
841
+ console.log('rs读出来是空')
842
+ this.$refs.paged.$refs.cri.model.f_price_name = ''
843
+ }
844
+ return rs
845
+ }
846
+ },
847
+ getCondition() {
848
+ return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
849
+ },
850
+ getfield() {
851
+ let data = {}
852
+ this.bodyData.forEach((value, index) => {
853
+ data[this.bodyData[index]] = this.headData[index]
854
+ })
855
+ //合计字段打印
856
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
857
+ if (this.sumsmodel) {
858
+ Object.keys(this.sumsmodel).forEach((key) => {
859
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
860
+ })
861
+ } else {
862
+ this.tfoot += '暂无'
863
+ }
864
+ this.tfoot += '</th></tr>'
865
+ return data
866
+ },
867
+ getExportField() {
868
+ return exportConfig.meterConfig
869
+ },
870
+ areas() {
871
+ let rs = []
872
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
873
+ let temp = {
874
+ label: this.$login.f.f_allArea[i].label,
875
+ value: this.$login.f.f_allArea[i].label
876
+ }
877
+ rs.push(temp)
878
+ }
879
+ return [{label: '全部', value: ''}, ...rs]
880
+ },
881
+ sliceArea() {
882
+ let rs = []
883
+ if (this.$refs.paged.$refs.cri.model.f_area.length > 0) {
884
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
885
+ if (this.$login.f.f_allArea[i].label === this.$refs.paged.$refs.cri.model.f_area[0]) {
886
+ rs = this.$login.f.f_allArea[i].value
887
+ }
888
+ }
889
+ }
890
+ return [{label: '全部', value: ''}, ...rs]
891
+ },
892
+ usertypes() {
893
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
894
+ },
895
+ // gasproperties() {
896
+ // return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
897
+ // },
898
+
899
+ metertypes() {
900
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
901
+ },
902
+ // meterbrands() {
903
+ // let arr = []
904
+ // this.$MagGetSaleParam.getGasbrand().forEach((item) => {
905
+ // let temp = {}
906
+ // temp.label = item.label
907
+ // temp.value = item.value.f_meter_brand
908
+ // arr.push(temp)
909
+ // })
910
+ // return [{label: '全部', value: ''}, ...arr]
911
+ // },
912
+ pricetypes() {
913
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
914
+ },
915
+ tablestate() {
916
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')]
917
+ },
918
+ bgl(){
919
+ return [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}]
920
+ },
921
+ usergrade(){
922
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')]
923
+ },
924
+ usestate(){
925
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用状态')]
926
+ }
927
+ }
928
+ }
929
+ </script>
930
+ <style>
931
+ .back-red{ /* 红色背景 */
932
+ background-color: #F6C6CE;
933
+ }
934
+ .back-blue{ /* 蓝色背景 */
935
+
936
+ }
937
+ </style>