manage-client 3.3.178 → 3.3.179

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 (42) hide show
  1. package/build/dev-server.js +7 -11
  2. package/gradle/wrapper/gradle-wrapper.properties +5 -5
  3. package/gradlew +234 -234
  4. package/gradlew.bat +89 -89
  5. package/package.json +2 -2
  6. package/src/components/SellReport/BusinessClassify.vue +292 -292
  7. package/src/components/SellReport/GasMoneyPublicConReport.vue +258 -258
  8. package/src/components/handReport/WebGastypeMonthReport.vue +190 -190
  9. package/src/components/sale/businessquery/BusinessManage.vue +212 -212
  10. package/src/components/sale/businessquery/CardHandplanQuery.vue +546 -546
  11. package/src/components/sale/businessquery/FMYGasQuery.vue +813 -813
  12. package/src/components/sale/businessquery/TransferQuery.vue +502 -502
  13. package/src/components/sale/businessquery/WebMeterMonthUserGasQuery.vue +471 -471
  14. package/src/components/sale/config/exportConfig.js +1245 -1245
  15. package/src/components/sale/filesquery/RecordInfoQuery.vue +1443 -1443
  16. package/src/components/webmeter/gasStatistics/GasStatistics.vue +525 -525
  17. package/src/components/webmeter/gasStatistics/NewGasStatistics.vue +541 -541
  18. package/src/filiale/WEINAN/InspectListGas.vue +616 -616
  19. package/src/filiale/jingyang/RechargeList.vue +346 -346
  20. package/src/filiale/jingyang/sale.js +6 -6
  21. package/src/filiale/liaoyuan/HandplanQuery.vue +1289 -1289
  22. package/src/filiale/meihekou/CardHandplanQuery.vue +664 -664
  23. package/src/filiale/meihekou/ChargeQuery.vue +1274 -1274
  24. package/src/filiale/meihekou/HandplanQuery.vue +1248 -1248
  25. package/src/filiale/ningjin/UserLostContactAnalysis.vue +623 -623
  26. package/src/filiale/qianneng/exportConfig.js +232 -232
  27. package/src/filiale/shaoguan/errorHandplanQuery.vue +386 -386
  28. package/src/filiale/taizhoukesi/ChangeMeterQuery.vue +683 -683
  29. package/src/filiale/taizhoukesi/config/exportConfig.js +2379 -2379
  30. package/src/filiale/taizhoukesi/sale.js +11 -11
  31. package/src/filiale/tongchuan/InspectListGas.vue +700 -700
  32. package/src/filiale/tongchuan/ResSelectGroupNew.vue +188 -188
  33. package/src/filiale/yangchun/ManageBusSummaryNew.vue +239 -239
  34. package/src/filiale/yangchun/UserQuery.vue +980 -980
  35. package/src/filiale/yangchun/config/DefaultPrint.js +6 -6
  36. package/src/filiale/yangchun/config/exportConfig.js +1231 -1231
  37. package/src/filiale/yangchun/config/tableConfig.js +58 -58
  38. package/src/filiale/yangchun/reportManage.js +6 -6
  39. package/src/filiale/yangchun/sale.js +8 -8
  40. package/src/filiale/yangchun/webmeterManage.js +5 -5
  41. package/src/reportManage.js +768 -768
  42. package/src/saleManage.js +689 -689
