manage-client 3.2.197 → 3.2.199

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,458 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex" 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">表&nbsp;钢&nbsp;号&nbsp;</label>
20
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_meternumber" placeholder='表钢号'
21
+ condition="m.f_meternumber = '{}'" v-next-el='meternumber' v-el:meternumber
22
+ >
23
+ </div>
24
+ <!-- <div class="col-sm-2">-->
25
+ <!-- <label class="font_normal_body">组织机构</label>-->
26
+ <!-- <res-select :initresid="$parent.$parent.orgid"-->
27
+ <!-- style="width:60%"-->
28
+ <!-- @res-select="$parent.$parent.getRes"-->
29
+ <!-- restype='organization'>-->
30
+ <!-- </res-select>-->
31
+ <!-- </div>-->
32
+ <div class="col-sm-2">
33
+ <label class="font_normal_body">客户编号</label>
34
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='客户编号'
35
+ condition="ui.f_userinfo_code = '{}'" v-next-el='f_userinfo_code' v-el:meternumber
36
+ >
37
+ </div>
38
+ <div class="col-sm-2">
39
+ <label class="font_normal_body">客户名称</label>
40
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_username" placeholder='客户名称'
41
+ condition="ui.f_user_name = '{}'" v-next-el='userid' v-el:username>
42
+ </div>
43
+
44
+ <div class="span" style="float:right;margin-top:10px">
45
+ <button class="button_search button_spacing" @click="search()">查询</button>
46
+ <button class="button_clear button_spacing" @click="$parent.$parent.clearmsg">清空</button>
47
+ <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
48
+ :field="$parent.$parent.getfield"
49
+ sqlurl="rs/logic/exportfile" sql-name="manage_getReportList" template-name='上报查询'
50
+ :choose-col="true"></export-excel>
51
+ <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>
52
+ </div>
53
+ </div>
54
+ <div class="row" v-show="$parent.$parent.criteriaShow">
55
+ <div class="col-sm-2">
56
+ <label class="font_normal_body">客户地址</label>
57
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_address" placeholder='客户地址'
58
+ condition="ua.f_address like '%{}%'" v-next-el='userid' v-el:username>
59
+ </div>
60
+ <div class="col-sm-2 form-group">
61
+ <label class="font_normal_body">客户类型</label>
62
+ <v-select :value.sync="model.f_user_type"
63
+ @change="$parent.$parent.userTypeChange()"
64
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
65
+ condition="uf.f_user_type = '{}'"
66
+ close-on-select></v-select>
67
+ </div>
68
+ <div class="col-sm-2 form-group">
69
+ <label class="font_normal_body">用气性质</label>
70
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
71
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
72
+ condition="uf.f_gasproperties = '{}'"
73
+ closfe-on-select></v-select>
74
+ </div>
75
+ <div class="col-sm-2 form-group">
76
+ <label class="font_normal_body">气价类型</label>
77
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
78
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
79
+ close-on-select>
80
+ </v-select>
81
+ </div>
82
+ <div class="col-sm-2 form-group">
83
+ <label class="font_normal_body">气价名称</label>
84
+ <v-select :value.sync="model.f_price_name"
85
+ v-model="model.f_price_name"
86
+ :options="$parent.$parent.getPricenames"
87
+ condition="ts.f_price_name = '{}'"
88
+ close-on-select></v-select>
89
+ </div>
90
+ <div class="col-sm-2 form-group">
91
+ <label class="font_normal_body">气表品牌</label>
92
+ <v-select :value.sync="model.f_meter_brand"
93
+ v-model="model.f_meter_brand"
94
+ :options="$parent.$parent.meterbrands"
95
+ condition="br.f_meter_brand = '{}'"
96
+ close-on-select></v-select>
97
+ </div>
98
+ <div class="col-sm-2 form-group" >
99
+ <label class="font_normal_body" >开始时间</label>
100
+ <datepicker style="width: 60%" placeholder="大于等于"
101
+ :value.sync="model.f_start_date"
102
+ v-model="model.f_start_date"
103
+ :format="'yyyy-MM-dd HH:mm:ss'"
104
+ condition="m.f_hand_date >= '{}'"
105
+ ></datepicker>
106
+ </div>
107
+ <div class="col-sm-2 form-group" >
108
+ <label class="font_normal_body">结束时间</label>
109
+ <datepicker style="width: 60%" placeholder="小于等于"
110
+ :value.sync="model.f_end_date"
111
+ v-model="model.f_end_date"
112
+ :format="'yyyy-MM-dd HH:mm:ss'"
113
+ condition="m.f_hand_date <= '{}'"
114
+ ></datepicker>
115
+ </div>
116
+ <div class="col-sm-2 form-group">
117
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
118
+ <v-select
119
+ placeholder='小区'
120
+
121
+ :value.sync="model.f_residential_area"
122
+ style="width:60%"
123
+ v-model="model.f_residential_area"
124
+ :options='$parent.$parent.areaList'
125
+ close-on-select
126
+ condition="f_residential_area = '{}'">
127
+ </v-select>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </criteria>
132
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
133
+ <template partial='head'>
134
+ <tr>
135
+ <th><nobr>客户编号</nobr></th>
136
+ <th><nobr>表号</nobr></th>
137
+ <th><nobr>客户姓名</nobr></th>
138
+ <th><nobr>客户电话</nobr></th>
139
+ <th><nobr>客户地址</nobr></th>
140
+
141
+ <th><nobr>上报日期</nobr></th>
142
+ <th><nobr>系统接收时间</nobr></th>
143
+ <th><nobr>表内剩余金额</nobr></th>
144
+ <th><nobr>表内单价</nobr></th>
145
+ <th><nobr>本次抄表底数</nobr></th>
146
+ <th><nobr>阀门状态</nobr></th>
147
+
148
+ <th><nobr>上报类型</nobr></th>
149
+ <th><nobr>表内累计充值金额</nobr></th>
150
+ <th><nobr>噪音强度</nobr></th>
151
+ <th><nobr>信噪比</nobr></th>
152
+ <th><nobr>电压</nobr></th>
153
+
154
+ <th><nobr>表状态</nobr></th>
155
+ <th><nobr>金额状态</nobr></th>
156
+ <!--<th><nobr>每小时上报量</nobr></th>-->
157
+ </tr>
158
+ </template>
159
+ <template partial='body' partial='list'>
160
+ <tr >
161
+ <td style="text-align: left;"><nobr> <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr></td>
162
+ <td style="text-align: left;"><nobr>{{row.f_meternumber}}</nobr></td>
163
+ <td style="text-align: left;"><nobr>{{row.f_user_name}}</nobr></td>
164
+ <td style="text-align: left;"><nobr>{{row.f_user_phone}}</nobr></td>
165
+ <td style="text-align: center;"><nobr>{{row.f_address}}</nobr></td>
166
+
167
+ <td style="text-align:center"><nobr>{{row.f_hand_date}}</nobr></td>
168
+ <th style="text-align:center"><nobr>{{row.f_insert_date}}</nobr></th>
169
+ <th style="text-align:center"><nobr>{{row.f_jval}}</nobr></th>
170
+ <th style="text-align:center"><nobr>{{row.f_price}}</nobr></th>
171
+ <th style="text-align:center"><nobr>{{row.f_tablebase}}</nobr></th>
172
+ <th style="text-align:center"><nobr>{{row.f_valvestate}}</nobr></th>
173
+
174
+
175
+ <th style="text-align:center"><nobr>{{row.f_upload_type}}</nobr></th>
176
+ <th style="text-align:center"><nobr>{{row.f_total_fee}}</nobr></th>
177
+ <th style="text-align:center"><nobr>{{row.f_signal}}</nobr></th>
178
+ <th style="text-align:center"><nobr>{{row.f_snr}}</nobr></th>
179
+ <th style="text-align:center"><nobr>{{row.f_batterylevel}}</nobr></th>
180
+
181
+ <th style="text-align:center"><nobr>{{row.f_table_msg}}</nobr></th>
182
+ <th style="text-align:center"><nobr>{{row.f_moneystate}}</nobr></th>
183
+ <!-- <th style="text-align:center"><nobr>{{row.f_nsturalgas_data}}</nobr></th>-->
184
+ <!-- <th style="text-align:center"><nobr><span @click="$parent.$parent.$parent.showdetail(row.f_nsturalgas_data)"><a>查看</a></span></nobr></th>-->
185
+ <!--<th style="text-align:center">-->
186
+ <!--<button type="button" class="button_search button_spacing width-60" @click="$parent.$parent.$parent.showdetail(row.f_nsturalgas_data)">查看</button>-->
187
+ <!--</th>-->
188
+ </tr>
189
+ </template>
190
+ <template partial='foot'></template>
191
+ </data-grid>
192
+ </criteria-paged>
193
+ <table class="table-hover">
194
+ <!-- <tr style="position: relative" class="table-bordered">-->
195
+ <!-- <td-->
196
+ <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">-->
197
+ <!-- 汇总信息-->
198
+ <!-- </td>-->
199
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
200
+ <!-- 表内剩余金额合计:&emsp;{{sumsmodel.f_meterbalanceamt}}-->
201
+ <!-- </td>-->
202
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
203
+ <!-- 抄表底数合计:&emsp;{{sumsmodel.f_tablebase}}-->
204
+ <!-- </td>-->
205
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
206
+ <!-- 表累计充值金额合计:&emsp;{{sumsmodel.f_meterdebitamt}}-->
207
+ <!-- </td>-->
208
+ <!-- </tr>-->
209
+ </table>
210
+ <modal :show.sync="detail24" >
211
+ <header slot="modal-header" class="modal-header">
212
+ <h4 class="modal-title">24小时上报数据明细</h4>
213
+ </header>
214
+ <article slot="modal-body" class="modal-body">
215
+ <table v-for="detail of detaillist">
216
+ <tr><td>{{detail.frozenDate}}</td><td>&nbsp;&nbsp;--&nbsp;&nbsp;</td><td>{{detail.frozenValue}}</td></tr>
217
+ </table>
218
+ </article>
219
+ <footer slot="modal-footer" class="modal-footer">
220
+ <div class="form-group">
221
+ <button class="btn btn-success" @click="close()">确认</button>
222
+ <button type="button" class="btn btn-default" @click='close'>取消</button>
223
+ </div>
224
+ </footer>
225
+ </modal>
226
+ </div>
227
+ <div class="flex" v-if="show">
228
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
229
+ </div>
230
+ </div>
231
+
232
+ </div>
233
+ </template>
234
+
235
+ <script>
236
+ import {HttpResetClass, PagedList} from 'vue-client'
237
+ import exportConfig from '../../components/sale/config/exportConfig'
238
+ import plugins from '../../plugins/GetLoginInfoService'
239
+ import defaultPrint from "../../components/sale/config/DefaultPrint";
240
+ import * as Util from '../../Util'
241
+
242
+ let readySomething = async function (self) {
243
+ await self.$MagLoadParams.loadParam()
244
+ self.initParams()
245
+ // self.sumsmodel = self.$refs.paged.$refs.grid.model.sums;
246
+ }
247
+ export default {
248
+ title: '上报查询',
249
+ data () {
250
+ return {
251
+ show:false,
252
+ detail24: false,
253
+ org:[this.$login.f.orgid],
254
+ orgcondition: ' and m.f_orgid = ' + this.$login.f.orgid,
255
+ //f_filialeid: this.$login.f.f_orgid,
256
+ detaillist: [],
257
+ meterbrands: [],
258
+ prices: [],
259
+ gasproperties:[],
260
+ condition:'',
261
+ rowdata:{},
262
+ sumsmodel: {},
263
+ orgid:[this.$login.f.orgid],
264
+ criteriaShow:false,
265
+ orgCondtionStr: '',
266
+ model: new PagedList('rs/sql/manage_getReportList', 50,{},{f_meterbalanceamt: 0,f_tablebase: 0,f_meterdebitamt: 0}),
267
+ areaList:[]
268
+ }
269
+ },
270
+ ready () {
271
+ this.initQueryParam()
272
+ // this.$refs.paged.$refs.criteria.search()
273
+ readySomething(this).then(() => {
274
+ this.$emit('ready')
275
+ }).catch((error) => {
276
+ this.$emit('error', error)
277
+ })
278
+ this.$refs.paged.$refs.criteria.model.f_start_date = Util.addDate(new Date(),-1).substring(0,10) + ' 00:00:00'
279
+ this.$refs.paged.$refs.criteria.model.f_end_date = Util.addDate(new Date(),-1).substring(0,10) + ' 23:59:59'
280
+ this.$refs.paged.$refs.criteria.search()
281
+ },
282
+ methods: {
283
+ async initQueryParam () {
284
+ let brr = []
285
+ let http = new HttpResetClass()
286
+ await http.load('POST', 'rs/sql/singleTable_OrderBy', {
287
+ data: {
288
+ items: '*',
289
+ condition: `1 = 1 and f_orgid = '${this.$login.f.orgid}'`,
290
+ orderitem: 'id',
291
+ tablename: 't_area'
292
+ }
293
+ },
294
+ {resolveMsg: null, rejectMsg: '获取小区信息出错!!!'}).then(
295
+ res => {
296
+ res.data.forEach((item) => {
297
+ let temp = {}
298
+ temp.label = item.f_area_address
299
+ temp.value = item.f_residential_area
300
+ brr.push(temp)
301
+ })
302
+ }
303
+ )
304
+ this.areaList = [{label: '全部', value: ''}, ...brr]
305
+ },
306
+ initParams() {
307
+ // 初始化气表品牌
308
+ let brandArr = []
309
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
310
+ let temp = {}
311
+ temp.label = item.label
312
+ temp.value = item.value.f_meter_brand
313
+ brandArr.push(temp)
314
+ })
315
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
316
+ //初始化气表价格
317
+ this.prices = this.$MagGetSaleParam.getPrices();
318
+ },
319
+ async updateParams() {
320
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
321
+ this.initParams()
322
+ },
323
+ getorg(obj) {
324
+ if(plugins.convertToIn(obj)!==null&&plugins.convertToIn(obj)!==''){
325
+ this.orgcondition = " and m.f_orgid in " + plugins.convertToIn(obj)
326
+ }else{
327
+ this.orgcondition = " and m.f_orgid = " + this.$login.f.orgid
328
+ }
329
+
330
+ },
331
+ userTypeChange () {
332
+ this.gasproperties=[]
333
+ if(this.$refs.paged.$refs.criteria.model !==null) {
334
+ this.$refs.paged.$refs.criteria.model.f_gasproperties=''
335
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
336
+ }
337
+ else{
338
+ this.gasproperties =[{label: '全部', value: ''}]
339
+ }
340
+ },
341
+ hidden(){
342
+ this.criteriaShow = !this.criteriaShow
343
+ },
344
+ cancel() {
345
+ this.show = false
346
+ },
347
+ clearmsg () {
348
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
349
+ this.$refs.paged.$refs.criteria.model[key] = []
350
+ })
351
+ },
352
+ getRes (obj) {
353
+ this.orgCondtionStr = condition
354
+ this.orgname = obj.orgnames[0]
355
+ this.depname = obj.depnames[0]
356
+ },
357
+ showmsg(obj){
358
+ this.rowdata=obj
359
+ this.show=true
360
+ },
361
+
362
+ search (args) {
363
+ args.condition = `${args.condition}`+this.orgcondition
364
+ console.log(args.condition+"args.condition")
365
+ this.condition = args.condition
366
+ this.model.search(args.condition, args.model)
367
+ console.log(this.$refs.paged.$refs.grid.model.sums+"--this.$refs.paged.$refs.grid.model.sums")
368
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
369
+ // args.condition = `${args.condition}`
370
+ // if (this.orgcondition)
371
+ // args.condition = `${args.condition}` + this.orgcondition
372
+ // else
373
+ // args.condition = `${args.condition}` + 'and m.f_orgid in ' + '(' + this.$login.f.orgid + ')'
374
+ // this.model.search(args.condition, args.model)
375
+ }
376
+ },
377
+ watch: {
378
+ 'orgCondtionStr'(val) {
379
+ let res = val.match(/'(.*?)'/)
380
+ console.log('正则提取:',res && res[1])
381
+ if (res) {
382
+ this.f_filialeid = res[1]
383
+ // this.updateParams()
384
+ }
385
+ }
386
+ },
387
+ computed: {
388
+ getPricenames() {
389
+ let f_user_type = this.$refs.paged.$refs.criteria.model.f_user_type;
390
+ let f_gasproperties = this.$refs.paged.$refs.criteria.model.f_gasproperties;
391
+ let pricetype = this.$refs.paged.$refs.criteria.model.pricetype;
392
+ console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
393
+ console.log("查看f_orgid:",this.$login.f.f_orgid)
394
+ if(this.$refs.paged.$refs.criteria.model !==null) {
395
+ let rs = []
396
+ let priceArr = []
397
+ if ( pricetype.length >0) {
398
+ let params = {
399
+ f_price_type: pricetype[0],
400
+ filter: this.org[0],
401
+ prices: this.prices
402
+ }
403
+ console.log("打印一下params:",params)
404
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
405
+ console.log("====================================》")
406
+ let temp = {}
407
+ temp.label = item.label
408
+ temp.value = item.value.f_price_name
409
+ priceArr.push(temp)
410
+ console.log("打印一下temp:",temp)
411
+ })
412
+
413
+ rs = [{label: '全部', value: ''}, ...priceArr]
414
+ }
415
+ if (rs.length === 0) {
416
+ console.log('rs读出来是空')
417
+ this.$refs.paged.$refs.criteria.model.f_price_name = ''
418
+ }
419
+ return rs
420
+ }
421
+ },
422
+ getfield () {
423
+ return exportConfig.ReportListConfig
424
+ },
425
+ usertypes() {
426
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
427
+ },
428
+ pricetypes() {
429
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
430
+ },
431
+ getCondition () {
432
+ var con = ""
433
+ if (this.orgCondtionStr) {
434
+ con = `${this.$refs.paged.$refs.criteria.condition} `+this.orgcondition
435
+ }
436
+ else {
437
+ con = `${this.$refs.paged.$refs.criteria.condition} `+this.orgcondition
438
+ }
439
+ return {
440
+ condition: con
441
+ }
442
+ }
443
+ }
444
+ }
445
+ </script>
446
+
447
+ <style>
448
+ .mystyle{
449
+ margin-left:80px;
450
+ }
451
+ .datapanel {
452
+ color: #333;
453
+ background-color: white;
454
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
455
+ padding: 10px 10px 10px 10px;
456
+ border-radius:15px;
457
+ }
458
+ </style>