sale-client 4.3.67 → 4.3.69

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.
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ #Wed May 13 15:19:48 CST 2026
2
+ gradle.version=5.2.1
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.3.67",
3
+ "version": "4.3.69",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -459,7 +459,7 @@
459
459
  }
460
460
  console.log('获取到的欠费记录', owes)
461
461
  self.alldue_fee = owes.reduce((total, item) => {
462
- return total + (item.f_oughtfee + item.overdue - item.f_debt_money)
462
+ return total + (item.f_oughtfee + item.overdue)
463
463
  }, 0)
464
464
  console.log('总欠费金额为', self.alldue_fee)
465
465
  self.owes = res.data
@@ -0,0 +1,549 @@
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" width="100%">
8
+ <div class="col-sm-2 form-group">
9
+ <label class="font_normal_body">123开始时间</label>
10
+ <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_start_date"
11
+ class="datepicker"
12
+ condition="f_operate_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">结束时间</label>
20
+ <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_end_date"
21
+ class="datepicker"
22
+ condition="f_operate_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_state" v-model='model.f_state'
31
+ style="width:60%"
32
+ :options='$parent.$parent.jiaofeistates' placeholder='缴费状态'
33
+ close-on-select
34
+ condition="s.f_state = '{}'"></v-select>
35
+ </div>
36
+ <div class="col-sm-2 form-group">
37
+ <label class="font_normal_body">收费类型</label>
38
+ <v-select :value.sync="model.f_type" v-model='model.f_type'
39
+ style="width:60%"
40
+ :options='$parent.$parent.types' placeholder='收费类型'
41
+ close-on-select
42
+ condition="f_type = '{}'"></v-select>
43
+ </div>
44
+ <div class="col-sm-2 form-group">
45
+ <label class="font_normal_body">表具状态</label>
46
+ <v-select :value.sync="model.f_table_state" v-model='model.f_table_state'
47
+ style="width:60%"
48
+ :options='$parent.$parent.tablestates' placeholder='表具状态'
49
+ close-on-select
50
+ condition="f_table_state = '{}'"></v-select>
51
+ </div>
52
+ <div style="float: right">
53
+ <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
54
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
55
+ :field="$parent.$parent.getExportFields" :header="$parent.$parent.other"
56
+ sqlurl="api/af-revenue/logic/saleExport"
57
+ :sql-name="$parent.$parent.isIot ? 'sale_WebChargeQuery' : 'sale_ChargeQuery'"
58
+ template-name='用户收费查询导出'
59
+ :choose-col="true">
60
+ </export-excel>
61
+ <print-data :defaultfield="$parent.$parent.defaultfield"
62
+ :field="$parent.$parent.isIot?$parent.$parent.iotFields:$parent.$parent.fields"
63
+ :is-selected="true" :model="$parent.$parent.printModel"
64
+ @print-data="$parent.$parent.print()" print-name="购气流水"></print-data>
65
+ </div>
66
+ </div>
67
+ </div>
68
+
69
+
70
+ </criteria>
71
+ <data-grid :model="model" class="list_area table_sy" partial='list' v-ref:grid>
72
+ <template partial='head'>
73
+ <tr>
74
+ <th>
75
+ <nobr>收费类型</nobr>
76
+ </th>
77
+ <th v-if="!$parent.$parent.$parent.isIot">
78
+ <nobr>收费区间</nobr>
79
+ </th>
80
+
81
+ <th>
82
+ <nobr>表号</nobr>
83
+ </th>
84
+ <th v-if="!$parent.$parent.$parent.isIot">
85
+ <nobr>上期指数</nobr>
86
+ </th>
87
+ <th v-if="!$parent.$parent.$parent.isIot">
88
+ <nobr>本期指数</nobr>
89
+ </th>
90
+ <th>
91
+ <nobr>气价</nobr>
92
+ </th>
93
+ <th>
94
+ <nobr>气量</nobr>
95
+ </th>
96
+ <th>
97
+ <nobr>气费金额</nobr>
98
+ </th>
99
+ <th>
100
+ <nobr>违约金</nobr>
101
+ </th>
102
+ <th>
103
+ <nobr>减免金额</nobr>
104
+ </th>
105
+ <th v-if="!$parent.$parent.$parent.f_calculation.includes('表端结算')">
106
+ <nobr>上期结余</nobr>
107
+ </th>
108
+ <th v-if="!$parent.$parent.$parent.isIot">
109
+ <nobr>应交金额</nobr>
110
+ </th>
111
+ <th>
112
+ <nobr>实收金额</nobr>
113
+ </th>
114
+ <th v-if="!$parent.$parent.$parent.f_calculation.includes('表端结算')">
115
+ <nobr>本期结余</nobr>
116
+ </th>
117
+ <th>
118
+ <nobr>付款方式</nobr>
119
+ </th>
120
+ <th>
121
+ <nobr>操作员</nobr>
122
+ </th>
123
+ <th>
124
+ <nobr>缴费日期</nobr>
125
+ </th>
126
+ <th>
127
+ <nobr>缴费时间</nobr>
128
+ </th>
129
+ <th>
130
+ <nobr>缴费状态</nobr>
131
+ </th>
132
+ <th>
133
+ <nobr>网点</nobr>
134
+ </th>
135
+ <th>
136
+ <nobr>备注</nobr>
137
+ </th>
138
+ <th>
139
+ <nobr>操作</nobr>
140
+ </th>
141
+ </tr>
142
+ </template>
143
+ <template partial='body' partial='list' v-ref:grid>
144
+ <tr>
145
+ <td style="text-align:center">{{ row.type }}</td>
146
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{ row.f_hand_date }}</td>
147
+
148
+ <td style="text-align:center">{{ row.f_meternumber }}</td>
149
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{ row.f_last_tablebase }}</td>
150
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{ row.f_tablebase }}</td>
151
+ <td style="text-align:center">{{ row.f_price }}</td>
152
+ <td style="text-align:center">{{ row.f_pregas }}</td>
153
+ <td style="text-align:center">{{ $parent.$parent.$parent.round2(row.f_preamount) }}</td>
154
+ <td style="text-align:center">{{ row.f_delaypay }}</td>
155
+ <td style="text-align:center">{{ row.f_jianmian }}</td>
156
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.f_calculation.includes('表端结算')">{{ row.f_balance }}</td>
157
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{ $parent.$parent.$parent.round2(row.f_oughtfee) }}</td>
158
+ <td style="text-align:center">{{ row.f_collection }}</td>
159
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.f_calculation.includes('表端结算')">{{ $parent.$parent.$parent.round2(row.f_curbalance) }}</td>
160
+ <td style="text-align:center">{{ row.f_payment }}</td>
161
+ <td style="text-align:center">{{ row.f_operator }}</td>
162
+ <td style="text-align:center">{{ row.f_operate_date.substring(0, 10) }}</td>
163
+ <td style="text-align:center">{{ row.f_operate_date.substring(11, 19) }}</td>
164
+ <td style="text-align:center">{{ row.f_state }}</td>
165
+ <td style="text-align:center">{{ row.f_depname }}</td>
166
+ <td style="text-align:center">{{ row.f_comments }}</td>
167
+ <td style="text-align:center">
168
+ <button @click.stop="$parent.$parent.$parent.report(row)" class="btn btn-link" name="button"
169
+ type="button"
170
+ v-if="row.f_state==='有效'">票据补打
171
+ </button>
172
+ </td>
173
+ </tr>
174
+ </template>
175
+ <template partial='foot'></template>
176
+ </data-grid>
177
+ </criteria-paged>
178
+ </div>
179
+ <table class="table-hover">
180
+ <tr class="table-bordered" style="position: relative">
181
+ <td
182
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
183
+ 汇总信息
184
+ </td>
185
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
186
+ <!-- 气量合计:&emsp;{{model.sums.f_pregas}}-->
187
+ <!-- </td>-->
188
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
189
+ <!-- 金额合计:&emsp;{{model.sums.f_preamount}}-->
190
+ <!-- </td>-->
191
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
192
+ <!-- 应交合计:&emsp;{{model.sums.f_oughtfee}}-->
193
+ <!-- </td>-->
194
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
195
+ 气量合计:&emsp;{{ round2(sumsmodel.f_pregas)}}
196
+ </td>
197
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
198
+ 实收合计:&emsp;{{ round2(sumsmodel.f_collection) }}
199
+ </td>
200
+ </tr>
201
+ </table>
202
+ <reissue-bill :data="reissue_data" :show.sync="reissue_show" @cancel="reissueOper()"
203
+ @reissue-success="reissueSucc()" v-if="reissue_show"></reissue-bill>
204
+
205
+ </div>
206
+ </template>
207
+
208
+ <script>
209
+ import {HttpResetClass, PagedList} from 'vue-client'
210
+ import co from 'co'
211
+
212
+ let reprintGen = function* (self, row) {
213
+ try {
214
+ let reissueData = {}
215
+ reissueData = Object.assign({}, reissueData, row)
216
+
217
+ reissueData.f_bill_type = row.type
218
+ reissueData.f_bill_style = '普通收据'
219
+ reissueData.f_operator = self.$login.f.name
220
+ reissueData.f_operatorid = self.$login.f.id
221
+ reissueData.f_orgid = self.$login.f.orgid
222
+ reissueData.f_orgname = self.$login.f.orgs
223
+ reissueData.f_depid = self.$login.f.depids
224
+ reissueData.f_depname = self.$login.f.deps
225
+ reissueData.billUrl = self.getBillUrl(row.type)
226
+
227
+ self.reissue_data = reissueData
228
+ self.reissue_show = true
229
+ } catch (error) {
230
+ if (error.status) {
231
+ self.$warn(`加载数据出错, ${JSON.stringify(error)}`, 'CardList')
232
+ }
233
+ throw error
234
+ }
235
+ }
236
+ export default {
237
+ title: '收费',
238
+ data () {
239
+ return {
240
+ reissue_show: false,
241
+ reissue_data: null,
242
+ condition: '1=1',
243
+ model: new PagedList(`${this.row.f_meter_type === '物联网表' ? 'api/af-revenue/sql/sale_WebChargeQuery' : 'api/af-revenue/sql/sale_ChargeQuery'}`, 20, {f_user_id: this.row.f_user_id}, {
244
+ f_collection: 0,
245
+ f_pregas:0
246
+ }),
247
+ isIot: this.row.f_meter_type === '物联网表',
248
+ show: false,
249
+ list: [],
250
+ jiaofeistates: this.$appdata.getParam('缴费状态') ? [{
251
+ label: '全部',
252
+ value: ''
253
+ }, ...this.$appdata.getParam('缴费状态')] : [],
254
+ types: this.$appdata.getParam('收费类型') ? [{
255
+ label: '全部',
256
+ value: ''
257
+ }, ...this.$appdata.getParam('收费类型')] : [],
258
+ tablestates: this.$appdata.getParam('表具状态') ? [{
259
+ label: '全部',
260
+ value: ''
261
+ }, ...this.$appdata.getParam('表具状态')] : [],
262
+ // 控制单选
263
+ radio: [],
264
+ searchValue: this.$appdata.getSingleValue('综合条件查询') ? this.$appdata.getSingleValue('综合条件查询') : 'f_userinfo_id',
265
+ // 选中的页
266
+ all: [],
267
+ other: [],
268
+ f_calculation: '',
269
+ footer: [],
270
+ sumsmodel: {},
271
+ // row数据
272
+ rowsdata: [],
273
+ fields: {
274
+ 'f_userinfo_code': '客户编号',
275
+ 'f_user_name': '客户姓名',
276
+ 'f_pregas': '购气量',
277
+ 'f_price': '单价',
278
+ 'f_preamount': '购气金额',
279
+ 'f_hand_date': '收费区间',
280
+ 'f_operate_date': '缴费时间',
281
+ 'f_operator': '操作员',
282
+ 'f_last_tablebase': '上期指数',
283
+ 'f_tablebase': '本期指数',
284
+ 'f_comments': '备注'
285
+ },
286
+ iotFields: {
287
+ 'f_userinfo_code': '客户编号',
288
+ 'f_user_name': '客户姓名',
289
+ 'f_pregas': '购气量',
290
+ 'f_price': '单价',
291
+ 'f_preamount': '购气金额',
292
+ 'f_operate_date': '缴费时间',
293
+ 'f_operator': '操作员',
294
+ 'f_comments': '备注'
295
+ },
296
+ defaultfield: [
297
+ 'f_userinfo_code',
298
+ 'f_user_name',
299
+ 'f_preamount',
300
+ 'f_pregas',
301
+ 'f_operate_date',
302
+ 'f_operator',
303
+ 'f_comments'
304
+ ],
305
+ printModel: {
306
+ rows: []
307
+ }
308
+ }
309
+ },
310
+ props: ['row'],
311
+ ready () {
312
+ this.$refs.paged.$refs.criteria.model.f_state = ['有效']
313
+ this.$refs.paged.$refs.criteria.model.f_user_id = this.row.f_user_id
314
+ this.f_calculation = this.row.f_calculation
315
+ this.$refs.paged.$refs.criteria.search()
316
+
317
+ },
318
+ methods: {
319
+ // 标准四舍五入保留2位小数
320
+ round2 (val) {
321
+ let num = parseFloat(val) || 0
322
+ return Math.round(num * 100) / 100
323
+ },
324
+ getotherfooter () {
325
+ this.other = []
326
+ this.footer = []
327
+ let otherInData = []
328
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
329
+ let footerData = []
330
+ let exportfield = this.getExportFields
331
+ footerData.push('合计')
332
+ for (var field in this.sumsmodel) {
333
+ footerData.push(`${exportfield[field]}合计:${this.sumsmodel[field]}`)
334
+ }
335
+ this.footer.push(footerData)
336
+ this.other.push(otherInData)
337
+ },
338
+ async search () {
339
+ console.log('aaa:', this.$refs.paged.$refs.criteria.condition)
340
+ this.condition = `${this.$refs.paged.$refs.criteria.condition} and ${this.searchValue} = '${this.row[this.searchValue]}'`
341
+ this.model.search(this.condition, this.model)
342
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
343
+ let http = new HttpResetClass()
344
+ let res = await http.load('POST', `${this.row.f_meter_type === '物联网表' ? 'api/af-revenue/sql/sale_WebChargeQuery' : 'api/af-revenue/sql/sale_ChargeQuery'}`, {
345
+ data: {
346
+ condition: this.condition,
347
+ f_user_id: this.row.f_user_id
348
+ }
349
+ }, {resolveMsg: null, rejectMsg: null})
350
+ this.printModel.rows = res.data
351
+ },
352
+ // 多选框初始化
353
+ selectInit () {
354
+ this.rowsdata = []
355
+ this.all = []
356
+ this.radio = []
357
+ },
358
+ reissueSucc () {
359
+ this.reissue_show = false
360
+ this.$dispatch('refresh')
361
+ },
362
+ reissueOper () {
363
+ this.reissue_data = null
364
+ this.reissue_show = false
365
+ },
366
+ getBillUrl (type) {
367
+ let name = ''
368
+ // 根据type数据 选择调用的Logic
369
+ if (type === '机表收费') {
370
+ name = 'api/af-revenue/report/machine_bill'
371
+ } else if (type === '物联网收费') {
372
+ name = 'api/af-revenue/report/iot_bill'
373
+ } else if (type === '超用收费') {
374
+ name = 'api/af-revenue/report/overuse_bill'
375
+ } else if (type === '其他收费') {
376
+ name = 'api/af-revenue/report/otherCharge_bill'
377
+ } else if (type === '发卡售气') {
378
+ name = 'api/af-revenue/report/sendCard_bill'
379
+ } else if (type === '卡表收费') {
380
+ name = 'api/af-revenue/report/card_bill'
381
+ } else if (type === '预存缴费') {
382
+ name = 'api/af-revenue/report/pre_sell'
383
+ }
384
+ return name
385
+ },
386
+ report (row) {
387
+ let reprint = reprintGen(this, row)
388
+ return co(reprint)
389
+ },
390
+ print () {
391
+ this.selectInit()
392
+ },
393
+ select () {
394
+ let index = this.model.pageIndex - 1
395
+ if (!this.radio[index]) {
396
+ this.radio.$set(index, [])
397
+ }
398
+ if (this.all[index]) {
399
+ // 数据
400
+ this.rowsdata[index] = Object.assign([], this.model.rows)
401
+ // 勾选
402
+ for (var i = 0; i < this.model.rows.length; i++) {
403
+ this.radio[index].$set(i, true)
404
+ }
405
+ } else {
406
+ // 数据
407
+ this.rowsdata[index] = []
408
+ // 不勾选
409
+ for (var i = 0; i < this.model.rows.length; i++) {
410
+ this.radio[index].$set(i, false)
411
+ }
412
+ }
413
+ let z = 0
414
+ for (let i = 0; i < this.all.length; i++) {
415
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
416
+ this.printModel.rows[z++] = this.rowsdata[i][j]
417
+ }
418
+ }
419
+ },
420
+ selectOne (event, row, i) {
421
+ let index = this.model.pageIndex - 1
422
+ if (!this.rowsdata[index]) {
423
+ this.rowsdata[index] = []
424
+ }
425
+ if (!this.radio[index]) {
426
+ this.radio.$set(index, [])
427
+ }
428
+ if (event.target.checked) {
429
+ // 数据
430
+ this.rowsdata[index][i] = row
431
+ // 勾选
432
+ this.radio[index].$set(i, true)
433
+ // 判断是否全部选中
434
+ var allState = true
435
+ if (this.model.rows.length != this.radio[index].length) {
436
+ allState = false
437
+ }
438
+ for (var state of this.radio[index]) {
439
+ if (!state) {
440
+ allState = false
441
+ }
442
+ }
443
+ if (allState) {
444
+ this.all.$set(index, true)
445
+ } else {
446
+ this.all.$set(index, false)
447
+ }
448
+ } else {
449
+ // 数据
450
+ this.rowsdata[index][i] = []
451
+ // 不勾选
452
+ this.radio[index].$set(i, false)
453
+ // 任意取消一个则全选状态设为false
454
+ this.all.$set(index, false)
455
+ }
456
+ let z = 0
457
+ this.printModel.rows = []
458
+ for (let i = 0; i < this.all.length; i++) {
459
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
460
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
461
+ this.printModel.rows[z++] = this.rowsdata[i][j]
462
+ }
463
+ }
464
+ }
465
+ }
466
+ },
467
+ watch: {
468
+ 'model.rows' (val) {
469
+ if (val.length === 0) {
470
+ this.sumsmodel = {}
471
+ }
472
+ },
473
+ 'sumsmodel': {
474
+ handler: function (val) {
475
+ this.getotherfooter()
476
+ },
477
+ deep: true
478
+ }
479
+ },
480
+ computed: {
481
+ getCondition () {
482
+ return {
483
+ condition: this.condition,
484
+ f_user_id: this.row.f_user_id
485
+ }
486
+ },
487
+ getExportFields () {
488
+ let fields
489
+ if (this.isIot) {
490
+ fields = {
491
+ 'f_userinfo_code': '客户编号',
492
+ 'f_user_name': '客户姓名',
493
+ 'type': '收费类型',
494
+ 'f_hand_date': '收费区间',
495
+ 'f_meternumber': '表号',
496
+ 'f_last_tablebase': '上期指数',
497
+ 'f_tablebase': '本期指数',
498
+ 'f_pregas': '气量',
499
+ 'f_price': '气价',
500
+ 'f_preamount': '气费金额',
501
+ 'f_delaypay': '违约金',
502
+ 'f_jianmian': '减免金额',
503
+ 'f_balance': '上期结余',
504
+ 'f_oughtfee': '应交金额',
505
+ 'f_collection': '实收金额',
506
+ 'f_curbalance': '本期结余',
507
+ 'f_payment': '付款方式',
508
+ 'f_operator': '操作员',
509
+ 'f_operate_date': '缴费时间',
510
+ 'f_state': '缴费状态',
511
+ 'f_depname': '网点',
512
+ 'f_comments': '备注'
513
+ }
514
+ } else {
515
+ fields = {
516
+ 'f_userinfo_code': '客户编号',
517
+ 'f_user_name': '客户姓名',
518
+ 'type': '收费类型',
519
+ 'f_meternumber': '表号',
520
+ 'f_pregas': '气量',
521
+ 'f_price': '气价',
522
+ 'f_preamount': '气费金额',
523
+ 'f_delaypay': '违约金',
524
+ 'f_jianmian': '减免金额',
525
+ 'f_balance': '上期结余',
526
+ 'f_collection': '实收金额',
527
+ 'f_curbalance': '本期结余',
528
+ 'f_payment': '付款方式',
529
+ 'f_operator': '操作员',
530
+ 'f_operate_date': '缴费时间',
531
+ 'f_state': '缴费状态',
532
+ 'f_depname': '网点',
533
+ 'f_comments': '备注'
534
+ }
535
+ }
536
+ return fields
537
+ },
538
+ ischecked () {
539
+ return function (index, i) {
540
+ if (!this.radio[index]) {
541
+ return false
542
+ }
543
+ return this.radio[index][i]
544
+ }
545
+ }
546
+ }
547
+ }
548
+ </script>
549
+
@@ -0,0 +1,271 @@
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
+
7
+ <div class="form-horizontal select-overspread container-fluid auto " novalidate partial>
8
+ <div class="row">
9
+
10
+ <div class="col-sm-2 form-group">
11
+ <label class="font_normal_body">开始时间</label>
12
+ <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_start_date"
13
+ class="datepicker"
14
+ condition="f_operate_date >= '{} 00:00:00' "
15
+ placeholder="起始时间"
16
+ style="width:60%"
17
+ v-model="model.f_start_date"
18
+ ></datepicker>
19
+ </div>
20
+ <div class="col-sm-2 form-group" >
21
+ <label class="font_normal_body" >结束时间</label>
22
+ <datepicker :format="'yyyy-MM-dd'" :value.sync="model.f_end_date"
23
+ class="datepicker"
24
+ condition="f_operate_date <= '{} 23:59:59' "
25
+ placeholder="结束时间"
26
+ style="width:60%"
27
+ v-model="model.f_end_date"
28
+ ></datepicker>
29
+ </div>
30
+ <div class="col-sm-2 form-group">
31
+ <label class="font_normal_body">是否有效</label>
32
+ <v-select :value.sync="model.f_state" v-model='model.f_state'
33
+ style="width:60%"
34
+ :options='$parent.$parent.isstates' placeholder='是否有效'
35
+ close-on-select
36
+ condition="f_state = '{}'"></v-select>
37
+ </div>
38
+ <div class="col-sm-2 form-group">
39
+ <label class="font_normal_body">表具状态</label>
40
+ <v-select :value.sync="model.f_table_state" v-model='model.f_table_state'
41
+ style="width:60%"
42
+ :options='$parent.$parent.istablestates' placeholder='表具状态'
43
+ close-on-select
44
+ condition="f_table_state = '{}'"></v-select>
45
+ </div>
46
+
47
+
48
+ <div style="float: right">
49
+ <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
50
+ <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.fields" :printview="true" :is-selected="true" :model="$parent.$parent.model"
51
+ @print-close="$parent.$parent.print()" @print-data="$parent.$parent.print()" print-name="购气流水"></print-data>
52
+ </div>
53
+ </div>
54
+
55
+ </div>
56
+ </criteria>
57
+ <data-grid :model="model" class="list_area table_sy" partial='list' v-ref:grid>
58
+ <template partial='head'>
59
+ <tr>
60
+ <th><nobr>用户编号</nobr></th>
61
+ <th><nobr>姓名</nobr></th>
62
+ <th><nobr>住址</nobr></th>
63
+ <th><nobr>卡号</nobr></th>
64
+ <th><nobr>气量</nobr></th>
65
+ <th><nobr>单价</nobr></th>
66
+ <th><nobr>应交</nobr></th>
67
+ <th v-if="!$parent.$parent.$parent.f_calculation.includes('表端结算')"><nobr>上期结余</nobr></th>
68
+ <th><nobr>收款</nobr></th>
69
+ <th v-if="!$parent.$parent.$parent.f_calculation.includes('表端结算')"><nobr>本期结余</nobr></th>
70
+ <th><nobr>操作类型</nobr></th>
71
+ <th><nobr>操作员 </nobr></th>
72
+ <th><nobr>操作时间 </nobr></th>
73
+ <th><nobr>状态 </nobr></th>
74
+ <th><nobr>备注</nobr></th>
75
+ </tr>
76
+ </template>
77
+ <template partial='body' partial='list' v-ref:grid>
78
+ <tr >
79
+ <td style="text-align:center">{{row.f_userinfo_code}}</td>
80
+ <td style="text-align:center">{{row.f_user_name}}</td>
81
+ <td style="text-align:center">{{row.f_address}}</td>
82
+ <td style="text-align:center">{{row.f_card_id}}</td>
83
+ <td style="text-align:center">{{row.gas}}</td>
84
+ <td style="text-align:center">{{row.price}}</td>
85
+ <td style="text-align:center">{{$parent.$parent.$parent.round2(row.fee)}}</td>
86
+ <td style="text-align:center;white-space:nowrap;" v-if="!$parent.$parent.$parent.f_calculation.includes('表端结算')">{{$parent.$parent.$parent.round2(row.f_balance)}}</td>
87
+ <td style="text-align:center">{{row.f_collection}}</td>
88
+ <td style="text-align:center;white-space:nowrap;" v-if="!$parent.$parent.$parent.f_calculation.includes('表端结算')">{{$parent.$parent.$parent.round2(row.f_curbalance)}}</td>
89
+ <td style="text-align:center">{{row.type}}</td>
90
+ <td style="text-align:center">{{row.f_operator}}</td>
91
+ <td style="text-align:center">{{row.f_operate_date}}</td>
92
+ <td style="text-align:center">{{row.f_state}}</td>
93
+ <td style="text-align:center">{{row.note}}</td>
94
+ </tr>
95
+ </template>
96
+ <template partial='foot'></template>
97
+ </data-grid>
98
+ </criteria-paged>
99
+ </div>
100
+ <table class="table-hover">
101
+ <tr class="table-bordered" style="position: relative">
102
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
103
+ 汇总信息
104
+ </td>
105
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
106
+ 气量合计:&emsp;{{round2(model.sums.gas)}}
107
+ </td>
108
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
109
+ 金额合计:&emsp;{{round2(model.sums.fee)}}
110
+ </td>
111
+ </tr>
112
+ </table>
113
+ </div>
114
+ </template>
115
+
116
+ <script>
117
+ import {HttpResetClass, PagedList} from 'vue-client'
118
+
119
+ export default {
120
+ title: '操作查询',
121
+ data () {
122
+ return {
123
+ condition: '1=1',
124
+ model: new PagedList('api/af-revenue/sql/sale_RecordQuery', 20, {}, {
125
+ fee: 0,
126
+ gas: 0
127
+ }),
128
+ f_calculation: '',
129
+ isstates: this.$appdata.getParam('是否有效') ? [{
130
+ label: '全部',
131
+ value: ''
132
+ }, ...this.$appdata.getParam('是否有效')] : [],
133
+ istablestates: this.$appdata.getParam('表具状态') ? [{
134
+ label: '全部',
135
+ value: ''
136
+ }, ...this.$appdata.getParam('表具状态')] : [],
137
+ // 控制单选
138
+ radio: [],
139
+ searchValue: this.$appdata.getSingleValue('综合条件查询') ? this.$appdata.getSingleValue('综合条件查询') : 'f_userfiles_id',
140
+ // 选中的页
141
+ all: [],
142
+ // row数据
143
+ rowsdata: [],
144
+ fields: {'f_userinfo_code': '客户编号', 'f_user_name': '客户姓名', 'f_address': '地址', 'f_card_id': '卡号', 'fee': '金额', 'gas': '气量','price': '单价', 'type': '类型', 'f_operator': '操作员', 'f_operate_date': '操作时间'},
145
+ defaultfield: [
146
+ 'f_userinfo_code', 'f_user_name', 'fee', 'gas', 'type', 'f_operate_date'
147
+ ],
148
+ printModel: {
149
+ rows: []
150
+ }
151
+ }
152
+ },
153
+ props: ['row'],
154
+ ready () {
155
+ this.$refs.paged.$refs.criteria.model.f_state = ['有效']
156
+ this.f_calculation = this.row.f_calculation
157
+ console.log('########f_calculation', this.f_calculation)
158
+ this.$refs.paged.$refs.criteria.search()
159
+ },
160
+ methods: {
161
+ // 标准四舍五入保留2位小数
162
+ round2 (val) {
163
+ let num = parseFloat(val) || 0
164
+ return Math.round(num * 100) / 100
165
+ },
166
+ async search () {
167
+ this.condition = `${this.$refs.paged.$refs.criteria.condition} and ${this.searchValue} = '${this.row[this.searchValue]}' `
168
+ this.model.search(this.condition, this.model)
169
+ let http = new HttpResetClass()
170
+ let res = await http.load('POST', 'api/af-revenue/sql/sale_RecordQuery', {
171
+ data: {
172
+ condition: this.condition
173
+ }
174
+ }, {resolveMsg: null, rejectMsg: null})
175
+ this.printModel.rows = res.data
176
+ },
177
+ // 多选框初始化
178
+ selectInit () {
179
+ this.rowsdata = []
180
+ this.all = []
181
+ this.radio = []
182
+ },
183
+ print () {
184
+ this.selectInit()
185
+ },
186
+ select () {
187
+ let index = this.model.pageIndex - 1
188
+ if (!this.radio[index]) {
189
+ this.radio.$set(index, [])
190
+ }
191
+ if (this.all[index]) {
192
+ // 数据
193
+ this.rowsdata[index] = Object.assign([], this.model.rows)
194
+ // 勾选
195
+ for (var i = 0; i < this.model.rows.length; i++) {
196
+ this.radio[index].$set(i, true)
197
+ }
198
+ } else {
199
+ // 数据
200
+ this.rowsdata[index] = []
201
+ // 不勾选
202
+ for (var i = 0; i < this.model.rows.length; i++) {
203
+ this.radio[index].$set(i, false)
204
+ }
205
+ }
206
+ let z = 0
207
+ this.printModel.rows = []
208
+ for (let i = 0; i < this.all.length; i++) {
209
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
210
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
211
+ this.printModel.rows[z++] = this.rowsdata[i][j]
212
+ }
213
+ }
214
+ }
215
+ },
216
+ selectOne (event, row, i) {
217
+ let index = this.model.pageIndex - 1
218
+ if (!this.rowsdata[index]) {
219
+ this.rowsdata[index] = []
220
+ }
221
+ if (!this.radio[index]) {
222
+ this.radio.$set(index, [])
223
+ }
224
+ if (event.target.checked) {
225
+ // 数据
226
+ this.rowsdata[index][i] = row
227
+ // 勾选
228
+ this.radio[index].$set(i, true)
229
+ // 判断是否全部选中
230
+ var allState = true
231
+ if (this.model.rows.length != this.radio[index].length) {
232
+ allState = false
233
+ }
234
+ for (var state of this.radio[index]) {
235
+ if (!state) {
236
+ allState = false
237
+ }
238
+ }
239
+ this.all.$set(index, allState)
240
+ } else {
241
+ // 数据
242
+ this.rowsdata[index][i] = []
243
+ // 不勾选
244
+ this.radio[index].$set(i, false)
245
+ // 任意取消一个则全选状态设为false
246
+ this.all.$set(index, false)
247
+ }
248
+ let z = 0
249
+ this.printModel.rows = []
250
+ for (let i = 0; i < this.all.length; i++) {
251
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
252
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
253
+ this.printModel.rows[z++] = this.rowsdata[i][j]
254
+ }
255
+ }
256
+ }
257
+ }
258
+ },
259
+ computed: {
260
+ ischecked () {
261
+ return function (index, i) {
262
+ if (!this.radio[index]) {
263
+ return false
264
+ }
265
+ return this.radio[index][i]
266
+ }
267
+ }
268
+ }
269
+ }
270
+ </script>
271
+
@@ -34,12 +34,12 @@
34
34
  import {HttpResetClass} from 'vue-client'
