manage-client 3.2.29 → 3.2.30

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.
Files changed (53) hide show
  1. package/.gradle/5.4.1/fileChanges/last-build.bin +0 -0
  2. package/.gradle/5.4.1/fileHashes/fileHashes.lock +0 -0
  3. package/.gradle/5.4.1/gc.properties +0 -0
  4. package/build/dev-server.js +28 -9
  5. package/gradle/wrapper/gradle-wrapper.properties +5 -5
  6. package/package.json +1 -1
  7. package/src/.idea/misc.xml +9 -0
  8. package/src/.idea/modules.xml +8 -0
  9. package/src/.idea/src.iml +9 -0
  10. package/src/.idea/vcs.xml +6 -0
  11. package/src/.idea/workspace.xml +93 -0
  12. package/src/components/sale/businessquery/BusinesQuery.vue +358 -348
  13. package/src/components/sale/businessquery/ChangeMeterQuery.vue +632 -632
  14. package/src/components/sale/businessquery/ChangeUserQuery.vue +357 -348
  15. package/src/components/sale/businessquery/ChargeQuery.vue +1245 -1235
  16. package/src/components/sale/businessquery/DisableQuery.vue +451 -441
  17. package/src/components/sale/businessquery/EnableQuery.vue +408 -398
  18. package/src/components/sale/businessquery/FillCardQuery.vue +486 -481
  19. package/src/components/sale/businessquery/FillGasQuery.vue +511 -506
  20. package/src/components/sale/businessquery/InspectListUser.vue +433 -433
  21. package/src/components/sale/businessquery/OtherChargeQuery.vue +634 -624
  22. package/src/components/sale/businessquery/ReverseQuery.vue +402 -392
  23. package/src/components/sale/businessquery/SalesGasClassification.vue +168 -168
  24. package/src/components/sale/businessquery/TransferQuery.vue +418 -408
  25. package/src/components/sale/businessquery/iotStateSearch/iotStateQuery.vue +308 -308
  26. package/src/components/sale/filesquery/ArchivesManage.vue +57 -57
  27. package/src/components/sale/filesquery/DeviceQuery.vue +534 -524
  28. package/src/components/sale/filesquery/FireQuery.vue +477 -477
  29. package/src/components/sale/filesquery/RecordInfoQuery.vue +1260 -1250
  30. package/src/components/sale/report/aode/YearByUserType.vue +272 -272
  31. package/src/filiale/WEINAN/OtherChargeQuery.vue +521 -521
  32. package/src/filiale/WEINAN/config/tableConfig.js +20 -20
  33. package/src/filiale/jingwei/RecordInfoQuery.vue +1142 -1142
  34. package/src/filiale/liaoyuan/ReportList.vue +421 -421
  35. package/src/filiale/macheng/RecordInfoQuery.vue +1023 -1023
  36. package/src/filiale/meihekou/CardHandplanQuery.vue +612 -612
  37. package/src/filiale/meihekou/RecordInfoQuery.vue +1158 -1158
  38. package/src/filiale/pingxiang/sale.js +9 -9
  39. package/src/filiale/qingtongxia/sale.js +13 -13
  40. package/src/filiale/rongcheng/UserQuery.vue +827 -827
  41. package/src/filiale/shaoguan/HandplanQuery.vue +1314 -1314
  42. package/src/filiale/shaoguan/TransferQuery.vue +403 -403
  43. package/src/filiale/shaoguan/config/exportConfig.js +433 -433
  44. package/src/filiale/shaoguan/errorHandplanQuery.vue +366 -366
  45. package/src/filiale/shaoguan/sale/businessquery/ExemptQuery.vue +314 -314
  46. package/src/filiale/shaoguan/sale/businessquery/FMYGasQuery.vue +687 -687
  47. package/src/filiale/shaoguan/sale/businessquery/PaymentChangeQuery.vue +338 -338
  48. package/src/filiale/shaoguan/sale/businessquery/ReconcileQuery.vue +426 -426
  49. package/src/filiale/tongchuan/ChargeQuery.vue +1270 -1270
  50. package/src/filiale/tongchuan/FillGasQuery.vue +523 -523
  51. package/src/filiale/tongchuan/config/exportConfig.js +857 -857
  52. package/src/main.js +11 -11
  53. package/src/saleManage.js +529 -529