@@ -1,471 +1,471 @@
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
- <criteria-paged :model="model" v-ref:paged>
6
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
- <div novalidate class="form-inline auto" partial>
8
- <div class="row">
9
- <div class="col-sm-2 form-group">
10
- <label class="font_normal_body">客户编号</label>
11
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
12
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
13
- </div>
14
- <div class="col-sm-2 form-group">
15
- <label class="font_normal_body">客户名称</label>
16
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
17
- condition="f_user_name like '%{}%'" placeholder="客户名称">
18
- </div>
19
- <div class="span" style="float:right;">
20
- <button class="button_search button_spacing" @click="search()">查询</button>
21
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
22
- <button :class="!$parent.$parent.isCurrentMonth ? 'button_new' : 'button_search button_spacing'"
23
- @click="$parent.$parent.currentMonth()">
24
- 查询当月
25
- </button>
26
- <button :class="$parent.$parent.isCurrentMonth ? 'button_new' : 'button_search button_spacing'"
27
- @click="$parent.$parent.historyMonth()">
28
- 历史查询
29
- </button>
30
- <export-excel :data="$parent.$parent.getCondition"
31
- :field="$parent.$parent.getfield"
32
- sqlurl="api/af-revenue/logic/openapi/exportfile"
33
- :sql-name="$parent.$parent.sqlName"
34
- template-name='物联网表月日用气报表'
35
- :choose-col="true">
36
- </export-excel>
37
- <div style="float: right" class="button_spacing"
38
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
39
- @click="$parent.$parent.hidden()"></div>
40
- </div>
41
- </div>
42
- <div class="row" v-show="$parent.$parent.criteriaShow">
43
- <res-select-group :show-component="$parent.$parent.resshow"
44
- :selectin="true"
45
- :initres="$parent.$parent.initres"
46
- @re-res="$parent.$parent.getRes"
47
- v-ref:sel>
48
- </res-select-group>
49
- <div class="col-sm-2 form-group">
50
- <label class="font_normal_body">客户地址</label>
51
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
52
- condition="f_address like '%{}%'" placeholder='客户地址'>
53
- </div>
54
- <div class="col-sm-2 form-group">
55
- <label class="font_normal_body">用气性质</label>
56
- <v-select :options='$parent.$parent.gasproperties'
57
- :value.sync="model.f_gasproperties"
58
- close-on-select
59
- condition="f_gasproperties = '{}'"
60
- placeholder='用气性质'
61
- style="width:60%"
62
- v-model="model.f_gasproperties"
63
- value-single="true">
64
- </v-select>
65
- </div>
66
- <div class="col-sm-2 form-group">
67
- <label class="font_normal_body">气表品牌</label>
68
- <v-select :value.sync="model.f_meter_brand"
69
- v-model="model.f_meter_brand"
70
- :options='$parent.$parent.meterbrands'
71
- placeholder='请选择'
72
- condition="f_meter_brand = '{}'"
73
- close-on-select></v-select>
74
- </div>
75
- <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
76
- <label class="font_normal_body">累计用气量</label>
77
- <div class="row">
78
- <input type="text" style="width:27%" class="input_search" v-model="model.f_total_gas1"
79
- condition="f_total_gas >= {} " placeholder="">
80
- <label class="font_normal_body"> ≤ x ≤ </label>
81
- <input type="text" style="width:27%" class="input_search" v-model="model.f_total_gas2"
82
- condition="f_total_gas <= {} " placeholder="">
83
- </div>
84
- </div>
85
- <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
86
- <label class="font_normal_body">日均用气量</label>
87
- <div class="row">
88
- <input type="text" style="width:27%" class="input_search" v-model="model.f_day_gas1"
89
- condition="f_day_gas >= {} " placeholder="">
90
- <label class="font_normal_body"> ≤ x ≤ </label>
91
- <input type="text" style="width:27%" class="input_search" v-model="model.f_day_gas2"
92
- condition="f_day_gas <= {} " placeholder="">
93
- </div>
94
- </div>
95
- <div class="col-sm-2 form-group" v-show="!$parent.$parent.isCurrentMonth">
96
- <label for="startDate" class="font_normal_body">开始月份</label>
97
- <datepicker id="startDate"
98
- placeholder="开始月份"
99
- style="width:60%"
100
- v-model="model.startMonth"
101
- :value.sync="model.startMonth"
102
- :format="'yyyy-MM'"
103
- :show-reset-button="true"
104
- >
105
- </datepicker>
106
- </div>
107
- <div class="col-sm-2 form-group" v-show="!$parent.$parent.isCurrentMonth">
108
- <label for="endDate" class="font_normal_body">结束月份</label>
109
- <datepicker id="endDate"
110
- placeholder="结束月份"
111
- style="width:60%"
112
- v-model="model.endMonth"
113
- :value.sync="model.endMonth"
114
- :format="'yyyy-MM'"
115
- :show-reset-button="true"
116
- >
117
- </datepicker>
118
- </div>
119
- <div class="col-sm-2 form-group" v-show="$parent.$parent.isCurrentMonth">
120
- <label for="startDate" class="font_normal_body">开始日期</label>
121
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
122
- v-model="model.startDate"
123
- :value.sync="model.startDate"
124
- :format="'yyyy-MM-dd'"
125
- :disabled="true"
126
- :show-reset-button="true"
127
- >
128
- </datepicker>
129
- </div>
130
- <div class="col-sm-2 form-group" v-show="$parent.$parent.isCurrentMonth">
131
- <label for="endDate" class="font_normal_body">结束日期</label>
132
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
133
- v-model="model.endDate"
134
- :value.sync="model.endDate"
135
- :format="'yyyy-MM-dd'"
136
- :disabled="true"
137
- :show-reset-button="true"
138
- >
139
- </datepicker>
140
- </div>
141
- </div>
142
- </div>
143
- </criteria>
144
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
145
- <template partial='head'>
146
- <tr>
147
- <th>
148
- <nobr>月份</nobr>
149
- </th>
150
- <th>
151
- <nobr>用户编号</nobr>
152
- </th>
153
- <th>
154
- <nobr>用户姓名</nobr>
155
- </th>
156
- <th>
157
- <nobr>用户电话</nobr>
158
- </th>
159
- <th>
160
- <nobr>用户地址</nobr>
161
- </th>
162
- <th>
163
- <nobr>用气性质</nobr>
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
- </tr>
181
- </template>
182
- <template partial='body'>
183
- <td style="text-align: center;">
184
- <nobr>{{ row.f_month }}</nobr>
185
- </td>
186
- <td style="text-align: center;">
187
- <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
188
- </td>
189
- <td style="text-align: center;">
190
- <nobr>{{ row.f_user_name }}</nobr>
191
- </td>
192
- <td style="text-align: center;">
193
- <nobr>{{ row.f_user_phone }}</nobr>
194
- </td>
195
- <td style="text-align: center;">
196
- <nobr>{{ row.f_address }}</nobr>
197
- </td>
198
- <td style="text-align: center;">
199
- <nobr>{{ row.f_gasproperties }}</nobr>
200
- </td>
201
- <td style="text-align: center;">
202
- <nobr>{{ row.f_calculation }}</nobr>
203
- </td>
204
- <td style="text-align: center;">
205
- <nobr>{{ row.f_meter_brand }}</nobr>
206
- </td>
207
- <td style="text-align: center;">
208
- <nobr>{{ row.f_total_gas }}</nobr>
209
- </td>
210
- <td style="text-align: center;">
211
- <nobr>{{ row.f_month_gas }}</nobr>
212
- </td>
213
- <td style="text-align: center;">
214
- <nobr>{{ row.f_day_gas }}</nobr>
215
- </td>
216
- </template>
217
- <template partial='foot'></template>
218
- </data-grid>
219
- </criteria-paged>
220
- </div>
221
- <div v-if="show">
222
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id"
223
- @cancel-main="cancel">
224
- </user-info-detail-manage-new>
225
- </div>
226
- </div>
227
- </div>
228
- </template>
229
- <script>
230
- import {PagedList} from 'vue-client'
231
- import exportConfig from '../../../components/sale/config/exportConfig'
232
- import plugins from "../../../plugins/GetLoginInfoService";
233
-
234
-
235
- let readySomething = async function (self) {
236
- self.initDate()
237
- await self.$MagLoadParams.loadParam()
238
- self.initParams()
239
- }
240
- export default {
241
- title: '物联网表月用气查询',
242
- name: 'WebMeterMonthUserGasQuery',
243
- data() {
244
- return {
245
- model: new PagedList('api/af-revenue/sql/manage_webMeterUserGasQueryCurrMonth', 20),
246
- initres: {
247
- org: [this.$login.f.orgid]
248
- },
249
- sqlName: 'manage_webMeterUserGasQueryCurrMonth',
250
- resshow: ['company'],
251
- isCurrentMonth: true,
252
- other: [],
253
- footer: [],
254
- rowdata: {},
255
- gasproperties: [],
256
- show: false,
257
- criteriaShow: false,
258
- orgCondtionStr: '',
259
- modelval: [],
260
- condition: '',
261
- printshow: false,
262
- all: false,
263
- fields: {},
264
- thead: '',
265
- tfoot: '',
266
- defaultfield: [],
267
- f_filialeid: this.$login.f.f_orgid,
268
- f_orgid: this.$login.f.orgid,
269
- f_depid: this.$login.f.depids,
270
- f_operatorid: this.$login.f.id,
271
- }
272
- },
273
- ready() {
274
- readySomething(this)
275
- },
276
- methods: {
277
- initDate () {
278
- this.$refs.paged.$refs.cri.model.startDate = this.$login.toStartAndEndDateString()[0]
279
- this.$refs.paged.$refs.cri.model.endDate = this.$login.toStandardDateString()
280
- },
281
- initParams() {
282
- // 初始化气表品牌
283
- let brandArr = []
284
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
285
- if (item.value.f_meter_type === '物联网表') {
286
- let temp = {}
287
- temp.label = item.label
288
- temp.value = item.value.f_meter_brand
289
- brandArr.push(temp)
290
- }
291
- })
292
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
293
- },
294
- currentMonth() {
295
- this.isCurrentMonth = true
296
- },
297
- historyMonth() {
298
- this.isCurrentMonth = false
299
- },
300
- // 加载抄表册
301
- loadMeterBooks() {
302
- this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
303
- },
304
- getotherfooter() {
305
- this.other = [];
306
- this.footer = [];
307
- let otherInData = [];
308
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
309
- let footerData = [], exportfield = this.getfield;
310
- footerData.push("合计");
311
- let self = this;
312
- for (var field in self.sumsmodel) {
313
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
314
- }
315
- this.footer.push(footerData);
316
- this.other.push(otherInData);
317
- },
318
- search() {
319
- this.$refs.paged.$refs.cri.search()
320
- },
321
- cancel() {
322
- this.show = false
323
- },
324
- areBothMonthsBeforeCurrent(dateStr1, dateStr2) {
325
- let now = new Date();
326
- let currentMonthStart = new Date(now.getFullYear(), now.getMonth(), 1)
327
- // 将字符串转换为标准日期对象,这里采用'yyyy-MM'格式避免潜在的解析问题
328
- let date1 = new Date(dateStr1.replace(/-/g, '/'))
329
- let date2 = new Date(dateStr2.replace(/-/g, '/'))
330
- // 比较两个日期是否都在当前月份之前
331
- return date1 < currentMonthStart && date2 < currentMonthStart
332
- },
333
- getLastDayOfMonth(dateString) {
334
- // 分割字符串获取年和月
335
- let [year, month] = dateString.split('-')
336
- // 创建一个新日期对象,注意月份需要减1
337
- let date = new Date(parseInt(year), parseInt(month) - 1, 1)
338
- // 获取下一个月的第一天,然后回退一天得到本月最后一天
339
- date.setMonth(date.getMonth() + 1)
340
- date.setDate(date.getDate() - 1)
341
- // 格式化为 "yyyy-mm-dd"
342
- return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`
343
- },
344
- selfSearch(args) {
345
- if (!this.orgCondtionStr) {
346
- args.condition = `${args.condition} and f_orgid = '${this.$login.f.orgid}'`
347
- } else {
348
- args.condition = args.condition + this.orgCondtionStr
349
- }
350
- if (this.isCurrentMonth ) {
351
- this.model.params.startDate = this.$refs.paged.$refs.cri.model.startDate
352
- this.model.params.endDate = this.$refs.paged.$refs.cri.model.endDate
353
- } else {
354
- if (this.$refs.paged.$refs.cri.model.startMonth && this.$refs.paged.$refs.cri.model.endMonth) {
355
- // 需要判断是选择月份
356
- if (this.areBothMonthsBeforeCurrent(this.$refs.paged.$refs.cri.model.startMonth,this.$refs.paged.$refs.cri.model.endMonth)) {
357
- this.model.params.startDate = this.$refs.paged.$refs.cri.model.startMonth + '-01'
358
- this.model.params.endDate = this.getLastDayOfMonth(this.$refs.paged.$refs.cri.model.endMonth)
359
- }else {
360
- this.$showMessage('请选择小于当前月份的开始月份和结束月份来查询历史数据!')
361
- return
362
- }
363
- } else {
364
- this.$showMessage('请选择开始月份和结束月份后再进行查询')
365
- return
366
- }
367
- }
368
- this.condition = args.condition
369
- this.model.search(args.condition, args.model)
370
- },
371
- clear() {
372
- //清空部门和人员
373
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
374
- //部门和人员变为全选
375
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
376
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
377
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
378
- this.$refs.paged.$refs.cri.model[key] = []
379
- })
380
- },
381
- show() {
382
- this.criteriaShow = true
383
- },
384
- hidden() {
385
- this.criteriaShow = !this.criteriaShow
386
- },
387
- showmsg(obj) {
388
- this.rowdata = obj
389
- this.show = true
390
- },
391
- getRes(condition, obj) {
392
- this.orgCondtionStr = condition
393
- },
394
- put() {
395
- // 对Modelval进行排序
396
- this.sortModelval()
397
- this.thead = `<tr><th colspan=${this.modelval.length}>非民用用气查询</th></tr><tr>`
398
- for (let key of this.modelval) {
399
- this.thead += '<th>' + this.fields[key] + '</th>'
400
- }
401
- this.thead += '</tr>'
402
- },
403
- print() {
404
- this.$refs.print.PrintAsFile()
405
- this.printshow = false
406
- },
407
- dealmsg(val) {
408
- this.rowdata = val
409
- this.show = true
410
- val.model = this.model.model
411
- this.$dispatch('deal-msg', val)
412
- },
413
- close() {
414
- this.printshow = false
415
- this.all = false
416
- },
417
- // 对选择的列进行排序
418
- sortModelval() {
419
- let sortModel = []
420
- Object.keys(this.fields).forEach((key) => {
421
- if (this.modelval.includes(key)) {
422
- sortModel.push(key)
423
- }
424
- })
425
- this.modelval = sortModel
426
- console.log('选择的打印的字段', this.modelval)
427
- }
428
- },
429
- computed: {
430
- metertype() {
431
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
432
- },
433
- gasproperties() {
434
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
435
- },
436
- getCondition() {
437
- return {
438
- condition: this.condition,
439
- startDate: this.$refs.paged.$refs.cri.model.startDate,
440
- endDate: this.$refs.paged.$refs.cri.model.endDate
441
- }
442
- },
443
- getfield() {
444
- return exportConfig.webMeterMonthUserGasConfig
445
- },
446
- usertypes() {
447
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
448
- },
449
- },
450
- events: {},
451
- watch: {
452
- 'isCurrentMonth' () {
453
- if (this.isCurrentMonth) {
454
- this.model.url = this.url = 'api/af-revenue/sql/manage_webMeterUserGasQueryCurrMonth'
455
- this.sqlName = 'manage_webMeterUserGasQueryCurrMonth'
456
- } else {
457
- this.model.url = this.url = 'api/af-revenue/sql/manage_webMeterUserGasQueryHisMonth'
458
- this.sqlName = 'manage_webMeterUserGasQueryHisMonth'
459
- }
460
- }
461
- }
462
- }
463
- </script>
464
- <style>
465
- .datapanel {
466
- color: #333;
467
- background-color: white;
468
- padding: 10px 20px;
469
- border-radius: 15px;
470
- }
471
- </style>
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
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
+ <div novalidate class="form-inline auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label class="font_normal_body">客户编号</label>
11
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
12
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
13
+ </div>
14
+ <div class="col-sm-2 form-group">
15
+ <label class="font_normal_body">客户名称</label>
16
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
17
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
18
+ </div>
19
+ <div class="span" style="float:right;">
20
+ <button class="button_search button_spacing" @click="search()">查询</button>
21
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
22
+ <button :class="!$parent.$parent.isCurrentMonth ? 'button_new' : 'button_search button_spacing'"
23
+ @click="$parent.$parent.currentMonth()">
24
+ 查询当月
25
+ </button>
26
+ <button :class="$parent.$parent.isCurrentMonth ? 'button_new' : 'button_search button_spacing'"
27
+ @click="$parent.$parent.historyMonth()">
28
+ 历史查询
29
+ </button>
30
+ <export-excel :data="$parent.$parent.getCondition"
31
+ :field="$parent.$parent.getfield"
32
+ sqlurl="api/af-revenue/logic/openapi/exportfile"
33
+ :sql-name="$parent.$parent.sqlName"
34
+ template-name='物联网表月日用气报表'
35
+ :choose-col="true">
36
+ </export-excel>
37
+ <div style="float: right" class="button_spacing"
38
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
39
+ @click="$parent.$parent.hidden()"></div>
40
+ </div>
41
+ </div>
42
+ <div class="row" v-show="$parent.$parent.criteriaShow">
43
+ <res-select-group :show-component="$parent.$parent.resshow"
44
+ :selectin="true"
45
+ :initres="$parent.$parent.initres"
46
+ @re-res="$parent.$parent.getRes"
47
+ v-ref:sel>
48
+ </res-select-group>
49
+ <div class="col-sm-2 form-group">
50
+ <label class="font_normal_body">客户地址</label>
51
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
52
+ condition="f_address like '%{}%'" placeholder='客户地址'>
53
+ </div>
54
+ <div class="col-sm-2 form-group">
55
+ <label class="font_normal_body">用气性质</label>
56
+ <v-select :options='$parent.$parent.gasproperties'
57
+ :value.sync="model.f_gasproperties"
58
+ close-on-select
59
+ condition="f_gasproperties = '{}'"
60
+ placeholder='用气性质'
61
+ style="width:60%"
62
+ v-model="model.f_gasproperties"
63
+ value-single="true">
64
+ </v-select>
65
+ </div>
66
+ <div class="col-sm-2 form-group">
67
+ <label class="font_normal_body">气表品牌</label>
68
+ <v-select :value.sync="model.f_meter_brand"
69
+ v-model="model.f_meter_brand"
70
+ :options='$parent.$parent.meterbrands'
71
+ placeholder='请选择'
72
+ condition="f_meter_brand = '{}'"
73
+ close-on-select></v-select>
74
+ </div>
75
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
76
+ <label class="font_normal_body">累计用气量</label>
77
+ <div class="row">
78
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_total_gas1"
79
+ condition="f_total_gas >= {} " placeholder="">
80
+ <label class="font_normal_body"> ≤ x ≤ </label>
81
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_total_gas2"
82
+ condition="f_total_gas <= {} " placeholder="">
83
+ </div>
84
+ </div>
85
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
86
+ <label class="font_normal_body">日均用气量</label>
87
+ <div class="row">
88
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_day_gas1"
89
+ condition="f_day_gas >= {} " placeholder="">
90
+ <label class="font_normal_body"> ≤ x ≤ </label>
91
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_day_gas2"
92
+ condition="f_day_gas <= {} " placeholder="">
93
+ </div>
94
+ </div>
95
+ <div class="col-sm-2 form-group" v-show="!$parent.$parent.isCurrentMonth">
96
+ <label for="startDate" class="font_normal_body">开始月份</label>
97
+ <datepicker id="startDate"
98
+ placeholder="开始月份"
99
+ style="width:60%"
100
+ v-model="model.startMonth"
101
+ :value.sync="model.startMonth"
102
+ :format="'yyyy-MM'"
103
+ :show-reset-button="true"
104
+ >
105
+ </datepicker>
106
+ </div>
107
+ <div class="col-sm-2 form-group" v-show="!$parent.$parent.isCurrentMonth">
108
+ <label for="endDate" class="font_normal_body">结束月份</label>
109
+ <datepicker id="endDate"
110
+ placeholder="结束月份"
111
+ style="width:60%"
112
+ v-model="model.endMonth"
113
+ :value.sync="model.endMonth"
114
+ :format="'yyyy-MM'"
115
+ :show-reset-button="true"
116
+ >
117
+ </datepicker>
118
+ </div>
119
+ <div class="col-sm-2 form-group" v-show="$parent.$parent.isCurrentMonth">
120
+ <label for="startDate" class="font_normal_body">开始日期</label>
121
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
122
+ v-model="model.startDate"
123
+ :value.sync="model.startDate"
124
+ :format="'yyyy-MM-dd'"
125
+ :disabled="true"
126
+ :show-reset-button="true"
127
+ >
128
+ </datepicker>
129
+ </div>
130
+ <div class="col-sm-2 form-group" v-show="$parent.$parent.isCurrentMonth">
131
+ <label for="endDate" class="font_normal_body">结束日期</label>
132
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
133
+ v-model="model.endDate"
134
+ :value.sync="model.endDate"
135
+ :format="'yyyy-MM-dd'"
136
+ :disabled="true"
137
+ :show-reset-button="true"
138
+ >
139
+ </datepicker>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ </criteria>
144
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
145
+ <template partial='head'>
146
+ <tr>
147
+ <th>
148
+ <nobr>月份</nobr>
149
+ </th>
150
+ <th>
151
+ <nobr>用户编号</nobr>
152
+ </th>
153
+ <th>
154
+ <nobr>用户姓名</nobr>
155
+ </th>
156
+ <th>
157
+ <nobr>用户电话</nobr>
158
+ </th>
159
+ <th>
160
+ <nobr>用户地址</nobr>
161
+ </th>
162
+ <th>
163
+ <nobr>用气性质</nobr>
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
+ </tr>
181
+ </template>
182
+ <template partial='body'>
183
+ <td style="text-align: center;">
184
+ <nobr>{{ row.f_month }}</nobr>
185
+ </td>
186
+ <td style="text-align: center;">
187
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
188
+ </td>
189
+ <td style="text-align: center;">
190
+ <nobr>{{ row.f_user_name }}</nobr>
191
+ </td>
192
+ <td style="text-align: center;">
193
+ <nobr>{{ row.f_user_phone }}</nobr>
194
+ </td>
195
+ <td style="text-align: center;">
196
+ <nobr>{{ row.f_address }}</nobr>
197
+ </td>
198
+ <td style="text-align: center;">
199
+ <nobr>{{ row.f_gasproperties }}</nobr>
200
+ </td>
201
+ <td style="text-align: center;">
202
+ <nobr>{{ row.f_calculation }}</nobr>
203
+ </td>
204
+ <td style="text-align: center;">
205
+ <nobr>{{ row.f_meter_brand }}</nobr>
206
+ </td>
207
+ <td style="text-align: center;">
208
+ <nobr>{{ row.f_total_gas }}</nobr>
209
+ </td>
210
+ <td style="text-align: center;">
211
+ <nobr>{{ row.f_month_gas }}</nobr>
212
+ </td>
213
+ <td style="text-align: center;">
214
+ <nobr>{{ row.f_day_gas }}</nobr>
215
+ </td>
216
+ </template>
217
+ <template partial='foot'></template>
218
+ </data-grid>
219
+ </criteria-paged>
220
+ </div>
221
+ <div v-if="show">
222
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id"
223
+ @cancel-main="cancel">
224
+ </user-info-detail-manage-new>
225
+ </div>
226
+ </div>
227
+ </div>
228
+ </template>
229
+ <script>
230
+ import {PagedList} from 'vue-client'
231
+ import exportConfig from '../../../components/sale/config/exportConfig'
232
+ import plugins from "../../../plugins/GetLoginInfoService";
233
+
234
+
235
+ let readySomething = async function (self) {
236
+ self.initDate()
237
+ await self.$MagLoadParams.loadParam()
238
+ self.initParams()
239
+ }
240
+ export default {
241
+ title: '物联网表月用气查询',
242
+ name: 'WebMeterMonthUserGasQuery',
243
+ data() {
244
+ return {
245
+ model: new PagedList('api/af-revenue/sql/manage_webMeterUserGasQueryCurrMonth', 20),
246
+ initres: {
247
+ org: [this.$login.f.orgid]
248
+ },
249
+ sqlName: 'manage_webMeterUserGasQueryCurrMonth',
250
+ resshow: ['company'],
251
+ isCurrentMonth: true,
252
+ other: [],
253
+ footer: [],
254
+ rowdata: {},
255
+ gasproperties: [],
256
+ show: false,
257
+ criteriaShow: false,
258
+ orgCondtionStr: '',
259
+ modelval: [],
260
+ condition: '',
261
+ printshow: false,
262
+ all: false,
263
+ fields: {},
264
+ thead: '',
265
+ tfoot: '',
266
+ defaultfield: [],
267
+ f_filialeid: this.$login.f.f_orgid,
268
+ f_orgid: this.$login.f.orgid,
269
+ f_depid: this.$login.f.depids,
270
+ f_operatorid: this.$login.f.id,
271
+ }
272
+ },
273
+ ready() {
274
+ readySomething(this)
275
+ },
276
+ methods: {
277
+ initDate () {
278
+ this.$refs.paged.$refs.cri.model.startDate = this.$login.toStartAndEndDateString()[0]
279
+ this.$refs.paged.$refs.cri.model.endDate = this.$login.toStandardDateString()
280
+ },
281
+ initParams() {
282
+ // 初始化气表品牌
283
+ let brandArr = []
284
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
285
+ if (item.value.f_meter_type === '物联网表') {
286
+ let temp = {}
287
+ temp.label = item.label
288
+ temp.value = item.value.f_meter_brand
289
+ brandArr.push(temp)
290
+ }
291
+ })
292
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
293
+ },
294
+ currentMonth() {
295
+ this.isCurrentMonth = true
296
+ },
297
+ historyMonth() {
298
+ this.isCurrentMonth = false
299
+ },
300
+ // 加载抄表册
301
+ loadMeterBooks() {
302
+ this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
303
+ },
304
+ getotherfooter() {
305
+ this.other = [];
306
+ this.footer = [];
307
+ let otherInData = [];
308
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
309
+ let footerData = [], exportfield = this.getfield;
310
+ footerData.push("合计");
311
+ let self = this;
312
+ for (var field in self.sumsmodel) {
313
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
314
+ }
315
+ this.footer.push(footerData);
316
+ this.other.push(otherInData);
317
+ },
318
+ search() {
319
+ this.$refs.paged.$refs.cri.search()
320
+ },
321
+ cancel() {
322
+ this.show = false
323
+ },
324
+ areBothMonthsBeforeCurrent(dateStr1, dateStr2) {
325
+ let now = new Date();
326
+ let currentMonthStart = new Date(now.getFullYear(), now.getMonth(), 1)
327
+ // 将字符串转换为标准日期对象,这里采用'yyyy-MM'格式避免潜在的解析问题
328
+ let date1 = new Date(dateStr1.replace(/-/g, '/'))
329
+ let date2 = new Date(dateStr2.replace(/-/g, '/'))
330
+ // 比较两个日期是否都在当前月份之前
331
+ return date1 < currentMonthStart && date2 < currentMonthStart
332
+ },
333
+ getLastDayOfMonth(dateString) {
334
+ // 分割字符串获取年和月
335
+ let [year, month] = dateString.split('-')
336
+ // 创建一个新日期对象,注意月份需要减1
337
+ let date = new Date(parseInt(year), parseInt(month) - 1, 1)
338
+ // 获取下一个月的第一天,然后回退一天得到本月最后一天
339
+ date.setMonth(date.getMonth() + 1)
340
+ date.setDate(date.getDate() - 1)
341
+ // 格式化为 "yyyy-mm-dd"
342
+ return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`
343
+ },
344
+ selfSearch(args) {
345
+ if (!this.orgCondtionStr) {
346
+ args.condition = `${args.condition} and f_orgid = '${this.$login.f.orgid}'`
347
+ } else {
348
+ args.condition = args.condition + this.orgCondtionStr
349
+ }
350
+ if (this.isCurrentMonth ) {
351
+ this.model.params.startDate = this.$refs.paged.$refs.cri.model.startDate
352
+ this.model.params.endDate = this.$refs.paged.$refs.cri.model.endDate
353
+ } else {
354
+ if (this.$refs.paged.$refs.cri.model.startMonth && this.$refs.paged.$refs.cri.model.endMonth) {
355
+ // 需要判断是选择月份
356
+ if (this.areBothMonthsBeforeCurrent(this.$refs.paged.$refs.cri.model.startMonth,this.$refs.paged.$refs.cri.model.endMonth)) {
357
+ this.model.params.startDate = this.$refs.paged.$refs.cri.model.startMonth + '-01'
358
+ this.model.params.endDate = this.getLastDayOfMonth(this.$refs.paged.$refs.cri.model.endMonth)
359
+ }else {
360
+ this.$showMessage('请选择小于当前月份的开始月份和结束月份来查询历史数据!')
361
+ return
362
+ }
363
+ } else {
364
+ this.$showMessage('请选择开始月份和结束月份后再进行查询')
365
+ return
366
+ }
367
+ }
368
+ this.condition = args.condition
369
+ this.model.search(args.condition, args.model)
370
+ },
371
+ clear() {
372
+ //清空部门和人员
373
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
374
+ //部门和人员变为全选
375
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
376
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
377
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
378
+ this.$refs.paged.$refs.cri.model[key] = []
379
+ })
380
+ },
381
+ show() {
382
+ this.criteriaShow = true
383
+ },
384
+ hidden() {
385
+ this.criteriaShow = !this.criteriaShow
386
+ },
387
+ showmsg(obj) {
388
+ this.rowdata = obj
389
+ this.show = true
390
+ },
391
+ getRes(condition, obj) {
392
+ this.orgCondtionStr = condition
393
+ },
394
+ put() {
395
+ // 对Modelval进行排序
396
+ this.sortModelval()
397
+ this.thead = `<tr><th colspan=${this.modelval.length}>非民用用气查询</th></tr><tr>`
398
+ for (let key of this.modelval) {
399
+ this.thead += '<th>' + this.fields[key] + '</th>'
400
+ }
401
+ this.thead += '</tr>'
402
+ },
403
+ print() {
404
+ this.$refs.print.PrintAsFile()
405
+ this.printshow = false
406
+ },
407
+ dealmsg(val) {
408
+ this.rowdata = val
409
+ this.show = true
410
+ val.model = this.model.model
411
+ this.$dispatch('deal-msg', val)
412
+ },
413
+ close() {
414
+ this.printshow = false
415
+ this.all = false
416
+ },
417
+ // 对选择的列进行排序
418
+ sortModelval() {
419
+ let sortModel = []
420
+ Object.keys(this.fields).forEach((key) => {
421
+ if (this.modelval.includes(key)) {
422
+ sortModel.push(key)
423
+ }
424
+ })
425
+ this.modelval = sortModel
426
+ console.log('选择的打印的字段', this.modelval)
427
+ }
428
+ },
429
+ computed: {
430
+ metertype() {
431
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
432
+ },
433
+ gasproperties() {
434
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
435
+ },
436
+ getCondition() {
437
+ return {
438
+ condition: this.condition,
439
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
440
+ endDate: this.$refs.paged.$refs.cri.model.endDate
441
+ }
442
+ },
443
+ getfield() {
444
+ return exportConfig.webMeterMonthUserGasConfig
445
+ },
446
+ usertypes() {
447
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
448
+ },
449
+ },
450
+ events: {},
451
+ watch: {
452
+ 'isCurrentMonth' () {
453
+ if (this.isCurrentMonth) {
454
+ this.model.url = this.url = 'api/af-revenue/sql/manage_webMeterUserGasQueryCurrMonth'
455
+ this.sqlName = 'manage_webMeterUserGasQueryCurrMonth'
456
+ } else {
457
+ this.model.url = this.url = 'api/af-revenue/sql/manage_webMeterUserGasQueryHisMonth'
458
+ this.sqlName = 'manage_webMeterUserGasQueryHisMonth'
459
+ }
460
+ }
461
+ }
462
+ }
463
+ </script>
464
+ <style>
465
+ .datapanel {
466
+ color: #333;
467
+ background-color: white;
468
+ padding: 10px 20px;
469
+ border-radius: 15px;
470
+ }
471
+ </style>