manage-client 3.2.107 → 3.2.109

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