manage-client 4.1.85-tcls → 4.1.85

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 (27) hide show
  1. package/build/dev-server.js +99 -181
  2. package/package.json +1 -1
  3. package/src/filiale/jinbin/exportConfig.js +1110 -0
  4. package/src/filiale/jinbin/sale/businessquery/ChargeQuery.vue +1372 -0
  5. package/src/filiale/jinbin/sale.js +7 -0
  6. package/src/filiale/tongchuan/ChangeMeterQuery.vue +702 -730
  7. package/src/filiale/tongchuan/ChargeQuery.vue +1487 -1514
  8. package/src/filiale/tongchuan/DisableQuery.vue +523 -550
  9. package/src/filiale/tongchuan/FillCardQuery.vue +573 -598
  10. package/src/filiale/tongchuan/FillGasQuery.vue +533 -560
  11. package/src/filiale/tongchuan/HandplanQuery.vue +1332 -1358
  12. package/src/filiale/tongchuan/RecordInfoQuery.vue +1493 -1493
  13. package/src/filiale/tongchuan/ReverseQuery.vue +450 -477
  14. package/src/filiale/tongchuan/config/exportConfig.js +918 -1102
  15. package/src/filiale/tongchuan/sale.js +0 -36
  16. package/src/filiale/tongchuan/sellingChargePrice.vue +714 -754
  17. package/src/main.js +1 -1
  18. package/src/filiale/tongchuan/CancellationQuery.vue +0 -455
  19. package/src/filiale/tongchuan/EnableQuery.vue +0 -489
  20. package/src/filiale/tongchuan/OtherChargeDetailQuery.vue +0 -74
  21. package/src/filiale/tongchuan/OtherChargeQuery.vue +0 -751
  22. package/src/filiale/tongchuan/PrivilegeQuery.vue +0 -420
  23. package/src/filiale/tongchuan/ResSelectUserGroup.vue +0 -384
  24. package/src/filiale/tongchuan/TransferQuery.vue +0 -528
  25. package/src/filiale/tongchuan/TransferRecordQuery.vue +0 -202
  26. package/src/filiale/tongchuan/overDueQuery.vue +0 -497
  27. package/src/filiale/tongchuan/priceadjustQuery.vue +0 -560
