manage-client 3.2.75 → 3.2.76-jb

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.
Files changed (50) hide show
  1. package/.babelrc +5 -5
  2. package/.classpath +6 -6
  3. package/.editorconfig +9 -9
  4. package/.project +18 -18
  5. package/README.md +38 -38
  6. package/build/dev-server.js +8 -8
  7. package/config/dev.env.js +6 -6
  8. package/config/prod.env.js +3 -3
  9. package/config/test.env.js +6 -6
  10. package/package.json +14 -8
  11. package/release.bat +5 -5
  12. package/src/App.vue +71 -28
  13. package/src/components/MeterManage/ChangeMeterQuery.vue +82 -82
  14. package/src/components/MeterManage/HandQuery.vue +72 -72
  15. package/src/components/MeterManage/ReversalQuery.vue +77 -77
  16. package/src/components/SellReport/GaspriceHas.vue +141 -141
  17. package/src/components/SellReport/ManageBusSummary.vue +224 -224
  18. package/src/components/WebReport/AbnormalInfoEcharts.vue +120 -120
  19. package/src/components/WebReport/Communication.vue +131 -131
  20. package/src/components/WebReport/CompanyUser.vue +79 -79
  21. package/src/components/WebReport/GaspriceHas.vue +141 -141
  22. package/src/components/WebReport/ReportWorklist.vue +220 -220
  23. package/src/components/WebReport/SellType.vue +89 -89
  24. package/src/components/WebReport/Telemanlist.vue +221 -221
  25. package/src/components/WebReport/UserGasEcharts.vue +107 -107
  26. package/src/components/WebReport/ValueEcharts.vue +99 -99
  27. package/src/components/sale/businessquery/overDueQuery.vue +12 -0
  28. package/src/components/sale/config/DefaultPrint.js +6 -6
  29. package/src/components/sale/filesquery/detail/oper/ChangeMessage.vue +46 -46
  30. package/src/components/sale/filesquery/detail/oper/HandOper.vue +46 -46
  31. package/src/components/sale/filesquery/detail/oper/HandleMessage.vue +46 -46
  32. package/src/components/webmeter/gasAnalysis/GasAnalysisEcharts.vue +144 -144
  33. package/src/components/webmeter/gasAnalysis/GasAnalysisSummary.vue +162 -162
  34. package/src/components/webmeter/gasStatistics/GasStatistics.vue +462 -467
  35. package/src/components/webmeter/newwebmeter/NewException/NewExceptionEform.vue +149 -149
  36. package/src/filiale/macheng/RecordInfoQuery.vue +1023 -1023
  37. package/src/main.js +66 -66
  38. package/src/plugins/LodopFuncs.js +124 -124
  39. package/src/stores/GetParames.js +15 -15
  40. package/src/stores/Util.js +132 -132
  41. package/test/unit/.eslintrc +5 -5
  42. package/test/unit/TestUtil.js +35 -35
  43. package/test/unit/context.html +20 -20
  44. package/test/unit/index.js +13 -13
  45. package/test/unit/init.js +11 -11
  46. package/test/unit/karma.conf.js +45 -45
  47. package/test/unit/specs/components/CallReport/Repair.spec.js +25 -25
  48. package/test/unit/specs/components/ManageBusiness/EquipmentQuery.spec.js +21 -21
  49. package/test/unit/specs/components/ManageBusiness/TableWithQuery.spec.js +21 -21
  50. package/test/unit/specs/components/ManageBusiness/UserQuery.spec.js +21 -21