@@ -1,524 +1,534 @@
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">客户电话</label>
22
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
23
- condition="f_user_phone like '%{}%'" placeholder="客户电话">
24
- </div>
25
- <div class="span" style = "float:right;">
26
- <button class="button_search button_spacing" @click="search()">查询</button>
27
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
28
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
29
-
30
- <export-excel :data="$parent.$parent.getCondition"
31
- :field="$parent.$parent.getExportField"
32
- :header="$parent.$parent.other"
33
- v-if="$parent.$parent.authArr.includes('档案查询导出')"
34
- sqlurl="rs/logic/exportfile" sql-name="deviceQuery" template-name='表具设备查询导出' :choose-col="true"></export-excel>
35
- <print-data :sum-field="$parent.$parent.getExportField" :model="$parent.model" :field="$parent.$parent.getExportField"
36
- :defaultfield="$parent.$parent.defaultfield"
37
- titletable="表具设备查询"
38
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
39
- <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>
40
- </div>
41
- </div>
42
- <div class="row" v-show="$parent.$parent.criteriaShow">
43
- <div class="col-sm-2 form-group" >
44
- <label class="font_normal_body">客户地址</label>
45
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
46
- condition="f_address like '%{}%'" placeholder='客户地址'>
47
- </div>
48
- <div class="col-sm-2 form-group" >
49
- <label class="font_normal_body">客户状态</label>
50
- <v-select :value.sync="model.f_user_state"
51
- v-model="model.f_user_state"
52
- :options='$parent.$parent.userstates' placeholder='请选择'
53
- condition="f_user_state = '{}'"
54
- close-on-select></v-select>
55
- </div>
56
- <div class="col-sm-2 form-group">
57
- <label class="font_normal_body">客户类型</label>
58
- <v-select :value.sync="model.f_user_type"
59
- :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
60
- condition="f_user_type = '{}'"
61
- close-on-select></v-select>
62
- </div>
63
- <div class="col-sm-2 form-group" >
64
- <label class="font_normal_body">所属表&nbsp;&nbsp;&nbsp;</label>
65
- <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
66
- condition="f_meternumber like '%{}%'" placeholder='所属表(表号)'>
67
- </div>
68
-
69
- <div class="col-sm-2 form-group" >
70
- <label class="font_normal_body">设备类型</label>
71
- <v-select :value.sync="model.f_devices_type"
72
- v-model="model.f_devices_type"
73
- :options='$parent.$parent.deviceTypes' placeholder='请选择'
74
- condition="f_devices_type = '{}'"
75
- close-on-select></v-select>
76
- </div>
77
- <div class="col-sm-2 form-group" >
78
- <label class="font_normal_body">购买方式</label>
79
- <v-select :value.sync="model.watchpurchase"
80
- v-model="model.watchpurchase"
81
- :options='$parent.$parent.watchpurchases' placeholder='请选择'
82
- condition="watchpurchase = '{}'"
83
- close-on-select></v-select>
84
- </div>
85
- <div class="col-sm-2 form-group" >
86
- <label class="font_normal_body">管道类型</label>
87
- <v-select :value.sync="model.f_pipe_type"
88
- v-model="model.f_pipe_type"
89
- :options='$parent.$parent.pipetype' placeholder='请选择'
90
- condition="f_pipe_type = '{}'"
91
- close-on-select></v-select>
92
- </div>
93
- <div class="col-sm-2 form-group" >
94
- <label class="font_normal_body">设备编号</label>
95
- <input type="text" style="width:60%" class="input_search" v-model="model.f_devices_no"
96
- condition="f_devices_no like '%{}%'" placeholder='设备编号'>
97
- </div>
98
- <div class="col-sm-2 form-group" >
99
- <label class="font_normal_body">设备品牌</label>
100
- <input type="text" style="width:60%" class="input_search" v-model="model.f_brand"
101
- condition="f_brand like '%{}%'" placeholder='设备品牌'>
102
- </div>
103
- <div class="col-sm-2 form-group" >
104
- <label class="font_normal_body">设备型号</label>
105
- <input type="text" style="width:60%" class="input_search" v-model="model.f_devices_model"
106
- condition="f_devices_model like '%{}%'" placeholder='设备型号'>
107
- </div>
108
- <div class="col-sm-2 form-group" >
109
- <label class="font_normal_body">设备数量</label>
110
- <input type="text" style="width:60%" class="input_search" v-model="model.f_devices_num"
111
- condition="f_devices_num = {}" placeholder='设备数量'>
112
- </div>
113
- <div class="col-sm-2 form-group" >
114
- <label class="font_normal_body" title="安装日期大于">安装日期</label>
115
- <datepicker placeholder="安装日期大于" style="width:60%"
116
- v-model="model.f_input_start_date"
117
- :value.sync="model.f_input_start_date"
118
- :format="'yyyy-MM-dd'"
119
- :show-reset-button="true"
120
- condition="f_input_date >= '{} 00:00:00'">
121
- </datepicker>
122
- </div>
123
- <div class="col-sm-2 form-group" >
124
- <label class="font_normal_body" title="安装日期小于">安装日期</label>
125
- <datepicker placeholder="安装日期小于" style="width:60%"
126
- v-model="model.f_input_end_date"
127
- :value.sync="model.f_input_end_date"
128
- :format="'yyyy-MM-dd'"
129
- :show-reset-button="true"
130
- condition="f_input_date <= '{} 23:59:59'">
131
- </datepicker>
132
- </div>
133
- <div class="col-sm-2 form-group" >
134
- <label class="font_normal_body" >到期日期</label>
135
- <datepicker placeholder="到期日期大于" style="width:60%"
136
- v-model="model.f_expire_start_date"
137
- :value.sync="model.f_expire_start_date"
138
- :format="'yyyy-MM-dd'"
139
- :show-reset-button="true"
140
- condition="f_expire_date >= '{} 00:00:00'">
141
- </datepicker>
142
- </div>
143
- <div class="col-sm-2 form-group" >
144
- <label class="font_normal_body">到期日期</label>
145
- <datepicker placeholder="到期日期小于" style="width:60%"
146
- v-model="model.f_expire_end_date"
147
- :value.sync="model.f_expire_end_date"
148
- :format="'yyyy-MM-dd'"
149
- :show-reset-button="true"
150
- condition="f_expire_date <= '{} 23:59:59'">
151
- </datepicker>
152
- </div>
153
- <div class="col-sm-2 form-group" >
154
- <label class="font_normal_body" title="生产日期大于" >生产日期</label>
155
- <datepicker placeholder="生产日期大于" style="width:60%"
156
- v-model="model.f_make_start_date"
157
- :value.sync="model.f_make_start_date"
158
- :format="'yyyy-MM-dd'"
159
- :show-reset-button="true"
160
- condition="f_make_date >= '{} 00:00:00'">
161
- </datepicker>
162
- </div>
163
- <div class="col-sm-2 form-group" >
164
- <label class="font_normal_body" title="生产日期小于">生产日期</label>
165
- <datepicker placeholder="生产日期小于" style="width:60%"
166
- v-model="model.f_make_end_date"
167
- :value.sync="model.f_make_end_date"
168
- :format="'yyyy-MM-dd'"
169
- :show-reset-button="true"
170
- condition="f_make_date <= '{} 23:59:59'">
171
- </datepicker>
172
- </div>
173
- <div class="col-sm-2 form-group" >
174
- <label for="startDate" class="font_normal_body" title="操作开始日期">开始日期</label>
175
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
176
- v-model="model.startDate"
177
- :value.sync="model.startDate"
178
- :format="'yyyy-MM-dd'"
179
- :show-reset-button="true"
180
- condition="f_operate_date >= '{} 00:00:00'">
181
- </datepicker>
182
- </div>
183
- <div class="col-sm-2 form-group" >
184
- <label for="endDate" class="font_normal_body" title="操作结束日期">结束日期</label>
185
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
186
- v-model="model.endDate"
187
- :value.sync="model.endDate"
188
- :format="'yyyy-MM-dd'"
189
- :show-reset-button="true"
190
- condition="f_operate_date <= '{} 23:59:59'">
191
- </datepicker>
192
- </div>
193
- <div class="col-sm-2 form-group" >
194
- <label class="font_normal_body">使用年限</label>
195
- <input type="text" style="width:60%" class="input_search" v-model="model.f_service_life"
196
- condition="f_service_life = '{}'" placeholder='使用年限'>
197
- </div>
198
- <div class="col-sm-2 form-group" >
199
- <label class="font_normal_body">备注信息</label>
200
- <input type="text" style="width:60%" class="input_search" v-model="model.f_comments"
201
- condition="f_comments like '%{}%'" placeholder='备注'>
202
- </div>
203
- <div class="col-sm-2 form-group">
204
- <label class="font_normal_body" >抄表员&emsp;</label>
205
- <v-select :value.sync="model.f_inputtor"
206
- v-model="model.f_inputtor"
207
- :options='$parent.$parent.inputtores' placeholder='请选择'
208
- condition="f_inputtor = '{}'"
209
- close-on-select :search="false">
210
- </v-select>
211
- </div>
212
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"></res-select-group>
213
- </div>
214
- </div>
215
- </criteria>
216
-
217
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
218
- <template partial='head'>
219
- <tr>
220
- <th><nobr>客户编号</nobr></th>
221
- <th><nobr>客户名称</nobr></th>
222
- <th><nobr>客户电话</nobr></th>
223
- <th><nobr>客户地址</nobr></th>
224
- <th><nobr>客户状态</nobr></th>
225
- <th><nobr>所属表具(表号)</nobr></th>
226
- <th><nobr>购买方式</nobr></th>
227
- <th><nobr>设备类型</nobr></th>
228
- <th><nobr>设备编号</nobr></th>
229
- <th><nobr>设备品牌</nobr></th>
230
- <th><nobr>设备型号</nobr></th>
231
- <th><nobr>设备数量</nobr></th>
232
- <th><nobr>设备状态</nobr></th>
233
- <th><nobr>管道类型</nobr></th>
234
- <th><nobr>生产日期</nobr></th>
235
- <th><nobr>使用年限</nobr></th>
236
- <th><nobr>安装人</nobr></th>
237
- <th><nobr>安装日期</nobr></th>
238
- <th><nobr>到期日期</nobr></th>
239
- <th><nobr>操作人</nobr></th>
240
- <th><nobr>操作时间</nobr></th>
241
- <th><nobr>备注</nobr></th>
242
- </tr>
243
- </template>
244
- <template partial='body'>
245
- <td style="text-align: center;"><nobr>
246
- <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
247
- </nobr> </td>
248
- <td style="text-align: center;"><nobr>{{row.f_user_name}}</nobr></td>
249
- <td style="text-align: center;"><nobr>{{row.f_user_phone}}</nobr></td>
250
- <td style="text-align: center;"><nobr>{{row.f_address}}</nobr></td>
251
- <td style="text-align: center;"><nobr>{{row.f_user_state}}</nobr></td>
252
- <td style="text-align: center;"><nobr>{{row.f_meternumber}}</nobr></td>
253
- <td style="text-align: center;"><nobr>{{row.watchpurchase}}</nobr></td>
254
- <td style="text-align: center;"><nobr>{{row.f_devices_type}}</nobr></td>
255
- <td style="text-align: center;"><nobr>{{row.f_devices_no}}</nobr></td>
256
- <td style="text-align: center;"><nobr>{{row.f_brand}}</nobr></td>
257
- <td style="text-align: center;"><nobr>{{row.f_devices_model}}</nobr></td>
258
- <td style="text-align: center;"><nobr>{{row.f_devices_num}}</nobr></td>
259
- <td style="text-align: center;"><nobr>{{row.f_userinfodevices_state}}</nobr></td>
260
- <td style="text-align: center;"><nobr>{{row.f_pipe_type}}</nobr></td>
261
- <td style="text-align: center;"><nobr>{{row.f_make_date}}</nobr></td>
262
- <td style="text-align: center;"><nobr>{{row.f_service_life}}</nobr></td>
263
- <td style="text-align: center;"><nobr>{{row.f_input_person}}</nobr></td>
264
- <td style="text-align: center;"><nobr>{{row.f_input_date}}</nobr></td>
265
- <td style="text-align: center;"><nobr>{{row.f_expire_date}}</nobr></td>
266
- <td style="text-align: center;"><nobr>{{row.f_operator}}</nobr></td>
267
- <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
268
- <td style="text-align: center;"><nobr>{{row.f_comments}}</nobr></td>
269
- </template>
270
- <template partial='foot'>
271
-
272
- </template>
273
- </data-grid>
274
- </criteria-paged>
275
-
276
- <table class="table-hover">
277
- <tr style="position: relative" class="table-bordered">
278
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">汇总信息</td>
279
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">暂无合计字段</td>
280
- </tr>
281
- </table>
282
-
283
- <modal :show.sync="printshow" v-ref:modal backdrop="false">
284
- <header slot="modal-header" class="modal-header text-center">
285
- <h4 class="modal-title">打印列选择</h4>
286
- <input type="checkbox" class="" id="f_generations" v-model="all">
287
- <label for="f_generations" class="font-size">全选</label>
288
- </header>
289
- <article slot="modal-body">
290
- <div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
291
- <div class="col-sm-3" v-for="f in fields">
292
- <input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">
293
- <label :for="'water-owe-details-'+$index" class="font-size">{{f}}</label>
294
- </div>
295
- </div>
296
- </article>
297
- <footer slot="modal-footer" class="modal-footer">
298
- <center>
299
- <button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>
300
- <button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>
301
- <print-table :model='model' v-show="false" v-ref:print
302
- :top='40' :left='60' :right='40' :bottom='60'
303
- :thead="thead" :tfoot='tfoot' :attach="yangsen"
304
- :fields="modelval" :printpage="true">
305
- </print-table>
306
- </center>
307
- </footer>
308
- </modal>
309
- </div>
310
- <div class="flex" v-if="show">
311
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
312
- </div>
313
- </div></div></div>
314
- </template>
315
-
316
- <script>
317
- import { PagedList } from 'vue-client'
318
- import defaultPrint from '../config/DefaultPrint'
319
- import exportConfig from '../config/exportConfig'
320
-
321
- let readySomething = async function (self) {
322
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
323
- self.$MagGetSaleParam.initinputtor();
324
- self.getinputtores();
325
- // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
326
- // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
327
- // await self.$refs.paged.$refs.cri.search()
328
- }
329
- export default {
330
- title: '表具设备查询',
331
- data() {
332
- return {
333
- other:[],
334
- footer:[],
335
- model: new PagedList('rs/sql/deviceQuery', 20),
336
- criteriaShow: false,
337
- orgCondtionStr: '',
338
- modelval: [],
339
- printshow: false,
340
- all: false,
341
- fields: {},
342
- thead: '',
343
- tfoot: '',
344
- defaultfield: [],
345
- config: {
346
- defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone']
347
- },
348
- show:false,
349
- rowdata:{},
350
- // 下拉框参数
351
- inputtores:[],
352
- usertypes:this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
353
- userstates:this.$appdata.getParam('用户状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')] : [],
354
- deviceTypes: this.$appdata.getParam('设备类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('设备类型')] : [],
355
- // brand: this.$appdata.getParam('设备品牌') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('设备品牌')] : [],
356
- watchpurchases: this.$appdata.getParam('购买方式') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('购买方式')] : [],
357
- pipetype: this.$appdata.getParam('管道类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('管道类型')] : [],
358
- initres: {
359
- org:[this.$login.f.orgid],
360
- dep:[],
361
- user:[],
362
- },
363
- // 合计数据
364
- sumsmodel: {}
365
- }
366
- },
367
- ready(){
368
- readySomething(this).then(() => {
369
- this.$emit('ready')
370
- }).catch((error) => {
371
- this.$emit('error', error)
372
- })
373
- },
374
- methods: {
375
- async getinputtores () {
376
- // 获取抄表员
377
- let rs = []
378
- if (this.$login.f.f_gasman.length > 0) {
379
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
380
- let temp = {
381
- label: this.$login.f.f_gasman[i].name,
382
- value: this.$login.f.f_gasman[i].name
383
- }
384
- rs.push(temp)
385
- }
386
- }
387
- this.inputtores = [{label: '全部', value: ''}, ...rs]
388
- },
389
- getotherfooter () {
390
- // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
391
- // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
392
- this.other = [];
393
- this.footer = [];
394
- let exportdata = this.getCondition;
395
- let otherInData = [];
396
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
397
- // let footerData = [], exportfield = this.getExportField;
398
- // footerData.push("合计");
399
- // let self = this;
400
- // for (var field in self.sumsmodel) {
401
- // footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
402
- // }
403
- // this.footer.push(footerData);
404
- this.other.push(otherInData);
405
- },
406
- search(){
407
- this.$refs.paged.$refs.cri.search()
408
- },
409
- cancel() {
410
- this.show = false
411
- },
412
- showmsg(obj){
413
- this.rowdata=obj
414
- this.show=true
415
- },
416
- selfSearch (args) {
417
- if (!this.orgCondtionStr) {
418
- args.condition = `${args.condition}` + " and f_orgid = " + this.$login.f.orgid
419
- } else {
420
- args.condition = `${args.condition}` + this.orgCondtionStr
421
- }
422
-
423
- this.model.search(args.condition, args.model)
424
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
425
- console.log('合计字段',this.sumsmodel)
426
- },
427
- clear(){
428
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
429
- this.$refs.paged.$refs.cri.model[key] = []
430
- })
431
- },
432
- hidden(){
433
- this.criteriaShow = !this.criteriaShow
434
- },
435
- getRes(obj) {
436
- this.orgCondtionStr = obj
437
- },
438
- stamp () {
439
- this.all = false
440
- //默认选择要打印的列
441
- this.modelval = defaultPrint.config
442
- this.fields = this.getfield
443
- console.log('所有打印字段',this.fields)
444
- this.printshow = true
445
- this.put()
446
- },
447
- put () {
448
- // 对Modelval进行排序
449
- this.sortModelval()
450
- this.thead = `<tr><th colspan=${this.modelval.length}>设备查询统计报表</th></tr><tr>`
451
- for (let key of this.modelval) {
452
- this.thead += '<th>' + this.fields[key] + '</th>'
453
- }
454
- this.thead += '</tr>'
455
- },
456
- print () {
457
- this.$refs.print.PrintAsFile()
458
- this.printshow = false
459
- },
460
- close () {
461
- this.printshow = false
462
- this.all = false
463
- },
464
- // 对选择的列进行排序
465
- sortModelval () {
466
- let sortModel = []
467
- Object.keys(this.fields).forEach((key) => {
468
- if (this.modelval.includes(key)) {
469
- sortModel.push(key)
470
- }
471
- })
472
- this.modelval = sortModel
473
- console.log('选择的打印的字段', this.modelval)
474
- }
475
- },
476
- watch:{
477
- 'all' (val) {
478
- if (val) {
479
- this.modelval = this.bodyData
480
- } else {
481
- this.modelval = defaultPrint.config
482
- this.put()
483
- }
484
- },
485
- sumsmodel:{
486
- handler: function(val) {
487
- this.getotherfooter();
488
- },
489
- deep: true
490
- },
491
- 'modelval.length' () {
492
- this.put()
493
- },
494
- },
495
- computed:{
496
- authArr () {
497
- return this.$login.r ? this.$login.r : []
498
- },
499
- getCondition(){
500
- return {condition: `${this.$refs.paged.$refs.cri.condition}`+this.orgCondtionStr}
501
- },
502
- getfield(){
503
- let data = {}
504
- this.bodyData.forEach((value, index)=>{
505
- data[this.bodyData[index]] = this.headData[index]
506
- })
507
- //合计字段打印
508
- this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
509
- if(this.sumsmodel){
510
- Object.keys(this.sumsmodel).forEach((key) => {
511
- this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
512
- })
513
- }else{
514
- this.tfoot += '暂无'
515
- }
516
- this.tfoot += '</th></tr>'
517
- return data
518
- },
519
- getExportField() {
520
- return exportConfig.deviceConfig
521
- }
522
- }
523
- }
524
- </script>
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">客户电话</label>
22
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
23
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
24
+ </div>
25
+ <div class="span" style = "float:right;">
26
+ <button class="button_search button_spacing" @click="search()">查询</button>
27
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
28
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
29
+
30
+ <export-excel :data="$parent.$parent.getCondition"
31
+ :field="$parent.$parent.getExportField"
32
+ :header="$parent.$parent.other"
33
+ v-if="$parent.$parent.authArr.includes('档案查询导出')"
34
+ sqlurl="rs/logic/exportfile" sql-name="deviceQuery" template-name='表具设备查询导出' :choose-col="true"></export-excel>
35
+ <print-data :sum-field="$parent.$parent.getExportField" :model="$parent.model" :field="$parent.$parent.getExportField"
36
+ :defaultfield="$parent.$parent.defaultfield"
37
+ titletable="表具设备查询"
38
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
39
+ <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>
40
+ </div>
41
+ </div>
42
+ <div class="row" v-show="$parent.$parent.criteriaShow">
43
+ <div class="col-sm-2 form-group" >
44
+ <label class="font_normal_body">客户地址</label>
45
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
46
+ condition="f_address like '%{}%'" placeholder='客户地址'>
47
+ </div>
48
+ <div class="col-sm-2 form-group" >
49
+ <label class="font_normal_body">客户状态</label>
50
+ <v-select :value.sync="model.f_user_state"
51
+ v-model="model.f_user_state"
52
+ :options='$parent.$parent.userstates' placeholder='请选择'
53
+ condition="f_user_state = '{}'"
54
+ close-on-select></v-select>
55
+ </div>
56
+ <div class="col-sm-2 form-group">
57
+ <label class="font_normal_body">客户类型</label>
58
+ <v-select :value.sync="model.f_user_type"
59
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
60
+ condition="f_user_type = '{}'"
61
+ close-on-select></v-select>
62
+ </div>
63
+ <div class="col-sm-2 form-group" >
64
+ <label class="font_normal_body">所属表&nbsp;&nbsp;&nbsp;</label>
65
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
66
+ condition="f_meternumber like '%{}%'" placeholder='所属表(表号)'>
67
+ </div>
68
+
69
+ <div class="col-sm-2 form-group" >
70
+ <label class="font_normal_body">设备类型</label>
71
+ <v-select :value.sync="model.f_devices_type"
72
+ v-model="model.f_devices_type"
73
+ :options='$parent.$parent.deviceTypes' placeholder='请选择'
74
+ condition="f_devices_type = '{}'"
75
+ close-on-select></v-select>
76
+ </div>
77
+ <div class="col-sm-2 form-group" >
78
+ <label class="font_normal_body">购买方式</label>
79
+ <v-select :value.sync="model.watchpurchase"
80
+ v-model="model.watchpurchase"
81
+ :options='$parent.$parent.watchpurchases' placeholder='请选择'
82
+ condition="watchpurchase = '{}'"
83
+ close-on-select></v-select>
84
+ </div>
85
+ <div class="col-sm-2 form-group" >
86
+ <label class="font_normal_body">管道类型</label>
87
+ <v-select :value.sync="model.f_pipe_type"
88
+ v-model="model.f_pipe_type"
89
+ :options='$parent.$parent.pipetype' placeholder='请选择'
90
+ condition="f_pipe_type = '{}'"
91
+ close-on-select></v-select>
92
+ </div>
93
+ <div class="col-sm-2 form-group">
94
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
95
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meter_number"
96
+ condition="f_meternumber = '{}'" placeholder='表号'>
97
+ </div>
98
+ <div class="col-sm-2 form-group">
99
+ <label class="font_normal_body">卡&emsp;&emsp;号</label>
100
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
101
+ condition="f_card_id = '{}'" placeholder='卡号'>
102
+ </div>
103
+ <div class="col-sm-2 form-group" >
104
+ <label class="font_normal_body">设备编号</label>
105
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_devices_no"
106
+ condition="f_devices_no like '%{}%'" placeholder='设备编号'>
107
+ </div>
108
+ <div class="col-sm-2 form-group" >
109
+ <label class="font_normal_body">设备品牌</label>
110
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_brand"
111
+ condition="f_brand like '%{}%'" placeholder='设备品牌'>
112
+ </div>
113
+ <div class="col-sm-2 form-group" >
114
+ <label class="font_normal_body">设备型号</label>
115
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_devices_model"
116
+ condition="f_devices_model like '%{}%'" placeholder='设备型号'>
117
+ </div>
118
+ <div class="col-sm-2 form-group" >
119
+ <label class="font_normal_body">设备数量</label>
120
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_devices_num"
121
+ condition="f_devices_num = {}" placeholder='设备数量'>
122
+ </div>
123
+ <div class="col-sm-2 form-group" >
124
+ <label class="font_normal_body" title="安装日期大于">安装日期</label>
125
+ <datepicker placeholder="安装日期大于" style="width:60%"
126
+ v-model="model.f_input_start_date"
127
+ :value.sync="model.f_input_start_date"
128
+ :format="'yyyy-MM-dd'"
129
+ :show-reset-button="true"
130
+ condition="f_input_date >= '{} 00:00:00'">
131
+ </datepicker>
132
+ </div>
133
+ <div class="col-sm-2 form-group" >
134
+ <label class="font_normal_body" title="安装日期小于">安装日期</label>
135
+ <datepicker placeholder="安装日期小于" style="width:60%"
136
+ v-model="model.f_input_end_date"
137
+ :value.sync="model.f_input_end_date"
138
+ :format="'yyyy-MM-dd'"
139
+ :show-reset-button="true"
140
+ condition="f_input_date <= '{} 23:59:59'">
141
+ </datepicker>
142
+ </div>
143
+ <div class="col-sm-2 form-group" >
144
+ <label class="font_normal_body" >到期日期</label>
145
+ <datepicker placeholder="到期日期大于" style="width:60%"
146
+ v-model="model.f_expire_start_date"
147
+ :value.sync="model.f_expire_start_date"
148
+ :format="'yyyy-MM-dd'"
149
+ :show-reset-button="true"
150
+ condition="f_expire_date >= '{} 00:00:00'">
151
+ </datepicker>
152
+ </div>
153
+ <div class="col-sm-2 form-group" >
154
+ <label class="font_normal_body">到期日期</label>
155
+ <datepicker placeholder="到期日期小于" style="width:60%"
156
+ v-model="model.f_expire_end_date"
157
+ :value.sync="model.f_expire_end_date"
158
+ :format="'yyyy-MM-dd'"
159
+ :show-reset-button="true"
160
+ condition="f_expire_date <= '{} 23:59:59'">
161
+ </datepicker>
162
+ </div>
163
+ <div class="col-sm-2 form-group" >
164
+ <label class="font_normal_body" title="生产日期大于" >生产日期</label>
165
+ <datepicker placeholder="生产日期大于" style="width:60%"
166
+ v-model="model.f_make_start_date"
167
+ :value.sync="model.f_make_start_date"
168
+ :format="'yyyy-MM-dd'"
169
+ :show-reset-button="true"
170
+ condition="f_make_date >= '{} 00:00:00'">
171
+ </datepicker>
172
+ </div>
173
+ <div class="col-sm-2 form-group" >
174
+ <label class="font_normal_body" title="生产日期小于">生产日期</label>
175
+ <datepicker placeholder="生产日期小于" style="width:60%"
176
+ v-model="model.f_make_end_date"
177
+ :value.sync="model.f_make_end_date"
178
+ :format="'yyyy-MM-dd'"
179
+ :show-reset-button="true"
180
+ condition="f_make_date <= '{} 23:59:59'">
181
+ </datepicker>
182
+ </div>
183
+ <div class="col-sm-2 form-group" >
184
+ <label for="startDate" class="font_normal_body" title="操作开始日期">开始日期</label>
185
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
186
+ v-model="model.startDate"
187
+ :value.sync="model.startDate"
188
+ :format="'yyyy-MM-dd'"
189
+ :show-reset-button="true"
190
+ condition="f_operate_date >= '{} 00:00:00'">
191
+ </datepicker>
192
+ </div>
193
+ <div class="col-sm-2 form-group" >
194
+ <label for="endDate" class="font_normal_body" title="操作结束日期">结束日期</label>
195
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
196
+ v-model="model.endDate"
197
+ :value.sync="model.endDate"
198
+ :format="'yyyy-MM-dd'"
199
+ :show-reset-button="true"
200
+ condition="f_operate_date <= '{} 23:59:59'">
201
+ </datepicker>
202
+ </div>
203
+ <div class="col-sm-2 form-group" >
204
+ <label class="font_normal_body">使用年限</label>
205
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_service_life"
206
+ condition="f_service_life = '{}'" placeholder='使用年限'>
207
+ </div>
208
+ <div class="col-sm-2 form-group" >
209
+ <label class="font_normal_body">备注信息</label>
210
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_comments"
211
+ condition="f_comments like '%{}%'" placeholder='备注'>
212
+ </div>
213
+ <div class="col-sm-2 form-group">
214
+ <label class="font_normal_body" >抄表员&emsp;</label>
215
+ <v-select :value.sync="model.f_inputtor"
216
+ v-model="model.f_inputtor"
217
+ :options='$parent.$parent.inputtores' placeholder='请选择'
218
+ condition="f_inputtor = '{}'"
219
+ close-on-select :search="false">
220
+ </v-select>
221
+ </div>
222
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"></res-select-group>
223
+ </div>
224
+ </div>
225
+ </criteria>
226
+
227
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
228
+ <template partial='head'>
229
+ <tr>
230
+ <th><nobr>客户编号</nobr></th>
231
+ <th><nobr>客户名称</nobr></th>
232
+ <th><nobr>客户电话</nobr></th>
233
+ <th><nobr>客户地址</nobr></th>
234
+ <th><nobr>客户状态</nobr></th>
235
+ <th><nobr>所属表具(表号)</nobr></th>
236
+ <th><nobr>购买方式</nobr></th>
237
+ <th><nobr>设备类型</nobr></th>
238
+ <th><nobr>设备编号</nobr></th>
239
+ <th><nobr>设备品牌</nobr></th>
240
+ <th><nobr>设备型号</nobr></th>
241
+ <th><nobr>设备数量</nobr></th>
242
+ <th><nobr>设备状态</nobr></th>
243
+ <th><nobr>管道类型</nobr></th>
244
+ <th><nobr>生产日期</nobr></th>
245
+ <th><nobr>使用年限</nobr></th>
246
+ <th><nobr>安装人</nobr></th>
247
+ <th><nobr>安装日期</nobr></th>
248
+ <th><nobr>到期日期</nobr></th>
249
+ <th><nobr>操作人</nobr></th>
250
+ <th><nobr>操作时间</nobr></th>
251
+ <th><nobr>备注</nobr></th>
252
+ </tr>
253
+ </template>
254
+ <template partial='body'>
255
+ <td style="text-align: center;"><nobr>
256
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
257
+ </nobr> </td>
258
+ <td style="text-align: center;"><nobr>{{row.f_user_name}}</nobr></td>
259
+ <td style="text-align: center;"><nobr>{{row.f_user_phone}}</nobr></td>
260
+ <td style="text-align: center;"><nobr>{{row.f_address}}</nobr></td>
261
+ <td style="text-align: center;"><nobr>{{row.f_user_state}}</nobr></td>
262
+ <td style="text-align: center;"><nobr>{{row.f_meternumber}}</nobr></td>
263
+ <td style="text-align: center;"><nobr>{{row.watchpurchase}}</nobr></td>
264
+ <td style="text-align: center;"><nobr>{{row.f_devices_type}}</nobr></td>
265
+ <td style="text-align: center;"><nobr>{{row.f_devices_no}}</nobr></td>
266
+ <td style="text-align: center;"><nobr>{{row.f_brand}}</nobr></td>
267
+ <td style="text-align: center;"><nobr>{{row.f_devices_model}}</nobr></td>
268
+ <td style="text-align: center;"><nobr>{{row.f_devices_num}}</nobr></td>
269
+ <td style="text-align: center;"><nobr>{{row.f_userinfodevices_state}}</nobr></td>
270
+ <td style="text-align: center;"><nobr>{{row.f_pipe_type}}</nobr></td>
271
+ <td style="text-align: center;"><nobr>{{row.f_make_date}}</nobr></td>
272
+ <td style="text-align: center;"><nobr>{{row.f_service_life}}</nobr></td>
273
+ <td style="text-align: center;"><nobr>{{row.f_input_person}}</nobr></td>
274
+ <td style="text-align: center;"><nobr>{{row.f_input_date}}</nobr></td>
275
+ <td style="text-align: center;"><nobr>{{row.f_expire_date}}</nobr></td>
276
+ <td style="text-align: center;"><nobr>{{row.f_operator}}</nobr></td>
277
+ <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
278
+ <td style="text-align: center;"><nobr>{{row.f_comments}}</nobr></td>
279
+ </template>
280
+ <template partial='foot'>
281
+
282
+ </template>
283
+ </data-grid>
284
+ </criteria-paged>
285
+
286
+ <table class="table-hover">
287
+ <tr style="position: relative" class="table-bordered">
288
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">汇总信息</td>
289
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">暂无合计字段</td>
290
+ </tr>
291
+ </table>
292
+
293
+ <modal :show.sync="printshow" v-ref:modal backdrop="false">
294
+ <header slot="modal-header" class="modal-header text-center">
295
+ <h4 class="modal-title">打印列选择</h4>
296
+ <input type="checkbox" class="" id="f_generations" v-model="all">
297
+ <label for="f_generations" class="font-size">全选</label>
298
+ </header>
299
+ <article slot="modal-body">
300
+ <div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
301
+ <div class="col-sm-3" v-for="f in fields">
302
+ <input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">
303
+ <label :for="'water-owe-details-'+$index" class="font-size">{{f}}</label>
304
+ </div>
305
+ </div>
306
+ </article>
307
+ <footer slot="modal-footer" class="modal-footer">
308
+ <center>
309
+ <button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>
310
+ <button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>
311
+ <print-table :model='model' v-show="false" v-ref:print
312
+ :top='40' :left='60' :right='40' :bottom='60'
313
+ :thead="thead" :tfoot='tfoot' :attach="yangsen"
314
+ :fields="modelval" :printpage="true">
315
+ </print-table>
316
+ </center>
317
+ </footer>
318
+ </modal>
319
+ </div>
320
+ <div class="flex" v-if="show">
321
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
322
+ </div>
323
+ </div></div></div>
324
+ </template>
325
+
326
+ <script>
327
+ import { PagedList } from 'vue-client'
328
+ import defaultPrint from '../config/DefaultPrint'
329
+ import exportConfig from '../config/exportConfig'
330
+
331
+ let readySomething = async function (self) {
332
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
333
+ self.$MagGetSaleParam.initinputtor();
334
+ self.getinputtores();
335
+ // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
336
+ // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
337
+ // await self.$refs.paged.$refs.cri.search()
338
+ }
339
+ export default {
340
+ title: '表具设备查询',
341
+ data() {
342
+ return {
343
+ other:[],
344
+ footer:[],
345
+ model: new PagedList('rs/sql/deviceQuery', 20),
346
+ criteriaShow: false,
347
+ orgCondtionStr: '',
348
+ modelval: [],
349
+ printshow: false,
350
+ all: false,
351
+ fields: {},
352
+ thead: '',
353
+ tfoot: '',
354
+ defaultfield: [],
355
+ config: {
356
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone']
357
+ },
358
+ show:false,
359
+ rowdata:{},
360
+ // 下拉框参数
361
+ inputtores:[],
362
+ usertypes:this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
363
+ userstates:this.$appdata.getParam('用户状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')] : [],
364
+ deviceTypes: this.$appdata.getParam('设备类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('设备类型')] : [],
365
+ // brand: this.$appdata.getParam('设备品牌') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('设备品牌')] : [],
366
+ watchpurchases: this.$appdata.getParam('购买方式') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('购买方式')] : [],
367
+ pipetype: this.$appdata.getParam('管道类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('管道类型')] : [],
368
+ initres: {
369
+ org:[this.$login.f.orgid],
370
+ dep:[],
371
+ user:[],
372
+ },
373
+ // 合计数据
374
+ sumsmodel: {}
375
+ }
376
+ },
377
+ ready(){
378
+ readySomething(this).then(() => {
379
+ this.$emit('ready')
380
+ }).catch((error) => {
381
+ this.$emit('error', error)
382
+ })
383
+ },
384
+ methods: {
385
+ async getinputtores () {
386
+ // 获取抄表员
387
+ let rs = []
388
+ if (this.$login.f.f_gasman.length > 0) {
389
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
390
+ let temp = {
391
+ label: this.$login.f.f_gasman[i].name,
392
+ value: this.$login.f.f_gasman[i].name
393
+ }
394
+ rs.push(temp)
395
+ }
396
+ }
397
+ this.inputtores = [{label: '全部', value: ''}, ...rs]
398
+ },
399
+ getotherfooter () {
400
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
401
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
402
+ this.other = [];
403
+ this.footer = [];
404
+ let exportdata = this.getCondition;
405
+ let otherInData = [];
406
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
407
+ // let footerData = [], exportfield = this.getExportField;
408
+ // footerData.push("合计");
409
+ // let self = this;
410
+ // for (var field in self.sumsmodel) {
411
+ // footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
412
+ // }
413
+ // this.footer.push(footerData);
414
+ this.other.push(otherInData);
415
+ },
416
+ search(){
417
+ this.$refs.paged.$refs.cri.search()
418
+ },
419
+ cancel() {
420
+ this.show = false
421
+ },
422
+ showmsg(obj){
423
+ this.rowdata=obj
424
+ this.show=true
425
+ },
426
+ selfSearch (args) {
427
+ if (!this.orgCondtionStr) {
428
+ args.condition = `${args.condition}` + " and f_orgid = " + this.$login.f.orgid
429
+ } else {
430
+ args.condition = `${args.condition}` + this.orgCondtionStr
431
+ }
432
+
433
+ this.model.search(args.condition, args.model)
434
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
435
+ console.log('合计字段',this.sumsmodel)
436
+ },
437
+ clear(){
438
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
439
+ this.$refs.paged.$refs.cri.model[key] = []
440
+ })
441
+ },
442
+ hidden(){
443
+ this.criteriaShow = !this.criteriaShow
444
+ },
445
+ getRes(obj) {
446
+ this.orgCondtionStr = obj
447
+ },
448
+ stamp () {
449
+ this.all = false
450
+ //默认选择要打印的列
451
+ this.modelval = defaultPrint.config
452
+ this.fields = this.getfield
453
+ console.log('所有打印字段',this.fields)
454
+ this.printshow = true
455
+ this.put()
456
+ },
457
+ put () {
458
+ // 对Modelval进行排序
459
+ this.sortModelval()
460
+ this.thead = `<tr><th colspan=${this.modelval.length}>设备查询统计报表</th></tr><tr>`
461
+ for (let key of this.modelval) {
462
+ this.thead += '<th>' + this.fields[key] + '</th>'
463
+ }
464
+ this.thead += '</tr>'
465
+ },
466
+ print () {
467
+ this.$refs.print.PrintAsFile()
468
+ this.printshow = false
469
+ },
470
+ close () {
471
+ this.printshow = false
472
+ this.all = false
473
+ },
474
+ // 对选择的列进行排序
475
+ sortModelval () {
476
+ let sortModel = []
477
+ Object.keys(this.fields).forEach((key) => {
478
+ if (this.modelval.includes(key)) {
479
+ sortModel.push(key)
480
+ }
481
+ })
482
+ this.modelval = sortModel
483
+ console.log('选择的打印的字段', this.modelval)
484
+ }
485
+ },
486
+ watch:{
487
+ 'all' (val) {
488
+ if (val) {
489
+ this.modelval = this.bodyData
490
+ } else {
491
+ this.modelval = defaultPrint.config
492
+ this.put()
493
+ }
494
+ },
495
+ sumsmodel:{
496
+ handler: function(val) {
497
+ this.getotherfooter();
498
+ },
499
+ deep: true
500
+ },
501
+ 'modelval.length' () {
502
+ this.put()
503
+ },
504
+ },
505
+ computed:{
506
+ authArr () {
507
+ return this.$login.r ? this.$login.r : []
508
+ },
509
+ getCondition(){
510
+ return {condition: `${this.$refs.paged.$refs.cri.condition}`+this.orgCondtionStr}
511
+ },
512
+ getfield(){
513
+ let data = {}
514
+ this.bodyData.forEach((value, index)=>{
515
+ data[this.bodyData[index]] = this.headData[index]
516
+ })
517
+ //合计字段打印
518
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
519
+ if(this.sumsmodel){
520
+ Object.keys(this.sumsmodel).forEach((key) => {
521
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
522
+ })
523
+ }else{
524
+ this.tfoot += '暂无'
525
+ }
526
+ this.tfoot += '</th></tr>'
527
+ return data
528
+ },
529
+ getExportField() {
530
+ return exportConfig.deviceConfig
531
+ }
532
+ }
533
+ }
534
+ </script>