manage-client 3.3.2 → 3.3.3

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 (63) hide show
  1. package/build/dev-server.js +180 -180
  2. package/package.json +1 -1
  3. package/src/components/sale/businessquery/GroupChargeQuery.vue +481 -481
  4. package/src/components/sale/businessquery/NewAreaGeneralQuery.vue +633 -633
  5. package/src/components/webmeter/recharge/RechargeList.vue +346 -346
  6. package/src/filiale/gehua/GroupChargeQuery.vue +486 -486
  7. package/src/filiale/huayin/ChargeQuery.vue +1305 -1305
  8. package/src/filiale/macheng/config/exportConfig.js +1 -1
  9. package/src/filiale/rongcheng/AreaBuildingDetailInfo.vue +281 -281
  10. package/src/filiale/rongcheng/AreaBuildingInfoSummary.vue +301 -301
  11. package/src/filiale/rongcheng/exportConfig.js +536 -536
  12. package/src/filiale/rongcheng/sale.js +22 -22
  13. package/src/filiale/shanxian/CancellationQuery.vue +426 -0
  14. package/src/filiale/shanxian/ChangeUserQuery.vue +395 -0
  15. package/src/filiale/shanxian/DeviceQuery.vue +586 -0
  16. package/src/filiale/shanxian/DisableQuery.vue +528 -0
  17. package/src/filiale/shanxian/EnableQuery.vue +461 -0
  18. package/src/filiale/shanxian/FMYGasQuery.vue +731 -0
  19. package/src/filiale/shanxian/FillCardQuery.vue +569 -569
  20. package/src/filiale/shanxian/FillGasQuery.vue +588 -588
  21. package/src/filiale/shanxian/FmyGasDeviceQuery.vue +68 -33
  22. package/src/filiale/shanxian/InspectListUserNew.vue +18 -16
  23. package/src/filiale/shanxian/LostContactAnalysisList.vue +633 -632
  24. package/src/filiale/shanxian/MeterQuery.vue +968 -0
  25. package/src/filiale/shanxian/MonthGasQuery.vue +481 -0
  26. package/src/filiale/shanxian/NewQueryInstruct.vue +457 -0
  27. package/src/filiale/shanxian/OtherChargeQuery.vue +684 -684
  28. package/src/filiale/shanxian/ReverseQuery.vue +454 -0
  29. package/src/filiale/shanxian/TransferQuery.vue +469 -0
  30. package/src/filiale/shanxian/UserGasAll.vue +15 -14
  31. package/src/filiale/shanxian/UserLostContactAnalysis.vue +584 -583
  32. package/src/filiale/shanxian/UserQuery.vue +960 -959
  33. package/src/filiale/shanxian/config/exportConfig.js +100 -100
  34. package/src/filiale/shanxian/newwebmeter/TotalExceptionByMeter.vue +608 -0
  35. package/src/filiale/shanxian/sale.js +46 -26
  36. package/src/filiale/shanxian/webmeterManage.js +4 -0
  37. package/src/filiale/wenxi/ChangeMeterQuery.vue +704 -704
  38. package/src/filiale/wenxi/ChangeUserQuery.vue +371 -371
  39. package/src/filiale/wenxi/ChargeQuery.vue +1260 -1260
  40. package/src/filiale/wenxi/FmyGasDeviceQuery.vue +944 -944
  41. package/src/filiale/wenxi/GasDeviceQuery.vue +1041 -1041
  42. package/src/filiale/wenxi/GasStatistics.vue +515 -515
  43. package/src/filiale/wenxi/GetNoMetereadData.vue +374 -374
  44. package/src/filiale/wenxi/HandplanQuery.vue +1370 -1370
  45. package/src/filiale/wenxi/ManageUserTypeSell.vue +173 -173
  46. package/src/filiale/wenxi/MeterQuery.vue +937 -964
  47. package/src/filiale/wenxi/NewGasStatistics.vue +522 -522
  48. package/src/filiale/wenxi/RecordInfoQuery.vue +1213 -1213
  49. package/src/filiale/wenxi/WebHandQuery.vue +475 -475
  50. package/src/filiale/wenxi/config/exportConfig.js +916 -916
  51. package/src/filiale/wenxi/sale.js +24 -24
  52. package/src/filiale/wenxi/webmeterManage.js +13 -13
  53. package/src/filiale/xinkang/EchartsBox.vue +139 -139
  54. package/src/filiale/xinkang/ManageBrandHouseCount.vue +347 -347
  55. package/src/filiale/xinkang/NewGasStatistics.vue +526 -526
  56. package/src/filiale/xinkang/exportConfig.js +1998 -1998
  57. package/src/filiale/xinkang/meterFaultChangeSummary.vue +196 -196
  58. package/src/filiale/xinkang/reportManage.js +15 -15
  59. package/src/filiale/xinkang/sale.js +13 -13
  60. package/src/filiale/xinkang/webmeterManage.js +9 -9
  61. package/src/filiale/zhongyi/GasStatistics.vue +521 -521
  62. package/src/main.js +66 -72
  63. package/lib/package_2022-12-01-14-30-50.json +0 -109