35
35
  // 导入IC卡相关查询界面
36
36
  import ChangeMeterQueryUser from '../../components/common/userinfo_detail/ic_detail/ChangeMeterQueryUser'
37
- import ChargeQueryUser from '../../components/common/userinfo_detail/ic_detail/ChargeQueryUser'
37
+ import ChargeQueryUser from './ChargeQueryUser'
38
38
  import ChargeRecordQueryUser from '../../components/common/userinfo_detail/ic_detail/ChargeRecordQuery'
39
39
  import FillCardQueryUser from '../../components/common/userinfo_detail/ic_detail/FillCardQueryUser'
40
40
  import HandQueryUser from './HandQueryUser'
41
41
  import OtherChargeQueryUser from '../../components/common/userinfo_detail/ic_detail/OtherChargeQueryUser'
42
- import RecordQueryUser from '../../components/common/userinfo_detail/ic_detail/RecordQueryUser'
42
+ import RecordQueryUser from './/RecordQueryUser'
43
43
  import TransferQueryUser from '../../components/common/userinfo_detail/ic_detail/TransferQueryUser'
44
44
  import CardHandRecord from '../../components/common/userinfo_detail/ic_detail/CardHandRecord'
45
45
  import AutomaticPurse from '../../components/common/userinfo_detail/ic_detail/AutomaticPurse'
