manage-client 3.2.233 → 3.2.235

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.
@@ -8,42 +8,16 @@
8
8
  <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
9
  <div class="row">
10
10
  <res-select-group :show-component="['company']" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
11
+
11
12
  <div class="col-sm-2 form-group">
12
- <label for="startDate" class="font_normal_body">审核日期起</label>
13
- <datepicker id="startDate" placeholder="审核日期起" style="width:60%"
14
- v-model="model.startDate"
15
- :value.sync="model.startDate"
16
- :format="'yyyy-MM-dd'"
17
- :show-reset-button="true"
18
- condition="f_audit_date >= '{} 00:00:00'">
19
- </datepicker>
20
- </div>
21
- <div class="col-sm-2 form-group">
22
- <label for="endDate" class="font_normal_body">审核日期止</label>
23
- <datepicker id="endDate" placeholder="审核日期止" style="width:60%"
24
- v-model="model.endDate"
25
- :value.sync="model.endDate"
26
- :format="'yyyy-MM-dd'"
27
- :show-reset-button="true"
28
- condition="f_audit_date <= '{} 23:59:59'">
29
- </datepicker>
13
+ <label class="font_normal_body">年份</label>
14
+ <v-select :value.sync="model.a_yd"
15
+ :options='$parent.$parent.jfnfArray' placeholder='请选择' v-model="model.a_yd"
16
+ condition="a_yd like '{}%'"
17
+ close-on-select></v-select>
30
18
  </div>
31
19
 
32
- <div class="col-sm-2 form-group">
33
- <label class="font_normal_body">气表类型</label>
34
- <v-select :value.sync="model.f_meter_classify"
35
- :options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_classify"
36
- condition="f_meter_classify in {}"
37
- close-on-select></v-select>
38
- </div>
39
20
 
40
- <div class="col-sm-2 form-group">
41
- <label class="font_normal_body">结算方式</label>
42
- <v-select :value.sync="model.f_calculation"
43
- :options='$parent.$parent.fcalculation' placeholder='请选择' v-model="model.f_calculation"
44
- condition="f_calculation in {}"
45
- close-on-select></v-select>
46
- </div>
47
21
 
48
22
  <div class="span" style="float:right;">
49
23
  <button class="button_search button_spacing" @click="$parent.$parent.search()">查询</button>
@@ -54,53 +28,12 @@
54
28
  :field="$parent.$parent.getExportField"
55
29
  :footer="$parent.$parent.footer"
56
30
  :header="$parent.$parent.other"
57
- sqlurl="rs/logic/exportfile" sql-name="qnChaobiaoyhhz" template-name='抄表按用户汇总导出'
31
+ sqlurl="rs/logic/exportfile" sql-name="qnJgqYhsbb" template-name='用户数报表导出'
58
32
  :choose-col="true"></export-excel>
59
33
 
60
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>
61
35
  </div>
62
36
  </div>
63
- <div class="row" v-show="$parent.$parent.criteriaShow">
64
- <div class="col-sm-2 form-group">
65
- <label class="font_normal_body">客户编号</label>
66
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
67
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
68
- </div>
69
- <div class="col-sm-2 form-group">
70
- <label class="font_normal_body">客户名称</label>
71
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
72
- condition="f_user_name like '%{}%'" placeholder="客户名称">
73
- </div>
74
- <div class="col-sm-2 form-group">
75
- <label class="font_normal_body">下账状态</label>
76
- <v-select :value.sync="model.f_accounts_state"
77
- :options='$parent.$parent.accountsState' placeholder='请选择' v-model="model.f_accounts_state"
78
- condition="f_accounts_state = '{}'"
79
- close-on-select></v-select>
80
- </div>
81
- <div class="col-sm-2 form-group">
82
- <label class="font_normal_body">客户类型</label>
83
- <v-select :value.sync="model.f_user_type"
84
- @change="$parent.$parent.userTypeChange()"
85
- :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
86
- condition="f_user_type = '{}'"
87
- close-on-select></v-select>
88
- </div>
89
- <div class="col-sm-2 form-group">
90
- <label class="font_normal_body">用气性质</label>
91
- <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
92
- :options='$parent.$parent.gasproperties' placeholder='请选择'
93
- condition="f_gasproperties = '{}'"
94
- close-on-select></v-select>
95
- </div>
96
- </div>
97
- <div class="row" v-show="$parent.$parent.criteriaShow">
98
- <div class="col-sm-2 form-group">
99
- <label class="font_normal_body">气量大于</label>
100
- <input type="text" style="width:60%" class="input_search" v-model="model.f_gas"
101
- condition="f_gas > {} " placeholder="气量大于">
102
- </div>
103
- </div>
104
37
  </div>
105
38
  </criteria>
106
39
 
@@ -108,67 +41,67 @@
108
41
  <template partial='head'>
