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