manage-client 3.2.232 → 3.2.233

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.2.232",
3
+ "version": "3.2.233",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -645,17 +645,17 @@
645
645
  this.show=true
646
646
  },
647
647
  selfSearch(args) {
648
- //抄表员查询条件
649
- this.inputtouPerson = this.$refs.paged.$refs.cri.model.f_inputtor
650
- if(this.inputtouPerson.length !== 0){
651
- let str = JSON.stringify(this.inputtouPerson)
652
- str = str.replace(/"/g,`'`)
653
- str = str.replace(/\[/g,``)
654
- str = str.replace(/\]/g,``)
655
- console.log("=====抄表员model22222222222绑定====",str)
656
- //查询多个抄表员时条件
657
- args.condition += ` and f_inputtor in ( ${str} )`
658
- }
648
+ // //抄表员查询条件
649
+ // this.inputtouPerson = this.$refs.paged.$refs.cri.model.f_inputtor
650
+ // if(this.inputtouPerson.length !== 0){
651
+ // let str = JSON.stringify(this.inputtouPerson)
652
+ // str = str.replace(/"/g,`'`)
653
+ // str = str.replace(/\[/g,``)
654
+ // str = str.replace(/\]/g,``)
655
+ // console.log("=====抄表员model22222222222绑定====",str)
656
+ // //查询多个抄表员时条件
657
+ // args.condition += ` and f_inputtor in ( ${str} )`
658
+ // }
659
659
  if (!this.orgCondtionStr) {
660
660
  args.condition = `${args.condition}` + " and f_orgid = " + this.$login.f.orgid
661
661
  } else {
@@ -0,0 +1,562 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search" v-if="!show">
4
+ <div class="flex">
5
+ <div style="flex:1;" class="flex" >
6
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
7
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
+ <div class="row">
10
+ <res-select-group :show-component="['company']" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
11
+
12
+
13
+ <div class="col-sm-2 form-group">
14
+ <label class="font_normal_body">交费月份</label>
15
+ <v-select :value.sync="model.a_jfyf"
16
+ :options='$parent.$parent.jfyfArray' placeholder='请选择' v-model="model.a_jfyf"
17
+ condition="a_jfyf in {}"
18
+ close-on-select></v-select>
19
+ </div>
20
+
21
+
22
+ <div class="span" style="float:right;">
23
+ <button class="button_search button_spacing" @click="$parent.$parent.search()">查询</button>
24
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
25
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
26
+
27
+ <export-excel :data="$parent.$parent.getCondition"
28
+ :field="$parent.$parent.getExportField"
29
+ :footer="$parent.$parent.footer"
30
+ :header="$parent.$parent.other"
31
+ sqlurl="rs/logic/exportfile" sql-name="qnChaobiaoyhhz" template-name='抄表按用户汇总导出'
32
+ :choose-col="true"></export-excel>
33
+
34
+ <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>
35
+ </div>
36
+ </div>
37
+
38
+ </div>
39
+ </criteria>
40
+
41
+ <data-grid :model="model" partial='list' class="list_area table_sy" @dblclick="$parent.dblclick" v-ref:grid>
42
+ <template partial='head'>
43
+ <tr>
44
+ <th>
45
+ <nobr>交费月份</nobr>
46
+ </th>
47
+ <th>
48
+ <nobr>用气性质</nobr>
49
+ </th>
50
+ <th>
51
+ <nobr>单价</nobr>
52
+ </th>
53
+ <th>
54
+ <nobr>气量</nobr>
55
+ </th>
56
+ <th>
57
+ <nobr>金额</nobr>
58
+ </th>
59
+ <th>
60
+ <nobr>违约金</nobr>
61
+ </th>
62
+ <th>
63
+ <nobr>实交金额</nobr>
64
+ </th>
65
+ </tr>
66
+ </template>
67
+ <template partial='body'>
68
+ <td style="text-align: center;">
69
+ <nobr>{{row.a_jfyf}}</nobr>
70
+ </td>
71
+ <td style="text-align: center;">
72
+ <nobr>{{row.c_yqxz}}</nobr>
73
+ </td>
74
+ <td style="text-align: center;">
75
+ <nobr>{{row.d_dj}}</nobr>
76
+ </td>
77
+ <td style="text-align: center;">
78
+ <nobr>{{row.e_ysql}}</nobr>
79
+ </td>
80
+ <td style="text-align: center;">
81
+ <nobr>{{row.f_je}}</nobr>
82
+ </td>
83
+ <td style="text-align: center;">
84
+ <nobr>{{row.g_znj}}</nobr>
85
+ </td>
86
+ <td style="text-align: center;">
87
+ <nobr>{{row.i_sjje}}</nobr>
88
+ </td>
89
+ </template>
90
+ <template partial='foot'>
91
+ </template>
92
+ </data-grid>
93
+ </criteria-paged>
94
+ <table class="table-hover">
95
+ <tr style="position: relative" class="table-bordered">
96
+ <td
97
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
98
+ 汇总信息
99
+ </td>
100
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
101
+ 气量合计:&emsp;{{sumsmodel.e_ysql}}&emsp;&emsp;金额合计:&emsp;{{sumsmodel.f_je}}&emsp;&emsp;违约金合计:&emsp;{{sumsmodel.g_znj}}&emsp;&emsp;实交金额合计:&emsp;{{sumsmodel.i_sjje}}
102
+ </td>
103
+ </tr>
104
+ </table>
105
+ </div>
106
+
107
+ </div>
108
+ </div>
109
+ <div class="basic-main" style="width:99%;height:98%;margin-bottom:0px" v-if="show">
110
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
111
+ </div>
112
+ </div>
113
+ </template>
114
+
115
+ <script>
116
+ import {HttpResetClass, PagedList} from 'vue-client'
117
+ import defaultPrint from '../../components/sale/config/DefaultPrint'
118
+ import exportConfig from './exportConfig'
119
+
120
+ let readySomething = async function (self) {
121
+ self.$MagGetSaleParam.initinputtor();
122
+ self.getinputtores();
123
+ // 获取区县
124
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
125
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
126
+ // await self.$refs.paged.$refs.cri.search()
127
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
128
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
129
+ }
130
+
131
+ export default {
132
+ title: '工商汇总报表',
133
+ data() {
134
+ return {
135
+ other:[],
136
+ footer:[],
137
+ model: new PagedList('rs/sql/qnJgqGshzbb', 20, {}, {e_ysql: 0, f_je: 0, g_znj: 0, i_sjje: 0}),
138
+ criteriaShow: false,
139
+ orgCondtionStr: '',
140
+ modelval: [],
141
+ printshow: false,
142
+ all: false,
143
+ fields: {},
144
+ //排序
145
+ orderitem:'',
146
+ orderFields: {
147
+
148
+ },
149
+ gasproperties:[],
150
+ //默认打印列
151
+ defaultfield: [],
152
+ config: {
153
+ defaultPrint: []
154
+ },
155
+ balance2:'',
156
+ thead: '',
157
+ tfoot: '',
158
+ area: [],
159
+ //合计数据
160
+ sumsmodel: {},
161
+ initres: {
162
+ org:[this.$login.f.orgid],
163
+ dep:[],
164
+ user:[],
165
+ },
166
+ userdetail: {
167
+ show: false,
168
+ f_userinfo_code: '',
169
+ f_filialeids: ''
170
+ },
171
+
172
+ show:false,
173
+ rowdata:{},
174
+ meterInfo:{},
175
+ deviceInfo:{},
176
+ condition2:'',
177
+
178
+
179
+ weixinSign:[{label:"全部",value:""},{label:"已绑定",value:"已绑定"},{label:"未绑定",value:"未绑定"}],
180
+ //小区
181
+ residentialArea: [],
182
+ //缴费月份
183
+ jfyfArray: [],
184
+ //表册片区
185
+ bookSlice:[{label: '全部',value: ''}],
186
+ inputtores:[{label: '全部',value: ''}], //抄表员
187
+ allorgid:[],
188
+ f_filialeid: this.$login.f.f_orgid,
189
+ dypayment:[{label:"全部",value:""},{label:"银行代扣",value:"银行代扣",},{label:"现金缴费",value:"现金缴费",}],
190
+ }
191
+ },
192
+ ready() {
193
+ this.getaddress()
194
+ // this.$refs.paged.$refs.cri.model.f_user_state=['正常']
195
+ readySomething(this).then(() => {
196
+ this.$emit('ready')
197
+ }).catch((error) => {
198
+ this.$emit('error', error)
199
+ })
200
+ this.initAreas(this.$login.f.orgid)
201
+ //self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
202
+ //self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
203
+
204
+ this.getjfyf()
205
+ },
206
+ methods: {
207
+ async getinputtores () {
208
+ // 获取抄表员
209
+ let rs = []
210
+ if (this.$login.f.f_gasman.length > 0) {
211
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
212
+ let temp = {
213
+ label: this.$login.f.f_gasman[i].name,
214
+ value: this.$login.f.f_gasman[i].name
215
+ }
216
+ rs.push(temp)
217
+ }
218
+ }
219
+ this.inputtores = [{label: '全部', value: ''}, ...rs]
220
+ },
221
+ async updateParams() {
222
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
223
+ this.inputtores = [];
224
+ this.inputtores.push({label: "全部", value: ""})
225
+ this.initSlice(this.f_filialeid)
226
+ if(this.allorgid!=null){
227
+ this.allorgid.forEach((res)=>{
228
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
229
+ })
230
+ }
231
+ },
232
+ getotherfooter () {
233
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
234
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
235
+ this.other = [];
236
+ this.footer = [];
237
+ let exportdata = this.getCondition;
238
+ let otherInData = [];
239
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
240
+ let footerData = [], exportfield = this.getExportField;
241
+ footerData.push("合计");
242
+ let self = this;
243
+ for (var field in self.sumsmodel) {
244
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
245
+ }
246
+ this.footer.push(footerData);
247
+ this.other.push(otherInData);
248
+ },
249
+ async getaddress(){
250
+ console.log('开始获取小区')
251
+ let HttpReset = new HttpResetClass()
252
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
253
+ data: {
254
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
255
+ }
256
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
257
+ console.log('小区',data)
258
+ let house = []
259
+ for (let row of data.data){
260
+ console.log('开始保存小区')
261
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
262
+ }
263
+ this.residentialArea = house
264
+ },
265
+ async getjfyf(){
266
+ console.log('开始获取交费月份')
267
+ let HttpReset = new HttpResetClass()
268
+ var data = await HttpReset.load('POST', 'rs/sql/qnJgqgetjfyf', {
269
+ data: {
270
+ condition: `1=1 `
271
+ }
272
+ }, {resolveMsg: null, rejectMsg: '获取交费月份失败!'})
273
+ console.log('交费月份',data)
274
+ let a_jfyf = []
275
+ for (let row of data.data){
276
+ console.log('开始保存交费月份')
277
+ a_jfyf.push({label: row.a_jfyf, value: row.a_jfyf})
278
+ }
279
+ this.jfyfArray = a_jfyf
280
+ },
281
+
282
+
283
+ //把数据库查询数据转换为下拉数据
284
+ calculate(rows){
285
+ let data = []
286
+ rows.forEach((row, n) => {
287
+ data[n] = {label: row.f_residential_area, value: row.id}
288
+ })
289
+ return data
290
+ },
291
+ search(){
292
+ console.log("=====search====")
293
+ //this.$refs.paged.$refs.cri.search()
294
+ this.$refs.paged.$refs.cri.search()
295
+ },
296
+ cancel(obj) {
297
+ console.log("=====cancel====" + obj)
298
+ this.show = false
299
+ },
300
+ showmsg(obj){
301
+ this.rowdata=obj
302
+ this.show=true
303
+ // let http = new HttpResetClass()
304
+ // http.load('POST','rs/sql/getUserMeter',{data: {condition: `f_userinfo_id ='${obj.f_userinfo_id}'`}},
305
+ // {resolveMsg: null, rejectMsg: null}).then((res) => {
306
+ // this.meterInfo = res.data})
307
+ // let http2 = new HttpResetClass()
308
+ // http2.load('POST','rs/sql/deviceQuery',{data: {condition: `f_userinfo_id ='${obj.f_userinfo_id}'`}},
309
+ // {resolveMsg: null, rejectMsg: null}).then((res) => {
310
+ // this.deviceInfo = res.data})
311
+
312
+ // this.f_userinfo_id=obj.f_userinfo_id
313
+ },
314
+ userTypeChange () {
315
+ this.gasproperties=[]
316
+ if(this.$refs.paged.$refs.cri.model !==null) {
317
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
318
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
319
+ }
320
+ else{
321
+ this.gasproperties =[{label: '全部', value: ''}]
322
+ }
323
+ },
324
+ //初始化片区
325
+ async initSlice (val) {
326
+ if (val) {
327
+ let getAllArea = await this.$resetpost('/rs/search', {
328
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
329
+ userid: this.$login.f.id
330
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
331
+ let arr = getAllArea.data.filter((res) => {
332
+ return res.parentid == val
333
+ })
334
+ this.bookSlice = []
335
+ console.log('过滤之后的片区-------------------', arr)
336
+ arr.forEach((res) => {
337
+ this.bookSlice.push({label: res.name, value: res.name})
338
+ })
339
+ }
340
+ },
341
+ async initAreas (val) {
342
+
343
+ if (val) {
344
+ let getAllArea = await this.$resetpost('/rs/search', {
345
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
346
+ userid: this.$login.f.id
347
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
348
+
349
+ let arr = getAllArea.data.filter((res) => {
350
+ return res.parentid == val
351
+ })
352
+ console.log('过滤之后的片区', arr)
353
+ this.sliceArea = []
354
+ arr.forEach((res) => {
355
+ this.sliceArea.push({label: res.name, value: res.name})
356
+ })
357
+ }
358
+ },
359
+ selfSearch(args) {
360
+ console.log('args', args)
361
+ console.log('this.orgCondtionStr', this.orgCondtionStr)
362
+ if (!this.orgCondtionStr) {
363
+ args.condition = `${args.condition}` + " and tr.f_orgid = " + this.$login.f.orgid
364
+ } else {
365
+ args.condition = `${args.condition}` + this.orgCondtionStr
366
+ }
367
+ this.condition2 = args.condition
368
+ this.model.search(args.condition, args.model)
369
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
370
+ console.log('合计字段', this.sumsmodel)
371
+ },
372
+ clear() {
373
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
374
+ this.$refs.paged.$refs.cri.model[key] = []
375
+ })
376
+ },
377
+ hidden() {
378
+ this.criteriaShow = !this.criteriaShow
379
+ },
380
+ getRes(obj) {
381
+ this.orgCondtionStr = obj
382
+ },
383
+ stamp() {
384
+ this.all = false
385
+ //默认选择要打印的列
386
+ this.modelval = defaultPrint.config
387
+ this.fields = this.getfield
388
+ console.log('所有打印字段', this.fields)
389
+ this.printshow = true
390
+ this.put()
391
+ },
392
+ put() {
393
+ // 对Modelval进行排序
394
+ this.sortModelval()
395
+ this.thead = `<tr><th colspan=${this.modelval.length}>用户查询统计报表</th></tr><tr>`
396
+ for (let key of this.modelval) {
397
+ this.thead += '<th>' + this.fields[key] + '</th>'
398
+ }
399
+ this.thead += '</tr>'
400
+ },
401
+ print() {
402
+ this.$refs.print.PrintAsFile()
403
+ this.printshow = false
404
+ },
405
+ close() {
406
+ this.printshow = false
407
+ },
408
+ // 对选择的列进行排序
409
+ sortModelval() {
410
+ let sortModel = []
411
+ Object.keys(this.fields).forEach((key) => {
412
+ if (this.modelval.includes(key)) {
413
+ sortModel.push(key)
414
+ }
415
+ })
416
+ this.modelval = sortModel
417
+ console.log('选择的打印的字段', this.modelval)
418
+ },
419
+ dblclick(row, index) {
420
+ console.log('双击之后数据', row, index)
421
+ this.userdetail.show = true
422
+ this.userdetail.f_userinfo_code = row.f_userinfo_code
423
+ this.userdetail.f_filialeids = row.f_filialeids
424
+ },
425
+ sort (field, rule) {
426
+ // 将所有排序方式设为不排序,实现相互排斥
427
+ for (let key in this.orderFields) {
428
+ if (key === field) {
429
+ this.orderFields[key] = rule
430
+ } else {
431
+ this.orderFields[key] = 'no'
432
+ }
433
+ }
434
+ // 如果新规则不排序,还原为默认排序
435
+ if (rule === 'no') {
436
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
437
+ } else {
438
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
439
+ }
440
+
441
+ this.search()
442
+ }
443
+ },
444
+
445
+ watch: {
446
+ 'all'(val) {
447
+ if (val) {
448
+ this.modelval = this.bodyData
449
+ } else {
450
+ this.modelval = defaultPrint.config
451
+ this.put()
452
+ }
453
+ },
454
+ 'modelval.length'() {
455
+ this.put()
456
+ },
457
+ sumsmodel:{
458
+ handler: function(val) {
459
+ this.getotherfooter();
460
+ },
461
+ deep: true
462
+ },
463
+ 'orgCondtionStr'(val) {
464
+ let res = val.match(/'(.*?)'/)
465
+ console.log('正则提取:',res && res[1])
466
+ if (res) {
467
+ this.f_filialeid = res[1]
468
+ if(res.input !=null){
469
+ let resorgid = res.input.substring(res.input.indexOf("'"));
470
+ if(resorgid!= null && resorgid!=''){
471
+ resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
472
+ // resorgid = resorgid.replaceAll("'","");
473
+ resorgid = resorgid.replace(/'/g,"");
474
+ this.allorgid = resorgid.split(",")
475
+ }
476
+ }
477
+ this.updateParams()
478
+ }
479
+ },
480
+ },
481
+ computed: {
482
+ // defaultexport() {
483
+ // return exportConfig.chargeexportConfig
484
+ // },
485
+ authArr () {
486
+ return this.$login.r ? this.$login.r : []
487
+ },
488
+
489
+ getCondition() {
490
+ return {condition: this.condition2,orderitem:this.orderitem}
491
+ },
492
+ getfield() {
493
+ let data = {}
494
+ this.bodyData.forEach((value, index) => {
495
+ data[this.bodyData[index]] = this.headData[index]
496
+ })
497
+ //合计字段打印
498
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
499
+ if (this.sumsmodel) {
500
+ Object.keys(this.sumsmodel).forEach((key) => {
501
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
502
+ })
503
+ } else {
504
+ this.tfoot += '暂无'
505
+ }
506
+ this.tfoot += '</th></tr>'
507
+ return data
508
+ },
509
+ getExportField() {
510
+ return exportConfig.qnChaobiaoyhhz
511
+ },
512
+ inputtor () {
513
+ // 获取抄表员
514
+ console.log('获取抄表员', this.$login.f)
515
+ let rs = []
516
+ if (this.$login.f.f_gasman.length > 0) {
517
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
518
+ let temp = {
519
+ label: this.$login.f.f_gasman[i].name,
520
+ value: this.$login.f.f_gasman[i].name
521
+ }
522
+ rs.push(temp)
523
+ }
524
+ }
525
+
526
+ return [{label: '全部', value: ''}, ...rs]
527
+ },
528
+ userstates() {
529
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('客户状态')]
530
+ },
531
+ userLevels () {
532
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')]
533
+ },
534
+ usertypes () {
535
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
536
+ },
537
+ hairpin() {
538
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('发卡状态')]
539
+ },
540
+ addressstate() {
541
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
542
+ },
543
+ fcalculation() {
544
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('结算方式')]
545
+ },
546
+ metertypes() {
547
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
548
+ },
549
+ accountsState() {
550
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('下账状态')]
551
+ }
552
+ }
553
+ }
554
+ </script>
555
+ <style>
556
+ .back-red{ /* 红色背景 */
557
+ background-color: #F6C6CE;
558
+ }
559
+ .back-blue{ /* 蓝色背景 */
560
+
561
+ }
562
+ </style>