109
42
  <tr>
110
43
  <th>
111
- <nobr>用户号</nobr>
44
+ <nobr>月度</nobr>
112
45
  </th>
113
46
  <th>
114
- <nobr>用户名</nobr>
47
+ <nobr>工业</nobr>
115
48
  </th>
116
49
  <th>
117
- <nobr>表号</nobr>
50
+ <nobr>商业</nobr>
118
51
  </th>
119
52
  <th>
120
- <nobr>客户类型</nobr>
53
+ <nobr>医院</nobr>
121
54
  </th>
122
55
  <th>
123
- <nobr>用气性质</nobr>
56
+ <nobr>幼儿园</nobr>
124
57
  </th>
125
58
  <th>
126
- <nobr>起方</nobr>
59
+ <nobr>养老</nobr>
127
60
  </th>
128
61
  <th>
129
- <nobr>止方</nobr>
62
+ <nobr>学校</nobr>
130
63
  </th>
131
64
  <th>
132
- <nobr>单价</nobr>
65
+ <nobr>居民户</nobr>
133
66
  </th>
134
67
  <th>
135
- <nobr>气量</nobr>
68
+ <nobr>壁挂炉</nobr>
136
69
  </th>
137
70
  <th>
138
- <nobr>金额</nobr>
71
+ <nobr>小计</nobr>
139
72
  </th>
140
73
  </tr>
141
74
  </template>
142
75
  <template partial='body'>
143
76
  <td style="text-align: center;">
144
- <nobr>{{row.f_userinfo_code}}</nobr>
77
+ <nobr>{{row.a_yd}}</nobr>
145
78
  </td>
146
79
  <td style="text-align: center;">
147
- <nobr>{{row.f_user_name}}</nobr>
80
+ <nobr>{{row.b_gy}}</nobr>
148
81
  </td>
149
82
  <td style="text-align: center;">
150
- <nobr>{{row.f_meternumber}}</nobr>
83
+ <nobr>{{row.c_sy}}</nobr>
151
84
  </td>
152
85
  <td style="text-align: center;">
153
- <nobr>{{row.f_user_type}}</nobr>
86
+ <nobr>{{row.d_yy}}</nobr>
154
87
  </td>
155
88
  <td style="text-align: center;">
156
- <nobr>{{row.f_gasproperties}}</nobr>
89
+ <nobr>{{row.e_yey}}</nobr>
157
90
  </td>
158
91
  <td style="text-align: center;">
159
- <nobr>{{row.f_last_tablebase}}</nobr>
92
+ <nobr>{{row.f_yl}}</nobr>
160
93
  </td>
161
94
  <td style="text-align: center;">
162
- <nobr>{{row.f_tablebase}}</nobr>
95
+ <nobr>{{row.g_xx}}</nobr>
163
96
  </td>
164
97
  <td style="text-align: center;">
165
- <nobr>{{row.f_price}}</nobr>
98
+ <nobr>{{row.h_jm}}</nobr>
166
99
  </td>
167
100
  <td style="text-align: center;">
168
- <nobr>{{row.f_gas}}</nobr>
101
+ <nobr>{{row.i_bgl}}</nobr>
169
102
  </td>
170
103
  <td style="text-align: center;">
171
- <nobr>{{row.f_money}}</nobr>
104
+ <nobr>{{row.j_xj}}</nobr>
172
105
  </td>
173
106
  </template>
174
107
  <template partial='foot'>
@@ -182,7 +115,7 @@
182
115
  汇总信息
183
116
  </td>
184
117
  <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
185
- 气量合计:&emsp;{{sumsmodel.f_gas}}&emsp;&emsp;金额合计:&emsp;{{sumsmodel.f_money}}
118
+ 工业合计:&emsp;{{sumsmodel.b_gy}}&emsp;&emsp;商业合计:&emsp;{{sumsmodel.c_sy}}&emsp;&emsp;医院合计:&emsp;{{sumsmodel.d_yy}}&emsp;&emsp;幼儿园合计:&emsp;{{sumsmodel.e_yey}}&emsp;&emsp;养老合计:&emsp;{{sumsmodel.f_yl}}&emsp;&emsp;学校合计:&emsp;{{sumsmodel.g_xx}}&emsp;&emsp;居民户合计:&emsp;{{sumsmodel.h_jm}}&emsp;&emsp;壁挂炉合计:&emsp;{{sumsmodel.i_bgl}}
186
119
  </td>
187
120
  </tr>
188
121
  </table>
@@ -197,429 +130,465 @@
197
130
  </template>
198
131
 
199
132
  <script>