@@ -1,467 +1,462 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main">
4
- <div class="flex" :class="{showbottom:showbottomsum}" v-if="!show">
5
- <criteria-paged :model="model" v-ref:paged>
6
- <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- <div class="row" >
9
- <div class="col-sm-2">
10
- <label class="font_normal_body">组织机构</label>
11
- <res-select :initresid="$parent.$parent.org"
12
- style="width:60%"
13
- @res-select="$parent.$parent.getorg"
14
- :is-mul=false
15
- restype='organization'>
16
- </res-select>
17
- </div>
18
- <div class="col-sm-2">
19
- <label class="font_normal_body">客户编号</label>
20
- <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='客户编号'
21
- condition="ss.f_userinfo_code like '%{}%'" v-next-el='f_userinfo_code' v-el:meternumber
22
- >
23
- </div>
24
- <div class="col-sm-2">
25
- <label class="font_normal_body">客户名称</label>
26
- <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_username" placeholder='客户名称'
27
- condition="ss.f_user_name like '%{}%'" v-next-el='userid' v-el:username>
28
- </div>
29
- <div class="col-sm-2">
30
- <label class="font_normal_body">客户地址</label>
31
- <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_address" placeholder='客户地址'
32
- condition="ss.f_address like '%{}%'" v-next-el='f_address' v-el:f_address>
33
- </div>
34
- <div class="span" style="float:right;margin-top:10px">
35
- <button class="button_search button_spacing" @click="search()">查询</button>
36
- <button class="button_clear button_spacing" @click="$parent.$parent.clearmsg">清空</button>
37
- <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
38
- :field="$parent.$parent.getfield"
39
- sqlurl="rs/logic/exportfile" sql-name="gasStatisticsQuery" template-name='用气量统计表'
40
- :choose-col="true"></export-excel>
41
- <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
42
- :defaultfield="$parent.$parent.defaultfield"
43
- titletable="缴费记录报表" :starthead="$parent.$parent.getstart"
44
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
45
- <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>
46
- </div>
47
- </div>
48
- <div class="row" v-show="$parent.$parent.criteriaShow">
49
- <div class="col-sm-2">
50
- <label class="font_normal_body">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话</label>
51
- <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_user_phone" placeholder='电话'
52
- condition="ss.f_user_phone like '%{}%'" v-next-el='f_user_phone' v-el:f_user_phone
53
- >
54
- </div>
55
- <div class="col-sm-2">
56
- <label class="font_normal_body">小&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</label>
57
- <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_residential_area" placeholder='小区'
58
- condition="ss.f_residential_area like '%{}%'" v-next-el='f_residential_area' v-el:f_residential_area>
59
- </div>
60
- <div class="col-sm-2">
61
- <label class="font_normal_body">表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</label>
62
- <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_meternumber" placeholder='表号'
63
- condition="ss.f_meternumber like '%{}%'" v-next-el='meternumber' v-el:meternumber
64
- >
65
- </div>
66
- <div class="col-sm-2">
67
- <label class="font_normal_body">燃气证号</label>
68
- <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_gascode" placeholder='燃气证号'
69
- condition="ss.f_gascode like '%{}%'" v-next-el='f_gascode' v-el:f_gascode
70
- >
71
- </div>
72
- <div class="col-sm-2 form-group">
73
- <label class="font_normal_body">气价类型</label>
74
- <v-select :value.sync="model.pricetype" v-model="model.pricetype"
75
- placeholder='气价类型' :options="$parent.$parent.pricetypes"
76
- close-on-select>
77
- </v-select>
78
- </div>
79
- <div class="col-sm-2 form-group">
80
- <label class="font_normal_body">气价名称</label>
81
- <v-select :value.sync="model.f_price_name"
82
- v-model="model.f_price_name"
83
- :options="$parent.$parent.getPricenames"
84
- condition="ss.f_price_name = '{}'"
85
- close-on-select></v-select>
86
- </div>
87
- <div class="col-sm-2 form-group">
88
- <label class="font_normal_body">气表品牌</label>
89
- <v-select :value.sync="model.f_meter_brand"
90
- v-model="model.f_meter_brand"
91
- :options="$parent.$parent.meterbrands"
92
- condition="ss.f_meter_brand = '{}'"
93
- close-on-select></v-select>
94
- </div>
95
- <div class="col-sm-2 form-group">
96
- <label class="font_normal_body">是否换表</label>
97
- <v-select :value.sync="model.f_changetable_state"
98
- v-model="model.f_changetable_state"
99
- :options="$parent.$parent.isChange"
100
- condition="ss.f_changetable_state = '{}'"
101
- close-on-select></v-select>
102
- </div>
103
- <div class="col-sm-2 form-group">
104
- <label class="font_normal_body">用气状态</label>
105
- <v-select :value.sync="model.f_gas_state"
106
- v-model="model.f_gas_state"
107
- :options="$parent.$parent.gasState"
108
- condition="ss.f_gas_state = '{}'"
109
- close-on-select></v-select>
110
- </div>
111
- <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
112
- <label class="font_normal_body">用气量区间</label>
113
- <div class="row">
114
- <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount1"
115
- condition="ss.f_oughtamount >= {} " placeholder="">
116
- <label class="font_normal_body"> ≤ x ≤ </label>
117
- <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount2"
118
- condition="ss.f_oughtamount <= {} " placeholder="">
119
- </div>
120
- </div>
121
- <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
122
- <label class="font_normal_body">&nbsp;充值区间&nbsp;&nbsp;</label>
123
- <div class="row">
124
- <input type="text" style="width:27%" class="input_search" v-model="model.f_collection1"
125
- condition="ss.f_collection >= {} " placeholder="">
126
- <label class="font_normal_body"> ≤ x ≤ </label>
127
- <input type="text" style="width:27%" class="input_search" v-model="model.f_collection2"
128
- condition="ss.f_collection <= {} " placeholder="">
129
- </div>
130
- </div>
131
- <div class="col-sm-2 form-group" >
132
- <label class="font_normal_body" for="startDate">开始时间</label>
133
- <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
134
- v-model="model.startDate"
135
- :value.sync="model.startDate"
136
- :disabled-days-of-Week="[]"
137
- :format="'yyyy-MM-dd 00:00:00'"
138
- :show-reset-button="reset">
139
- </datepicker>
140
- </div>
141
- <div class="col-sm-2 form-group" >
142
- <label class="font_normal_body" for="endDate">结束时间</label>
143
- <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
144
- v-model="model.endDate"
145
- :value.sync="model.endDate"
146
- :disabled-days-of-Week="[]"
147
- :format="'yyyy-MM-dd 23:59:59'"
148
- :show-reset-button="reset">
149
- </datepicker>
150
- </div>
151
- </div>
152
- </div>
153
- </criteria>
154
- <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
155
- <template partial='head'>
156
- <tr>
157
- <th><nobr>客户编号</nobr></th>
158
- <th><nobr>客户名称</nobr></th>
159
- <th><nobr>小区</nobr></th>
160
- <th><nobr>地址</nobr></th>
161
- <th><nobr>电话</nobr></th>
162
-
163
- <th><nobr>燃气证号</nobr></th>
164
- <th><nobr>表号</nobr></th>
165
- <th><nobr>表具类型</nobr></th>
166
- <th><nobr>表描述</nobr></th>
167
- <th><nobr>气价名称</nobr></th>
168
-
169
- <th><nobr>用气性质</nobr></th>
170
- <th><nobr>期初余额</nobr></th>
171
- <th><nobr>起方</nobr></th>
172
- <th><nobr>止方</nobr></th>
173
- <th><nobr>期间用气量</nobr></th>
174
-
175
- <th><nobr>期间用气金额</nobr></th>
176
- <th><nobr>期间充值金额</nobr></th>
177
- <th><nobr>期末余额</nobr></th>
178
- <th><nobr>用气状态</nobr></th>
179
- <th><nobr>是否换表</nobr></th>
180
- <th><nobr>最后通讯日期</nobr></th>
181
- </tr>
182
- </template>
183
- <template partial='body' partial='list'>
184
- <tr >
185
- <td style="text-align: left;"><nobr> <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr></td>
186
- <td style="text-align: left;"><nobr>{{row.f_user_name}}</nobr></td>
187
- <td style="text-align: left;"><nobr>{{row.f_residential_area}}</nobr></td>
188
- <td style="text-align: left;"><nobr>{{row.f_address}}</nobr></td>
189
- <td style="text-align: center;"><nobr>{{row.f_user_phone}}</nobr></td>
190
-
191
- <td style="text-align:center"><nobr>{{row.f_gascode}}</nobr></td>
192
- <th style="text-align:center"><nobr>{{row.f_meternumber}}</nobr></th>
193
- <th style="text-align:center"><nobr>{{row.f_meter_classify}}</nobr></th>
194
- <th style="text-align:center"><nobr>{{row.f_meter_title}}</nobr></th>
195
- <th style="text-align:center"><nobr>{{row.f_price_name}}</nobr></th>
196
- <th style="text-align:center"><nobr>{{row.f_gasproperties}}</nobr></th>
197
-
198
-
199
- <th style="text-align:center"><nobr>{{row.f_balance}}</nobr></th>
200
- <th style="text-align:center"><nobr>{{row.f_last_tablebase}}</nobr></th>
201
- <th style="text-align:center"><nobr>{{row.f_tablebase}}</nobr></th>
202
- <th style="text-align:center"><nobr>{{row.f_oughtamount}}</nobr></th>
203
- <th style="text-align:center"><nobr>{{row.f_oughtfee}}</nobr></th>
204
-
205
- <th style="text-align:center"><nobr>{{row.f_collection}}</nobr></th>
206
- <th style="text-align:center"><nobr>{{row.f_curbalance}}</nobr></th>
207
- <th style="text-align:center"><nobr>{{row.f_gas_state}}</nobr></th>
208
- <th style="text-align:center"><nobr>{{row.f_changetable_state}}</nobr></th>
209
- <th style="text-align:center"><nobr>{{row.f_input_date}}</nobr></th>
210
- </tr>
211
- </template>
212
- <template partial='foot'></template>
213
- </data-grid>
214
- </criteria-paged>
215
- <table class="table-hover">
216
- <tr style="position: relative" class="table-bordered">
217
- <td
218
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
219
- 汇总信息
220
- </td>
221
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
222
- 期间用气量:&emsp;{{sumsmodel.f_oughtamount}}
223
- </td>
224
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
225
- 期间用气金额:&emsp;{{sumsmodel.f_oughtfee}}
226
- </td>
227
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
228
- 期间充值金额:&emsp;{{sumsmodel.f_collection}}
229
- </td>
230
- </tr>
231
- </table>
232
- </div>
233
- </div>
234
- </div>
235
- </template>
236
-
237
- <script>
238
- import {HttpResetClass, PagedList} from 'vue-client'
239
- import exportConfig from '../../sale/config/exportConfig'
240
- import * as Util from '../../../Util'
241
- import plugins from '../../../plugins/GetLoginInfoService'
242
-
243
- let readySomething = async function (self) {
244
- await self.$MagLoadParams.loadParam()
245
- self.initParams()
246
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
247
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums;
248
- }
249
- export default {
250
- title: '用气量统计表',
251
- data () {
252
- return {
253
- show:false,
254
- org:[this.$login.f.orgid],
255
- orgcondition: ' and ss.f_orgid = ' + this.$login.f.orgid,
256
- //f_filialeid: this.$login.f.f_orgid,
257
- detaillist: [],
258
- meterbrands: [],
259
- prices: [],
260
- gasproperties:[],
261
- condition:'',
262
- rowdata:{},
263
- getstart:'',
264
- config: {
265
- defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_meternumber', 'f_gasproperties', 'f_balance', 'f_last_tablebase','f_tablebase',
266
- 'f_oughtamount', 'f_oughtfee', 'f_collection', 'f_curbalance', 'f_gas_state', 'f_changetable_state', 'f_input_date']
267
- },
268
- sumsmodel: {},
269
- orgid:[this.$login.f.orgid],
270
- criteriaShow:false,
271
- //默认打印列
272
- defaultfield: [],
273
- orgCondtionStr: '',
274
- model: new PagedList('rs/sql/gasStatisticsQuery', 50,{
275
- startDate: 'this.model.startDate',
276
- endDate: 'this.model.endDate'
277
- },{
278
- f_oughtamount: 0,
279
- f_oughtfee: 0,
280
- f_collection:0
281
- }),
282
- showbottomsum:false //页面下方是否有合计: 默认为false, 在watch修改
283
- }
284
- },
285
- ready () {
286
- // this.$refs.paged.$refs.criteria.search()
287
- readySomething(this).then(() => {
288
- this.$emit('ready')
289
- }).catch((error) => {
290
- this.$emit('error', error)
291
- })
292
- this.$refs.paged.$refs.criteria.model.startDate = Util.addDate(new Date(),-1).substring(0,10) + ' 00:00:00'
293
- this.$refs.paged.$refs.criteria.model.endDate = Util.addDate(new Date(),-1).substring(0,10) + ' 23:59:59'
294
- this.$refs.paged.$refs.criteria.model.inputStartDate = Util.addDate(new Date(),-1).substring(0,10) + ' 00:00:00'
295
- this.$refs.paged.$refs.criteria.model.inputEndDate = Util.addDate(new Date(),-1).substring(0,10) + ' 23:59:59'
296
- this.$refs.paged.$refs.criteria.search()
297
- },
298
- methods: {
299
- initParams() {
300
- // 初始化气表品牌
301
- let brandArr = []
302
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
303
- let temp = {}
304
- temp.label = item.label
305
- temp.value = item.value.f_meter_brand
306
- brandArr.push(temp)
307
- })
308
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
309
- //初始化气表价格
310
- this.prices = this.$MagGetSaleParam.getPrices();
311
- },
312
- async updateParams() {
313
- await this.$MagLoadParams.loadParam(this.f_filialeid)
314
- this.initParams()
315
- },
316
- getorg(obj) {
317
- if(plugins.convertToIn(obj)!==null&&plugins.convertToIn(obj)!==''){
318
- this.orgcondition = " and ss.f_orgid in " + plugins.convertToIn(obj)
319
- }else{
320
- this.orgcondition = " and ss.f_orgid = " + this.$login.f.orgid
321
- }
322
- },
323
- userTypeChange () {
324
- this.gasproperties=[]
325
- if(this.$refs.paged.$refs.criteria.model !==null) {
326
- this.$refs.paged.$refs.criteria.model.f_gasproperties=''
327
- this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
328
- }
329
- else{
330
- this.gasproperties =[{label: '全部', value: ''}]
331
- }
332
- },
333
- hidden(){
334
- this.criteriaShow = !this.criteriaShow
335
- },
336
- cancel() {
337
- this.show = false
338
- },
339
- clearmsg () {
340
- Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
341
- this.$refs.paged.$refs.criteria.model[key] = []
342
- })
343
- },
344
- getRes (obj) {
345
- this.orgCondtionStr = condition
346
- this.orgname = obj.orgnames[0]
347
- this.depname = obj.depnames[0]
348
- },
349
- showmsg(obj){
350
- this.rowdata=obj
351
- this.show=true
352
- },
353
-
354
- search (args) {
355
- args.condition = `${args.condition}`+this.orgcondition
356
- console.log(args.condition+"args.condition")
357
- this.condition = args.condition
358
- this.model.search(args.condition, args.model)
359
- console.log(this.$refs.paged.$refs.grid.model.sums+"--this.$refs.paged.$refs.grid.model.sums")
360
- console.log(this.f_gas_state)
361
-
362
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
363
- // args.condition = `${args.condition}`
364
- // if (this.orgcondition)
365
- // args.condition = `${args.condition}` + this.orgcondition
366
- // else
367
- // args.condition = `${args.condition}` + 'and m.f_orgid in ' + '(' + this.$login.f.orgid + ')'
368
- // this.model.search(args.condition, args.model)
369
- }
370
- },
371
- watch: {
372
- 'model.rows'(val) {
373
- //如果有合计 这里为true, 其他为false ,反正相反
374
- this.showbottomsum=true;
375
- if(val.length === 0){
376
- this.sumsmodel = {}
377
- this.showbottomsum=false;
378
- }
379
- },
380
- 'orgCondtionStr'(val) {
381
- let res = val.match(/'(.*?)'/)
382
- console.log('正则提取:',res && res[1])
383
- if (res) {
384
- this.f_filialeid = res[1]
385
- // this.updateParams()
386
- }
387
- }
388
- },
389
- computed: {
390
- getstart(){
391
- return `开始时间:${this.$refs.paged.$refs.cri.model.startDate} 结束时间:${this.$refs.paged.$refs.cri.model.endDate}`
392
- },
393
- getPricenames() {
394
- let f_user_type = this.$refs.paged.$refs.criteria.model.f_user_type;
395
- let f_gasproperties = this.$refs.paged.$refs.criteria.model.f_gasproperties;
396
- let pricetype = this.$refs.paged.$refs.criteria.model.pricetype;
397
- console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
398
- console.log("查看f_orgid:",this.$login.f.f_orgid)
399
- if(this.$refs.paged.$refs.criteria.model !==null) {
400
- let rs = []
401
- let priceArr = []
402
- if ( pricetype.length >0) {
403
- let params = {
404
- f_price_type: pricetype[0],
405
- filter: this.org[0],
406
- prices: this.prices
407
- }
408
- console.log("打印一下params:",params)
409
- this.$MagGetSaleParam.getPrice(params).forEach((item) => {
410
- console.log("====================================》")
411
- let temp = {}
412
- temp.label = item.label
413
- temp.value = item.value.f_price_name
414
- priceArr.push(temp)
415
- console.log("打印一下temp:",temp)
416
- })
417
-
418
- rs = [{label: '全部', value: ''}, ...priceArr]
419
- }
420
- if (rs.length === 0) {
421
- console.log('rs读出来是空')
422
- this.$refs.paged.$refs.criteria.model.f_price_name = ''
423
- }
424
- return rs
425
- }
426
- },
427
- getfield () {
428
- return exportConfig.GasStatistics
429
- },
430
- usertypes() {
431
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
432
- },
433
- pricetypes() {
434
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
435
- },
436
- gasState() {
437
- return [{label:'正常', value:'正常'},
438
- {label:'异常', value:'异常'},
439
- ]
440
- },
441
- isChange() {
442
- return [{label:'是', value:'是'},
443
- {label:'否', value:'否'},
444
- ]
445
- },
446
- getCondition () {
447
- var con = ""
448
- if (this.orgCondtionStr) {
449
- con = `${this.$refs.paged.$refs.criteria.condition} and m.f_orgid in (${this.orgCondtionStr})`
450
- }
451
- else {
452
- con = `${this.$refs.paged.$refs.criteria.condition}and m.f_orgid in ('${this.$login.f.orgid}' )`
453
- }
454
- return {
455
- condition: con
456
- }
457
- }
458
- }
459
- }
460
- </script>
461
-
462
- <style>
463
- .showbottom{
464
- height:95%
465
- }
466
- </style>
467
-
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex" :class="{showbottom:showbottomsum}" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row" >
9
+ <div class="col-sm-2">
10
+ <label class="font_normal_body">组织机构</label>
11
+ <res-select :initresid="$parent.$parent.org"
12
+ style="width:60%"
13
+ @res-select="$parent.$parent.getorg"
14
+ :is-mul=false
15
+ restype='organization'>
16
+ </res-select>
17
+ </div>
18
+ <div class="col-sm-2">
19
+ <label class="font_normal_body">客户编号</label>
20
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='客户编号'
21
+ condition="ss.f_userinfo_code like '%{}%'" v-next-el='f_userinfo_code' v-el:meternumber
22
+ >
23
+ </div>
24
+ <div class="col-sm-2">
25
+ <label class="font_normal_body">客户名称</label>
26
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_username" placeholder='客户名称'
27
+ condition="ss.f_user_name like '%{}%'" v-next-el='userid' v-el:username>
28
+ </div>
29
+ <div class="col-sm-2">
30
+ <label class="font_normal_body">客户地址</label>
31
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_address" placeholder='客户地址'
32
+ condition="ss.f_address like '%{}%'" v-next-el='f_address' v-el:f_address>
33
+ </div>
34
+ <div class="span" style="float:right;margin-top:10px">
35
+ <button class="button_search button_spacing" @click="search()">查询</button>
36
+ <button class="button_clear button_spacing" @click="$parent.$parent.clearmsg">清空</button>
37
+ <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
38
+ :field="$parent.$parent.getfield"
39
+ sqlurl="rs/logic/exportfile" sql-name="gasStatisticsQuery" template-name='用气量统计表'
40
+ :choose-col="true"></export-excel>
41
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
42
+ :defaultfield="$parent.$parent.defaultfield"
43
+ titletable="缴费记录报表" :starthead="$parent.$parent.getstart"
44
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
45
+ <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>
46
+ </div>
47
+ </div>
48
+ <div class="row" v-show="$parent.$parent.criteriaShow">
49
+ <div class="col-sm-2">
50
+ <label class="font_normal_body">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话</label>
51
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_user_phone" placeholder='电话'
52
+ condition="ss.f_user_phone like '%{}%'" v-next-el='f_user_phone' v-el:f_user_phone
53
+ >
54
+ </div>
55
+ <div class="col-sm-2">
56
+ <label class="font_normal_body">小&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</label>
57
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_residential_area" placeholder='小区'
58
+ condition="ss.f_residential_area like '%{}%'" v-next-el='f_residential_area' v-el:f_residential_area>
59
+ </div>
60
+ <div class="col-sm-2">
61
+ <label class="font_normal_body">表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</label>
62
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_meternumber" placeholder='表号'
63
+ condition="ss.f_meternumber like '%{}%'" v-next-el='meternumber' v-el:meternumber
64
+ >
65
+ </div>
66
+ <div class="col-sm-2">
67
+ <label class="font_normal_body">燃气证号</label>
68
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_gascode" placeholder='燃气证号'
69
+ condition="ss.f_gascode like '%{}%'" v-next-el='f_gascode' v-el:f_gascode
70
+ >
71
+ </div>
72
+ <div class="col-sm-2 form-group">
73
+ <label class="font_normal_body">气价类型</label>
74
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
75
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
76
+ close-on-select>
77
+ </v-select>
78
+ </div>
79
+ <div class="col-sm-2 form-group">
80
+ <label class="font_normal_body">气价名称</label>
81
+ <v-select :value.sync="model.f_price_name"
82
+ v-model="model.f_price_name"
83
+ :options="$parent.$parent.getPricenames"
84
+ condition="ss.f_price_name = '{}'"
85
+ close-on-select></v-select>
86
+ </div>
87
+ <div class="col-sm-2 form-group">
88
+ <label class="font_normal_body">气表品牌</label>
89
+ <v-select :value.sync="model.f_meter_brand"
90
+ v-model="model.f_meter_brand"
91
+ :options="$parent.$parent.meterbrands"
92
+ condition="ss.f_meter_brand = '{}'"
93
+ close-on-select></v-select>
94
+ </div>
95
+ <div class="col-sm-2 form-group">
96
+ <label class="font_normal_body">是否换表</label>
97
+ <v-select :value.sync="model.f_changetable_state"
98
+ v-model="model.f_changetable_state"
99
+ :options="$parent.$parent.isChange"
100
+ condition="ss.f_changetable_state = '{}'"
101
+ close-on-select></v-select>
102
+ </div>
103
+ <div class="col-sm-2 form-group">
104
+ <label class="font_normal_body">用气状态</label>
105
+ <v-select :value.sync="model.f_gas_state"
106
+ v-model="model.f_gas_state"
107
+ :options="$parent.$parent.gasState"
108
+ condition="ss.f_gas_state = '{}'"
109
+ close-on-select></v-select>
110
+ </div>
111
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
112
+ <label class="font_normal_body">用气量区间</label>
113
+ <div class="row">
114
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount1"
115
+ condition="ss.f_oughtamount >= {} " placeholder="">
116
+ <label class="font_normal_body"> ≤ x ≤ </label>
117
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_oughtamount2"
118
+ condition="ss.f_oughtamount <= {} " placeholder="">
119
+ </div>
120
+ </div>
121
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
122
+ <label class="font_normal_body">&nbsp;充值区间&nbsp;&nbsp;</label>
123
+ <div class="row">
124
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_collection1"
125
+ condition="ss.f_collection >= {} " placeholder="">
126
+ <label class="font_normal_body"> ≤ x ≤ </label>
127
+ <input type="text" style="width:27%" class="input_search" v-model="model.f_collection2"
128
+ condition="ss.f_collection <= {} " placeholder="">
129
+ </div>
130
+ </div>
131
+ <div class="col-sm-2 form-group" >
132
+ <label class="font_normal_body" for="startDate">开始时间</label>
133
+ <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
134
+ v-model="model.startDate"
135
+ :value.sync="model.startDate"
136
+ :disabled-days-of-Week="[]"
137
+ :format="'yyyy-MM-dd 00:00:00'"
138
+ :show-reset-button="reset">
139
+ </datepicker>
140
+ </div>
141
+ <div class="col-sm-2 form-group" >
142
+ <label class="font_normal_body" for="endDate">结束时间</label>
143
+ <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
144
+ v-model="model.endDate"
145
+ :value.sync="model.endDate"
146
+ :disabled-days-of-Week="[]"
147
+ :format="'yyyy-MM-dd 23:59:59'"
148
+ :show-reset-button="reset">
149
+ </datepicker>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </criteria>
154
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
155
+ <template partial='head'>
156
+ <tr>
157
+ <th><nobr>客户编号</nobr></th>
158
+ <th><nobr>客户名称</nobr></th>
159
+ <th><nobr>小区</nobr></th>
160
+ <th><nobr>地址</nobr></th>
161
+ <th><nobr>电话</nobr></th>
162
+
163
+ <th><nobr>燃气证号</nobr></th>
164
+ <th><nobr>表号</nobr></th>
165
+ <th><nobr>表具类型</nobr></th>
166
+ <th><nobr>表描述</nobr></th>
167
+ <th><nobr>气价名称</nobr></th>
168
+
169
+ <th><nobr>用气性质</nobr></th>
170
+ <th><nobr>期初余额</nobr></th>
171
+ <th><nobr>起方</nobr></th>
172
+ <th><nobr>止方</nobr></th>
173
+ <th><nobr>期间用气量</nobr></th>
174
+
175
+ <th><nobr>期间用气金额</nobr></th>
176
+ <th><nobr>期间充值金额</nobr></th>
177
+ <th><nobr>期末余额</nobr></th>
178
+ <th><nobr>用气状态</nobr></th>
179
+ <th><nobr>是否换表</nobr></th>
180
+ <th><nobr>最后通讯日期</nobr></th>
181
+ </tr>
182
+ </template>
183
+ <template partial='body' partial='list'>
184
+ <tr >
185
+ <td style="text-align: left;"><nobr> <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr></td>
186
+ <td style="text-align: left;"><nobr>{{row.f_user_name}}</nobr></td>
187
+ <td style="text-align: left;"><nobr>{{row.f_residential_area}}</nobr></td>
188
+ <td style="text-align: left;"><nobr>{{row.f_address}}</nobr></td>
189
+ <td style="text-align: center;"><nobr>{{row.f_user_phone}}</nobr></td>
190
+
191
+ <td style="text-align:center"><nobr>{{row.f_gascode}}</nobr></td>
192
+ <th style="text-align:center"><nobr>{{row.f_meternumber}}</nobr></th>
193
+ <th style="text-align:center"><nobr>{{row.f_meter_classify}}</nobr></th>
194
+ <th style="text-align:center"><nobr>{{row.f_meter_title}}</nobr></th>
195
+ <th style="text-align:center"><nobr>{{row.f_price_name}}</nobr></th>
196
+ <th style="text-align:center"><nobr>{{row.f_gasproperties}}</nobr></th>
197
+
198
+
199
+ <th style="text-align:center"><nobr>{{row.f_balance}}</nobr></th>
200
+ <th style="text-align:center"><nobr>{{row.f_last_tablebase}}</nobr></th>
201
+ <th style="text-align:center"><nobr>{{row.f_tablebase}}</nobr></th>
202
+ <th style="text-align:center"><nobr>{{row.f_oughtamount}}</nobr></th>
203
+ <th style="text-align:center"><nobr>{{row.f_oughtfee}}</nobr></th>
204
+
205
+ <th style="text-align:center"><nobr>{{row.f_collection}}</nobr></th>
206
+ <th style="text-align:center"><nobr>{{row.f_curbalance}}</nobr></th>
207
+ <th style="text-align:center"><nobr>{{row.f_gas_state}}</nobr></th>
208
+ <th style="text-align:center"><nobr>{{row.f_changetable_state}}</nobr></th>
209
+ <th style="text-align:center"><nobr>{{row.f_input_date}}</nobr></th>
210
+ </tr>
211
+ </template>
212
+ <template partial='foot'></template>
213
+ </data-grid>
214
+ </criteria-paged>
215
+ <table class="table-hover">
216
+ <tr style="position: relative" class="table-bordered">
217
+ <td
218
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
219
+ 汇总信息
220
+ </td>
221
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
222
+ 期间用气量:&emsp;{{sumsmodel.f_oughtamount}}
223
+ </td>
224
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
225
+ 期间用气金额:&emsp;{{sumsmodel.f_oughtfee}}
226
+ </td>
227
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
228
+ 期间充值金额:&emsp;{{sumsmodel.f_collection}}
229
+ </td>
230
+ </tr>
231
+ </table>
232
+ </div>
233
+ </div>
234
+ </div>
235
+ </template>
236
+
237
+ <script>
238
+ import {HttpResetClass, PagedList} from 'vue-client'
239
+ import exportConfig from '../../sale/config/exportConfig'
240
+ import * as Util from '../../../Util'
241
+ import plugins from '../../../plugins/GetLoginInfoService'
242
+
243
+ let readySomething = async function (self) {
244
+ await self.$MagLoadParams.loadParam()
245
+ self.initParams()
246
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
247
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums;
248
+ }
249
+ export default {
250
+ title: '用气量统计表',
251
+ data () {
252
+ return {
253
+ show:false,
254
+ org:[this.$login.f.orgid],
255
+ orgcondition: ' and ss.f_orgid = ' + this.$login.f.orgid,
256
+ //f_filialeid: this.$login.f.f_orgid,
257
+ detaillist: [],
258
+ meterbrands: [],
259
+ prices: [],
260
+ gasproperties:[],
261
+ condition:'',
262
+ rowdata:{},
263
+ getstart:'',
264
+ config: {
265
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_meternumber', 'f_gasproperties', 'f_balance', 'f_last_tablebase','f_tablebase',
266
+ 'f_oughtamount', 'f_oughtfee', 'f_collection', 'f_curbalance', 'f_gas_state', 'f_changetable_state', 'f_input_date']
267
+ },
268
+ sumsmodel: {},
269
+ orgid:[this.$login.f.orgid],
270
+ criteriaShow:false,
271
+ //默认打印列
272
+ defaultfield: [],
273
+ orgCondtionStr: '',
274
+ model: new PagedList('rs/sql/gasStatisticsQuery', 50,{
275
+ startDate: 'this.model.startDate',
276
+ endDate: 'this.model.endDate'
277
+ },{
278
+ f_oughtamount: 0,
279
+ f_oughtfee: 0,
280
+ f_collection:0
281
+ }),
282
+ showbottomsum:false //页面下方是否有合计: 默认为false, 在watch修改
283
+ }
284
+ },
285
+ ready () {
286
+ // this.$refs.paged.$refs.criteria.search()
287
+ readySomething(this).then(() => {
288
+ this.$emit('ready')
289
+ }).catch((error) => {
290
+ this.$emit('error', error)
291
+ })
292
+ this.$refs.paged.$refs.criteria.model.startDate = Util.addDate(new Date(),-1).substring(0,10) + ' 00:00:00'
293
+ this.$refs.paged.$refs.criteria.model.endDate = Util.addDate(new Date(),-1).substring(0,10) + ' 23:59:59'
294
+ this.$refs.paged.$refs.criteria.model.inputStartDate = Util.addDate(new Date(),-1).substring(0,10) + ' 00:00:00'
295
+ this.$refs.paged.$refs.criteria.model.inputEndDate = Util.addDate(new Date(),-1).substring(0,10) + ' 23:59:59'
296
+ this.$refs.paged.$refs.criteria.search()
297
+ },
298
+ methods: {
299
+ initParams() {
300
+ // 初始化气表品牌
301
+ let brandArr = []
302
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
303
+ let temp = {}
304
+ temp.label = item.label
305
+ temp.value = item.value.f_meter_brand
306
+ brandArr.push(temp)
307
+ })
308
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
309
+ //初始化气表价格
310
+ this.prices = this.$MagGetSaleParam.getPrices();
311
+ },
312
+ async updateParams() {
313
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
314
+ this.initParams()
315
+ },
316
+ getorg(obj) {
317
+ if(plugins.convertToIn(obj)!==null&&plugins.convertToIn(obj)!==''){
318
+ this.orgcondition = " and ss.f_orgid in " + plugins.convertToIn(obj)
319
+ }else{
320
+ this.orgcondition = " and ss.f_orgid = " + this.$login.f.orgid
321
+ }
322
+ },
323
+ userTypeChange () {
324
+ this.gasproperties=[]
325
+ if(this.$refs.paged.$refs.criteria.model !==null) {
326
+ this.$refs.paged.$refs.criteria.model.f_gasproperties=''
327
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
328
+ }
329
+ else{
330
+ this.gasproperties =[{label: '全部', value: ''}]
331
+ }
332
+ },
333
+ hidden(){
334
+ this.criteriaShow = !this.criteriaShow
335
+ },
336
+ cancel() {
337
+ this.show = false
338
+ },
339
+ clearmsg () {
340
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
341
+ this.$refs.paged.$refs.criteria.model[key] = []
342
+ })
343
+ },
344
+ getRes (obj) {
345
+ this.orgCondtionStr = condition
346
+ this.orgname = obj.orgnames[0]
347
+ this.depname = obj.depnames[0]
348
+ },
349
+ showmsg(obj){
350
+ this.rowdata=obj
351
+ this.show=true
352
+ },
353
+
354
+ search (args) {
355
+ args.condition = `${args.condition}`+this.orgcondition
356
+ console.log(args.condition+"args.condition")
357
+ this.condition = args.condition
358
+ this.model.search(args.condition, args.model)
359
+ console.log(this.$refs.paged.$refs.grid.model.sums+"--this.$refs.paged.$refs.grid.model.sums")
360
+ console.log(this.f_gas_state)
361
+
362
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
363
+ // args.condition = `${args.condition}`
364
+ // if (this.orgcondition)
365
+ // args.condition = `${args.condition}` + this.orgcondition
366
+ // else
367
+ // args.condition = `${args.condition}` + 'and m.f_orgid in ' + '(' + this.$login.f.orgid + ')'
368
+ // this.model.search(args.condition, args.model)
369
+ }
370
+ },
371
+ watch: {
372
+ 'model.rows'(val) {
373
+ //如果有合计 这里为true, 其他为false ,反正相反
374
+ this.showbottomsum=true;
375
+ if(val.length === 0){
376
+ this.sumsmodel = {}
377
+ this.showbottomsum=false;
378
+ }
379
+ },
380
+ 'orgCondtionStr'(val) {
381
+ let res = val.match(/'(.*?)'/)
382
+ console.log('正则提取:',res && res[1])
383
+ if (res) {
384
+ this.f_filialeid = res[1]
385
+ // this.updateParams()
386
+ }
387
+ }
388
+ },
389
+ computed: {
390
+ getstart(){
391
+ return `开始时间:${this.$refs.paged.$refs.cri.model.startDate} 结束时间:${this.$refs.paged.$refs.cri.model.endDate}`
392
+ },
393
+ getPricenames() {
394
+ let f_user_type = this.$refs.paged.$refs.criteria.model.f_user_type;
395
+ let f_gasproperties = this.$refs.paged.$refs.criteria.model.f_gasproperties;
396
+ let pricetype = this.$refs.paged.$refs.criteria.model.pricetype;
397
+ console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
398
+ console.log("查看f_orgid:",this.$login.f.f_orgid)
399
+ if(this.$refs.paged.$refs.criteria.model !==null) {
400
+ let rs = []
401
+ let priceArr = []
402
+ if ( pricetype.length >0) {
403
+ let params = {
404
+ f_price_type: pricetype[0],
405
+ filter: this.org[0],
406
+ prices: this.prices
407
+ }
408
+ console.log("打印一下params:",params)
409
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
410
+ console.log("====================================》")
411
+ let temp = {}
412
+ temp.label = item.label
413
+ temp.value = item.value.f_price_name
414
+ priceArr.push(temp)
415
+ console.log("打印一下temp:",temp)
416
+ })
417
+
418
+ rs = [{label: '全部', value: ''}, ...priceArr]
419
+ }
420
+ if (rs.length === 0) {
421
+ console.log('rs读出来是空')
422
+ this.$refs.paged.$refs.criteria.model.f_price_name = ''
423
+ }
424
+ return rs
425
+ }
426
+ },
427
+ getfield () {
428
+ return exportConfig.GasStatistics
429
+ },
430
+ usertypes() {
431
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
432
+ },
433
+ pricetypes() {
434
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
435
+ },
436
+ gasState() {
437
+ return [{label:'正常', value:'正常'},
438
+ {label:'异常', value:'异常'},
439
+ ]
440
+ },
441
+ isChange() {
442
+ return [{label:'是', value:'是'},
443
+ {label:'否', value:'否'},
444
+ ]
445
+ },
446
+ getCondition () {
447
+ return {
448
+ startDate: this.$refs.paged.$refs.criteria.model.startDate,
449
+ endDate: this.$refs.paged.$refs.criteria.model.endDate,
450
+ condition: this.condition
451
+ }
452
+ }
453
+ }
454
+ }
455
+ </script>
456
+
457
+ <style>
458
+ .showbottom{
459
+ height:95%
460
+ }
461
+ </style>
462
+