@@ -1,754 +1,714 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main" @keyup.enter="search">
4
- <div class="flex" :class="{showbottom:showbottomsum}" v-if="!show">
5
- <criteria-paged :model="model" v-ref:paged @sort="sort">
6
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri >
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- <div class="row">
9
- <div class="col-sm-2 form-group">
10
- <label for="startDate" class="font_normal_body">开始日期</label>
11
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
12
- v-model="model.startDate"
13
- :value.sync="model.startDate"
14
- :format="'yyyy-MM-dd HH:mm:ss'"
15
- :show-reset-button="true"
16
- condition="f_operate_date >= '{}'">
17
- </datepicker>
18
- </div>
19
- <div class="col-sm-2 form-group">
20
- <label for="endDate" class="font_normal_body">结束日期</label>
21
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
- v-model="model.endDate"
23
- :value.sync="model.endDate"
24
- :format="'yyyy-MM-dd HH:mm:ss'"
25
- :show-reset-button="true"
26
- condition="f_operate_date <= '{}'">
27
- </datepicker>
28
- </div>
29
- <div class="col-sm-2 form-group">
30
- <label class="font_normal_body">客户编号</label>
31
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
32
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
33
- </div>
34
- <div class="col-sm-2 form-group">
35
- <label class="font_normal_body">气表类型</label>
36
- <v-select :value.sync="model.metertypes" v-model="model.metertypes"
37
- @change="$parent.$parent.metertypeschange"
38
- condition="f_meter_type = '{}'" multiple
39
- placeholder='气表类型' :options="$parent.$parent.metertypes"
40
- close-on-select v-ref:type>
41
- </v-select>
42
-
43
- </div>
44
-
45
-
46
-
47
-
48
-
49
- <div class="span" style="float:right;">
50
- <button class="button_search button_spacing" v-show="false" @click="$parent.$parent.ReadIDCard()">读取身份证</button>
51
- <read-card :is-single.sync="$parent.$parent.isSingleUser" @read-info="$parent.$parent.cardBtn" v-ref:readcard></read-card>
52
- <button class="button_search button_spacing" @click="search()">查询</button>
53
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
54
-
55
- <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
56
- :field="$parent.$parent.getfield" :header="$parent.$parent.other"
57
- :defaultselect="$parent.$parent.defaultexport"
58
- sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="findS" template-name='气费阶梯明细导出'
59
- :choose-col="true">
60
- </export-excel>
61
-
62
- <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
63
- :defaultfield="$parent.$parent.defaultfield"
64
- titletable="气费阶梯明细" :starthead="$parent.$parent.getstart"
65
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
66
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
67
-
68
- </div>
69
- </div>
70
- <div class="row" v-show="$parent.$parent.criteriaShow">
71
- <res-select-user-group
72
- :operator-initres="$parent.$parent.initres"
73
- :user-initres="$parent.$parent.userInitres"
74
- :show-component="['company','department','operator','slicearea','user_company']"
75
- @re-res="$parent.$parent.getRes"
76
- @re-us-res="$parent.$parent.getUserRes"
77
- v-ref:usersel>
78
- </res-select-user-group>
79
- <div class="col-sm-2 form-group">
80
- <label class="font_normal_body">客户名称</label>
81
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
82
- condition="f_user_name like '%{}%'" placeholder="客户名称">
83
- </div>
84
- <!-- <div class="col-sm-2 form-group">-->
85
- <!-- <label class="font_normal_body">客户电话</label>-->
86
- <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"-->
87
- <!-- condition="f_user_phone like '%{}%'" placeholder="客户电话">-->
88
- <!-- </div>-->
89
- <!-- <div class="col-sm-2 form-group">-->
90
- <!-- <label class="font_normal_body">身份证号</label>-->
91
- <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_idnumber"-->
92
- <!-- condition="f_idnumber like '%{}%'" placeholder="身份证号">-->
93
- <!-- </div>-->
94
- <!-- <div class="col-sm-2 form-group">-->
95
- <!-- <label class="font_normal_body">客户地址</label>-->
96
- <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"-->
97
- <!-- condition="f_address like '%{}%'" placeholder='客户地址'>-->
98
- <!-- </div>-->
99
-
100
- <div class="col-sm-2 form-group">
101
- <label class="font_normal_body">气价类型</label>
102
- <v-select :value.sync="model.pricetypes" v-model="model.pricetypes"
103
- @change="$parent.$parent.pricetypechanged"
104
- placeholder='气价类型' :options="$parent.$parent.pricetypes"
105
- close-on-select v-ref:type>
106
- </v-select>
107
- </div>
108
-
109
-
110
- <div class="col-sm-2 form-group">
111
- <label class="font_normal_body">气价名称</label>
112
- <v-select :value.sync="model.pricename"
113
- v-model="model.pricename"
114
- @change="$parent.$parent.pricenamechanged"
115
- :options="$parent.$parent.pricename"
116
- condition="f_price_name in {}"
117
- ></v-select>
118
- </div>
119
- <div class="col-sm-2 form-group">
120
- <label class="font_normal_body">单价</label>
121
- <input type="text" style="width:60%" class="input_search" v-model="model.f_price"
122
- condition="f_price = '%{}%'" placeholder='单价'>
123
- </div>
124
-
125
- <div class="col-sm-2 form-group">
126
- <label class="font_normal_body">客户类型</label>
127
- <v-select :value.sync="model.usertypes" v-model="model.usertypes"
128
- @change="$parent.$parent.usertypechange"
129
- condition="f_user_type = '{}'"
130
- placeholder='客户类型' :options="$parent.$parent.usertypes"
131
- close-on-select v-ref:type>
132
- </v-select>
133
- </div>
134
- <div class="col-sm-2 form-group">
135
- <label class="font_normal_body">用气类型</label>
136
- <v-select :value.sync="model.gaspropertiestyps" v-model="model.gaspropertiestyps"
137
- @change="$parent.$parent.gaspropertieschange"
138
- condition="f_gasproperties = '{}'"
139
- placeholder='用气类型' :options="$parent.$parent.gaspropertiestyps"
140
- close-on-select v-ref:type>
141
- </v-select>
142
- </div>
143
-
144
-
145
- <div class="col-sm-2 form-group">
146
- <label class="font_normal_body">收费类型</label>
147
- <v-select :value.sync="model.typesss" v-model="model.typesss"
148
- @change="$parent.$parent.typechangesss" multiple
149
- condition="f_type in {}"
150
- placeholder='收费类型' :options="$parent.$parent.typesss"
151
- close-on-select v-ref:type>
152
-
153
- </v-select>
154
- </div>
155
-
156
- </div>
157
- </div>
158
- </criteria>
159
-
160
- <data-grid :model="model" partial='list' class="list_area table_sy" style="height: 95%" v-ref:grid>
161
- <template partial='head'>
162
- <tr>
163
- <th>
164
- <data-order field="f_userinfo_code" name="客户编号"
165
- :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
166
- </th>
167
- <th>
168
- <nobr>客户名称</nobr>
169
- </th>
170
- <th>
171
- <nobr>客户类型</nobr>
172
- </th>
173
- <th>
174
- <nobr>用气性质</nobr>
175
- </th>
176
- <th>
177
- <nobr>气表类型</nobr>
178
- </th>
179
- <th>
180
- <nobr>气价名称</nobr>
181
- </th>
182
- <th>
183
- <nobr>收费类型</nobr>
184
- </th>
185
- <th>
186
- <nobr>单价</nobr>
187
- </th>
188
- <th>
189
- <nobr>气量</nobr>
190
- </th>
191
- <th>
192
- <nobr>气费</nobr>
193
- </th>
194
- <th>
195
- <nobr>操作员人员</nobr>
196
- </th>
197
- <th>
198
- <nobr>操作员部门</nobr>
199
- </th>
200
- <th>
201
- <nobr>操作员公司</nobr>
202
- </th>
203
- <th>
204
- <nobr>用户公司</nobr>
205
- </th>
206
- </tr>
207
- </template>
208
- <template partial='body'>
209
- <td style="text-align: center;">
210
- <nobr>{{row.f_userinfo_code}}</nobr>
211
- </td>
212
- <td style="text-align: center;"><nobr>
213
- <nobr>{{row.f_user_name}}</nobr>
214
- </nobr> </td>
215
- <td style="text-align: center;">
216
- <nobr>{{row.f_user_type}}</nobr>
217
- </td>
218
- <td style="text-align: center;">
219
- <nobr>{{row.f_gasproperties}}</nobr>
220
- </td>
221
- <td style="text-align: center;">
222
- <nobr>{{row.f_meter_type}}</nobr>
223
- </td>
224
- <td style="text-align: center;">
225
- <nobr>{{row.f_price_name}}</nobr>
226
- </td>
227
- <td style="text-align: center;">
228
- <nobr>{{row.f_type}}</nobr>
229
- </td>
230
- <td style="text-align: center;">
231
- <nobr>{{row.f_price}}</nobr>
232
- </td>
233
- <td style="text-align: center;">
234
- <nobr>{{row.f_gas}}</nobr>
235
- </td>
236
- <td style="text-align: center;">
237
- <nobr>{{row.f_money}}</nobr>
238
- </td>
239
- <td style="text-align: center;">
240
- <nobr>{{row.f_operator}}</nobr>
241
- </td>
242
- <td style="text-align: center;">
243
- <nobr>{{row.f_depname}}</nobr>
244
- </td>
245
- <td style="text-align: center;">
246
- <nobr>{{row.f_orgname}}</nobr>
247
- </td>
248
- <td style="text-align: center;">
249
- <nobr>{{row.f_us_orgname}}</nobr>
250
- </td>
251
-
252
- </template>
253
- <template partial='foot'></template>
254
- </data-grid>
255
- </criteria-paged>
256
- <table class="table-hover">
257
- </table>
258
- </div>
259
- </div>
260
- <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
261
- <article slot="modal-body">
262
- <upload :blodid="selected.f_userinfo_id" :businessid="selected.id" v-ref:upload isupload="false" takeimg="false" fusetype="%收费" :isremark="false" style="width:auto" ></upload>
263
- </article>
264
- <footer slot="modal-footer" class="modal-footer">
265
- </footer>
266
- </modal>
267
- </div>
268
- <high-meter-idcard :show.sync="false" v-ref:highcard ></high-meter-idcard>
269
- </template>
270
-
271
- <script>
272
- import {HttpResetClass, PagedList} from 'vue-client'
273
- import exportConfig from './config/exportConfig'
274
- import ResSelectUserGroup from './ResSelectUserGroup.vue'
275
- let cardBtnGen = async function (self, val) {
276
- self.cardInfo = val.data
277
-
278
- // 判断读卡是否需要卡密码
279
- console.log('读卡上的信息', self.cardInfo)
280
-
281
- if (self.cardInfo.NewParam) {
282
- if (self.cardInfo.NewParam.error) {
283
- if (self.cardInfo.NewParam.error === '0001') {
284
- // 需要重新读卡并传卡密码
285
- if (self.model.rows.length == 1 && self.model.rows[0].f_alias === self.cardInfo.Factory) {
286
- self.readCardParam = self.model.rows[0].f_card_password
287
- self.cardInfo = await self.$refs.paged.$refs.cri.$refs.readcard.readCard2(self.model.rows[0].f_card_password)
288
- } else {
289
- self.$showAlert('此卡需要先获取客户信息。请通过条件查询该客户信息之后进行读卡!!', 'warning', 2000)
290
- return
291
- }
292
- }
293
- }
294
- }
295
- self.card=self.cardInfo.CardID
296
- self.search()
297
- }
298
- let readySomething = async function (self) {
299
- //加载抄表册
300
- self.initmeterbook();
301
- // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
302
- // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
303
- self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
304
- self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
305
- // self.$refs.paged.$refs.cri.model.f_state=['有效'];
306
- // self.$refs.paged.$refs.cri.search()
307
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
308
- await self.$MagLoadParams.loadParam()
309
- self.initParams()
310
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums;
311
- }
312
- export default {
313
- components: {
314
- 'res-select-user-group': ResSelectUserGroup
315
- },
316
- props:['data'],
317
- title: '气阶查询',
318
- data() {
319
- return {
320
- IdCardInfo:'',
321
- card:'',
322
- isSingleUser: null,
323
- startDate1:'',
324
- endDate1:'',
325
- resshow:['company','department','operator','slicearea'],
326
- other:[],
327
-
328
- footer:[],
329
- config: {
330
- defaultPrint: ['f_userinfo_code', 'f_user_name','f_stairamount1', 'f_stair2amount', 'f_stair3amount','f_operate_date']
331
- },
332
- //排序
333
- orderitem:'f_operate_date desc',
334
- orderFields: {
335
- f_operate_date: 'no'
336
- },
337
- //f_price_name:[],
338
- gasproperties:[],
339
- showinfo: false,
340
- data: {},
341
- getstart:'',
342
- show:false,
343
- rowdata:{},
344
- initres: {
345
- org:[this.$login.f.orgid],
346
- dep:[],
347
- user:[]
348
- },
349
- userInitres: {
350
- org: [],
351
- dep: [],
352
- user: []
353
- },
354
- model: new PagedList('api/af-revenue/sql/findS', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`},),
355
- criteriaShow: false,
356
- orgCondtionStr: '',
357
- userOrgConditionStr: '',
358
- // 下拉框
359
- meterbrands: [],
360
- pricenames: [],
361
- prices: [],
362
- area: [],
363
- //默认打印列
364
- defaultfield: [],
365
- //小区
366
- residentialArea: [],
367
- sumsmodel: {},
368
- f_filialeid: this.$login.f.orgid,
369
- wxstate:[
370
- {label: '全部', value: ''},
371
- {label: '已退款', value: `= '3'`},
372
- {label: '未退款', value: `!= '3'`}
373
- ],
374
- privilege_money:[
375
- {label: '全部', value: ''},
376
- {label: '已优惠', value: '> 0'},
377
- {label: '未优惠', value: '= 0'}
378
- ],
379
- showupload:false,
380
- selected:{},
381
- meterbooks:[{label: '全部',value: ''}], //抄表册
382
- inputtores:[{label: '全部',value: ''}],
383
- writecard:[{label: '全部',value: ''},{label: '已写卡',value: '已写卡'},{label: '未写卡',value: '未写卡'}],
384
- bluetoothpackage:[{label: '全部',value: ''},{label: '发送成功',value: '发送成功'},{label: '执行成功',value: '执行成功'}],
385
- allorgid:[],
386
- tempfalg :false,
387
- lastorgstr:'',
388
- // pos设备列表
389
- posEquipment: [{label: '全部',value: ''}],
390
- showbottomsum:false //页面下方是否有合计: 默认为false, 在watch修改
391
- }
392
- },
393
- ready() {
394
- this.$refs.paged.$refs.cri.model.f_state=['有效']
395
- this.getaddress()
396
- this.getEquipment()
397
- //加载抄表册
398
- this.$MagGetSaleParam.initinputtor();
399
- this.getinputtores();
400
- // this.initres.dep.push(this.$login.f.depids)
401
- readySomething(this).then(() => {
402
- this.$emit('ready')
403
- }).catch((error) => {
404
- this.$emit('error', error)
405
- })
406
- },
407
- methods: {
408
- pricetypechanged(){
409
- this.$refs.paged.$refs.cri.model.f_price_type = []
410
- },
411
- usertypechange(){
412
- this.$refs.paged.$refs.cri.model.f_user_type = []
413
- },
414
- gaspropertieschange(){
415
- this.$refs.paged.$refs.cri.model.f_gasproperties = []
416
- },
417
- metertypeschange(){
418
- this.$refs.paged.$refs.cri.model.f_meter_type = []
419
- },
420
- typechangesss(){
421
- this.$refs.paged.$refs.cri.model.f_type = []
422
- },
423
- pricenamechanged(){
424
- this.$refs.paged.$refs.cri.model.f_price_name = []
425
- },
426
-
427
-
428
- ReadIDCard(){
429
- this.$refs.highcard.sendMsg(this.$refs.highcard.CLT_MSG.READ_IDCARD, (msg) => {
430
- console.log('======',msg)
431
- if(msg.err !== 0){ return}
432
- this.IdCardInfo=msg.strID
433
- })
434
- if(this.IdCardInfo) {
435
- this.search()
436
- }else{
437
- alert("读取失败,找不到用户信息")
438
- }
439
- },
440
- cardBtn (val) {
441
- // this.clear()
442
- cardBtnGen(this, val)
443
- },
444
- async initmeterbook(orgstr){
445
- if(orgstr == null ){
446
- orgstr = this.f_filialeid;
447
- }
448
- //获取新的抄表册,先去清理所有的抄表册
449
- this.$GetSaleParam.meterbooks = [];
450
- //开始加载新的抄表册
451
- await this.$LoadParams.loadMeterBook(orgstr)
452
- this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
453
- },
454
- async getinputtores () {
455
- // 获取抄表员
456
- let rs = []
457
- if (this.$login.f.f_gasman.length > 0) {
458
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
459
- let temp = {
460
- label: this.$login.f.f_gasman[i].name,
461
- value: this.$login.f.f_gasman[i].name
462
- }
463
- rs.push(temp)
464
- }
465
- }
466
- this.inputtores = [{label: '全部', value: ''}, ...rs]
467
- },
468
- //显示附件
469
- view(row){
470
- this.showupload = true
471
- this.selected= row
472
- },
473
- getotherfooter () {
474
- // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
475
- // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
476
- this.other = [];
477
- this.footer = [];
478
- let exportdata = this.getCondition;
479
- let otherInData = [];
480
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
481
- let footerData = [], exportfield = this.getfield;
482
- footerData.push("合计");
483
- let self = this;
484
- for (var field in self.sumsmodel) {
485
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
486
- }
487
- this.footer.push(footerData);
488
- this.other.push(otherInData);
489
- },
490
- calculate(rows){
491
- let data = []
492
- rows.forEach((row, n) => {
493
- data[n] = {label: row.f_residential_area, value: row.id}
494
- })
495
- return data
496
- },
497
-
498
- search(){
499
-
500
- this.$refs.paged.$refs.cri.search()
501
- },
502
- cancel() {
503
- this.show = false
504
- },
505
- showmsg(obj){
506
- this.rowdata=obj
507
- this.show=true
508
- },
509
- userTypeChange () {
510
- this.gasproperties=[]
511
- if(this.$refs.paged.$refs.cri.model !==null) {
512
- this.$refs.paged.$refs.cri.model.f_gasproperties=''
513
- this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
514
- }
515
- else{
516
- this.gasproperties =[{label: '全部', value: ''}]
517
- }
518
- },
519
- initParams() {
520
- // 初始化气表品牌
521
- let brandArr = []
522
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
523
- let temp = {}
524
- temp.label = item.label
525
- temp.value = item.value.f_meter_brand
526
- brandArr.push(temp)
527
- })
528
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
529
- //初始化气表价格
530
- this.prices = this.$MagGetSaleParam.getPrices();
531
- },
532
- selfSearch(args) {
533
- if (this.data) {
534
- this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
535
- this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
536
- }
537
-
538
- let f_orgstr = this.orgCondtionStr + this.userOrgConditionStr
539
- args.condition = `${args.condition} ` + f_orgstr
540
- if(this.card!=''){
541
- args.condition+=` and f_card_id='${this.card}'`
542
- }
543
- if(this.IdCardInfo!=''){
544
- args.condition +=` and f_idnumber='${this.IdCardInfo}'`
545
- }
546
- this.model.search(args.condition, args.model)
547
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums;
548
- this.card=''
549
- this.IdCardInfo=''
550
- },
551
- clear() {
552
- console.log('========',this.$refs.paged.$refs.cri.$refs.usersel)
553
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
554
- this.$refs.paged.$refs.cri.model[key] = []
555
- })
556
- // 清空组织、片区、人员
557
- if (this.$refs.paged.$refs.cri.$refs.usersel && this.$refs.paged.$refs.cri.$refs.usersel.resetAll) {
558
- this.$refs.paged.$refs.cri.$refs.usersel.resetAll()
559
- }
560
- this.orgCondtionStr = ''
561
- this.userOrgConditionStr = ''
562
- },
563
- dealmsg(val,startDate,endDate) {
564
- val.model = this.model.model
565
- startDate=this.startDate1
566
- endDate=this.endDate1
567
- this.$dispatch('deal-msg', val,startDate,endDate)
568
- },
569
- show() {
570
- this.criteriaShow = true
571
- },
572
- hidden() {
573
- this.criteriaShow = !this.criteriaShow
574
- },
575
- async getRes(condition,obj) {
576
- this.orgCondtionStr = condition
577
- this.orgname = obj.orgnames[0]
578
- this.depname = obj.depnames[0]
579
- },
580
- getUserRes (condition) {
581
- this.userOrgConditionStr = condition
582
- },
583
- async updateParams() {
584
- await this.$MagLoadParams.loadParam(this.f_filialeid)
585
- this.inputtores = [];
586
- this.inputtores.push({label: "全部", value: ""})
587
- if(this.allorgid!=null){
588
- this.allorgid.forEach((res)=>{
589
- this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
590
- })
591
- }
592
- this.initParams()
593
- },
594
- sort (field, rule) {
595
- // 将所有排序方式设为不排序,实现相互排斥
596
- for (let key in this.orderFields) {
597
- if (key === field) {
598
- this.orderFields[key] = rule
599
- } else {
600
- this.orderFields[key] = 'no'
601
- }
602
- }
603
- // 如果新规则不排序,还原为默认排序
604
- if (rule === 'no') {
605
- this.model.paramSource.orderitem = `'${this.orderitem}'`
606
- } else {
607
- this.model.paramSource.orderitem = `'${field} ${rule}'`
608
- }
609
-
610
- this.search()
611
- }
612
-
613
- },
614
- events:{
615
- 'getidcard'(IdCard){
616
- // console.log(param)
617
- this.$refs.paged.$refs.cri.model.f_info_idnumber=IdCard.strID
618
- }
619
- },
620
- watch: {
621
- 'model.rows'(val) {
622
- //如果有合计 这里为true, 其他为false ,反正相反
623
- this.showbottomsum=true;
624
- if(val.length === 0){
625
- this.sumsmodel = {}
626
- this.showbottomsum=false;
627
- }
628
- },
629
- 'model.rows.length' () {
630
- this.isSingleUser = this.model.rows
631
- },
632
- async 'orgCondtionStr'(val) {
633
- //更新抄表册
634
- this.$refs.paged.$refs.cri.model.f_inputtor=[]
635
- this.$refs.paged.$refs.cri.model.f_meter_book = []
636
- this.meterbooks = [{label: '全部',value: ''}];
637
- if(this.lastorgstr != val){
638
- this.tempfalg = true;
639
- this.lastorgstr = val;
640
- }
641
- if(this.tempfalg && val != null && val!='' && val.indexOf("(")>-1){
642
- this.tempfalg = false;
643
- let a = val.substring(val.indexOf("(")+2)
644
- await this.initmeterbook(a.substring(0,a.indexOf(")")-1));
645
- }
646
- let res = val.match(/'(.*?)'/)
647
- console.log('正则提取:',res && res[1])
648
- if (res) {
649
- this.f_filialeid = res[1]
650
- if(res.input !=null){
651
- let resorgid = res.input.substring(res.input.indexOf("'"));
652
- if(resorgid!= null && resorgid!=''){
653
- resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
654
- // resorgid = resorgid.replaceAll("'","");
655
- resorgid = resorgid.replace(/'/g,"");
656
- this.allorgid = resorgid.split(",")
657
- }
658
- }
659
- this.updateParams()
660
- }
661
- },
662
- sumsmodel:{
663
- handler: function(val) {
664
- this.getotherfooter();
665
- },
666
- deep: true
667
- }
668
- },
669
- computed: {
670
- getstart(){
671
- return `开始时间:${this.$refs.paged.$refs.cri.model.startDate} 结束时间:${this.$refs.paged.$refs.cri.model.endDate}`
672
- },
673
- chooserow(){
674
- let aaa= true
675
- if(this.$login.r && this.$login.r.includes('打印项选择')){
676
- aaa = false
677
- }
678
- return aaa
679
- },
680
- getPricenames() {
681
- let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
682
- let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
683
- let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
684
- console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
685
- if(this.$refs.paged.$refs.cri.model !==null) {
686
- let rs = []
687
- let priceArr = []
688
- if ( pricetype.length >0) {
689
- let params = {
690
- f_price_type: pricetype[0],
691
- filter: this.f_filialeid,
692
- prices: this.prices
693
- }
694
- this.$MagGetSaleParam.getPrice(params).forEach((item) => {
695
- let temp = {}
696
- temp.label = item.label
697
- temp.value = item.value.f_price_name
698
- priceArr.push(temp)
699
- })
700
- if(priceArr.length == 0 ){
701
- rs= [{label: '全部', value: ''}]
702
- }else{
703
- rs = [ ...priceArr]
704
- }
705
- }
706
- if (rs.length === 0) {
707
- console.log('rs读出来是空')
708
- this.$refs.paged.$refs.cri.model.f_price_name = ''
709
- }
710
- return rs
711
- }
712
- },
713
- getCondition() {
714
- return {
715
- startDate: this.$refs.paged.$refs.cri.model.startDate,
716
- endDate: this.$refs.paged.$refs.cri.model.endDate,
717
- condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
718
- orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"
719
- }
720
- },
721
- getfield() {
722
- return exportConfig.sellingChargePriceConfig
723
- },
724
- defaultexport() {
725
- return exportConfig.chargeexportConfig
726
- },
727
- pricetypes() {
728
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
729
- },
730
-
731
- pricename(){
732
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价名称')]
733
- },
734
- usertypes(){
735
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('客户类型')]
736
- },
737
- gaspropertiestyps(){
738
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
739
- },
740
- metertypes(){
741
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
742
- },
743
- typesss(){
744
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('收费类型')]
745
- },
746
-
747
- }
748
- }
749
- </script>
750
- <style scoped>
751
- .showbottom{
752
- height:95%
753
- }
754
- </style>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex" :class="{showbottom:showbottomsum}" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri >
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label for="startDate" class="font_normal_body">开始日期</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="true"
16
+ condition="f_operate_date >= '{}'">
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-2 form-group">
20
+ <label for="endDate" class="font_normal_body">结束日期</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :format="'yyyy-MM-dd HH:mm:ss'"
25
+ :show-reset-button="true"
26
+ condition="f_operate_date <= '{}'">
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-2 form-group">
30
+ <label class="font_normal_body">客户编号</label>
31
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
32
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
33
+ </div>
34
+ <div class="col-sm-2 form-group">
35
+ <label class="font_normal_body">气表类型</label>
36
+ <v-select :value.sync="model.metertypes" v-model="model.metertypes"
37
+ @change="$parent.$parent.metertypeschange"
38
+ condition="f_meter_type = '{}'" multiple
39
+ placeholder='气表类型' :options="$parent.$parent.metertypes"
40
+ close-on-select v-ref:type>
41
+ </v-select>
42
+
43
+ </div>
44
+
45
+
46
+
47
+
48
+
49
+ <div class="span" style="float:right;">
50
+ <button class="button_search button_spacing" v-show="false" @click="$parent.$parent.ReadIDCard()">读取身份证</button>
51
+ <read-card :is-single.sync="$parent.$parent.isSingleUser" @read-info="$parent.$parent.cardBtn" v-ref:readcard></read-card>
52
+ <button class="button_search button_spacing" @click="search()">查询</button>
53
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
54
+
55
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
56
+ :field="$parent.$parent.getfield" :header="$parent.$parent.other"
57
+ :defaultselect="$parent.$parent.defaultexport"
58
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="findS" template-name='气费阶梯明细导出'
59
+ :choose-col="true">
60
+ </export-excel>
61
+
62
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
63
+ :defaultfield="$parent.$parent.defaultfield"
64
+ titletable="气费阶梯明细" :starthead="$parent.$parent.getstart"
65
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
66
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
67
+
68
+ </div>
69
+ </div>
70
+ <div class="row" v-show="$parent.$parent.criteriaShow">
71
+ <res-select-group :show-component="$parent.$parent.resshow" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
72
+ <div class="col-sm-2 form-group">
73
+ <label class="font_normal_body">客户名称</label>
74
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
75
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
76
+ </div>
77
+ <!-- <div class="col-sm-2 form-group">-->
78
+ <!-- <label class="font_normal_body">客户电话</label>-->
79
+ <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"-->
80
+ <!-- condition="f_user_phone like '%{}%'" placeholder="客户电话">-->
81
+ <!-- </div>-->
82
+ <!-- <div class="col-sm-2 form-group">-->
83
+ <!-- <label class="font_normal_body">身份证号</label>-->
84
+ <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_idnumber"-->
85
+ <!-- condition="f_idnumber like '%{}%'" placeholder="身份证号">-->
86
+ <!-- </div>-->
87
+ <!-- <div class="col-sm-2 form-group">-->
88
+ <!-- <label class="font_normal_body">客户地址</label>-->
89
+ <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"-->
90
+ <!-- condition="f_address like '%{}%'" placeholder='客户地址'>-->
91
+ <!-- </div>-->
92
+
93
+ <div class="col-sm-2 form-group">
94
+ <label class="font_normal_body">气价类型</label>
95
+ <v-select :value.sync="model.pricetypes" v-model="model.pricetypes"
96
+ @change="$parent.$parent.pricetypechanged"
97
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
98
+ close-on-select v-ref:type>
99
+ </v-select>
100
+ </div>
101
+
102
+
103
+ <div class="col-sm-2 form-group">
104
+ <label class="font_normal_body">气价名称</label>
105
+ <v-select :value.sync="model.pricename"
106
+ v-model="model.pricename"
107
+ @change="$parent.$parent.pricenamechanged"
108
+ :options="$parent.$parent.pricename"
109
+ condition="f_price_name in {}"
110
+ ></v-select>
111
+ </div>
112
+ <div class="col-sm-2 form-group">
113
+ <label class="font_normal_body">单价</label>
114
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_price"
115
+ condition="f_price = '%{}%'" placeholder='单价'>
116
+ </div>
117
+
118
+ <div class="col-sm-2 form-group">
119
+ <label class="font_normal_body">客户类型</label>
120
+ <v-select :value.sync="model.usertypes" v-model="model.usertypes"
121
+ @change="$parent.$parent.usertypechange"
122
+ condition="f_user_type = '{}'"
123
+ placeholder='客户类型' :options="$parent.$parent.usertypes"
124
+ close-on-select v-ref:type>
125
+ </v-select>
126
+ </div>
127
+ <div class="col-sm-2 form-group">
128
+ <label class="font_normal_body">用气类型</label>
129
+ <v-select :value.sync="model.gaspropertiestyps" v-model="model.gaspropertiestyps"
130
+ @change="$parent.$parent.gaspropertieschange"
131
+ condition="f_gasproperties = '{}'"
132
+ placeholder='用气类型' :options="$parent.$parent.gaspropertiestyps"
133
+ close-on-select v-ref:type>
134
+ </v-select>
135
+ </div>
136
+
137
+
138
+ <div class="col-sm-2 form-group">
139
+ <label class="font_normal_body">收费类型</label>
140
+ <v-select :value.sync="model.typesss" v-model="model.typesss"
141
+ @change="$parent.$parent.typechangesss" multiple
142
+ condition="f_type in {}"
143
+ placeholder='收费类型' :options="$parent.$parent.typesss"
144
+ close-on-select v-ref:type>
145
+
146
+ </v-select>
147
+ </div>
148
+
149
+ </div>
150
+ </div>
151
+ </criteria>
152
+
153
+ <data-grid :model="model" partial='list' class="list_area table_sy" style="height: 95%" v-ref:grid>
154
+ <template partial='head'>
155
+ <tr>
156
+ <th>
157
+ <data-order field="f_userinfo_code" name="客户编号"
158
+ :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
159
+ </th>
160
+ <th>
161
+ <nobr>客户名称</nobr>
162
+ </th>
163
+ <th>
164
+ <nobr>客户类型</nobr>
165
+ </th>
166
+ <th>
167
+ <nobr>用气性质</nobr>
168
+ </th>
169
+ <th>
170
+ <nobr>气表类型</nobr>
171
+ </th>
172
+ <th>
173
+ <nobr>气价名称</nobr>
174
+ </th>
175
+ <th>
176
+ <nobr>收费类型</nobr>
177
+ </th>
178
+ <th>
179
+ <nobr>单价</nobr>
180
+ </th>
181
+ <th>
182
+ <nobr>气量</nobr>
183
+ </th>
184
+ <th>
185
+ <nobr>气费</nobr>
186
+ </th>
187
+ </tr>
188
+ </template>
189
+ <template partial='body'>
190
+ <td style="text-align: center;">
191
+ <nobr>{{row.f_userinfo_code}}</nobr>
192
+ </td>
193
+ <td style="text-align: center;"><nobr>
194
+ <nobr>{{row.f_user_name}}</nobr>
195
+ </nobr> </td>
196
+ <td style="text-align: center;">
197
+ <nobr>{{row.f_user_type}}</nobr>
198
+ </td>
199
+ <td style="text-align: center;">
200
+ <nobr>{{row.f_gasproperties}}</nobr>
201
+ </td>
202
+ <td style="text-align: center;">
203
+ <nobr>{{row.f_meter_type}}</nobr>
204
+ </td>
205
+ <td style="text-align: center;">
206
+ <nobr>{{row.f_price_name}}</nobr>
207
+ </td>
208
+ <td style="text-align: center;">
209
+ <nobr>{{row.f_type}}</nobr>
210
+ </td>
211
+ <td style="text-align: center;">
212
+ <nobr>{{row.f_price}}</nobr>
213
+ </td>
214
+ <td style="text-align: center;">
215
+ <nobr>{{row.f_gas}}</nobr>
216
+ </td>
217
+ <td style="text-align: center;">
218
+ <nobr>{{row.f_money}}</nobr>
219
+ </td>
220
+
221
+ </template>
222
+ <template partial='foot'></template>
223
+ </data-grid>
224
+ </criteria-paged>
225
+ <table class="table-hover">
226
+ </table>
227
+ </div>
228
+ </div>
229
+ <modal :show.sync="showupload" v-if="showupload" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
230
+ <article slot="modal-body">
231
+ <upload :blodid="selected.f_userinfo_id" :businessid="selected.id" v-ref:upload isupload="false" takeimg="false" fusetype="%收费" :isremark="false" style="width:auto" ></upload>
232
+ </article>
233
+ <footer slot="modal-footer" class="modal-footer">
234
+ </footer>
235
+ </modal>
236
+ </div>
237
+ <high-meter-idcard :show.sync="false" v-ref:highcard ></high-meter-idcard>
238
+ </template>
239
+
240
+ <script>
241
+ import {HttpResetClass, PagedList} from 'vue-client'
242
+ import exportConfig from '../../components/sale/config/exportConfig'
243
+ let cardBtnGen = async function (self, val) {
244
+ self.cardInfo = val.data
245
+
246
+ // 判断读卡是否需要卡密码
247
+ console.log('读卡上的信息', self.cardInfo)
248
+
249
+ if (self.cardInfo.NewParam) {
250
+ if (self.cardInfo.NewParam.error) {
251
+ if (self.cardInfo.NewParam.error === '0001') {
252
+ // 需要重新读卡并传卡密码
253
+ if (self.model.rows.length == 1 && self.model.rows[0].f_alias === self.cardInfo.Factory) {
254
+ self.readCardParam = self.model.rows[0].f_card_password
255
+ self.cardInfo = await self.$refs.paged.$refs.cri.$refs.readcard.readCard2(self.model.rows[0].f_card_password)
256
+ } else {
257
+ self.$showAlert('此卡需要先获取客户信息。请通过条件查询该客户信息之后进行读卡!!', 'warning', 2000)
258
+ return
259
+ }
260
+ }
261
+ }
262
+ }
263
+ self.card=self.cardInfo.CardID
264
+ self.search()
265
+ }
266
+ let readySomething = async function (self) {
267
+ //加载抄表册
268
+ self.initmeterbook();
269
+ // self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
270
+ // self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
271
+ self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
272
+ self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
273
+ // self.$refs.paged.$refs.cri.model.f_state=['有效'];
274
+ // self.$refs.paged.$refs.cri.search()
275
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
276
+ await self.$MagLoadParams.loadParam()
277
+ self.initParams()
278
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums;
279
+ }
280
+ export default {
281
+ props:['data'],
282
+ title: '气阶查询',
283
+ data() {
284
+ return {
285
+ IdCardInfo:'',
286
+ card:'',
287
+ isSingleUser: null,
288
+ startDate1:'',
289
+ endDate1:'',
290
+ resshow:['company','department','operator','slicearea'],
291
+ other:[],
292
+
293
+ footer:[],
294
+ config: {
295
+ defaultPrint: ['f_userinfo_code', 'f_user_name','f_stairamount1', 'f_stair2amount', 'f_stair3amount','f_operate_date']
296
+ },
297
+ //排序
298
+ orderitem:'f_operate_date desc',
299
+ orderFields: {
300
+ f_operate_date: 'no'
301
+ },
302
+ //f_price_name:[],
303
+ gasproperties:[],
304
+ showinfo: false,
305
+ data: {},
306
+ getstart:'',
307
+ show:false,
308
+ rowdata:{},
309
+ initres: {
310
+ org:[this.$login.f.orgid],
311
+ dep:[],
312
+ user:[]
313
+ },
314
+ model: new PagedList('api/af-revenue/sql/findS', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`},),
315
+ criteriaShow: false,
316
+ orgCondtionStr: '',
317
+ // 下拉框
318
+ meterbrands: [],
319
+ pricenames: [],
320
+ prices: [],
321
+ area: [],
322
+ //默认打印列
323
+ defaultfield: [],
324
+ //小区
325
+ residentialArea: [],
326
+ sumsmodel: {},
327
+ f_filialeid: this.$login.f.orgid,
328
+ wxstate:[
329
+ {label: '全部', value: ''},
330
+ {label: '已退款', value: `= '3'`},
331
+ {label: '未退款', value: `!= '3'`}
332
+ ],
333
+ privilege_money:[
334
+ {label: '全部', value: ''},
335
+ {label: '已优惠', value: '> 0'},
336
+ {label: '未优惠', value: '= 0'}
337
+ ],
338
+ showupload:false,
339
+ selected:{},
340
+ meterbooks:[{label: '全部',value: ''}], //抄表册
341
+ inputtores:[{label: '全部',value: ''}],
342
+ writecard:[{label: '全部',value: ''},{label: '已写卡',value: '已写卡'},{label: '未写卡',value: '未写卡'}],
343
+ bluetoothpackage:[{label: '全部',value: ''},{label: '发送成功',value: '发送成功'},{label: '执行成功',value: '执行成功'}],
344
+ allorgid:[],
345
+ tempfalg :false,
346
+ lastorgstr:'',
347
+ // pos设备列表
348
+ posEquipment: [{label: '全部',value: ''}],
349
+ showbottomsum:false //页面下方是否有合计: 默认为false, 在watch修改
350
+ }
351
+ },
352
+ ready() {
353
+ this.$refs.paged.$refs.cri.model.f_state=['有效']
354
+ this.getaddress()
355
+ this.getEquipment()
356
+ //加载抄表册
357
+ this.$MagGetSaleParam.initinputtor();
358
+ this.getinputtores();
359
+ // this.initres.dep.push(this.$login.f.depids)
360
+ readySomething(this).then(() => {
361
+ this.$emit('ready')
362
+ }).catch((error) => {
363
+ this.$emit('error', error)
364
+ })
365
+ },
366
+ methods: {
367
+ pricetypechanged(){
368
+ this.$refs.paged.$refs.cri.model.f_price_type = []
369
+ },
370
+ usertypechange(){
371
+ this.$refs.paged.$refs.cri.model.f_user_type = []
372
+ },
373
+ gaspropertieschange(){
374
+ this.$refs.paged.$refs.cri.model.f_gasproperties = []
375
+ },
376
+ metertypeschange(){
377
+ this.$refs.paged.$refs.cri.model.f_meter_type = []
378
+ },
379
+ typechangesss(){
380
+ this.$refs.paged.$refs.cri.model.f_type = []
381
+ },
382
+ pricenamechanged(){
383
+ this.$refs.paged.$refs.cri.model.f_price_name = []
384
+ },
385
+
386
+
387
+ ReadIDCard(){
388
+ this.$refs.highcard.sendMsg(this.$refs.highcard.CLT_MSG.READ_IDCARD, (msg) => {
389
+ console.log('======',msg)
390
+ if(msg.err !== 0){ return}
391
+ this.IdCardInfo=msg.strID
392
+ })
393
+ if(this.IdCardInfo) {
394
+ this.search()
395
+ }else{
396
+ alert("读取失败,找不到用户信息")
397
+ }
398
+ },
399
+ cardBtn (val) {
400
+ // this.clear()
401
+ cardBtnGen(this, val)
402
+ },
403
+ async initmeterbook(orgstr){
404
+ if(orgstr == null ){
405
+ orgstr = this.f_filialeid;
406
+ }
407
+ //获取新的抄表册,先去清理所有的抄表册
408
+ this.$GetSaleParam.meterbooks = [];
409
+ //开始加载新的抄表册
410
+ await this.$LoadParams.loadMeterBook(orgstr)
411
+ this.meterbooks = [{label: '全部', value: ''}, ...this.$GetSaleParam.getMeterBooks()]
412
+ },
413
+ async getinputtores () {
414
+ // 获取抄表员
415
+ let rs = []
416
+ if (this.$login.f.f_gasman.length > 0) {
417
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
418
+ let temp = {
419
+ label: this.$login.f.f_gasman[i].name,
420
+ value: this.$login.f.f_gasman[i].name
421
+ }
422
+ rs.push(temp)
423
+ }
424
+ }
425
+ this.inputtores = [{label: '全部', value: ''}, ...rs]
426
+ },
427
+ //显示附件
428
+ view(row){
429
+ this.showupload = true
430
+ this.selected= row
431
+ },
432
+ getotherfooter () {
433
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
434
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
435
+ this.other = [];
436
+ this.footer = [];
437
+ let exportdata = this.getCondition;
438
+ let otherInData = [];
439
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
440
+ let footerData = [], exportfield = this.getfield;
441
+ footerData.push("合计");
442
+ let self = this;
443
+ for (var field in self.sumsmodel) {
444
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
445
+ }
446
+ this.footer.push(footerData);
447
+ this.other.push(otherInData);
448
+ },
449
+ calculate(rows){
450
+ let data = []
451
+ rows.forEach((row, n) => {
452
+ data[n] = {label: row.f_residential_area, value: row.id}
453
+ })
454
+ return data
455
+ },
456
+
457
+ search(){
458
+
459
+ this.$refs.paged.$refs.cri.search()
460
+ },
461
+ cancel() {
462
+ this.show = false
463
+ },
464
+ showmsg(obj){
465
+ this.rowdata=obj
466
+ this.show=true
467
+ },
468
+ userTypeChange () {
469
+ this.gasproperties=[]
470
+ if(this.$refs.paged.$refs.cri.model !==null) {
471
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
472
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
473
+ }
474
+ else{
475
+ this.gasproperties =[{label: '全部', value: ''}]
476
+ }
477
+ },
478
+ initParams() {
479
+ // 初始化气表品牌
480
+ let brandArr = []
481
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
482
+ let temp = {}
483
+ temp.label = item.label
484
+ temp.value = item.value.f_meter_brand
485
+ brandArr.push(temp)
486
+ })
487
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
488
+ //初始化气表价格
489
+ this.prices = this.$MagGetSaleParam.getPrices();
490
+ },
491
+ selfSearch(args) {
492
+ if (this.data) {
493
+ this.$parent.$parent.$parent.data.startDate=this.$refs.paged.$refs.cri.model.startDate
494
+ this.$parent.$parent.$parent.data.endDate=this.$refs.paged.$refs.cri.model.endDate
495
+ }
496
+
497
+ let f_orgstr = this.orgCondtionStr
498
+ args.condition = `${args.condition} ` + f_orgstr
499
+ if(this.card!=''){
500
+ args.condition+=` and f_card_id='${this.card}'`
501
+ }
502
+ if(this.IdCardInfo!=''){
503
+ args.condition +=` and f_idnumber='${this.IdCardInfo}'`
504
+ }
505
+ this.model.search(args.condition, args.model)
506
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums;
507
+ this.card=''
508
+ this.IdCardInfo=''
509
+ },
510
+ clear() {
511
+ console.log('========',this.$refs.paged.$refs.cri.$refs.sel)
512
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
513
+ this.$refs.paged.$refs.cri.model[key] = []
514
+ })
515
+ //清空部门和人员
516
+ this.$refs.paged.$refs.cri.$refs.sel.$children[0].selectres = []
517
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
518
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].selectres = []
519
+ this.$refs.paged.$refs.cri.$refs.sel.$children[3].selectres = []
520
+ //部门和人员变为全选
521
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
522
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
523
+ },
524
+ dealmsg(val,startDate,endDate) {
525
+ val.model = this.model.model
526
+ startDate=this.startDate1
527
+ endDate=this.endDate1
528
+ this.$dispatch('deal-msg', val,startDate,endDate)
529
+ },
530
+ show() {
531
+ this.criteriaShow = true
532
+ },
533
+ hidden() {
534
+ this.criteriaShow = !this.criteriaShow
535
+ },
536
+ async getRes(condition,obj) {
537
+ this.orgCondtionStr = condition
538
+ this.orgname = obj.orgnames[0]
539
+ this.depname = obj.depnames[0]
540
+
541
+
542
+ },
543
+ async updateParams() {
544
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
545
+ this.inputtores = [];
546
+ this.inputtores.push({label: "全部", value: ""})
547
+ if(this.allorgid!=null){
548
+ this.allorgid.forEach((res)=>{
549
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
550
+ })
551
+ }
552
+ this.initParams()
553
+ },
554
+ sort (field, rule) {
555
+ // 将所有排序方式设为不排序,实现相互排斥
556
+ for (let key in this.orderFields) {
557
+ if (key === field) {
558
+ this.orderFields[key] = rule
559
+ } else {
560
+ this.orderFields[key] = 'no'
561
+ }
562
+ }
563
+ // 如果新规则不排序,还原为默认排序
564
+ if (rule === 'no') {
565
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
566
+ } else {
567
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
568
+ }
569
+
570
+ this.search()
571
+ }
572
+
573
+ },
574
+ events:{
575
+ 'getidcard'(IdCard){
576
+ // console.log(param)
577
+ this.$refs.paged.$refs.cri.model.f_info_idnumber=IdCard.strID
578
+ }
579
+ },
580
+ watch: {
581
+ 'model.rows'(val) {
582
+ //如果有合计 这里为true, 其他为false ,反正相反
583
+ this.showbottomsum=true;
584
+ if(val.length === 0){
585
+ this.sumsmodel = {}
586
+ this.showbottomsum=false;
587
+ }
588
+ },
589
+ 'model.rows.length' () {
590
+ this.isSingleUser = this.model.rows
591
+ },
592
+ async 'orgCondtionStr'(val) {
593
+ //更新抄表册
594
+ this.$refs.paged.$refs.cri.model.f_inputtor=[]
595
+ this.$refs.paged.$refs.cri.model.f_meter_book = []
596
+ this.meterbooks = [{label: '全部',value: ''}];
597
+ if(this.lastorgstr != val){
598
+ this.tempfalg = true;
599
+ this.lastorgstr = val;
600
+ }
601
+ if(this.tempfalg && val != null && val!='' && val.indexOf("(")>-1){
602
+ this.tempfalg = false;
603
+ let a = val.substring(val.indexOf("(")+2)
604
+ await this.initmeterbook(a.substring(0,a.indexOf(")")-1));
605
+ }
606
+ let res = val.match(/'(.*?)'/)
607
+ console.log('正则提取:',res && res[1])
608
+ if (res) {
609
+ this.f_filialeid = res[1]
610
+ if(res.input !=null){
611
+ let resorgid = res.input.substring(res.input.indexOf("'"));
612
+ if(resorgid!= null && resorgid!=''){
613
+ resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
614
+ // resorgid = resorgid.replaceAll("'","");
615
+ resorgid = resorgid.replace(/'/g,"");
616
+ this.allorgid = resorgid.split(",")
617
+ }
618
+ }
619
+ this.updateParams()
620
+ }
621
+ },
622
+ sumsmodel:{
623
+ handler: function(val) {
624
+ this.getotherfooter();
625
+ },
626
+ deep: true
627
+ }
628
+ },
629
+ computed: {
630
+ getstart(){
631
+ return `开始时间:${this.$refs.paged.$refs.cri.model.startDate} 结束时间:${this.$refs.paged.$refs.cri.model.endDate}`
632
+ },
633
+ chooserow(){
634
+ let aaa= true
635
+ if(this.$login.r && this.$login.r.includes('打印项选择')){
636
+ aaa = false
637
+ }
638
+ return aaa
639
+ },
640
+ getPricenames() {
641
+ let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
642
+ let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
643
+ let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
644
+ console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
645
+ if(this.$refs.paged.$refs.cri.model !==null) {
646
+ let rs = []
647
+ let priceArr = []
648
+ if ( pricetype.length >0) {
649
+ let params = {
650
+ f_price_type: pricetype[0],
651
+ filter: this.f_filialeid,
652
+ prices: this.prices
653
+ }
654
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
655
+ let temp = {}
656
+ temp.label = item.label
657
+ temp.value = item.value.f_price_name
658
+ priceArr.push(temp)
659
+ })
660
+ if(priceArr.length == 0 ){
661
+ rs= [{label: '全部', value: ''}]
662
+ }else{
663
+ rs = [ ...priceArr]
664
+ }
665
+ }
666
+ if (rs.length === 0) {
667
+ console.log('rs读出来是空')
668
+ this.$refs.paged.$refs.cri.model.f_price_name = ''
669
+ }
670
+ return rs
671
+ }
672
+ },
673
+ getCondition() {
674
+ return {
675
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
676
+ endDate: this.$refs.paged.$refs.cri.model.endDate,
677
+ condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,
678
+ orderitem: this.orderitem?`${this.orderitem}`: " f_operate_date desc"
679
+ }
680
+ },
681
+ getfield() {
682
+ return exportConfig.sellingChargePriceConfig
683
+ },
684
+ defaultexport() {
685
+ return exportConfig.chargeexportConfig
686
+ },
687
+ pricetypes() {
688
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
689
+ },
690
+
691
+ pricename(){
692
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价名称')]
693
+ },
694
+ usertypes(){
695
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('客户类型')]
696
+ },
697
+ gaspropertiestyps(){
698
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
699
+ },
700
+ metertypes(){
701
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
702
+ },
703
+ typesss(){
704
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('收费类型')]
705
+ },
706
+
707
+ }
708
+ }
709
+ </script>
710
+ <style scoped>
711
+ .showbottom{
712
+ height:95%
713
+ }
714
+ </style>