sale-client 3.6.110 → 3.6.111

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.110",
3
+ "version": "3.6.111",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -91,7 +91,7 @@
91
91
  "style-loader": "^0.20.3",
92
92
  "system-clients": "3.2.61",
93
93
  "url-loader": "^0.5.7",
94
- "vue-client": "1.24.86",
94
+ "vue-client": "1.24.94",
95
95
  "vue-clipboard2": "0.3.1",
96
96
  "vue-hot-reload-api": "^1.2.0",
97
97
  "vue-html-loader": "^1.0.0",
@@ -44,6 +44,13 @@
44
44
 
45
45
  <div style="float: right">
46
46
  <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
47
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
48
+ :field="$parent.$parent.getExportFields" :header="$parent.$parent.other"
49
+ sqlurl="rs/logic/saleExport"
50
+ :sql-name="$parent.$parent.isIot ? 'sale_WebChargeQuery' : 'sale_ChargeQuery'"
51
+ template-name='用户收费查询导出'
52
+ :choose-col="true">
53
+ </export-excel>
47
54
  <print-data :defaultfield="$parent.$parent.defaultfield"
48
55
  :field="$parent.$parent.isIot?$parent.$parent.iotFields:$parent.$parent.fields"
49
56
  :is-selected="true" :model="$parent.$parent.printModel"
@@ -178,10 +185,10 @@
178
185
  <!-- 应交合计:&emsp;{{model.sums.f_oughtfee}}-->
179
186
  <!-- </td>-->
180
187
  <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
181
- 气量合计:&emsp;{{model.sums.f_pregas}}
188
+ 气量合计:&emsp;{{ sumsmodel.f_pregas}}
182
189
  </td>
183
190
  <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
184
- 实收合计:&emsp;{{ model.sums.f_collection }}
191
+ 实收合计:&emsp;{{ sumsmodel.f_collection }}
185
192
  </td>
186
193
  </tr>
187
194
  </table>