@@ -40,4 +40,5 @@ export default function () {
40
40
  })
41
41
  Vue.component('user-info-detail-manage-new', (resolve) => { require(['./UserInfoDetailManageNew'], resolve) })
42
42
  Vue.component('stairinfo', (resolve) => { require(['./Stairinfo'], resolve) })
43
+ Vue.component('charge-query-user', (resolve) => { require(['./ChargeQueryUser.vue'], resolve) })
43
44
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="auto" style="overflow:auto;">
2
+ <div class="row" >
3
3
  <validator name='v'>
4
4
  <form novalidate class="form-horizontal">
5
5
  <div class="row auto" >
@@ -163,13 +163,14 @@
163
163
  :options='ladder'
164
164
  close-on-select clear-button></v-select>
165
165
  </div>
166
- <div v-if="config.hasAudit" class="col-sm-4 form-group">
167
- <label class="font_normal_body" :class="[$v.f_audit_person.required ? 'has-error' : 'has-success']">&nbsp;审核人员&nbsp;</label>
168
- <input v-show="false" v-model="model.f_audit_person"
166
+ <div v-if="config.hasAudit" class="col-sm-4 form-group" :class="[$v.f_audit_person.required ? 'has-error' : 'has-success']">
167
+ <label class="font_normal_body" >&nbsp;审核人员&nbsp;</label>
168
+ <input v-show="false" v-model="$refs.f_audit_person.selectedItems"
169
169
  v-validate:f_audit_person='{required: true}'>