@@ -1,588 +1,588 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main" @keyup.enter="search">
4
- <div class="flex" v-if="!show">
5
-
6
- <criteria-paged :model="model" v-ref:paged @sort="sort">
7
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
- <div class="row">
10
- <div class="col-sm-2 form-group">
11
- <label 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_address"
23
- condition="f_address like '%{}%'" placeholder='用户地址'>
24
- </div>
25
- <div class="col-sm-2 form-group">
26
- <label class="font_normal_body" title="旧用户编号">档案编号</label>
27
- <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
28
- condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
29
- </div>
30
-
31
- <div class="span" style="float:right;">
32
- <button class="button_search button_spacing" @click="search()">查询</button>
33
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
34
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
35
-
36
- <export-excel :data="$parent.$parent.getCondition"
37
- :field="$parent.$parent.getfield"
38
- :footer="$parent.$parent.footer"
39
- :header="$parent.$parent.other"
40
- sqlurl="rs/logic/exportfile" sql-name="fillGasQuery" template-name='补气查询导出'
41
- :choose-col="true"></export-excel>
42
- <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
43
- :defaultfield="$parent.$parent.defaultfield"
44
- titletable="补气记录"
45
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
46
- <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>
47
- </div>
48
- </div>
49
-
50
- <div class="row" v-show="$parent.$parent.criteriaShow">
51
- <div class="col-sm-2 form-group">
52
- <label for="startDate" class="font_normal_body">开始日期</label>
53
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
54
- v-model="model.startDate"
55
- :value.sync="model.startDate"
56
- :format="'yyyy-MM-dd HH:mm:ss'"
57
- :show-reset-button="true"
58
- condition="f_operate_date >= '{}'">
59
- </datepicker>
60
- </div>
61
- <div class="col-sm-2 form-group">
62
- <label for="endDate" class="font_normal_body">结束日期</label>
63
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
64
- v-model="model.endDate"
65
- :value.sync="model.endDate"
66
- :format="'yyyy-MM-dd HH:mm:ss'"
67
- :show-reset-button="true"
68
- condition="f_operate_date <= '{}'">
69
- </datepicker>
70
- </div>
71
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" :cascade =true v-ref:sel></res-select-group>
72
- <div class="col-sm-2 form-group">
73
- <label class="font_normal_body">用户电话</label>
74
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
75
- condition="f_user_phone like '%{}%'" placeholder="用户电话">
76
- </div>
77
- <div class="col-sm-2 form-group">
78
- <label class="font_normal_body">补气类型</label>
79
- <v-select :value.sync="model.f_type"
80
- v-model="model.f_type"
81
- :multiple="true"
82
- :options='$parent.$parent.fillGasTypes' placeholder='请选择'
83
- condition="f_type in {}"
84
- close-on-select></v-select>
85
- <!--:options='$parent.$parent.fillGasTypes' placeholder='请选择'-->
86
- </div>
87
-
88
- <div class="col-sm-2 form-group">
89
- <label class="font_normal_body">卡&emsp;&emsp;号</label>
90
- <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
91
- condition="f_card_id like '%{}%'" placeholder='卡号'>
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_meternumber"
96
- condition="f_meternumber = '{}'" placeholder='表号'>
97
- </div>
98
- <div class="col-sm-2 form-group">
99
- <label class="font_normal_body">气表类型</label>
100
- <v-select :value.sync="model.f_meter_type" multiple
101
- :options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_type"
102
- condition="f_meter_type in {}"
103
- close-on-select></v-select>
104
- </div>
105
- <div class="col-sm-2 form-group">
106
- <label class="font_normal_body">气表品牌</label>
107
- <v-select :value.sync="model.f_meter_brand"
108
- v-model="model.f_meter_brand"
109
- :options='$parent.$parent.meterbrands' placeholder='请选择'
110
- condition="f_meter_brand = '{}'"
111
- close-on-select></v-select>
112
- </div>
113
- <div class="col-sm-2 form-group">
114
- <label class="font_normal_body">气价名称</label>
115
- <v-select :value.sync="model.f_price_name"
116
- v-model="model.f_price_name"
117
- :options="$parent.$parent.pricenames" placeholder='气价名称'
118
- condition="f_price_name in {}"
119
- ></v-select>
120
- </div>
121
- <div class="col-sm-2 form-group">
122
- <label class="font_normal_body">补气状态</label>
123
- <v-select :value.sync="model.f_state"
124
- v-model="model.f_state"
125
- :options='$parent.$parent.chargeState' placeholder='请选择'
126
- condition="f_state = '{}'"
127
- close-on-select></v-select>
128
- </div>
129
- <div class="col-sm-2 form-group">
130
- <label class="font_normal_body">用户类型</label>
131
- <v-select :value.sync="model.f_user_type" v-model="model.f_user_type"
132
- :options='$parent.$parent.usertypes' placeholder='请选择'
133
- @change="$parent.$parent.userTypeChange()"
134
- condition="f_user_type = '{}'"
135
- close-on-select></v-select>
136
- </div>
137
- <div class="col-sm-2 form-group">
138
- <label class="font_normal_body">用气性质</label>
139
- <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
140
- :options='$parent.$parent.gasproperties' placeholder='请选择'
141
- condition="f_gasproperties = '{}'"
142
- close-on-select></v-select>
143
- </div>
144
- </div>
145
-
146
- </div>
147
- </criteria>
148
-
149
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
150
- <template partial='head'>
151
- <tr>
152
- <th>
153
- <!-- <nobr>用户编号</nobr>-->
154
- <data-order field="f_userinfo_code" name="用户编号"
155
- :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
156
- </th>
157
- <th>
158
- <nobr>用户名称</nobr>
159
- </th>
160
- <th>
161
- <!-- <nobr>用户地址</nobr>-->
162
- <data-order field="f_address" name="用户地址"
163
- :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
164
- </th>
165
- <th>
166
- <nobr>档案编号</nobr>
167
- </th>
168
- <th>
169
- <nobr>用户类型</nobr>
170
- </th>
171
- <th>
172
- <nobr>用户电话</nobr>
173
- </th>
174
- <th>
175
- <nobr>表号</nobr>
176
- </th>
177
- <th>
178
- <nobr>卡号</nobr>
179
- </th>
180
- <th>
181
- <nobr>气表品牌</nobr>
182
- </th>
183
- <th>
184
- <nobr>补气量</nobr>
185
- </th>
186
- <th>
187
- <nobr>补气金额</nobr>
188
- </th>
189
- <th>
190
- <nobr>补气类型</nobr>
191
- </th>
192
- <th>
193
- <!-- <nobr>补气日期</nobr>-->
194
- <data-order field="f_operate_date" name="补气日期"
195
- :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
196
- </th>
197
- <th>
198
- <nobr>补气原因</nobr>
199
- </th>
200
- <th>
201
- <nobr>操作员</nobr>
202
- </th>
203
- <th>
204
- <nobr>部门</nobr>
205
- </th>
206
- <th>
207
- <nobr>公司</nobr>
208
- </th>
209
- <th><nobr>附件</nobr></th>
210
- </tr>
211
- </template>
212
- <template partial='body'>
213
- <td style="text-align: center;">
214
- <nobr>
215
- <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
216
- </td>
217
- <td style="text-align: center;">
218
- <nobr>{{row.f_user_name}}</nobr>
219
- </td>
220
- <td style="text-align: center;">
221
- <nobr>{{row.f_address}}</nobr>
222
- </td>
223
- <td style="text-align: center;">
224
- <nobr>{{row.f_olduserinfo_code}}</nobr>
225
- </td>
226
- <td style="text-align: center;">
227
- <nobr>{{row.f_user_type}}</nobr>
228
- </td>
229
- <td style="text-align: center;">
230
- <nobr>{{row.f_user_phone}}</nobr>
231
- </td>
232
- <td style="text-align: center;">
233
- <nobr>{{row.f_meternumber}}</nobr>
234
- </td>
235
- <td style="text-align: center;">
236
- <nobr>{{row.f_card_id}}</nobr>
237
- </td>
238
- <td style="text-align: center;">
239
- <nobr>{{row.f_meter_brand}}</nobr>
240
- </td>
241
- <td style="text-align: center;">
242
- <nobr>{{row.f_pregas}}</nobr>
243
- </td>
244
- <td style="text-align: center;">
245
- <nobr>{{row.f_preamount}}</nobr>
246
- </td>
247
- <td style="text-align: center;">
248
- <nobr>{{row.f_type}}</nobr>
249
- </td>
250
- <td style="text-align: center;">
251
- <nobr>{{row.f_operate_date}}</nobr>
252
- </td>
253
- <td style="text-align: center;">
254
- <nobr>{{row.f_comments}}</nobr>
255
- </td>
256
- <td style="text-align: center;">
257
- <nobr>{{row.f_operator}}</nobr>
258
- </td>
259
- <td style="text-align: center;">
260
- <nobr>{{row.f_depname}}</nobr>
261
- </td>
262
- <td style="text-align: center;">
263
- <nobr>{{row.f_orgname}}</nobr>
264
- </td>
265
- <td style="text-align: center;"><nobr>
266
- <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
267
- </nobr></td>
268
- </template>
269
- <template partial='foot'></template>
270
- </data-grid>
271
- </criteria-paged>
272
-
273
- <table class="table-hover">
274
- <tr style="position: relative" class="table-bordered">
275
- <td
276
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
277
- 汇总信息
278
- </td>
279
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
280
- 补气量合计:&emsp;{{sumsmodel.f_pregas}}
281
- </td>
282
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
283
- 补气金额合计:&emsp;{{sumsmodel.f_preamount}}
284
- </td>
285
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
286
- 户数合计:&emsp;{{sumsmodel.hushu}}
287
- </td>
288
- </tr>
289
- </table>
290
- </div>
291
- <div class="flex" v-if="show">
292
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
293
- </div>
294
- </div>
295
- <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
296
- <article slot="modal-body">
297
- <upload :blodid="selected.f_userinfo_id" v-ref:upload isupload="false" takeimg="false" fusetype="补气" :isremark="false" style="width:auto" ></upload>
298
- </article>
299
- <footer slot="modal-footer" class="modal-footer">
300
- </footer>
301
- </modal>
302
- </div>
303
- </template>
304
-
305
- <script>
306
- import {PagedList} from 'vue-client'
307
- import defaultPrint from './config/DefaultPrint'
308
- import exportConfig from './config/exportConfig'
309
-
310
- let readySomething = async function (self) {
311
-
312
- self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
313
- self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
314
- // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
315
- // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
316
- // await self.$refs.paged.$refs.cri.search()
317
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
318
- self.initParams()
319
- await self.$MagLoadParams.loadParam()
320
- self.getPricenames()
321
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
322
- }
323
- export default {
324
- props:['data'],
325
- title: '补气查询',
326
- data() {
327
- return {
328
- data: {},
329
- other:[],
330
- footer:[],
331
- model: new PagedList('rs/sql/fillGasQuery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`}, {f_pregas: 0,f_preamount: 0,hushu:0}),
332
- criteriaShow: false,
333
- headData: ["用户编号", "用户名称", "用户电话", "身份证号", "地址", "补气类型", "表编号", "卡号", "气表品牌", "气表状态", "补气量", "补气日期", "操作员", "部门", "公司"],
334
- bodyData: ["f_userinfo_code", "f_user_name", "f_user_phone", "f_idnumber", "address", "f_type", "f_user_id", "f_card_id", "f_meter_brand", "f_table_state", "f_fillgas", "f_operate_date", "f_operator", "f_depname", "f_orgname"],
335
- orgCondtionStr: '',
336
- config: {
337
- defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone', 'f_idnumber', 'f_type', 'f_meter_brand', 'f_fillgas','f_operate_date', 'f_operator']
338
- },
339
- //排序
340
- orderitem:'f_operate_date desc',
341
- orderFields: {
342
- f_operate_date: 'no'
343
- },
344
- //默认打印列
345
- defaultfield: [],
346
- modelval: [],
347
- printshow: false,
348
- all: false,
349
- fields: {},
350
- thead: '',
351
- tfoot: '',
352
- show:false,
353
- rowdata:{},
354
- meterbrands: [],
355
- pricenames:[],
356
- filltype: [],
357
- initres: {
358
- org:[this.$login.f.orgid],
359
- dep:[],
360
- user:[],
361
- },
362
- showupload:false,
363
- selected:{},
364
- gasproperties:[],
365
- //合计数据
366
- sumsmodel: {},
367
- metertypes: this.$appdata.getParam('气表类型')?[{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]:[]
368
-
369
- }
370
- },
371
- ready() {
372
- readySomething(this).then(() => {
373
- this.$emit('ready')
374
- }).catch((error) => {
375
- this.$emit('error', error)
376
- })
377
- },
378
- methods: {
379
- view(row){
380
- this.showupload = true
381
- this.selected= row
382
- },
383
- getotherfooter(){
384
- // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
385
- // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
386
- this.other=[];
387
- this.footer=[];
388
- let exportdata = this.getCondition;
389
- let otherInData=[];
390
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
391
- let footerData=[],exportfield=this.getfield;
392
- footerData.push("合计");
393
- let self = this;
394
- for(var field in self.sumsmodel){
395
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
396
- }
397
- this.footer.push(footerData);
398
- this.other.push(otherInData);
399
- },
400
- sort (field, rule) {
401
- // 将所有排序方式设为不排序,实现相互排斥
402
- for (let key in this.orderFields) {
403
- if (key === field) {
404
- this.orderFields[key] = rule
405
- } else {
406
- this.orderFields[key] = 'no'
407
- }
408
- }
409
- // 如果新规则不排序,还原为默认排序
410
- if (rule === 'no') {
411
- this.model.paramSource.orderitem = `'${this.orderitem}'`
412
- } else {
413
- this.model.paramSource.orderitem = `'${field} ${rule}'`
414
- }
415
-
416
- this.search()
417
- },
418
- search(){
419
- this.$refs.paged.$refs.cri.search()
420
- },
421
- initParams() {
422
- // 初始化气表品牌
423
- let brandArr = []
424
- let typeArr = []
425
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
426
- let temp = {}
427
- let temp2 = {}
428
- temp.label = item.label
429
- temp.value = item.value.f_meter_brand
430
- temp2.value = item.value.f_type
431
- brandArr.push(temp)
432
- typeArr.push(temp2)
433
- })
434
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
435
- this.filltype = [{label: '全部', value: ''}, ...typeArr]
436
- },
437
- getPricenames() {
438
- this.pricenames = []
439
- let priceArr = []
440
- this.$MagGetSaleParam.prices.forEach((item) => {
441
- let temp = {}
442
- temp.label = item.f_price_name
443
- temp.value = item.f_price_name
444
- priceArr.push(temp)
445
- })
446
- this.pricenames = [{label: '全部', value: ''}, ...priceArr]
447
- },
448
- selfSearch(args) {
449
- if (this.data) {
450
- this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
451
- this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
452
- }
453
- args.condition = `${args.condition}` + this.orgCondtionStr
454
- args.condition = args.condition.replace(/f_zones/, "f_slice_area")
455
- this.model.search(args.condition, args.model)
456
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
457
- this.sumsmodel.hushu=[...new Set(this.$refs.paged.$refs.grid.model.rows.map(item => item.f_userinfo_code))].length
458
- console.log("this.sumsmodel",this.sumsmodel,this.$refs.paged.$refs.grid)
459
- },
460
- clear() {
461
- //清空部门和人员
462
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
463
- //部门和人员变为全选
464
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
465
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
466
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
467
- this.$refs.paged.$refs.cri.model[key] = []
468
- })
469
- },
470
- show() {
471
- this.criteriaShow = true
472
- },
473
- hidden() {
474
- this.criteriaShow = !this.criteriaShow
475
- },
476
- getRes(condition) {
477
- this.orgCondtionStr = condition
478
- },
479
- stamp() {
480
- this.all = false
481
- //默认选择要打印的列
482
- this.modelval = defaultPrint.config
483
- this.fields = this.getfield
484
- console.log('所有打印字段', this.fields)
485
- this.printshow = true
486
- this.put()
487
- },
488
- cancel() {
489
- this.show = false
490
- },
491
- dealmsg(val) {
492
- console.log('---------------dealmsg')
493
- this.rowdata=val
494
- this.show=true
495
- val.model = this.model.model
496
- this.$dispatch('deal-msg', val)
497
- },
498
- put() {
499
- // 对Modelval进行排序
500
- this.sortModelval()
501
- this.thead = `<tr><th colspan=${this.modelval.length}>补气查询统计报表</th></tr><tr>`
502
- for (let key of this.modelval) {
503
- this.thead += '<th>' + this.fields[key] + '</th>'
504
- }
505
- this.thead += '</tr>'
506
- },
507
- print() {
508
- this.$refs.print.PrintAsFile()
509
- this.printshow = false
510
- },
511
- close() {
512
- this.printshow = false
513
- this.all = false
514
- },
515
- // 对选择的列进行排序
516
- sortModelval() {
517
- let sortModel = []
518
- Object.keys(this.fields).forEach((key) => {
519
- if (this.modelval.includes(key)) {
520
- sortModel.push(key)
521
- }
522
- })
523
- this.modelval = sortModel
524
- console.log('选择的打印的字段', this.modelval)
525
- },
526
- async updateParams() {
527
- await this.$MagLoadParams.loadParam(this.f_filialeid)
528
- this.initParams()
529
- },
530
- userTypeChange () {
531
- this.gasproperties=[]
532
- if(this.$refs.paged.$refs.cri.model !==null) {
533
- this.$refs.paged.$refs.cri.model.f_gasproperties=''
534
- this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
535
- }
536
- else{
537
- this.gasproperties =[{label: '全部', value: ''}]
538
- }
539
- }
540
- },
541
- watch: {
542
- 'all'(val) {
543
- if (val) {
544
- this.modelval = this.bodyData
545
- } else {
546
- this.modelval = defaultPrint.config
547
- this.put()
548
- }
549
- },
550
- 'modelval.length'() {
551
- this.put()
552
- },
553
- sumsmodel:{
554
- handler: function(val) {
555
- this.getotherfooter();
556
- },
557
- deep: true
558
- },
559
- 'orgCondtionStr'(val) {
560
- let res = val.match(/'(.*?)'/)
561
- console.log('正则提取:',res && res[1])
562
- if (res) {
563
- this.f_filialeid = res[1]
564
- this.updateParams()
565
- }
566
- }
567
- },
568
- computed: {
569
- getCondition() {
570
- return {
571
- condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
572
- orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"}
573
- },
574
- getfield() {
575
- return exportConfig.fillgasConfig
576
- },
577
- fillGasTypes() {
578
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气类型')]
579
- },
580
- chargeState() {
581
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气状态')]
582
- },
583
- usertypes() {
584
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
585
- }
586
- }
587
- }
588
- </script>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex" v-if="!show">
5
+
6
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
7
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
+ <div class="row">
10
+ <div class="col-sm-2 form-group">
11
+ <label 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_address"
23
+ condition="f_address like '%{}%'" placeholder='用户地址'>
24
+ </div>
25
+ <div class="col-sm-2 form-group">
26
+ <label class="font_normal_body" title="旧用户编号">档案编号</label>
27
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
28
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
29
+ </div>
30
+
31
+ <div class="span" style="float:right;">
32
+ <button class="button_search button_spacing" @click="search()">查询</button>
33
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
34
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
35
+
36
+ <export-excel :data="$parent.$parent.getCondition"
37
+ :field="$parent.$parent.getfield"
38
+ :footer="$parent.$parent.footer"
39
+ :header="$parent.$parent.other"
40
+ sqlurl="rs/logic/exportfile" sql-name="fillGasQuery" template-name='补气查询导出'
41
+ :choose-col="true"></export-excel>
42
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
43
+ :defaultfield="$parent.$parent.defaultfield"
44
+ titletable="补气记录"
45
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
46
+ <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>
47
+ </div>
48
+ </div>
49
+
50
+ <div class="row" v-show="$parent.$parent.criteriaShow">
51
+ <div class="col-sm-2 form-group">
52
+ <label for="startDate" class="font_normal_body">开始日期</label>
53
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
54
+ v-model="model.startDate"
55
+ :value.sync="model.startDate"
56
+ :format="'yyyy-MM-dd HH:mm:ss'"
57
+ :show-reset-button="true"
58
+ condition="f_operate_date >= '{}'">
59
+ </datepicker>
60
+ </div>
61
+ <div class="col-sm-2 form-group">
62
+ <label for="endDate" class="font_normal_body">结束日期</label>
63
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
64
+ v-model="model.endDate"
65
+ :value.sync="model.endDate"
66
+ :format="'yyyy-MM-dd HH:mm:ss'"
67
+ :show-reset-button="true"
68
+ condition="f_operate_date <= '{}'">
69
+ </datepicker>
70
+ </div>
71
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" :cascade =true v-ref:sel></res-select-group>
72
+ <div class="col-sm-2 form-group">
73
+ <label class="font_normal_body">用户电话</label>
74
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
75
+ condition="f_user_phone like '%{}%'" placeholder="用户电话">
76
+ </div>
77
+ <div class="col-sm-2 form-group">
78
+ <label class="font_normal_body">补气类型</label>
79
+ <v-select :value.sync="model.f_type"
80
+ v-model="model.f_type"
81
+ :multiple="true"
82
+ :options='$parent.$parent.fillGasTypes' placeholder='请选择'
83
+ condition="f_type in {}"
84
+ close-on-select></v-select>
85
+ <!--:options='$parent.$parent.fillGasTypes' placeholder='请选择'-->
86
+ </div>
87
+
88
+ <div class="col-sm-2 form-group">
89
+ <label class="font_normal_body">卡&emsp;&emsp;号</label>
90
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
91
+ condition="f_card_id like '%{}%'" placeholder='卡号'>
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_meternumber"
96
+ condition="f_meternumber = '{}'" placeholder='表号'>
97
+ </div>
98
+ <div class="col-sm-2 form-group">
99
+ <label class="font_normal_body">气表类型</label>
100
+ <v-select :value.sync="model.f_meter_type" multiple
101
+ :options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_type"
102
+ condition="f_meter_type in {}"
103
+ close-on-select></v-select>
104
+ </div>
105
+ <div class="col-sm-2 form-group">
106
+ <label class="font_normal_body">气表品牌</label>
107
+ <v-select :value.sync="model.f_meter_brand"
108
+ v-model="model.f_meter_brand"
109
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
110
+ condition="f_meter_brand = '{}'"
111
+ close-on-select></v-select>
112
+ </div>
113
+ <div class="col-sm-2 form-group">
114
+ <label class="font_normal_body">气价名称</label>
115
+ <v-select :value.sync="model.f_price_name"
116
+ v-model="model.f_price_name"
117
+ :options="$parent.$parent.pricenames" placeholder='气价名称'
118
+ condition="f_price_name in {}"
119
+ ></v-select>
120
+ </div>
121
+ <div class="col-sm-2 form-group">
122
+ <label class="font_normal_body">补气状态</label>
123
+ <v-select :value.sync="model.f_state"
124
+ v-model="model.f_state"
125
+ :options='$parent.$parent.chargeState' placeholder='请选择'
126
+ condition="f_state = '{}'"
127
+ close-on-select></v-select>
128
+ </div>
129
+ <div class="col-sm-2 form-group">
130
+ <label class="font_normal_body">用户类型</label>
131
+ <v-select :value.sync="model.f_user_type" v-model="model.f_user_type"
132
+ :options='$parent.$parent.usertypes' placeholder='请选择'
133
+ @change="$parent.$parent.userTypeChange()"
134
+ condition="f_user_type = '{}'"
135
+ close-on-select></v-select>
136
+ </div>
137
+ <div class="col-sm-2 form-group">
138
+ <label class="font_normal_body">用气性质</label>
139
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
140
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
141
+ condition="f_gasproperties = '{}'"
142
+ close-on-select></v-select>
143
+ </div>
144
+ </div>
145
+
146
+ </div>
147
+ </criteria>
148
+
149
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
150
+ <template partial='head'>
151
+ <tr>
152
+ <th>
153
+ <!-- <nobr>用户编号</nobr>-->
154
+ <data-order field="f_userinfo_code" name="用户编号"
155
+ :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
156
+ </th>
157
+ <th>
158
+ <nobr>用户名称</nobr>
159
+ </th>
160
+ <th>
161
+ <!-- <nobr>用户地址</nobr>-->
162
+ <data-order field="f_address" name="用户地址"
163
+ :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
164
+ </th>
165
+ <th>
166
+ <nobr>档案编号</nobr>
167
+ </th>
168
+ <th>
169
+ <nobr>用户类型</nobr>
170
+ </th>
171
+ <th>
172
+ <nobr>用户电话</nobr>
173
+ </th>
174
+ <th>
175
+ <nobr>表号</nobr>
176
+ </th>
177
+ <th>
178
+ <nobr>卡号</nobr>
179
+ </th>
180
+ <th>
181
+ <nobr>气表品牌</nobr>
182
+ </th>
183
+ <th>
184
+ <nobr>补气量</nobr>
185
+ </th>
186
+ <th>
187
+ <nobr>补气金额</nobr>
188
+ </th>
189
+ <th>
190
+ <nobr>补气类型</nobr>
191
+ </th>
192
+ <th>
193
+ <!-- <nobr>补气日期</nobr>-->
194
+ <data-order field="f_operate_date" name="补气日期"
195
+ :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
196
+ </th>
197
+ <th>
198
+ <nobr>补气原因</nobr>
199
+ </th>
200
+ <th>
201
+ <nobr>操作员</nobr>
202
+ </th>
203
+ <th>
204
+ <nobr>部门</nobr>
205
+ </th>
206
+ <th>
207
+ <nobr>公司</nobr>
208
+ </th>
209
+ <th><nobr>附件</nobr></th>
210
+ </tr>
211
+ </template>
212
+ <template partial='body'>
213
+ <td style="text-align: center;">
214
+ <nobr>
215
+ <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
216
+ </td>
217
+ <td style="text-align: center;">
218
+ <nobr>{{row.f_user_name}}</nobr>
219
+ </td>
220
+ <td style="text-align: center;">
221
+ <nobr>{{row.f_address}}</nobr>
222
+ </td>
223
+ <td style="text-align: center;">
224
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
225
+ </td>
226
+ <td style="text-align: center;">
227
+ <nobr>{{row.f_user_type}}</nobr>
228
+ </td>
229
+ <td style="text-align: center;">
230
+ <nobr>{{row.f_user_phone}}</nobr>
231
+ </td>
232
+ <td style="text-align: center;">
233
+ <nobr>{{row.f_meternumber}}</nobr>
234
+ </td>
235
+ <td style="text-align: center;">
236
+ <nobr>{{row.f_card_id}}</nobr>
237
+ </td>
238
+ <td style="text-align: center;">
239
+ <nobr>{{row.f_meter_brand}}</nobr>
240
+ </td>
241
+ <td style="text-align: center;">
242
+ <nobr>{{row.f_pregas}}</nobr>
243
+ </td>
244
+ <td style="text-align: center;">
245
+ <nobr>{{row.f_preamount}}</nobr>
246
+ </td>
247
+ <td style="text-align: center;">
248
+ <nobr>{{row.f_type}}</nobr>
249
+ </td>
250
+ <td style="text-align: center;">
251
+ <nobr>{{row.f_operate_date}}</nobr>
252
+ </td>
253
+ <td style="text-align: center;">
254
+ <nobr>{{row.f_comments}}</nobr>
255
+ </td>
256
+ <td style="text-align: center;">
257
+ <nobr>{{row.f_operator}}</nobr>
258
+ </td>
259
+ <td style="text-align: center;">
260
+ <nobr>{{row.f_depname}}</nobr>
261
+ </td>
262
+ <td style="text-align: center;">
263
+ <nobr>{{row.f_orgname}}</nobr>
264
+ </td>
265
+ <td style="text-align: center;"><nobr>
266
+ <button class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
267
+ </nobr></td>
268
+ </template>
269
+ <template partial='foot'></template>
270
+ </data-grid>
271
+ </criteria-paged>
272
+
273
+ <table class="table-hover">
274
+ <tr style="position: relative" class="table-bordered">
275
+ <td
276
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
277
+ 汇总信息
278
+ </td>
279
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
280
+ 补气量合计:&emsp;{{sumsmodel.f_pregas}}
281
+ </td>
282
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
283
+ 补气金额合计:&emsp;{{sumsmodel.f_preamount}}
284
+ </td>
285
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
286
+ 户数合计:&emsp;{{sumsmodel.hushu}}
287
+ </td>
288
+ </tr>
289
+ </table>
290
+ </div>
291
+ <div class="flex" v-if="show">
292
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
293
+ </div>
294
+ </div>
295
+ <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
296
+ <article slot="modal-body">
297
+ <upload :blodid="selected.f_userinfo_id" v-ref:upload isupload="false" takeimg="false" fusetype="补气" :isremark="false" style="width:auto" ></upload>
298
+ </article>
299
+ <footer slot="modal-footer" class="modal-footer">
300
+ </footer>
301
+ </modal>
302
+ </div>
303
+ </template>
304
+
305
+ <script>
306
+ import {PagedList} from 'vue-client'
307
+ import defaultPrint from './config/DefaultPrint'
308
+ import exportConfig from './config/exportConfig'
309
+
310
+ let readySomething = async function (self) {
311
+
312
+ self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
313
+ self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
314
+ // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
315
+ // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
316
+ // await self.$refs.paged.$refs.cri.search()
317
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
318
+ self.initParams()
319
+ await self.$MagLoadParams.loadParam()
320
+ self.getPricenames()
321
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
322
+ }
323
+ export default {
324
+ props:['data'],
325
+ title: '补气查询',
326
+ data() {
327
+ return {
328
+ data: {},
329
+ other:[],
330
+ footer:[],
331
+ model: new PagedList('rs/sql/fillGasQuery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`}, {f_pregas: 0,f_preamount: 0,hushu:0}),
332
+ criteriaShow: false,
333
+ headData: ["用户编号", "用户名称", "用户电话", "身份证号", "地址", "补气类型", "表编号", "卡号", "气表品牌", "气表状态", "补气量", "补气日期", "操作员", "部门", "公司"],
334
+ bodyData: ["f_userinfo_code", "f_user_name", "f_user_phone", "f_idnumber", "address", "f_type", "f_user_id", "f_card_id", "f_meter_brand", "f_table_state", "f_fillgas", "f_operate_date", "f_operator", "f_depname", "f_orgname"],
335
+ orgCondtionStr: '',
336
+ config: {
337
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone', 'f_idnumber', 'f_type', 'f_meter_brand', 'f_fillgas','f_operate_date', 'f_operator']
338
+ },
339
+ //排序
340
+ orderitem:'f_operate_date desc',
341
+ orderFields: {
342
+ f_operate_date: 'no'
343
+ },
344
+ //默认打印列
345
+ defaultfield: [],
346
+ modelval: [],
347
+ printshow: false,
348
+ all: false,
349
+ fields: {},
350
+ thead: '',
351
+ tfoot: '',
352
+ show:false,
353
+ rowdata:{},
354
+ meterbrands: [],
355
+ pricenames:[],
356
+ filltype: [],
357
+ initres: {
358
+ org:[this.$login.f.orgid],
359
+ dep:[],
360
+ user:[],
361
+ },
362
+ showupload:false,
363
+ selected:{},
364
+ gasproperties:[],
365
+ //合计数据
366
+ sumsmodel: {},
367
+ metertypes: this.$appdata.getParam('气表类型')?[{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]:[]
368
+
369
+ }
370
+ },
371
+ ready() {
372
+ readySomething(this).then(() => {
373
+ this.$emit('ready')
374
+ }).catch((error) => {
375
+ this.$emit('error', error)
376
+ })
377
+ },
378
+ methods: {
379
+ view(row){
380
+ this.showupload = true
381
+ this.selected= row
382
+ },
383
+ getotherfooter(){
384
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
385
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
386
+ this.other=[];
387
+ this.footer=[];
388
+ let exportdata = this.getCondition;
389
+ let otherInData=[];
390
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
391
+ let footerData=[],exportfield=this.getfield;
392
+ footerData.push("合计");
393
+ let self = this;
394
+ for(var field in self.sumsmodel){
395
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
396
+ }
397
+ this.footer.push(footerData);
398
+ this.other.push(otherInData);
399
+ },
400
+ sort (field, rule) {
401
+ // 将所有排序方式设为不排序,实现相互排斥
402
+ for (let key in this.orderFields) {
403
+ if (key === field) {
404
+ this.orderFields[key] = rule
405
+ } else {
406
+ this.orderFields[key] = 'no'
407
+ }
408
+ }
409
+ // 如果新规则不排序,还原为默认排序
410
+ if (rule === 'no') {
411
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
412
+ } else {
413
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
414
+ }
415
+
416
+ this.search()
417
+ },
418
+ search(){
419
+ this.$refs.paged.$refs.cri.search()
420
+ },
421
+ initParams() {
422
+ // 初始化气表品牌
423
+ let brandArr = []
424
+ let typeArr = []
425
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
426
+ let temp = {}
427
+ let temp2 = {}
428
+ temp.label = item.label
429
+ temp.value = item.value.f_meter_brand
430
+ temp2.value = item.value.f_type
431
+ brandArr.push(temp)
432
+ typeArr.push(temp2)
433
+ })
434
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
435
+ this.filltype = [{label: '全部', value: ''}, ...typeArr]
436
+ },
437
+ getPricenames() {
438
+ this.pricenames = []
439
+ let priceArr = []
440
+ this.$MagGetSaleParam.prices.forEach((item) => {
441
+ let temp = {}
442
+ temp.label = item.f_price_name
443
+ temp.value = item.f_price_name
444
+ priceArr.push(temp)
445
+ })
446
+ this.pricenames = [{label: '全部', value: ''}, ...priceArr]
447
+ },
448
+ selfSearch(args) {
449
+ if (this.data) {
450
+ this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
451
+ this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
452
+ }
453
+ args.condition = `${args.condition}` + this.orgCondtionStr
454
+ args.condition = args.condition.replace(/f_zones/, "f_slice_area")
455
+ this.model.search(args.condition, args.model)
456
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
457
+ this.sumsmodel.hushu=[...new Set(this.$refs.paged.$refs.grid.model.rows.map(item => item.f_userinfo_code))].length
458
+ console.log("this.sumsmodel",this.sumsmodel,this.$refs.paged.$refs.grid)
459
+ },
460
+ clear() {
461
+ //清空部门和人员
462
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
463
+ //部门和人员变为全选
464
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
465
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
466
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
467
+ this.$refs.paged.$refs.cri.model[key] = []
468
+ })
469
+ },
470
+ show() {
471
+ this.criteriaShow = true
472
+ },
473
+ hidden() {
474
+ this.criteriaShow = !this.criteriaShow
475
+ },
476
+ getRes(condition) {
477
+ this.orgCondtionStr = condition
478
+ },
479
+ stamp() {
480
+ this.all = false
481
+ //默认选择要打印的列
482
+ this.modelval = defaultPrint.config
483
+ this.fields = this.getfield
484
+ console.log('所有打印字段', this.fields)
485
+ this.printshow = true
486
+ this.put()
487
+ },
488
+ cancel() {
489
+ this.show = false
490
+ },
491
+ dealmsg(val) {
492
+ console.log('---------------dealmsg')
493
+ this.rowdata=val
494
+ this.show=true
495
+ val.model = this.model.model
496
+ this.$dispatch('deal-msg', val)
497
+ },
498
+ put() {
499
+ // 对Modelval进行排序
500
+ this.sortModelval()
501
+ this.thead = `<tr><th colspan=${this.modelval.length}>补气查询统计报表</th></tr><tr>`
502
+ for (let key of this.modelval) {
503
+ this.thead += '<th>' + this.fields[key] + '</th>'
504
+ }
505
+ this.thead += '</tr>'
506
+ },
507
+ print() {
508
+ this.$refs.print.PrintAsFile()
509
+ this.printshow = false
510
+ },
511
+ close() {
512
+ this.printshow = false
513
+ this.all = false
514
+ },
515
+ // 对选择的列进行排序
516
+ sortModelval() {
517
+ let sortModel = []
518
+ Object.keys(this.fields).forEach((key) => {
519
+ if (this.modelval.includes(key)) {
520
+ sortModel.push(key)
521
+ }
522
+ })
523
+ this.modelval = sortModel
524
+ console.log('选择的打印的字段', this.modelval)
525
+ },
526
+ async updateParams() {
527
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
528
+ this.initParams()
529
+ },
530
+ userTypeChange () {
531
+ this.gasproperties=[]
532
+ if(this.$refs.paged.$refs.cri.model !==null) {
533
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
534
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
535
+ }
536
+ else{
537
+ this.gasproperties =[{label: '全部', value: ''}]
538
+ }
539
+ }
540
+ },
541
+ watch: {
542
+ 'all'(val) {
543
+ if (val) {
544
+ this.modelval = this.bodyData
545
+ } else {
546
+ this.modelval = defaultPrint.config
547
+ this.put()
548
+ }
549
+ },
550
+ 'modelval.length'() {
551
+ this.put()
552
+ },
553
+ sumsmodel:{
554
+ handler: function(val) {
555
+ this.getotherfooter();
556
+ },
557
+ deep: true
558
+ },
559
+ 'orgCondtionStr'(val) {
560
+ let res = val.match(/'(.*?)'/)
561
+ console.log('正则提取:',res && res[1])
562
+ if (res) {
563
+ this.f_filialeid = res[1]
564
+ this.updateParams()
565
+ }
566
+ }
567
+ },
568
+ computed: {
569
+ getCondition() {
570
+ return {
571
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
572
+ orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"}
573
+ },
574
+ getfield() {
575
+ return exportConfig.fillgasConfig
576
+ },
577
+ fillGasTypes() {
578
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气类型')]
579
+ },
580
+ chargeState() {
581
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气状态')]
582
+ },
583
+ usertypes() {
584
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
585
+ }
586
+ }
587
+ }
588
+ </script>