manage-client 3.2.234 → 3.2.236

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