170
170
  <v-select :value.sync="model.f_audit_person"
171
171
  :options='auditor' placeholder='请选择'
172
- selected="审核人员"
172
+ selected="审核人员" v-ref:f_audit_person
173
+ v-model='model.f_audit_person'
173
174
  :value-single="true"
174
175
  style="width:60%"
175
176
  close-on-select></v-select>
@@ -208,7 +209,7 @@ let getPrice = async function (self) {
208
209
  await self.$LoadParams.loadParam(self.$login.f.orgid)
209
210
  await self.$getConfig(self, 'ChargeMeter')
210
211
  self.isGas = (self.row.f_collection_type == '按气量')
211
-
212
+ self.config.hasAudit = true
212
213
  let http = new HttpResetClass()
213
214
  let param = {
214
215
  tablename: 't_detailprice',
@@ -472,6 +473,7 @@ export default {
472
473
  f_meter_type: this.row.f_meter_type, // 表类型
473
474
  f_meter_brand: this.row.f_meter_brand, // 表品牌
474
475
  f_meter_base: this.row.f_meter_base, // 表底数
476
+ f_meter_style:this.row.f_meter_style,
475
477
  f_gasbrand_id: this.row.f_gasbrand_id, // 气表品牌ID
476
478
  brand_id: this.row.brand_id, // 品牌ID
477
479
  f_alias: this.row.f_alias, // 别名(如:"TianXinNEWSystem")