200
- import {HttpResetClass, PagedList} from 'vue-client'
201
- import defaultPrint from '../../components/sale/config/DefaultPrint'
202
- import exportConfig from './exportConfig'
133
+ import {HttpResetClass, PagedList} from 'vue-client'
134
+ import defaultPrint from '../../components/sale/config/DefaultPrint'
135
+ import exportConfig from './exportConfig'
203
136
 
204
- let readySomething = async function (self) {
205
- self.$MagGetSaleParam.initinputtor();
206
- self.getinputtores();
207
- // 获取区县
208
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
209
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
210
- // await self.$refs.paged.$refs.cri.search()
211
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
212
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
213
- }
137
+ let readySomething = async function (self) {
138
+ self.$MagGetSaleParam.initinputtor();
139
+ self.getinputtores();
140
+ // 获取区县
141
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
142
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
143
+ // await self.$refs.paged.$refs.cri.search()
144
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
145
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
146
+ }
214
147
 
215
- export default {
216
- title: '抄表按用户汇总',
217
- data() {
218
- return {
219
- other:[],
220
- footer:[],
221
- model: new PagedList('rs/sql/qnChaobiaoyhhz', 20, {}, {f_gas: 0, f_money: 0}),
222
- criteriaShow: false,
223
- orgCondtionStr: '',
224
- modelval: [],
225
- printshow: false,
226
- all: false,
227
- fields: {},
228
- //排序
229
- orderitem:'',
230
- orderFields: {
148
+ export default {
149
+ title: '用户数报表',
150
+ data() {
151
+ return {
152
+ other:[],
153
+ footer:[],
154
+ model: new PagedList('rs/sql/qnJgqYhsbb', 20, {}, {b_gy: 0, c_sy: 0, d_yy: 0, e_yey: 0, f_yl: 0, g_xx: 0, h_jm: 0, i_bgl: 0}),
155
+ criteriaShow: false,
156
+ orgCondtionStr: '',
157
+ modelval: [],
158
+ printshow: false,
159
+ all: false,
160
+ fields: {},
161
+ //排序
162
+ orderitem:'',
163
+ orderFields: {
231
164
 
232
- },
233
- gasproperties:[],
234
- //默认打印列
235
- defaultfield: [],
236
- config: {
237
- defaultPrint: []
238
- },
239
- balance2:'',
240
- thead: '',
241
- tfoot: '',
242
- area: [],
243
- //合计数据
244
- sumsmodel: {},
245
- initres: {
246
- org:[this.$login.f.orgid],
247
- dep:[],
248
- user:[],
249
- },
250
- userdetail: {
251
- show: false,
252
- f_userinfo_code: '',
253
- f_filialeids: ''
254
- },
165
+ },
166
+ gasproperties:[],
167
+ jfnfArray:[],
168
+ //默认打印列
169
+ defaultfield: [],
170
+ config: {
171
+ defaultPrint: []
172
+ },
173
+ balance2:'',
174
+ thead: '',
175
+ tfoot: '',
176
+ area: [],
177
+ //合计数据
178
+ sumsmodel: {},
179
+ initres: {
180
+ org:[this.$login.f.orgid],
181
+ dep:[],
182
+ user:[],
183
+ },
184
+ userdetail: {
185
+ show: false,
186
+ f_userinfo_code: '',
187
+ f_filialeids: ''
188
+ },
255
189
 
256
- show:false,
257
- rowdata:{},
258
- meterInfo:{},
259
- deviceInfo:{},
260
- condition2:'',
190
+ show:false,
191
+ rowdata:{},
192
+ meterInfo:{},
193
+ deviceInfo:{},
194
+ condition2:'',
261
195
 
262
196
 
263
- weixinSign:[{label:"全部",value:""},{label:"已绑定",value:"已绑定"},{label:"未绑定",value:"未绑定"}],
264
- //小区
265
- residentialArea: [],
266
- //表册片区
267
- bookSlice:[{label: '全部',value: ''}],
268
- inputtores:[{label: '全部',value: ''}], //抄表员
269
- allorgid:[],
270
- f_filialeid: this.$login.f.f_orgid,
271
- dypayment:[{label:"全部",value:""},{label:"银行代扣",value:"银行代扣",},{label:"现金缴费",value:"现金缴费",}],
272
- }
273
- },
274
- ready() {
275
- this.getaddress()
276
- // this.$refs.paged.$refs.cri.model.f_user_state=['正常']
277
- readySomething(this).then(() => {
278
- this.$emit('ready')
279
- }).catch((error) => {
280
- this.$emit('error', error)
281
- })
282
- this.initAreas(this.$login.f.orgid)
283
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
284
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
285
- },
286
- methods: {
287
- async getinputtores () {
288
- // 获取抄表员
289
- let rs = []
290
- if (this.$login.f.f_gasman.length > 0) {
291
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
292
- let temp = {
293
- label: this.$login.f.f_gasman[i].name,
294
- value: this.$login.f.f_gasman[i].name
295
- }
296
- rs.push(temp)
197
+ weixinSign:[{label:"全部",value:""},{label:"已绑定",value:"已绑定"},{label:"未绑定",value:"未绑定"}],
198
+ //小区
199
+ residentialArea: [],
200
+ //表册片区
201
+ bookSlice:[{label: '全部',value: ''}],
202
+ inputtores:[{label: '全部',value: ''}], //抄表员
203
+ allorgid:[],
204
+ f_filialeid: this.$login.f.f_orgid,
205
+ dypayment:[{label:"全部",value:""},{label:"银行代扣",value:"银行代扣",},{label:"现金缴费",value:"现金缴费",}],
206
+ }
207
+ },
208
+ ready() {
209
+ this.getaddress()
210
+ // this.$refs.paged.$refs.cri.model.f_user_state=['正常']
211
+ readySomething(this).then(() => {
212
+ this.$emit('ready')
213
+ }).catch((error) => {
214
+ this.$emit('error', error)
215
+ })
216
+ //this.initAreas(this.$login.f.orgid)
217
+ //self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
218
+ //self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
219
+ this.getJfnf();
220
+ },
221
+ methods: {
222
+ async getinputtores () {
223
+ // 获取抄表员
224
+ let rs = []
225
+ if (this.$login.f.f_gasman.length > 0) {
226
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
227
+ let temp = {
228
+ label: this.$login.f.f_gasman[i].name,
229
+ value: this.$login.f.f_gasman[i].name
297
230
  }
231
+ rs.push(temp)
298
232
  }
299
- this.inputtores = [{label: '全部', value: ''}, ...rs]
300
- },
301
- async updateParams() {
302
- await this.$MagLoadParams.loadParam(this.f_filialeid)
303
- this.inputtores = [];
304
- this.inputtores.push({label: "全部", value: ""})
305
- this.initSlice(this.f_filialeid)
306
- if(this.allorgid!=null){
307
- this.allorgid.forEach((res)=>{
308
- this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
309
- })
233
+ }
234
+ this.inputtores = [{label: '全部', value: ''}, ...rs]
235
+ },
236
+ async updateParams() {
237
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
238
+ this.inputtores = [];
239
+ this.inputtores.push({label: "全部", value: ""})
240
+ this.initSlice(this.f_filialeid)
241
+ if(this.allorgid!=null){
242
+ this.allorgid.forEach((res)=>{
243
+ this.inputtores = this.inputtores.concat(this.$MagGetSaleParam.getresinputtor(res));
244
+ })
245
+ }
246
+ },
247
+ async getJfnf(){
248
+ let HttpReset = new HttpResetClass()
249
+ var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
250
+ data: {
251
+ condition: '1=1',
252
+ tablename: 'qn_jgq_yhs',
253
+ groupitem: 'LEFT(a_yd,4)',
254
+ orderitem: 'LEFT(a_yd,4)',
255
+ items: 'LEFT(a_yd,4) as yf'
310
256
  }
311
- },
312
- getotherfooter () {
313
- // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
314
- // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
315
- this.other = [];
316
- this.footer = [];
317
- let exportdata = this.getCondition;
318
- let otherInData = [];
319
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
320
- let footerData = [], exportfield = this.getExportField;
321
- footerData.push("合计");
322
- let self = this;
323
- for (var field in self.sumsmodel) {
324
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
257
+ }, {resolveMsg: null, rejectMsg: '获取失败!'})
258
+ let nameArr = [{label: '全部', value: ''}]
259
+ for (let row of data.data){
260
+ nameArr.push({label: row.yf, value: row.yf})
261
+ }
262
+ this.jfnfArray = nameArr
263
+ },
264
+ async getGaspropperties(){
265
+ let HttpReset = new HttpResetClass()
266
+ var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
267
+ data: {
268
+ condition: '1=1',
269
+ tablename: 'qn_jgq_myhz',
270
+ groupitem: 'r_yqxzcfl',
271
+ orderitem: 'r_yqxzcfl',
272
+ items: 'r_yqxzcfl'
325
273
  }
326
- this.footer.push(footerData);
327
- this.other.push(otherInData);
328
- },
329
- async getaddress(){
330
- console.log('开始获取小区')
331
- let HttpReset = new HttpResetClass()
332
- var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
333
- data: {
334
- condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
335
- }
336
- }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
337
- console.log('小区',data)
338
- let house = []
339
- for (let row of data.data){
340
- console.log('开始保存小区')
341
- house.push({label: row.f_residential_area, value: row.f_residential_area})
274
+ }, {resolveMsg: null, rejectMsg: '获取失败!'})
275
+ let nameArr = [{label: '全部', value: ''}]
276
+ for (let row of data.data){
277
+ nameArr.push({label: row.r_yqxzcfl, value: row.r_yqxzcfl})
278
+ }
279
+ this.gasproperties = nameArr
280
+ },
281
+ getotherfooter () {
282
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
283
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
284
+ this.other = [];
285
+ this.footer = [];
286
+ let exportdata = this.getCondition;
287
+ let otherInData = [];
288
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
289
+ let footerData = [], exportfield = this.getExportField;
290
+ footerData.push("合计");
291
+ let self = this;
292
+ for (var field in self.sumsmodel) {
293
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
294
+ }
295
+ this.footer.push(footerData);
296
+ this.other.push(otherInData);
297
+ },
298
+ async getaddress(){
299
+ console.log('开始获取小区')
300
+ let HttpReset = new HttpResetClass()
301
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
302
+ data: {
303
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
342
304
  }
343
- this.residentialArea = house
344
- },
305
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
306
+ console.log('小区',data)
307
+ let house = []
308
+ for (let row of data.data){
309
+ console.log('开始保存小区')
310
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
311
+ }
312
+ this.residentialArea = house
313
+ },
345
314
 
346
- //把数据库查询数据转换为下拉数据
347
- calculate(rows){
348
- let data = []
349
- rows.forEach((row, n) => {
350
- data[n] = {label: row.f_residential_area, value: row.id}
351
- })
352
- return data
353
- },
354
- search(){
355
- console.log("=====search====")
356
- //this.$refs.paged.$refs.cri.search()
357
- this.$refs.paged.$refs.cri.search()
358
- },
359
- cancel(obj) {
360
- console.log("=====cancel====" + obj)
361
- this.show = false
362
- },
363
- showmsg(obj){
364
- this.rowdata=obj
365
- this.show=true
366
- // let http = new HttpResetClass()
367
- // http.load('POST','rs/sql/getUserMeter',{data: {condition: `f_userinfo_id ='${obj.f_userinfo_id}'`}},
368
- // {resolveMsg: null, rejectMsg: null}).then((res) => {
369
- // this.meterInfo = res.data})
370
- // let http2 = new HttpResetClass()
371
- // http2.load('POST','rs/sql/deviceQuery',{data: {condition: `f_userinfo_id ='${obj.f_userinfo_id}'`}},
372
- // {resolveMsg: null, rejectMsg: null}).then((res) => {
373
- // this.deviceInfo = res.data})
315
+ //把数据库查询数据转换为下拉数据
316
+ calculate(rows){
317
+ let data = []
318
+ rows.forEach((row, n) => {
319
+ data[n] = {label: row.f_residential_area, value: row.id}
320
+ })
321
+ return data
322
+ },
323
+ search(){
324
+ console.log("=====search====")
325
+ //this.$refs.paged.$refs.cri.search()
326
+ this.$refs.paged.$refs.cri.search()
327
+ },
328
+ cancel(obj) {
329
+ console.log("=====cancel====" + obj)
330
+ this.show = false
331
+ },
332
+ showmsg(obj){
333
+ this.rowdata=obj
334
+ this.show=true
335
+ // let http = new HttpResetClass()
336
+ // http.load('POST','rs/sql/getUserMeter',{data: {condition: `f_userinfo_id ='${obj.f_userinfo_id}'`}},
337
+ // {resolveMsg: null, rejectMsg: null}).then((res) => {
338
+ // this.meterInfo = res.data})
339
+ // let http2 = new HttpResetClass()
340
+ // http2.load('POST','rs/sql/deviceQuery',{data: {condition: `f_userinfo_id ='${obj.f_userinfo_id}'`}},
341
+ // {resolveMsg: null, rejectMsg: null}).then((res) => {
342
+ // this.deviceInfo = res.data})
374
343
 
375
- // this.f_userinfo_id=obj.f_userinfo_id
376
- },
377
- userTypeChange () {
378
- this.gasproperties=[]
379
- if(this.$refs.paged.$refs.cri.model !==null) {
380
- this.$refs.paged.$refs.cri.model.f_gasproperties=''
381
- this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
382
- }
383
- else{
384
- this.gasproperties =[{label: '全部', value: ''}]
385
- }
386
- },
387
- //初始化片区
388
- async initSlice (val) {
389
- if (val) {
390
- let getAllArea = await this.$resetpost('/rs/search', {
391
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
392
- userid: this.$login.f.id
393
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
394
- let arr = getAllArea.data.filter((res) => {
395
- return res.parentid == val
396
- })
397
- this.bookSlice = []
398
- console.log('过滤之后的片区-------------------', arr)
399
- arr.forEach((res) => {
400
- this.bookSlice.push({label: res.name, value: res.name})
401
- })
402
- }
403
- },
404
- async initAreas (val) {
344
+ // this.f_userinfo_id=obj.f_userinfo_id
345
+ },
346
+ userTypeChange () {
347
+ this.gasproperties=[]
348
+ if(this.$refs.paged.$refs.cri.model !==null) {
349
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
350
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
351
+ }
352
+ else{
353
+ this.gasproperties =[{label: '全部', value: ''}]
354
+ }
355
+ },
356
+ //初始化片区
357
+ async initSlice (val) {
358
+ if (val) {
359
+ let getAllArea = await this.$resetpost('/rs/search', {
360
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
361
+ userid: this.$login.f.id
362
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
363
+ let arr = getAllArea.data.filter((res) => {
364
+ return res.parentid == val
365
+ })
366
+ this.bookSlice = []
367
+ console.log('过滤之后的片区-------------------', arr)
368
+ arr.forEach((res) => {
369
+ this.bookSlice.push({label: res.name, value: res.name})
370
+ })
371
+ }
372
+ },
373
+ async initAreas (val) {
405
374
 
406
- if (val) {
407
- let getAllArea = await this.$resetpost('/rs/search', {
408
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
409
- userid: this.$login.f.id
410
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
375
+ if (val) {
376
+ let getAllArea = await this.$resetpost('/rs/search', {
377
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
378
+ userid: this.$login.f.id
379
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
411
380
 
412
- let arr = getAllArea.data.filter((res) => {
413
- return res.parentid == val
414
- })
415
- console.log('过滤之后的片区', arr)
416
- this.sliceArea = []
417
- arr.forEach((res) => {
418
- this.sliceArea.push({label: res.name, value: res.name})
419
- })
420
- }
421
- },
422
- selfSearch(args) {
423
- console.log('args', args)
424
- console.log('this.orgCondtionStr', this.orgCondtionStr)
425
- if (!this.orgCondtionStr) {
426
- args.condition = `${args.condition}` + " and tr.f_orgid = " + this.$login.f.orgid
427
- } else {
428
- args.condition = `${args.condition}` + this.orgCondtionStr
429
- }
430
- this.condition2 = args.condition
431
- this.model.search(args.condition, args.model)
432
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
433
- console.log('合计字段', this.sumsmodel)
434
- },
435
- clear() {
436
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
437
- this.$refs.paged.$refs.cri.model[key] = []
381
+ let arr = getAllArea.data.filter((res) => {
382
+ return res.parentid == val
438
383
  })
439
- },
440
- hidden() {
441
- this.criteriaShow = !this.criteriaShow
442
- },
443
- getRes(obj) {
444
- this.orgCondtionStr = obj
445
- },
446
- stamp() {
447
- this.all = false
448
- //默认选择要打印的列
449
- this.modelval = defaultPrint.config
450
- this.fields = this.getfield
451
- console.log('所有打印字段', this.fields)
452
- this.printshow = true
453
- this.put()
454
- },
455
- put() {
456
- // 对Modelval进行排序
457
- this.sortModelval()
458
- this.thead = `<tr><th colspan=${this.modelval.length}>用户查询统计报表</th></tr><tr>`
459
- for (let key of this.modelval) {
460
- this.thead += '<th>' + this.fields[key] + '</th>'
461
- }
462
- this.thead += '</tr>'
463
- },
464
- print() {
465
- this.$refs.print.PrintAsFile()
466
- this.printshow = false
467
- },
468
- close() {
469
- this.printshow = false
470
- },
471
- // 对选择的列进行排序
472
- sortModelval() {
473
- let sortModel = []
474
- Object.keys(this.fields).forEach((key) => {
475
- if (this.modelval.includes(key)) {
476
- sortModel.push(key)
477
- }
384
+ console.log('过滤之后的片区', arr)
385
+ this.sliceArea = []
386
+ arr.forEach((res) => {
387
+ this.sliceArea.push({label: res.name, value: res.name})
478
388
  })
479
- this.modelval = sortModel
480
- console.log('选择的打印的字段', this.modelval)
481
- },
482
- dblclick(row, index) {
483
- console.log('双击之后数据', row, index)
484
- this.userdetail.show = true
485
- this.userdetail.f_userinfo_code = row.f_userinfo_code
486
- this.userdetail.f_filialeids = row.f_filialeids
487
- },
488
- sort (field, rule) {
489
- // 将所有排序方式设为不排序,实现相互排斥
490
- for (let key in this.orderFields) {
491
- if (key === field) {
492
- this.orderFields[key] = rule
493
- } else {
494
- this.orderFields[key] = 'no'
495
- }
389
+ }
390
+ },
391
+ selfSearch(args) {
392
+ console.log('args', args)
393
+ console.log('this.orgCondtionStr', this.orgCondtionStr)
394
+ if (!this.orgCondtionStr) {
395
+ args.condition = `${args.condition}` + " and tr.f_orgid = " + this.$login.f.orgid
396
+ } else {
397
+ args.condition = `${args.condition}` + this.orgCondtionStr
398
+ }
399
+ this.condition2 = args.condition
400
+ this.model.search(args.condition, args.model)
401
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
402
+ console.log('合计字段', this.sumsmodel)
403
+ },
404
+ clear() {
405
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
406
+ this.$refs.paged.$refs.cri.model[key] = []
407
+ })
408
+ },
409
+ hidden() {
410
+ this.criteriaShow = !this.criteriaShow
411
+ },
412
+ getRes(obj) {
413
+ this.orgCondtionStr = obj
414
+ },
415
+ stamp() {
416
+ this.all = false
417
+ //默认选择要打印的列
418
+ this.modelval = defaultPrint.config
419
+ this.fields = this.getfield
420
+ console.log('所有打印字段', this.fields)
421
+ this.printshow = true
422
+ this.put()
423
+ },
424
+ put() {
425
+ // 对Modelval进行排序
426
+ this.sortModelval()
427
+ this.thead = `<tr><th colspan=${this.modelval.length}>用户查询统计报表</th></tr><tr>`
428
+ for (let key of this.modelval) {
429
+ this.thead += '<th>' + this.fields[key] + '</th>'
430
+ }
431
+ this.thead += '</tr>'
432
+ },
433
+ print() {
434
+ this.$refs.print.PrintAsFile()
435
+ this.printshow = false
436
+ },
437
+ close() {
438
+ this.printshow = false
439
+ },
440
+ // 对选择的列进行排序
441
+ sortModelval() {
442
+ let sortModel = []
443
+ Object.keys(this.fields).forEach((key) => {
444
+ if (this.modelval.includes(key)) {
445
+ sortModel.push(key)
496
446
  }
497
- // 如果新规则不排序,还原为默认排序
498
- if (rule === 'no') {
499
- this.model.paramSource.orderitem = `'${this.orderitem}'`
447
+ })
448
+ this.modelval = sortModel
449
+ console.log('选择的打印的字段', this.modelval)
450
+ },
451
+ dblclick(row, index) {
452
+ console.log('双击之后数据', row, index)
453
+ this.userdetail.show = true
454
+ this.userdetail.f_userinfo_code = row.f_userinfo_code
455
+ this.userdetail.f_filialeids = row.f_filialeids
456
+ },
457
+ sort (field, rule) {
458
+ // 将所有排序方式设为不排序,实现相互排斥
459
+ for (let key in this.orderFields) {
460
+ if (key === field) {
461
+ this.orderFields[key] = rule
500
462
  } else {
501
- this.model.paramSource.orderitem = `'${field} ${rule}'`
463
+ this.orderFields[key] = 'no'
502
464
  }
503
-
504
- this.search()
505
465
  }
506
- },
466
+ // 如果新规则不排序,还原为默认排序
467
+ if (rule === 'no') {
468
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
469
+ } else {
470
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
471
+ }
507
472
 
508
- watch: {
509
- 'all'(val) {
510
- if (val) {
511
- this.modelval = this.bodyData
512
- } else {
513
- this.modelval = defaultPrint.config
514
- this.put()
515
- }
516
- },
517
- 'modelval.length'() {
473
+ this.search()
474
+ }
475
+ },
476
+
477
+ watch: {
478
+ 'all'(val) {
479
+ if (val) {
480
+ this.modelval = this.bodyData
481
+ } else {
482
+ this.modelval = defaultPrint.config
518
483
  this.put()
484
+ }
485
+ },
486
+ 'modelval.length'() {
487
+ this.put()
488
+ },
489
+ sumsmodel:{
490
+ handler: function(val) {
491
+ this.getotherfooter();
519
492
  },
520
- sumsmodel:{
521
- handler: function(val) {
522
- this.getotherfooter();
523
- },
524
- deep: true
525
- },
526
- 'orgCondtionStr'(val) {
527
- let res = val.match(/'(.*?)'/)
528
- console.log('正则提取:',res && res[1])
529
- if (res) {
530
- this.f_filialeid = res[1]
531
- if(res.input !=null){
532
- let resorgid = res.input.substring(res.input.indexOf("'"));
533
- if(resorgid!= null && resorgid!=''){
534
- resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
535
- // resorgid = resorgid.replaceAll("'","");
536
- resorgid = resorgid.replace(/'/g,"");
537
- this.allorgid = resorgid.split(",")
538
- }
493
+ deep: true
494
+ },
495
+ 'orgCondtionStr'(val) {
496
+ let res = val.match(/'(.*?)'/)
497
+ console.log('正则提取:',res && res[1])
498
+ if (res) {
499
+ this.f_filialeid = res[1]
500
+ if(res.input !=null){
501
+ let resorgid = res.input.substring(res.input.indexOf("'"));
502
+ if(resorgid!= null && resorgid!=''){
503
+ resorgid = resorgid.substring(0,resorgid.lastIndexOf("'")+1);
504
+ // resorgid = resorgid.replaceAll("'","");
505
+ resorgid = resorgid.replace(/'/g,"");
506
+ this.allorgid = resorgid.split(",")
539
507
  }
540
- this.updateParams()
541
508
  }
542
- },
509
+ this.updateParams()
510
+ }
511
+ },
512
+ },
513
+ computed: {
514
+ // defaultexport() {
515
+ // return exportConfig.chargeexportConfig
516
+ // },
517
+ authArr () {
518
+ return this.$login.r ? this.$login.r : []
543
519
  },
544
- computed: {
545
- // defaultexport() {
546
- // return exportConfig.chargeexportConfig
547
- // },
548
- authArr () {
549
- return this.$login.r ? this.$login.r : []
550
- },
551
520
 
552
- getCondition() {
553
- return {condition: this.condition2,orderitem:this.orderitem}
554
- },
555
- getfield() {
556
- let data = {}
557
- this.bodyData.forEach((value, index) => {
558
- data[this.bodyData[index]] = this.headData[index]
521
+ getCondition() {
522
+ return {condition: this.condition2,orderitem:this.orderitem}
523
+ },
524
+ getfield() {
525
+ let data = {}
526
+ this.bodyData.forEach((value, index) => {
527
+ data[this.bodyData[index]] = this.headData[index]
528
+ })
529
+ //合计字段打印
530
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
531
+ if (this.sumsmodel) {
532
+ Object.keys(this.sumsmodel).forEach((key) => {
533
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
559
534
  })
560
- //合计字段打印
561
- this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
562
- if (this.sumsmodel) {
563
- Object.keys(this.sumsmodel).forEach((key) => {
564
- this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
565
- })
566
- } else {
567
- this.tfoot += '暂无'
568
- }
569
- this.tfoot += '</th></tr>'
570
- return data
571
- },
572
- getExportField() {
573
- return exportConfig.qnChaobiaoyhhz
574
- },
575
- inputtor () {
576
- // 获取抄表员
577
- console.log('获取抄表员', this.$login.f)
578
- let rs = []
579
- if (this.$login.f.f_gasman.length > 0) {
580
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
581
- let temp = {
582
- label: this.$login.f.f_gasman[i].name,
583
- value: this.$login.f.f_gasman[i].name
584
- }
585
- rs.push(temp)
535
+ } else {
536
+ this.tfoot += '暂无'
537
+ }
538
+ this.tfoot += '</th></tr>'
539
+ return data
540
+ },
541
+ getExportField() {
542
+ return exportConfig.qnChaobiaoyhhz
543
+ },
544
+ inputtor () {
545
+ // 获取抄表员
546
+ console.log('获取抄表员', this.$login.f)
547
+ let rs = []
548
+ if (this.$login.f.f_gasman.length > 0) {
549
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
550
+ let temp = {
551
+ label: this.$login.f.f_gasman[i].name,
552
+ value: this.$login.f.f_gasman[i].name
586
553
  }
554
+ rs.push(temp)
587
555
  }
588
-
589
- return [{label: '全部', value: ''}, ...rs]
590
- },
591
- userstates() {
592
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('客户状态')]
593
- },
594
- userLevels () {
595
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')]
596
- },
597
- usertypes () {
598
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
599
- },
600
- hairpin() {
601
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('发卡状态')]
602
- },
603
- addressstate() {
604
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
605
- },
606
- fcalculation() {
607
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('结算方式')]
608
- },
609
- metertypes() {
610
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
611
- },
612
- accountsState() {
613
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('下账状态')]
614
556
  }
557
+
558
+ return [{label: '全部', value: ''}, ...rs]
559
+ },
560
+ userstates() {
561
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('客户状态')]
562
+ },
563
+ userLevels () {
564
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')]
565
+ },
566
+ usertypes () {
567
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
568
+ },
569
+ hairpin() {
570
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('发卡状态')]
571
+ },
572
+ addressstate() {
573
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('地址状态')]
574
+ },
575
+ fcalculation() {
576
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('结算方式')]
577
+ },
578
+ metertypes() {
579
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
580
+ },
581
+ accountsState() {
582
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('下账状态')]
615
583
  }
616
584
  }
585
+ }
617
586
  </script>
618
587
  <style>
619
- .back-red{ /* 红色背景 */
620
- background-color: #F6C6CE;
621
- }
622
- .back-blue{ /* 蓝色背景 */
588
+ .back-red{ /* 红色背景 */
589
+ background-color: #F6C6CE;
590
+ }
591
+ .back-blue{ /* 蓝色背景 */
623
592
 
624
- }
593
+ }
625
594
  </style>