manage-client 3.2.156 → 3.2.158

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.
@@ -0,0 +1,454 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged>
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 00:00:00'"
15
+ :show-reset-button="true">
16
+ </datepicker>
17
+ </div>
18
+ <div class="col-sm-2 form-group">
19
+ <label for="endDate" class="font_normal_body">结束日期</label>
20
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
21
+ v-model="model.endDate"
22
+ :value.sync="model.endDate"
23
+ :format="'yyyy-MM-dd 23:59:59'"
24
+ :show-reset-button="true">
25
+ </datepicker>
26
+ </div>
27
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel :show-component="$parent.$parent.showself"></res-select-group>
28
+ <div class="col-sm-2 form-group">
29
+ <label class="font_normal_body">&nbsp;付款方式&nbsp;</label>
30
+ <v-select :value.sync="model.f_payment"
31
+ class="select_list select"
32
+ multiple
33
+ :search="false"
34
+ v-model="model.f_payment"
35
+ style="width: 60%"
36
+ :options='$parent.$parent.paytype'
37
+ placeholder='付款方式'
38
+ close-on-select>
39
+
40
+ </v-select>
41
+ </div>
42
+ <div class="col-sm-2 form-group">
43
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
44
+ <v-select :value.sync="model.f_residential_area"
45
+ class="select_list select"
46
+ enter-push
47
+ multiple = "true"
48
+ v-model="model.f_residential_area"
49
+ style="width: 60%"
50
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
51
+ close-on-select>
52
+
53
+ </v-select>
54
+ </div>
55
+ <div class="span" style="float:right;">
56
+ <button class="button_search button_spacing" @click="search()">查询</button>
57
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
58
+
59
+ <export-excel :data="$parent.$parent.getCondition"
60
+ :field="$parent.$parent.getfield"
61
+ :footer="$parent.$parent.footer"
62
+ :header="$parent.$parent.other"
63
+ sqlurl="rs/logic/exportfile"
64
+ sql-name="chargeDayReport"
65
+ template-name='收费明细日报表导出'
66
+ :choose-col="true"></export-excel>
67
+ <print-data :model="$parent.model" :field="$parent.$parent.getfield"
68
+ :printview="false"
69
+ :xyprint="2"
70
+
71
+ :footinfo="['制表人','审核人']"
72
+ :defaultfield="$parent.$parent.defaultfield" print-name="收费明细"
73
+ :sumsmodel="$parent.$parent.sumsmodel" :sum-field="$parent.$parent.sumField"
74
+ :start-date="$parent.$parent.startDate" :end-date="$parent.$parent.endDate"
75
+ ></print-data>
76
+ </div>
77
+ </div>
78
+ <div class="row" v-show="$parent.$parent.criteriaShow">
79
+
80
+ </div>
81
+ </div>
82
+ </criteria>
83
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid :classname="$parent.classname">
84
+ <template partial='head'>
85
+ <tr>
86
+ <th>
87
+ <nobr>序号</nobr>
88
+ </th>
89
+ <th>
90
+ <nobr>收费编号</nobr>
91
+ </th>
92
+ <th>
93
+ <nobr>客户编号</nobr>
94
+ </th>
95
+ <th>
96
+ <nobr>户主名称</nobr>
97
+ </th>
98
+ <th>
99
+ <nobr>小区</nobr>
100
+ </th>
101
+ <th>
102
+ <nobr>客户地址</nobr>
103
+ </th>
104
+ <th>
105
+ <nobr>气量</nobr>
106
+ </th>
107
+ <th>
108
+ <nobr>收款</nobr>
109
+ </th>
110
+ <th>
111
+ <nobr>单价</nobr>
112
+ </th>
113
+ <th>
114
+ <nobr>付款方式</nobr>
115
+ </th>
116
+ <th>
117
+ <nobr>收费时间</nobr>
118
+ </th>
119
+ <th>
120
+ <nobr>收费员</nobr>
121
+ </th>
122
+ <th>
123
+ <nobr>收费类型</nobr>
124
+ </th>
125
+ </tr>
126
+ </template>
127
+ <template partial='body'>
128
+ <td style="text-align:center">
129
+ <nobr>{{row.ord}}</nobr>
130
+ </td>
131
+ <td style="text-align: center;">
132
+ <nobr>{{row.id}}</nobr>
133
+ </td>
134
+ <td style="text-align: center;">
135
+ <nobr>{{row.f_userinfo_code}}</nobr>
136
+ </td>
137
+ <td style="text-align: center;">
138
+ <nobr>{{row.f_user_name}}</nobr>
139
+ </td>
140
+ <td style="text-align: center;">
141
+ <nobr>{{row.f_residential_area}}</nobr>
142
+ </td>
143
+ <td style="text-align: center;">
144
+ <nobr>{{row.f_address}}</nobr>
145
+ </td>
146
+ <td style="text-align: center;">
147
+ <nobr>{{row.f_pregas}}</nobr>
148
+ </td>
149
+ <td style="text-align: center;">
150
+ <nobr>{{row.f_preamount}}</nobr>
151
+ </td>
152
+ <td style="text-align: center;">
153
+ <nobr>{{row.price}}</nobr>
154
+ </td>
155
+ <td style="text-align: center;">
156
+ <nobr>{{row.f_payment}}</nobr>
157
+ </td>
158
+ <td style="text-align: center;">
159
+ <nobr>{{row.f_date}}</nobr>
160
+ </td>
161
+ <td style="text-align: center;">
162
+ <nobr>{{row.f_operator}}</nobr>
163
+ </td>
164
+ <td style="text-align: center;">
165
+ <nobr>{{row.f_type}}</nobr>
166
+ </td>
167
+ </template>
168
+ <template partial='foot'></template>
169
+ </data-grid>
170
+ </criteria-paged>
171
+ <table class="table-hover">
172
+ <tr style="position: relative" class="table-bordered">
173
+ <td
174
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold" >
175
+ 报表统计时间
176
+ </td>
177
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold" v-if="startDate==endDate">
178
+ {{startDate}}
179
+ </td>
180
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold" v-else>
181
+ {{startDate+" 至 "+endDate}}
182
+ </td>
183
+ </tr>
184
+ <tr style="position: relative" class="table-bordered">
185
+ <td
186
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
187
+ 汇总信息
188
+ </td>
189
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
190
+ 总气量:&emsp;{{sumsmodel.f_pregas}}
191
+ </td>
192
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
193
+ 总金额:&emsp;{{sumsmodel.f_preamount}}
194
+ </td>
195
+ </tr>
196
+ </table>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </template>
201
+ <script>
202
+ import {PagedList, HttpResetClass} from 'vue-client'
203
+ import defaultPrint from './config/DefaultPrint'
204
+ import exportConfig from './config/exportConfig'
205
+ // import PrintDataSelf from '../sale/common/PrintDataSelf'
206
+
207
+ let readySomething = async function (self) {
208
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
209
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
210
+
211
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
212
+ }
213
+ export default {
214
+ title: '收费明细日报表',
215
+ props: ['data'],
216
+ data() {
217
+ return {
218
+ data: {},
219
+ other:[],
220
+ footer:[],
221
+ model: new PagedList('rs/sql/chargeDayReport', 20, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'},{
222
+ f_pregas:0,
223
+ f_collection:0
224
+ }),
225
+ paytype: this.$appdata.getParam('付款方式'),
226
+ gasproperties:[],
227
+ initres: {
228
+ org:[this.$login.f.orgid],
229
+ dep:[],
230
+ user:[],
231
+ },
232
+ showself:['company','department','operator'],
233
+ show:false,
234
+ rowdata:{},
235
+ criteriaShow: false,
236
+ residentialArea: [],
237
+ area:[],
238
+ pays:[],
239
+ orgCondtionStr: '',
240
+ modelval: [],
241
+ startDate:"",
242
+ endDate:"",
243
+ inputtouPerson: [],
244
+ printshow: false,
245
+ all: false,
246
+ fields: {},
247
+ thead: '',
248
+ tfoot: '',
249
+
250
+ // 下拉框
251
+
252
+ //合计数据
253
+ sumsmodel: {},
254
+ sumField: {
255
+ 'f_pregas': '方量', 'f_preamount': '金额'
256
+ },
257
+ pageSum: {
258
+ 'f_pregas': '0.00',
259
+ 'f_preamount': '0.00',
260
+ },
261
+ defaultfield: [],
262
+ config: {
263
+ defaultPrint: ['f_userinfo_code', 'f_user_name']
264
+ },
265
+ batchmoneyShow:false
266
+ }
267
+ },
268
+ ready() {
269
+ this.getaddress()
270
+ readySomething(this).then(() => {
271
+ this.$emit('ready')
272
+ }).catch((error) => {
273
+ this.$emit('error', error)
274
+ })
275
+ },
276
+ methods: {
277
+ getotherfooter(){
278
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
279
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
280
+ this.other=[];
281
+ this.footer=[];
282
+ let exportdata = this.getCondition;
283
+ let otherInData=[];
284
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
285
+ let footerData=[],exportfield=this.getfield;
286
+ footerData.push("合计");
287
+ let self =this;
288
+ for(var field in self.sumsmodel){
289
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
290
+ }
291
+ this.footer.push(footerData);
292
+ this.other.push(otherInData);
293
+ },
294
+ search(){
295
+ this.$refs.paged.$refs.cri.search()
296
+ },
297
+ selfSearch(args) {
298
+ this.startDate=this.$refs.paged.$refs.cri.model.startDate.substring(0,10)
299
+ this.endDate=this.$refs.paged.$refs.cri.model.endDate.substring(0,10)
300
+ args.condition = `${args.condition} ` +' and '+this.orgCondtionStr.trim().substring(4)
301
+ //小区查询条件
302
+ this.area = this.$refs.paged.$refs.cri.model.f_residential_area
303
+ if(this.area.length !== 0){
304
+ let str = JSON.stringify(this.area)
305
+ str = str.replace(/"/g,`'`)
306
+ str = str.replace(/\[/g,``)
307
+ str = str.replace(/\]/g,``)
308
+ //查询多个小区时条件
309
+ args.condition += ` and f_residential_area in ( ${str} )`
310
+ }
311
+ this.pays = this.$refs.paged.$refs.cri.model.f_payment
312
+ if(this.pays.length !== 0){
313
+ let str = JSON.stringify(this.pays)
314
+ str = str.replace(/"/g,`'`)
315
+ str = str.replace(/\[/g,``)
316
+ str = str.replace(/\]/g,``)
317
+ //查询多种付款方式时条件
318
+ args.condition += ` and f_payment in ( ${str} )`
319
+ }
320
+ this.model.search(args.condition, args.model)
321
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
322
+ },
323
+ clear() {
324
+ //清空部门和人员
325
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
326
+ //部门和人员变为全选
327
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
328
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
329
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
330
+ this.$refs.paged.$refs.cri.model[key] = []
331
+ })
332
+ },
333
+ async getaddress(){
334
+ let HttpReset = new HttpResetClass()
335
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
336
+ data: {
337
+ condition: `1=1 and s.f_orgid = '${this.$login.f.orgid}'`
338
+ }
339
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
340
+ console.log('小区',data)
341
+ let house = [{label: '全部', value: ''}]
342
+ for (let row of data.data){
343
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
344
+ }
345
+ this.residentialArea = house
346
+ },
347
+ show() {
348
+ this.criteriaShow = true
349
+ },
350
+ hidden() {
351
+ this.criteriaShow = !this.criteriaShow
352
+ },
353
+ getRes(obj) {
354
+ this.orgCondtionStr = obj
355
+ },
356
+ stamp() {
357
+ this.all = false
358
+ //默认选择要打印的列
359
+ this.modelval = defaultPrint.config
360
+ this.fields = this.getfield
361
+ console.log('所有打印字段', this.fields)
362
+ this.printshow = true
363
+ this.put()
364
+ },
365
+ put() {
366
+ // 对Modelval进行排序
367
+ this.sortModelval()
368
+ this.thead = `<tr><th colspan=${this.modelval.length}>收费查询统计报表</th></tr><tr>`
369
+ for (let key of this.modelval) {
370
+ this.thead += '<th>' + this.fields[key] + '</th>'
371
+ }
372
+ this.thead += '</tr>'
373
+ },
374
+ print() {
375
+ this.$refs.print.PrintAsFile()
376
+ this.printshow = false
377
+ },
378
+ dealmsg(val) {
379
+ console.log('---------------dealmsg')
380
+ this.rowdata=val
381
+ this.show=true
382
+ val.model = this.model.model
383
+ this.$dispatch('deal-msg', val)
384
+ },
385
+ close() {
386
+ this.printshow = false
387
+ this.all = false
388
+ },
389
+ // 对选择的列进行排序
390
+ sortModelval() {
391
+ let sortModel = []
392
+ Object.keys(this.fields).forEach((key) => {
393
+ if (this.modelval.includes(key)) {
394
+ sortModel.push(key)
395
+ }
396
+ })
397
+ this.modelval = sortModel
398
+ console.log('选择的打印的字段', this.modelval)
399
+ },
400
+ userTypeChange () {
401
+ this.gasproperties=[]
402
+ if(this.$refs.paged.$refs.criteria.model !==null) {
403
+ this.$refs.paged.$refs.criteria.model.f_gasproperties=''
404
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
405
+ }
406
+ else{
407
+ this.gasproperties =[{label: '全部', value: ''}]
408
+ }
409
+ },
410
+ },
411
+ watch: {
412
+ 'all'(val) {
413
+ if (val) {
414
+ this.modelval = this.bodyData
415
+ } else {
416
+ this.modelval = defaultPrint.config
417
+ this.put()
418
+ }
419
+ },
420
+ 'modelval.length'() {
421
+ this.put()
422
+ },
423
+ sumsmodel:{
424
+ handler: function(val) {
425
+ this.getotherfooter();
426
+ },
427
+ deep: true
428
+ }
429
+ },
430
+ computed: {
431
+ getCondition() {
432
+ return {
433
+ startDate: this.$refs.paged.$refs.cri.model.startDate,
434
+ endDate: this.$refs.paged.$refs.cri.model.endDate,
435
+ condition: this.$refs.paged.model.condition
436
+ }
437
+ },
438
+ getfield() {
439
+ return exportConfig.ChargeDayReportConfig
440
+ },
441
+ whetherpaies () {
442
+ return [
443
+ {label: '全部', value: ''},
444
+ {label: '已缴费', value: '是'},
445
+ {label: '未缴费', value: '否'}
446
+ ]
447
+ },
448
+ usertypes() {
449
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
450
+ }
451
+
452
+ }
453
+ }
454
+ </script>
@@ -0,0 +1,6 @@
1
+ export default{
2
+ //把打印需要默认选中的字段名放在config数组中
3
+ config: [
4
+ "f_userinfo_code","f_user_name","f_user_phone","f_pregas","f_preamount","f_collection","f_balance","f_curbalance","f_idnumber"
5
+ ]
6
+ }