@@ -245,6 +252,9 @@ export default {
245
252
  radio: [],
246
253
  // 选中的页
247
254
  all: [],
255
+ other: [],
256
+ footer: [],
257
+ sumsmodel: {},
248
258
  // row数据
249
259
  rowsdata: [],
250
260
  fields: {
@@ -291,10 +301,25 @@ export default {
291
301
  this.$refs.paged.$refs.criteria.search()
292
302
  },
293
303
  methods: {
304
+ getotherfooter () {
305
+ this.other = []
306
+ this.footer = []
307
+ let otherInData = []
308
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
309
+ let footerData = []
310
+ let exportfield = this.getExportFields
311
+ footerData.push('合计')
312
+ for (var field in this.sumsmodel) {
313
+ footerData.push(`${exportfield[field]}合计:${this.sumsmodel[field]}`)
314
+ }
315
+ this.footer.push(footerData)
316
+ this.other.push(otherInData)
317
+ },
294
318
  async search () {
295
319
  console.log('aaa:', this.$refs.paged.$refs.criteria.condition)
296
320
  this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_user_id = '${this.row.f_user_id}' and f_orgid = '${this.$login.f.orgid}'`
297
321
  this.model.search(this.condition, this.model)
322
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
298
323
  let http = new HttpResetClass()
299
324
  let res = await http.load('POST', `${this.row.f_meter_type === '物联网表' ? 'rs/sql/sale_WebChargeQuery' : 'rs/sql/sale_ChargeQuery'}`, {
300
325
  data: {
@@ -419,7 +444,77 @@ export default {
419
444
  }
420
445
  }
421
446
  },
447
+ watch: {
448
+ 'model.rows' (val) {
449
+ if (val.length === 0) {
450
+ this.sumsmodel = {}
451
+ }
452
+ },
453
+ 'sumsmodel': {
454
+ handler: function (val) {
455
+ this.getotherfooter()
456
+ },
457
+ deep: true
458
+ }
459
+ },
422
460
  computed: {
461
+ getCondition () {
462
+ return {
463
+ condition: this.condition,
464
+ f_user_id: this.row.f_user_id
465
+ }
466
+ },
467
+ getExportFields () {
468
+ let fields
469
+ if (this.isIot) {
470
+ fields = {
471
+ 'f_userinfo_code': '客户编号',
472
+ 'f_user_name': '客户姓名',
473
+ 'type': '收费类型',
474
+ 'f_hand_date': '收费区间',
475
+ 'f_meternumber': '表号',
476
+ 'f_last_tablebase': '上期指数',
477
+ 'f_tablebase': '本期指数',
478
+ 'f_pregas': '气量',
479
+ 'f_price': '气价',
480
+ 'f_preamount': '气费金额',
481
+ 'f_delaypay': '滞纳金',
482
+ 'f_jianmian': '减免金额',
483
+ 'f_balance': '上期结余',
484
+ 'f_oughtfee': '应交金额',
485
+ 'f_collection': '实收金额',
486
+ 'f_curbalance': '本期结余',
487
+ 'f_payment': '付款方式',
488
+ 'f_operator': '操作员',
489
+ 'f_operate_date': '缴费时间',
490
+ 'f_state': '缴费状态',
491
+ 'f_depname': '网点',
492
+ 'f_comments': '备注'
493
+ }
494
+ } else {
495
+ fields = {
496
+ 'f_userinfo_code': '客户编号',
497
+ 'f_user_name': '客户姓名',
498
+ 'type': '收费类型',
499
+ 'f_meternumber': '表号',
500
+ 'f_pregas': '气量',
501
+ 'f_price': '气价',
502
+ 'f_preamount': '气费金额',
503
+ 'f_delaypay': '滞纳金',
504
+ 'f_jianmian': '减免金额',
505
+ 'f_balance': '上期结余',
506
+ 'f_collection': '实收金额',
507
+ 'f_curbalance': '本期结余',
508
+ 'f_payment': '付款方式',
509
+ 'f_operator': '操作员',
510
+ 'f_operate_date': '缴费时间',
511
+ 'f_state': '缴费状态',
512
+ 'f_depname': '网点',
513
+ 'f_comments': '备注'
514
+ }
515
+ }
516
+ return fields
517
+ },
423
518
  ischecked () {
424
519
  return function (index, i) {
425
520
  if (!this.radio[index]) {
@@ -175,6 +175,10 @@
175
175
  },
176
176
  selfSearch (args) {
177
177
  args.condition = `${args.condition} and f_orgid like '${this.$login.f.orgid}%'`
178
+ console.log('看看此用户是否限制查询全部票据', this.$login.r.includes('限制查看全部票据'))
179
+ if (this.$login.r.includes('限制查看全部票据')) {
180
+ args.condition = `${args.condition} and f_bill_user = '${this.$login.f.name}'`
181
+ }
178
182
  console.log(args.condition)
179
183
  this.model.search(args.condition, args.model)
180
184
  },
@@ -192,10 +192,10 @@
192
192
  </div>
193
193
  <div class="col-sm-2 form-group">
194
194
  <label class="font_normal_body">欠费金额</label>
195
- <input type="text" style="width:30%" class="input_search" title="大于等于" v-model="model.f_oughtfee_all_small"
196
- condition="f_oughtfee_all >= '{}' " placeholder="大于等于">
197
- <input type="text" style="width:30%" class="input_search" title="小于等于" v-model="model.f_oughtfee_all_big"
198
- condition="f_oughtfee_all <= '{}' " placeholder="小于等于">
195
+ <input type="text" style="width:30%" class="input_search" title="大于等于" v-model="model.f_oughtfee_col_small"
196
+ condition="f_oughtfee_col >= '{}' " placeholder="大于等于">
197
+ <input type="text" style="width:30%" class="input_search" title="小于等于" v-model="model.f_oughtfee_col_big"
198
+ condition="f_oughtfee_col <= '{}' " placeholder="小于等于">
199
199
  </div>
200
200
  <div class="col-sm-2 form-group">
201
201
  <label class="font_normal_body">欠费期数</label>
@@ -299,6 +299,12 @@
299
299
  <th>
300
300
  <nobr>用气金额</nobr>
301
301
  </th>
302
+ <th>
303
+ <nobr>合计欠费</nobr>
304
+ </th>
305
+ <th>
306
+ <nobr>实际欠费</nobr>
307
+ </th>
302
308
  <th>
303
309
  <nobr>缴费时间</nobr>
304
310
  </th>
@@ -320,12 +326,6 @@
320
326
  <th>
321
327
  <nobr>上期余额</nobr>
322
328
  </th>
323
- <th>
324
- <nobr>合计欠费</nobr>
325
- </th>
326
- <th>
327
- <nobr>实际欠费</nobr>
328
- </th>
329
329
  <th>
330
330
  <nobr>抄表员</nobr>
331
331
  </th>
@@ -393,6 +393,12 @@
393
393
  <td style="text-align: center;">
394
394
  <nobr>{{row.f_oughtfee}}</nobr>
395
395
  </td>
396
+ <td style="text-align: center;">
397
+ <nobr>{{row.f_oughtfee_all}}</nobr>
398
+ </td>
399
+ <td style="text-align: center;">
400
+ <nobr>{{row.f_oughtfee_col}}</nobr>
401
+ </td>
396
402
  <td style="text-align: center;">
397
403
  <nobr>{{row.f_operate_date}}</nobr>
398
404
  </td>
@@ -414,12 +420,6 @@
414
420
  <td style="text-align: center;">
415
421
  <nobr>{{row.f_balance}}</nobr>
416
422
  </td>
417
- <td style="text-align: center;">
418
- <nobr>{{row.f_oughtfee_all}}</nobr>
419
- </td>
420
- <td style="text-align: center;">
421
- <nobr>{{row.f_oughtfee_col}}</nobr>
422
- </td>
423
423
  <td style="text-align: center;">
424
424
  <nobr>{{row.f_inputtor}}</nobr>
425
425
  </td>
@@ -36,6 +36,13 @@
36
36
  <div class="span" style="float:right;">
37
37
  <button class="button_search button_spacing" @click="$parent.$parent.search()">查询</button>
38
38
  <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
39
+ <export-excel :data="$parent.$parent.getCondition"
40
+ :field="$parent.$parent.getExportFields" :header="$parent.$parent.other"
41
+ sqlurl="rs/logic/saleExport"
42
+ sql-name="getDownPlan"
43
+ template-name='抄表计划下发导出'
44
+ :choose-col="true">
45
+ </export-excel>
39
46
  <button class="button_search button_spacing"
40
47
  @click="$parent.$parent.batchDownHand()">计划下发
41
48
  </button>
@@ -603,6 +610,7 @@
603
610
  uploadText: '抄表',
604
611
  showerr: false,
605
612
  err: '',
613
+ other: [],
606
614
  // 请求对象(批量导入,查询进度使用)
607
615
  HttpReset: new HttpResetClass()
608
616
  }
@@ -616,6 +624,20 @@
616
624
  document.getElementById(this.inputid).focus()
617
625
  },
618
626
  methods: {
627
+ getotherfooter () {
628
+ this.other = []
629
+ // this.footer = []
630
+ let otherInData = []
631
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
632
+ // let footerData = []
633
+ // let exportfield = this.getExportFields
634
+ // footerData.push('合计')
635
+ // for (var field in this.sumsmodel) {
636
+ // footerData.push(`${exportfield[field]}合计:${this.sumsmodel[field]}`)
637
+ // }
638
+ // this.footer.push(footerData)
639
+ this.other.push(otherInData)
640
+ },
619
641
  // 获得本月的最后一天。
620
642
  getLastDayOfMonth (year, month) {
621
643
  let new_year = year // 取当前的年份
@@ -1008,6 +1030,20 @@
1008
1030
  // },
1009
1031
  },
1010
1032
  computed: {
1033
+ getExportFields () {
1034
+ return {
1035
+ 'f_userinfo_code': '客户编号',
1036
+ 'f_user_name': '客户姓名',
1037
+ 'f_address': '用户地址',
1038
+ 'f_user_level': '用户等级',
1039
+ 'f_adjustable_name': '调压箱名称',
1040
+ 'f_inputtor': '抄表员',
1041
+ 'f_balance': '上期结余',
1042
+ 'f_meternumber': '表号',
1043
+ 'f_meter_base': '上期底数',
1044
+ 'f_book_name': '抄表册'
1045
+ }
1046
+ },
1011
1047
  getCondition () {
1012
1048
  // return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
1013
1049
  return {
@@ -0,0 +1,205 @@
1
+ <template>
2
+ <div class="binary flex" >
3
+ <div class="row binary-left flex" style="width:99%;height:98%;margin-bottom:0px">
4
+ <div class="auto"><user-base-info-new :row="row" :buttonshow="buttonshow" @cancel-main="cancel" @cancel-re="cancelRe"></user-base-info-new></div>
5
+ <saletabbut v-if="row" v-ref:list style="height:72%;margin-top: 1%;overflow-y: scroll">
6
+ <saletab header="流水查询" v-if="permission('流水查询')">
7
+ <record-query-user :row="row"></record-query-user>
8
+ </saletab>
9
+ <saletab header="机表流水查询" v-if="permission('机表流水查询')&&row.f_meter_type.includes('机表')">
10
+ <machine-record-query :row="row" v-if="show == '机表流水查询'" @deal-msg="dealMsg"></machine-record-query>
11
+ </saletab>
12
+ <saletab header="收费查询" v-if="!newWebHand && permission('收费查询')">
13
+ <charge-query-user :row="row" v-if="show == '收费查询'" @deal-msg="dealMsg"></charge-query-user>
14
+ </saletab>
15
+ <saletab header="收费查询" v-if="newWebHand && permission('收费查询')">
16
+ <charge-query-user :row="row" v-if="show == '收费查询'" @deal-msg="dealMsg"></charge-query-user>
17
+ </saletab>
18
+ <saletab header="累购查询" v-if="permission('累购查询')">
19
+ <Repurchase :row="row" v-if="show == '累购查询'" @deal-msg="dealMsg"></Repurchase>
20
+ </saletab>
21
+ <saletab header="下账查询" v-if="!newWebHand && row.f_meter_type.includes('物联网表')&&permission('自动下账查询')">
22
+ <automatic-purse :row="row" @deal-msg="dealMsg"></automatic-purse>
23
+ </saletab>
24
+ <saletab header="下账查询" v-if="newWebHand && row.f_meter_type.includes('物联网表')&&permission('自动下账查询')">
25
+ <web-automatic-purse :row="row" @deal-msg="dealMsg"></web-automatic-purse>
26
+ </saletab>
27
+ <saletab header="抄表记录" v-if="row.f_meter_type.includes('卡表')&&permission('抄表记录')">
28
+ <card-hand-record :row="row" v-if="show == '抄表记录'" @deal-msg="dealMsg"></card-hand-record>
29
+ </saletab>
30
+ <saletab header="抄表记录" v-if="!row.f_meter_type.includes('卡表')&&permission('抄表记录')">
31
+ <hand-query-user :row="row" v-if="show == '抄表记录'" @deal-msg="dealMsg"></hand-query-user>
32
+ </saletab>
33
+ <saletab header="补卡查询" v-if="row.f_meter_type.includes('卡表')&&permission('补卡查询')">
34
+ <fill-card-query-user :row="row" v-if="show == '补卡查询'" @deal-msg="dealMsg"></fill-card-query-user>
35
+ </saletab>
36
+ <saletab header="补气查询" v-if="permission('补气查询')">
37
+ <fill-gas-query-user :row="row" v-if="show == '补气查询'" @deal-msg="dealMsg"></fill-gas-query-user>
38
+ </saletab>
39
+ <saletab header="换表查询" v-if="permission('换表查询')">
40
+ <change-meter-query-user :row="row" v-if="show == '换表查询'" @deal-msg="dealMsg"></change-meter-query-user>
41
+ </saletab>
42
+ <saletab header="其他收费" v-if="permission('其他收费')">
43
+ <other-charge-query-user :row="row" v-if="show == '其他收费'" @deal-msg="dealMsg"></other-charge-query-user>
44
+ </saletab>
45
+ <saletab header="过户查询" v-if="permission('过户查询')">
46
+ <transfer-query-user :row="row" v-if="show == '过户查询'" @deal-msg="dealMsg"></transfer-query-user>
47
+ </saletab>
48
+ <saletab header="价格调整" v-if="permission('价格调整')">
49
+ <price-change-query-user :row="row" v-if="show == '价格调整'" @deal-msg="dealMsg"></price-change-query-user>
50
+ </saletab>
51
+ <saletab header="附件查看" v-if="permission('附件查看')">
52
+ <upload-file-history :row="row" v-if="show == '附件查看'" @deal-msg="dealMsg"></upload-file-history>
53
+ </saletab>
54
+ <saletab header="变更记录" v-if="permission('变更记录')">
55
+ <change-record :row="row" v-if="show == '变更记录'" @deal-msg="dealMsg"></change-record>
56
+ </saletab>
57
+ <saletab header="指令查看" v-if="row.f_meter_type.includes('物联网表')&&permission('指令查看')">
58
+ <query-instruct :row="row" v-if="show == '指令查看'" @deal-msg="dealMsg"></query-instruct>
59
+ </saletab>
60
+ <saletab header="历史指令查看" v-if="row.f_meter_type.includes('物联网表')&&permission('历史指令查看')">
61
+ <query-history-instruct :row="row" v-if="show == '历史指令查看'" @deal-msg="dealMsg"></query-history-instruct>
62
+ </saletab>
63
+ <saletab header="异常报警" v-if="row.f_meter_type.includes('物联网表')&&permission('异常报警')">
64
+ <watch-warning :row="row" v-if="show == '异常报警'" @deal-msg="dealMsg"></watch-warning>
65
+ </saletab>
66
+ <saletab header="表具采集" v-if="row.f_meter_type.includes('物联网表')&&permission('表具采集')">
67
+ <watch-collection :row="row" v-if="show == '表具采集'" @deal-msg="dealMsg"></watch-collection>
68
+ </saletab>
69
+ <saletab header="调价补差" v-if="permission('调价补差')">
70
+ <price-adjustment-query-user :row="row" v-if="show == '调价补差'" @deal-msg="dealMsg"></price-adjustment-query-user>
71
+ </saletab>
72
+ <saletab header="设备查询" v-if="permission('设备查询')">
73
+ <deveice-record :row="row" v-if="show == '设备查询'" @deal-msg="dealMsg"></deveice-record>
74
+ </saletab>
75
+ <saletab header="流量计参数查看" v-if="permission('流量计参数查看')">
76
+ <meter-param :row="row" v-if="show == '流量计参数查看'" @deal-msg="dealMsg"></meter-param>
77
+ </saletab>
78
+ <saletab header="表使用量图表" v-if="permission('流量计参数查看')">
79
+ <table-usage-chart :row="row" v-if="show == '表使用量图表'" @deal-msg="dealMsg"></table-usage-chart>
80
+ </saletab>
81
+ <saletab header="用户设备查询" v-if="permission('用户设备查看')">
82
+ <user-device-query :row="row" v-if="show == '用户设备查询'" @deal-msg="dealMsg"></user-device-query>
83
+ </saletab>
84
+ </saletabbut>
85
+ </div>
86
+ </div>
87
+ </template>
88
+
89
+ <script>
90
+ import {HttpResetClass} from 'vue-client'
91
+ // 导入IC卡相关查询界面
92
+ import ChangeMeterQueryUser from '../../components/common/userinfo_detail/ic_detail/ChangeMeterQueryUser'
93
+ import ChargeQueryUser from '../../components/common/userinfo_detail/ic_detail/ChargeQueryUser'
94
+ import ChargeRecordQueryUser from '../../components/common/userinfo_detail/ic_detail/ChargeRecordQuery'
95
+ import FillCardQueryUser from '../../components/common/userinfo_detail/ic_detail/FillCardQueryUser'
96
+ import HandQueryUser from './ic_detail/HandQueryUser'
97
+ import OtherChargeQueryUser from '../../components/common/userinfo_detail/ic_detail/OtherChargeQueryUser'
98
+ import RecordQueryUser from '../../components/common/userinfo_detail/ic_detail/RecordQueryUser'
99
+ import TransferQueryUser from '../../components/common/userinfo_detail/ic_detail/TransferQueryUser'
100
+ import CardHandRecord from '../../components/common/userinfo_detail/ic_detail/CardHandRecord'
101
+ import AutomaticPurse from '../../components/common/userinfo_detail/ic_detail/AutomaticPurse'
102
+ import Repurchase from '../../components/common/userinfo_detail/ic_detail/Repurchase'
103
+ import MachineRecordQuery from '../../components/common/userinfo_detail/ic_detail/MachineRecordQuery'
104
+ import WebAutomaticPurse from '../../components/common/userinfo_detail/ic_detail/WebAutomaticPurse'
105
+ import WebChargeQueryUser from '../../components/common/userinfo_detail/ic_detail/WebChargeQueryUser'
106
+ // import WebHandQueryUser from '../../components/common/userinfo_detail/ic_detail/WebHandQueryUser'
107
+ import UserDeviceQuery from '../../components/common/userinfo_detail/ic_detail/UserDeviceQuery'
108
+
109
+ // 导入物联网相关查询
110
+ import QueryInstruct from '../../components/common/userinfo_detail/iot_detail/QueryInstruct'
111
+ import QueryHistoryInstruct from '../../components/common/userinfo_detail/iot_detail/QueryHistoryInstruct'
112
+ import WatchCollection from '../../components/common/userinfo_detail/iot_detail/WatchCollection'
113
+ import WatchWarning from '../../components/common/userinfo_detail/iot_detail/WatchWarning'
114
+ import PriceChangeQueryUser from '../../components/common/userinfo_detail/ic_detail/PriceChangeQueryUser'
115
+ import ChangeRecord from '../../components/common/userinfo_detail/ic_detail/ChangeRecord'
116
+ import PriceAdjustmentQueryUser from '../../components/common/userinfo_detail/ic_detail/PriceAdjustmentQueryUser'
117
+ import MeterParam from '../../components/common/userinfo_detail/ic_detail/MeterParam'
118
+ import DeveiceRecord from '../../components/common/userinfo_detail/ic_detail/DeveiceRecord'
119
+ export default {
120
+ title: '用户详细信息',
121
+ props: ['f_userfiles_id', 'f_userinfo_id', 'f_userinfo_code', 'parentname', 'buttonshow'],
122
+ components: {
123
+ PriceAdjustmentQueryUser,
124
+ PriceChangeQueryUser,
125
+ AutomaticPurse,
126
+ WebAutomaticPurse,
127
+ WebChargeQueryUser,
128
+ // WebHandQueryUser,
129
+ Repurchase,
130
+ ChangeMeterQueryUser,
131
+ ChargeQueryUser,
132
+ ChargeRecordQueryUser,
133
+ FillCardQueryUser,
134
+ HandQueryUser,
135
+ OtherChargeQueryUser,
136
+ RecordQueryUser,
137
+ TransferQueryUser,
138
+ WatchWarning,
139
+ WatchCollection,
140
+ QueryInstruct,
141
+ QueryHistoryInstruct,
142
+ ChangeRecord,
143
+ CardHandRecord,
144
+ MeterParam,
145
+ DeveiceRecord,
146
+ MachineRecordQuery,
147
+ UserDeviceQuery
148
+ },
149
+ data () {
150
+ return {
151
+ row: null,
152
+ name: '自动下账查询',
153
+ newWebHand: this.$appdata.getSingleValue('新抄表'),
154
+ show: ''
155
+ }
156
+ },
157
+ ready () {
158
+ this.search()
159
+ console.log(this.$login)
160
+ },
161
+ methods: {
162
+ permission (name) {
163
+ if (this.$login.r.find(value => value == '收费综合查询')) {
164
+ if (!this.$login.r.find(value => value == name)) {
165
+ return false
166
+ }
167
+ }
168
+ return true
169
+ },
170
+ async search () {
171
+ let http = new HttpResetClass()
172
+ let condition = ' 1 = 1'
173
+ if (this.f_userfiles_id) {
174
+ condition = `f_userfiles_id = '${this.f_userfiles_id}'`
175
+ } else if (this.f_userinfo_id) {
176
+ condition = `f_userinfo_id = '${this.f_userinfo_id}'`
177
+ } else if (this.f_userinfo_code) {
178
+ condition = `f_userinfo_code = '${this.f_userinfo_code}'`
179
+ }
180
+
181
+ let getBaseInfo = await http.load('POST', 'rs/sql/iot_getUserBaseData',
182
+ {data: {condition: condition}}, {resolveMsg: null, rejectMsg: '获取基本信息出错'})
183
+ this.row = getBaseInfo.data[0]
184
+ this.row.parentname = this.parentname || ''
185
+ },
186
+
187
+ cancel (val) {
188
+ this.$emit('cancel-main', val)
189
+ },
190
+
191
+ cancelRe (val) {
192
+ this.$emit('cancel-re', val)
193
+ },
194
+
195
+ butOper (val) {
196
+ this.name = val
197
+ }
198
+ },
199
+ watch: {
200
+ 'f_userinfo_id' () {
201
+ this.search()
202
+ }
203
+ }
204
+ }
205
+ </script>
@@ -0,0 +1,426 @@
1
+ <template >
2
+ <div class="flex" style="justify-content: space-between;">
3
+ <div @keyup.enter="search" style="">
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria @condition-changed='$parent.search' partial='criteria' v-ref:criteria>
6
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
7
+ <div class="row">
8
+ <div class="col-sm-2 form-group">
9
+ <label class="font_normal_body" title="归属日期" >开始时间</label>
10
+ <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_start_date"
11
+ class="datepicker"
12
+ condition="f_hand_date >= '{} 00:00:00' "
13
+ placeholder="起始时间"
14
+ style="width:60%"
15
+ v-model="model.f_start_date"
16
+ ></datepicker>
17
+ </div>
18
+ <div class="col-sm-2 form-group" >
19
+ <label class="font_normal_body" title="归属日期">结束时间</label>
20
+ <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_end_date"
21
+ class="datepicker"
22
+ condition="f_hand_date <= '{} 23:59:59' "
23
+ placeholder="结束时间"
24
+ style="width:60%"
25
+ v-model="model.f_end_date"
26
+ ></datepicker>
27
+ </div>
28
+ <div class="col-sm-2 form-group">
29
+ <label class="font_normal_body">是否缴费</label>
30
+ <v-select :value.sync="model.f_whether_pay" v-model='model.f_whether_pay'
31
+ style="width:60%"
32
+ :options='$parent.$parent.whetherpaies' placeholder='是否缴费'
33
+ close-on-select
34
+ condition="f_whether_pay = '{}'"></v-select>
35
+ </div>
36
+ <div class="col-sm-2 form-group">
37
+ <label class="font_normal_body" title="抄表状态">抄表状态</label>
38
+ <v-select :value.sync="model.f_meter_state" v-model='model.f_meter_state'
39
+ style="width:60%"
40
+ :options='$parent.$parent.meterstates' placeholder='抄表状态'
41
+ close-on-select
42
+ condition="f_meter_state = '{}'"></v-select>
43
+ </div>
44
+ <div class="col-sm-2 form-group">
45
+ <label class="font_normal_body" title="表单状态">表单状态</label>
46
+ <v-select :value.sync="model.f_hand_state" v-model='model.f_hand_state'
47
+ style="width:60%"
48
+ :options='$parent.$parent.handstates' placeholder='表单状态'
49
+ close-on-select
50
+ condition="f_hand_state = '{}'"></v-select>
51
+ </div>
52
+
53
+ <div style="float: right">
54
+ <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
55
+ <export-excel :data="$parent.$parent.getCondition"
56
+ :footer="$parent.$parent.footer"
57
+ :field="$parent.$parent.getExportFields"
58
+ :header="$parent.$parent.other"
59
+ sqlurl="rs/logic/saleExport"
60
+ sql-name="sale_handplanLiXianV3"
61
+ template-name='用户抄表记录导出'
62
+ :choose-col="true">
63
+ </export-excel>
64
+ <print-data :defaultfield="$parent.$parent.defaultfield"
65
+ :field="$parent.$parent.fields"
66
+ :is-selected="true"
67
+ :model="$parent.$parent.printModel"
68
+ @print-data="$parent.$parent.print()"
69
+ :starthead="$parent.$parent.starthead"
70
+ titletable="抄表记录打印">
71
+ </print-data>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </criteria>
76
+ <data-grid :model="model" class="list_area table_sy" class="list_area table_sy" partial='list' v-ref:grid>
77
+ <template partial='head'>
78
+ <tr>
79
+ <th><nobr>抄表月份</nobr></th>
80
+ <th><nobr>用气周期</nobr></th>
81
+ <th><nobr>抄表日期</nobr></th>
82
+ <th><nobr>录入日期</nobr></th>
83
+ <th><nobr>上期底数</nobr></th>
84
+ <th><nobr>本期底数</nobr></th>
85
+ <th><nobr>上期余额</nobr></th>
86
+ <th><nobr>用气量</nobr></th>
87
+ <th><nobr>用气金额</nobr></th>
88
+ <th><nobr>本期余额</nobr></th>
89
+ <th><nobr>是否缴费</nobr></th>
90
+ <th><nobr>一阶单价</nobr></th>
91
+ <th><nobr>一阶气量</nobr></th>
92
+ <th><nobr>二阶单价</nobr></th>
93
+ <th><nobr>二阶气量</nobr></th>
94
+ <th><nobr>三阶单价</nobr></th>
95
+ <th><nobr>三阶气量</nobr></th>
96
+ <th><nobr>抄表状态</nobr></th>
97
+ <th><nobr>抄表结果状态</nobr></th>
98
+ <th><nobr>表单状态</nobr></th>
99
+ <th><nobr>抄表员</nobr></th>
100
+ <th><nobr>录入员</nobr></th>
101
+ </tr>
102
+ </template>
103
+ <template partial='body' partial='list' v-ref:grid>
104
+ <tr>
105
+ <td style="text-align:center">{{row.f_hand_date.substring(0,7)}}</td>
106
+ <td style="text-align:center">{{row.datas}}</td>
107
+ <td style="text-align:center">{{row.f_hand_date}}</td>
108
+ <td style="text-align:center">{{row.f_input_date}}</td>
109
+ <td style="text-align:center">{{row.f_last_tablebase}}</td>
110
+ <td style="text-align:center">{{row.f_tablebase}}</td>
111
+ <td style="text-align:center">{{row.f_balance}}</td>
112
+ <td style="text-align:center">{{row.f_oughtamount}}</td>
113
+ <td style="text-align:center">{{row.f_oughtfee}}</td>
114
+ <td style="text-align:center">{{row.f_curbalance}}</td>
115
+ <td style="text-align:center">{{row.f_whether_pay}}</td>
116
+ <td style="text-align:center">{{row.f_stair1price}}</td>
117
+ <td style="text-align:center">{{row.f_stairamount1}}</td>
118
+ <td style="text-align:center">{{row.f_stair2price}}</td>
119
+ <td style="text-align:center">{{row.f_stair2amount}}</td>
120
+ <td style="text-align:center">{{row.f_stair3price}}</td>
121
+ <td style="text-align:center">{{row.f_stair3amount}}</td>
122
+ <td style="text-align:center">{{row.f_meter_state}}</td>
123
+ <td style="text-align:center">{{row.f_result_state}}</td>
124
+ <td style="text-align:center">{{row.f_hand_state}}</td>
125
+ <td style="text-align:center">{{row.f_inputtor}}</td>
126
+ <td style="text-align:center">{{row.f_input_person}}</td>
127
+ </tr>
128
+ </template>
129
+ <template partial='foot'></template>
130
+ </data-grid>
131
+ </criteria-paged>
132
+
133
+ </div>
134
+ <table class="table-hover">
135
+ <tr class="table-bordered" style="position: relative">
136
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
137
+ 汇总信息
138
+ </td>
139
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
140
+ 用气量合计:&emsp;{{sumsmodel.f_oughtamount}}
141
+ </td>
142
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
143
+ 用气金额合计:&emsp;{{sumsmodel.f_oughtfee}}
144
+ </td>
145
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
146
+ 一阶用气量合计:&emsp;{{sumsmodel.f_stairamount1}}
147
+ </td>
148
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
149
+ 一阶用气金额合计:&emsp;{{sumsmodel.f_stair1fee}}
150
+ </td>
151
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
152
+ 二阶用气量合计:&emsp;{{sumsmodel.f_stair2amount}}
153
+ </td>
154
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
155
+ 二阶用气金额合计:&emsp;{{sumsmodel.f_stair2fee}}
156
+ </td>
157
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
158
+ 三阶用气金额合计:&emsp;{{sumsmodel.f_stair3amount}}
159
+ </td>
160
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
161
+ 三阶用气金额合计:&emsp;{{sumsmodel.f_stair3fee}}
162
+ </td>
163
+ </tr>
164
+ </table>
165
+ </div>
166
+
167
+ </template>
168
+
169
+ <script>
170
+ import {HttpResetClass, PagedList} from 'vue-client'
171
+
172
+ export default {
173
+ title: '抄表',
174
+ data () {
175
+ return {
176
+ condition: '1=1',
177
+ model: new PagedList('rs/sql/sale_handplanLiXianV3', 20, {f_user_id: this.row.f_user_id}, {
178
+ f_oughtfee: 0,
179
+ f_oughtamount: 0,
180
+ f_stairamount1: 0,
181
+ f_stair1fee: 0,
182
+ f_stair2amount: 0,
183
+ f_stair2fee: 0,
184
+ f_stair3amount: 0,
185
+ f_stair3fee: 0
186
+ }),
187
+ show: false,
188
+ other: [],
189
+ footer: [],
190
+ sumsmodel: {},
191
+ lists: [],
192
+ meterstates: this.$appdata.getParam('抄表状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('抄表状态')] : [],
193
+ handstates: this.$appdata.getParam('表单状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('表单状态')] : [],
194
+ // 控制单选
195
+ radio: [],
196
+ // 选中的页
197
+ all: [],
198
+ // row数据
199
+ rowsdata: [],
200
+ starthead: '',
201
+ fields: {
202
+ 'f_userinfo_code': '用户编号',
203
+ 'f_user_name': '姓名',
204
+ 'f_last_tablebase': '上期底数',
205
+ 'f_tablebase': '本期底数',
206
+ 'f_oughtamount': '用气量',
207
+ 'f_oughtfee': '用气金额',
208
+ 'f_detailprice': '结算明细',
209
+ 'datas': '用气周期',
210
+ 'f_oughtfee1': '应交金额',
211
+ 'f_inputtor': '抄表员',
212
+ 'f_input_date': '录入时间',
213
+ 'f_whether_pay': '是否缴费',
214
+ 'f_hand_date': '抄表时间'
215
+ },
216
+ defaultfield: [
217
+ 'datas',
218
+ 'f_last_tablebase',
219
+ 'f_last_tablebase',
220
+ 'f_oughtamount',
221
+ 'f_oughtfee',
222
+ 'f_oughtfee1'
223
+ ],
224
+ fooinfo: [
225
+ '单位',
226
+ '收款人'
227
+ ],
228
+ printModel: {
229
+ rows: []
230
+ }
231
+ }
232
+ },
233
+ props: ['row'],
234
+ ready () {
235
+ this.$refs.paged.$refs.criteria.model.f_hand_state = ['有效']
236
+ this.$refs.paged.$refs.criteria.search()
237
+ // this.sumgasandmoney= this.$refs.paged.$refs.grid.model.sums
238
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
239
+ for (let i in this.all) {
240
+ this.money += i.f_oughtamount
241
+ this.gas += i.f_oughtfee
242
+ }
243
+ },
244
+ methods: {
245
+ getotherfooter () {
246
+ this.other = []
247
+ this.footer = []
248
+ let otherInData = []
249
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
250
+ let footerData = []
251
+ let exportfield = this.getExportFields
252
+ footerData.push('合计')
253
+ for (var field in this.sumsmodel) {
254
+ footerData.push(`${exportfield[field]}合计:${this.sumsmodel[field]}`)
255
+ }
256
+ this.footer.push(footerData)
257
+ this.other.push(otherInData)
258
+ },
259
+ async search () {
260
+ this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_user_id = '${this.row.f_user_id}' and f_orgid = '${this.$login.f.orgid}'`
261
+ this.model.search(this.condition, this.model)
262
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
263
+ let http = new HttpResetClass()
264
+ let res = await http.load('POST', 'rs/sql/sale_handplanLiXianV3', {
265
+ data: {
266
+ condition: this.condition,
267
+ f_user_id: this.row.f_user_id
268
+ }
269
+ }, {resolveMsg: null, rejectMsg: null})
270
+ this.printModel.rows = res.data
271
+ this.starthead = '用户编号:' + this.row.f_userinfo_code + '&emsp;&emsp;用户姓名:' + this.row.f_user_name
272
+ },
273
+ // 多选框初始化
274
+ selectInit () {
275
+ this.rowsdata = []
276
+ this.all = []
277
+ this.radio = []
278
+ },
279
+ print () {
280
+ console.log('====================================')
281
+ console.log('print')
282
+ console.log(this.printModel)
283
+ this.selectInit()
284
+ },
285
+ select () {
286
+ let index = this.model.pageIndex - 1
287
+ if (!this.radio[index]) {
288
+ this.radio.$set(index, [])
289
+ }
290
+ if (this.all[index]) {
291
+ // 数据
292
+ this.rowsdata[index] = Object.assign([], this.model.rows)
293
+ // 勾选
294
+ for (let i = 0; i < this.model.rows.length; i++) {
295
+ this.radio[index].$set(i, true)
296
+ }
297
+ } else {
298
+ // 数据
299
+ this.rowsdata[index] = []
300
+ // 不勾选
301
+ for (let i = 0; i < this.model.rows.length; i++) {
302
+ this.radio[index].$set(i, false)
303
+ }
304
+ }
305
+ let z = 0
306
+ for (let i = 0; i < this.all.length; i++) {
307
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
308
+ this.printModel.rows[z++] = this.rowsdata[i][j]
309
+ }
310
+ }
311
+ },
312
+ selectOne (event, row, i) {
313
+ let index = this.model.pageIndex - 1
314
+ if (!this.rowsdata[index]) {
315
+ this.rowsdata[index] = []
316
+ }
317
+ if (!this.radio[index]) {
318
+ this.radio.$set(index, [])
319
+ }
320
+ if (event.target.checked) {
321
+ // 数据
322
+ this.rowsdata[index][i] = row
323
+ // 勾选
324
+ this.radio[index].$set(i, true)
325
+ // 判断是否全部选中
326
+ var allState = true
327
+ if (this.model.rows.length != this.radio[index].length) {
328
+ allState = false
329
+ }
330
+ for (var state of this.radio[index]) {
331
+ if (!state) {
332
+ allState = false
333
+ }
334
+ }
335
+ if (allState) {
336
+ this.all.$set(index, true)
337
+ } else {
338
+ this.all.$set(index, false)
339
+ }
340
+ } else {
341
+ // 数据
342
+ this.rowsdata[index][i] = []
343
+ // 不勾选
344
+ this.radio[index].$set(i, false)
345
+ // 任意取消一个则全选状态设为false
346
+ this.all.$set(index, false)
347
+ }
348
+ let z = 0
349
+ this.printModel.rows = []
350
+ for (let i = 0; i < this.all.length; i++) {
351
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
352
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
353
+ this.printModel.rows[z++] = this.rowsdata[i][j]
354
+ }
355
+ }
356
+ }
357
+ }
358
+ },
359
+ watch: {
360
+ 'model.rows' (val) {
361
+ if (val.length === 0) {
362
+ this.sumsmodel = {}
363
+ }
364
+ },
365
+ 'sumsmodel': {
366
+ handler: function (val) {
367
+ this.getotherfooter()
368
+ },
369
+ deep: true
370
+ }
371
+ },
372
+ computed: {
373
+ getCondition () {
374
+ return {
375
+ condition: this.condition,
376
+ f_user_id: this.row.f_user_id
377
+ }
378
+ },
379
+ getExportFields () {
380
+ return {
381
+ 'f_userinfo_code': '客户编号',
382
+ 'f_user_name': '客户姓名',
383
+ 'f_hand_date': '抄表日期',
384
+ 'f_input_date': '下发日期',
385
+ 'f_last_tablebase': '上期底数',
386
+ 'f_tablebase': '本期底数',
387
+ 'f_balance': '上期余额',
388
+ 'f_oughtamount': '用气量',
389
+ 'f_oughtfee': '用气金额',
390
+ 'f_curbalance': '本期余额',
391
+ 'f_whether_pay': '是否缴费',
392
+ 'f_stair1price': '一阶单价',
393
+ 'f_stairamount1': '一阶气量',
394
+ 'f_stair1fee': '一阶用气金额',
395
+ 'f_stair2price': '二阶单价',
396
+ 'f_stair2amount': '二阶气量',
397
+ 'f_stair2fee': '二阶用气金额',
398
+ 'f_stair3price': '三阶单价',
399
+ 'f_stair3amount': '三阶气量',
400
+ 'f_stair3fee': '三阶用气金额',
401
+ 'f_meter_state': '抄表状态',
402
+ 'f_result_state': '抄表结果状态',
403
+ 'f_hand_state': '表单状态',
404
+ 'f_inputtor': '抄表员',
405
+ 'f_input_person': '录入员'
406
+ }
407
+ },
408
+ whetherpaies () {
409
+ return [
410
+ {label: '全部', value: ''},
411
+ {label: '已缴费', value: '是'},
412
+ {label: '未缴费', value: '否'}
413
+ ]
414
+ },
415
+ ischecked () {
416
+ return function (index, i) {
417
+ if (!this.radio[index]) {
418
+ return false
419
+ }
420
+ return this.radio[index][i]
421
+ }
422
+ }
423
+ }
424
+ }
425
+ </script>
426
+
@@ -1,6 +1,8 @@
1
1
  // 分公司特殊组件页面注册
2
2
  import Vue from 'vue'
3
+
3
4
  export default function () {
4
5
  // 换表 挪到公共 加配置了
5
6
  // Vue.component('machine-hand', (resolve) => { require(['./iotHand'], resolve) })
7
+ Vue.component('user-info-detail-manage-new', (resolve) => { require(['./UserInfoDetailManageNew'], resolve) })
6
8
  }