manage-client 4.0.63 → 4.0.64

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "4.0.63",
3
+ "version": "4.0.64",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -0,0 +1,160 @@
1
+ <template>
2
+ <div class="basic-main" style="height: 100%">
3
+ <criteria-paged :model="model" :pager='false' v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
6
+ <div class="row">
7
+ <div class="col-sm-2 form-group">
8
+ <label class="font_normal_body">用气性质</label>
9
+ <v-select :value.sync="model.f_gasproperties"
10
+ :multiple="true"
11
+ v-model="model.f_gasproperties"
12
+ :options='$parent.$parent.gasPropertyTypes'
13
+ placeholder='请选择'
14
+ condition=" s.f_gasproperties in {}">
15
+ </v-select>
16
+ </div>
17
+ <res-select-group :show-component="['company']" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
18
+ <div class="span" style = "float:right;">
19
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
20
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
21
+ <report-excel id='gasprice'></report-excel>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </criteria>
26
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
27
+ <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
28
+ <thead>
29
+ <tr>
30
+ <th :colspan='$parent.spans' style="font-weight: normal; text-align: left;">
31
+ <h3 style="text-align: center">用户详情统计表</h3>
32
+ </th>
33
+ </tr>
34
+ <tr>
35
+ <th :colspan='$parent.spans' style="font-weight: normal; text-align: center;">
36
+ <!-- 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;-->
37
+ <!-- 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;<br/>-->
38
+ <!-- 打印时间:{{{$parent.printTime}}}-->
39
+ </th>
40
+ </tr>
41
+ <tr>
42
+ <th :colspan='$parent.spans' style="font-weight: normal; text-align: center;">
43
+ <div>
44
+ <span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
45
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
46
+ <span v-show="$parent.operatorname.trim()!=''">人员:{{$parent.operatorname}}</span>
47
+ </div>
48
+ </th>
49
+ </tr>
50
+ </thead>
51
+ <tr>
52
+ <td :colspan='$parent.spans' class="noborder">
53
+ {{{ model.data.substring(26,model.data.length-8) }}}
54
+ </td>
55
+ </tr>
56
+ <tfoot>
57
+ <tr style="text-align: left">
58
+ <th :colspan='Math.floor($parent.spans/3)'>财务审核:</th>
59
+ <th :colspan='Math.floor($parent.spans/3)'>收款审核:</th>
60
+ <th :colspan='Math.floor($parent.spans/3)'>收款员:</th>
61
+ </tr>
62
+ </tfoot>
63
+ </table>
64
+ {{{ $parent.reportStr}}}
65
+ </div>
66
+ </criteria-paged>
67
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
68
+ <header slot="modal-header" class="modal-header">
69
+ <h4 class="modal-title">输入文件名称</h4>
70
+ </header>
71
+ <article slot="modal-body" class="modal-body">
72
+ <div class="form-group">
73
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
74
+ </div>
75
+ </article>
76
+ <footer slot="modal-footer" class="modal-footer">
77
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
78
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
79
+ </footer>
80
+ </modal>
81
+ </div>
82
+ </template>
83
+
84
+ <script>
85
+ import { DataModel } from 'vue-client'
86
+
87
+ export default {
88
+ title: '用户详情统计表',
89
+ props: ['data'],
90
+ data () {
91
+ return {
92
+ printTime: this.$login.toStandardTimeString(),
93
+ depresid: [],
94
+ userresid: [],
95
+ f_orgid: this.$login.f.orgid,
96
+ f_depid: this.$login.f.depids,
97
+ f_operatorid: this.$login.f.id,
98
+ operatorid: [],
99
+ depid: [],
100
+ orgname: '',
101
+ depname: '',
102
+ initres: {
103
+ org: [this.$login.f.orgid],
104
+ dep: [],
105
+ user: []
106
+ },
107
+ orgCondtionStr: '1=1',
108
+ operatorname: '',
109
+ model: new DataModel('api/af-revenue/report/tc_userSummaryReport', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
110
+ f_orgid: 'this.model.f_orgid'}),
111
+ reportStr: null,
112
+ spans: 0
113
+ }
114
+ },
115
+ ready () {
116
+ // this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
117
+ // this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
118
+ // this.$refs.paged.$refs.criteria.search()
119
+ console.log(this.$login.f)
120
+ },
121
+ methods: {
122
+ getRes (condition, obj) {
123
+ this.orgCondtionStr = condition.replace('f_orgid', 'ui.f_orgid')
124
+ this.orgCondtionStr = this.orgCondtionStr.replace('f_depid', 'ui.f_depid')
125
+ this.orgCondtionStr = this.orgCondtionStr.replace('f_operatorid', 'ui.f_operatorid')
126
+ this.orgname = obj.orgnames[0]
127
+ this.depname = obj.depnames[0]
128
+ },
129
+ searchData () {
130
+ this.$refs.paged.$refs.criteria.search()
131
+ },
132
+ selfSearch (args) {
133
+ this.$refs.paged.$refs.criteria.model.f_orgid = args.condition + this.orgCondtionStr
134
+ this.$refs.paged.search(args)
135
+ }
136
+ },
137
+ watch: {
138
+ 'model.data' (val) {
139
+ let len=0
140
+ let a=val.split('</tr>')
141
+ for(let i=0;i<a.length;i++){
142
+ if(a[i].split('</td>').length-1>len){
143
+ len=a[i].split('</td>').length-1
144
+ }
145
+ }
146
+ this.spans = len
147
+ }
148
+ },
149
+ computed: {
150
+ gasPropertyTypes () {
151
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
152
+ }
153
+ }
154
+ }
155
+ </script>
156
+ <style scoped>
157
+ .noborder{
158
+ border: none;
159
+ }
160
+ </style>
@@ -650,8 +650,14 @@
650
650
  methods: {
651
651
  //转换json数值
652
652
  trouble(val) {
653
+ if(val === '无问题'){
654
+ return '无问题'
655
+ }
653
656
  const defect_content = JSON.parse(val)
654
657
  let result = ''
658
+ if(defect_content.result === '正常'){
659
+ return '无问题'
660
+ }
655
661
  if (defect_content.data) {
656
662
  const jsonData = defect_content.data
657
663
  for (const itemdata of jsonData) {
@@ -0,0 +1,284 @@
1
+ <template lang="html">
2
+ <div class="basic-main" style="height: 100%;">
3
+ <div style="height: 10%;width: 100%;" v-show="echarts">
4
+ <div style="display: inline-block;">
5
+ <button @click="$parent.showEcharts()" class="button_clear button_spacing">隐藏图表</button>
6
+ </div>
7
+ </div>
8
+ <div style="height: 80%;width: 98%;">
9
+ <div id="userhandplan"></div>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import * as Util from '../../Util'
16
+ import co from 'co'
17
+ import echarts from 'echarts'
18
+ import { HttpResetClass } from 'vue-client'
19
+
20
+ let getData = function * (self) {
21
+ let load = new HttpResetClass()
22
+ load.load('POST', 'api/af-revenue/sql/webmeter_getNewHandChanceList',
23
+ {data:{ condition: self.condition, startDate: self.startdate, endDate: self.enddate}},
24
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
25
+ // every_time,f_bv1,f_bv2,f_bv3,f_gas
26
+ let every_time = res.data.map(x => x.f_insert_date)
27
+ let f_bv1 = res.data.map(x => x.f_bv1)
28
+ // let f_gas = res.data.map(x => x.f_gas)
29
+ let f_gas1 = res.data.map(x => x.f_gas1)
30
+ let c = res.data.map(x => x.c)
31
+ let c1 = res.data.map(x => x.c1)
32
+ // for (var i = 0; i < res.data.length; i++) {
33
+ // every_time[i] = res.data[i].f_insert_date
34
+ // f_bv1[i] = res.data[i].f_bv1
35
+ // f_gas[i] = res.data[i].f_gas
36
+ // f_gas1[i] = res.data[i].f_gas1
37
+ // }
38
+ console.log(self.echarts)
39
+ self.set(every_time, f_bv1, f_gas1, c, c1)
40
+ })
41
+ }
42
+ export default {
43
+ props: {
44
+ echarts: {
45
+ type: Boolean,
46
+ default:false
47
+ },
48
+ startdate: {
49
+ type: String,
50
+ default: Util.toStandardDateString()
51
+ },
52
+ enddate: {
53
+ type: String,
54
+ default: Util.toStandardDateString()
55
+ },
56
+ condition: {
57
+ type: String,
58
+ default: '1=1'
59
+ }
60
+ },
61
+ data () {
62
+ return {
63
+ xc: ''
64
+ }
65
+ },
66
+ ready(){
67
+ this.searchdata()
68
+ console.log(this.echarts)
69
+ },
70
+ methods: {
71
+ // every_time: 日期 f_bv1: 抄表成功率 f_gas: 日用气量
72
+ set (every_time, f_bv1, f_gas1, c, c1) {
73
+
74
+ const statInfo = document.getElementById('userhandplan') // 获取图表元素
75
+ statInfo.style.width = window.innerWidth - 200 + "px"; //初始化echarts图表宽度
76
+ statInfo.style.height = window.innerHeight - 200 + "px"; //初始化echarts图表宽度
77
+ this.xc = this.$echarts.init(statInfo)
78
+ // 设置宽度自适应
79
+ window.addEventListener('resize', () => {
80
+ statInfo.style.width = window.innerWidth - 200 + "px";
81
+ statInfo.style.height = window.innerHeight - 200 + "px";
82
+ this.xc.resize();
83
+ })
84
+ this.xc.setOption({
85
+ 'title': {
86
+ 'text': '抄表率分析',
87
+ 'left': 'center',
88
+ 'y': '10',
89
+ 'textStyle': {
90
+ 'color': '#696969',
91
+ fontSize: 20
92
+ }
93
+ },
94
+
95
+ 'tooltip': {
96
+ 'trigger': 'axis',
97
+ 'extraCssText': 'height: auto;'
98
+ },
99
+ 'legend': {
100
+ 'data': [
101
+ {
102
+ 'name': '日均用气量(m³)',
103
+ 'icon': 'circle',
104
+ 'textStyle': {
105
+ 'color': '#7b5541',
106
+ fontSize: 12
107
+ }
108
+ },
109
+ {
110
+ 'name': '抄表成功户数',
111
+ 'icon': 'circle',
112
+ 'textStyle': {
113
+ 'color': '#45c1b6',
114
+ fontSize: 12
115
+ }
116
+ },
117
+ {
118
+ 'name': '再用户数',
119
+ 'icon': 'circle',
120
+ 'textStyle': {
121
+ 'color': '#8a9e64',
122
+ fontSize: 12
123
+ }
124
+ },
125
+ {
126
+ 'name': '抄表成功率%',
127
+ 'icon': 'circle',
128
+ 'textStyle': {
129
+ 'color': '#ffaa00',
130
+ fontSize: 12
131
+ }
132
+ }
133
+ ],
134
+ 'top': '10%',
135
+ 'textStyle': {
136
+ 'color': '#fff'
137
+ }
138
+ },
139
+ 'xAxis': [
140
+ {
141
+ 'type': 'category',
142
+ 'data': every_time,
143
+ 'axisPointer': {
144
+ 'type': 'shadow'
145
+ },
146
+ 'axisLabel': {
147
+ 'show': true,
148
+ 'textStyle': {
149
+ 'color': '#7d838b',
150
+ fontSize: 10
151
+ }
152
+ }
153
+ }
154
+ ],
155
+ 'yAxis': [
156
+ {
157
+ 'type': 'value',
158
+ 'name': '用气量(m³)',
159
+ nameTextStyle: {
160
+ fontSize: 10
161
+ },
162
+ 'show': true,
163
+ 'axisLabel': {
164
+ 'show': true,
165
+ 'textStyle': {
166
+ 'color': '#7d8000',
167
+ fontSize: 10
168
+ }
169
+ }
170
+ },
171
+ {
172
+ 'type': 'value',
173
+ 'name': '完成率(%)',
174
+ nameTextStyle: {
175
+ fontSize: 10
176
+ },
177
+ 'show': true,
178
+ 'axisLabel': {
179
+ 'show': true,
180
+ 'textStyle': {
181
+ 'color': '#7d838b',
182
+ fontSize: 10
183
+ }
184
+ }
185
+ }
186
+ ],
187
+ 'grid': {
188
+ 'top': '15%'
189
+ },
190
+ 'series': [
191
+ {
192
+ 'name': '日均用气量(m³)',
193
+ 'type': 'line',
194
+ 'yAxisIndex': 1,
195
+ 'data': f_gas1,
196
+ 'itemStyle': {
197
+ 'normal': {
198
+ 'color': '#7b5541',
199
+ fontSize: 10
200
+ }
201
+ },
202
+ 'smooth': true
203
+ },
204
+ {
205
+ 'name': '抄表成功户数',
206
+ nameTextStyle: {
207
+ fontSize: 10
208
+ },
209
+ 'type': 'bar',
210
+ 'data': c1,
211
+ 'barWidth': 'auto',
212
+ markPoint: {
213
+ data: [
214
+ {type: 'max', name: '最大值'},
215
+ {type: 'min', name: '最小值'}
216
+ ]
217
+ },
218
+ markLine: {
219
+ data: [
220
+ {type: 'average', name: '平均值'}
221
+ ]
222
+ },
223
+ 'itemStyle': {
224
+ 'normal': {
225
+ 'color': '#45c1b6'
226
+ }
227
+ },
228
+ 'barGap': '0'
229
+ },
230
+ {
231
+ 'name': '再用户数',
232
+ nameTextStyle: {
233
+ fontSize: 10
234
+ },
235
+ 'type': 'bar',
236
+ 'data': c,
237
+ 'barWidth': 'auto',
238
+ markPoint: {
239
+ data: [
240
+ {type: 'max', name: '最大值'},
241
+ {type: 'min', name: '最小值'}
242
+ ]
243
+ },
244
+ markLine: {
245
+ data: [
246
+ {type: 'average', name: '平均值'}
247
+ ]
248
+ },
249
+ 'itemStyle': {
250
+ 'normal': {
251
+ 'color': '#8a9e64'
252
+ }
253
+ },
254
+ 'barGap': '0'
255
+ },
256
+ {
257
+ 'name': '抄表成功率%',
258
+ 'type': 'line',
259
+ 'yAxisIndex': 1,
260
+ 'data': f_bv1,
261
+ 'itemStyle': {
262
+ 'normal': {
263
+ 'color': '#ffaa00',
264
+ fontSize: 10
265
+ }
266
+ },
267
+ 'smooth': true
268
+ }
269
+ ]
270
+ })
271
+ },
272
+ searchdata () {
273
+ let getGen = getData(this)
274
+ co(getGen)
275
+ }
276
+ },
277
+ watch: {
278
+ 'echarts' () {
279
+ console.log(this.echarts)
280
+ this.searchdata()
281
+ }
282
+ }
283
+ }
284
+ </script>
@@ -0,0 +1,529 @@
1
+ <template>
2
+ <div class="flex-row" v-show="!echarts">
3
+ <div id='app' class="basic-main">
4
+ <criteria-paged :model="model" :pager='true' v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+
9
+ <div class="col-sm-2 form-group">
10
+ <label class="font_normal_body">客户编号</label>
11
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
12
+ v-model="model.f_userinfo_code" placeholder='客户编号'
13
+ condition="u.f_userinfo_code like '%{}%'" v-next-el='f_userinfo_code' v-el:meternumber
14
+ >
15
+ </div>
16
+ <div class="col-sm-2 form-group">
17
+ <label class="font_normal_body">客户名称</label>
18
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
19
+ v-model="model.f_username" placeholder='客户名称'
20
+ condition="u.f_user_name like '%{}%'" v-next-el='userid' v-el:username>
21
+ </div>
22
+ <div class="col-sm-2 form-group">
23
+ <label class="font_normal_body">客户地址</label>
24
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
25
+ v-model="model.f_address" placeholder='地址'
26
+ condition="a.f_address like '%{}%'" v-el:xq v-next-el='address' v-el:area
27
+ >
28
+ </div>
29
+ <div class="col-sm-2 form-group">
30
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
31
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
32
+ v-model="model.f_meternumber" placeholder='表钢号'
33
+ condition="uf.f_meternumber like '%{}%'" v-next-el='meternumber' v-el:meternumber
34
+ >
35
+ </div>
36
+ <div class="span" style="float:right;margin-top:10px">
37
+ <button class="button_search button_spacing" @click="search()">查询</button>
38
+ <button class="button_clear button_spacing" @click="$parent.$parent.clearmsg">清空</button>
39
+ <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
40
+ :field="$parent.$parent.getfield"
41
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="webmeter_getNewHandChanceList" template-name='抄表分析'
42
+ :choose-col="true"></export-excel>
43
+ <button class="button_export button_spacing" @click="$parent.$parent.showEcharts()">显示图表</button>
44
+ <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>
45
+ </div>
46
+ </div>
47
+ <div class="row" v-show="$parent.$parent.criteriaShow">
48
+ <div class="col-sm-2 form-group">
49
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
50
+ <right-tree @re-res="$parent.$parent.getRes"
51
+ :initresid='$parent.$parent.orgid'></right-tree>
52
+ <!-- <label class="font_normal_body">组织机构</label>-->
53
+ <!-- <res-select :initresid="$parent.$parent.orgid"-->
54
+ <!-- style="width:60%"-->
55
+ <!-- @res-select="$parent.$parent.getRes"-->
56
+ <!-- restype='organization'>-->
57
+ <!-- </res-select>-->
58
+ </div>
59
+ <res-select-group :show-component="$parent.$parent.resshow" :selectin="true" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
60
+
61
+ <!-- <res-select-group :initres="$parent.$parent.initres" :show-component="['company']" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>-->
62
+ <div class="col-sm-2 form-group">
63
+ <label class="font_normal_body">用户类型</label>
64
+ <v-select style="width:60%" id="f_user_type"
65
+ v-model="model.f_user_type"
66
+ placeholder='用户类型'
67
+ :value.sync="model.f_user_type"
68
+ @change="$parent.$parent.userTypeChange()"
69
+ :options='$parent.$parent.usertypes'
70
+ condition="uf.f_user_type = '{}'"
71
+ close-on-select>
72
+ </v-select>
73
+ </div>
74
+ <div class="col-sm-2 form-group">
75
+ <label class="font_normal_body">用气性质</label>
76
+ <v-select style="width:60%" id="f_gasproperties"
77
+ v-model="model.f_gasproperties"
78
+ placeholder='用气性质'
79
+ :value.sync="model.f_gasproperties"
80
+ :options='$parent.$parent.gasproperties'
81
+ condition="uf.f_gasproperties = '{}'"
82
+ close-on-select>
83
+ </v-select>
84
+ </div>
85
+ <div class="col-sm-2 form-group">
86
+ <label class="font_normal_body">气表品牌</label>
87
+ <v-select
88
+ :options='$parent.$parent.meterbrand'
89
+
90
+ :value.sync="model.f_meter_brand"
91
+ close-on-select
92
+ condition="f_meter_brand='{}'"
93
+ placeholder='气表品牌'
94
+ style="width:60%"
95
+ v-model="model.f_meter_brand">
96
+ </v-select>
97
+ </div>
98
+ <!-- <div class="col-sm-2 form-group">-->
99
+ <!-- <label class="font_normal_body">气表品牌</label>-->
100
+ <!-- <v-select-->
101
+ <!-- placeholder='气表品牌'-->
102
+ <!-- :value.sync="model.f_meter_brand"-->
103
+ <!-- v-model="model.f_meter_brand"-->
104
+ <!-- :options='$parent.$parent.WarningType'-->
105
+ <!-- @change="$parent.$parent.getMeterType"-->
106
+ <!-- close-on-select-->
107
+ <!-- condition="gb.f_meter_brand='{}'">-->
108
+ <!-- </v-select>-->
109
+ <!-- </div>-->
110
+ <div class="col-sm-2 form-group" >
111
+ <label class="font_normal_body">气表型号</label>
112
+ <v-select
113
+ placeholder='气表型号'
114
+ :value.sync="model.f_meter_style"
115
+ v-model="model.f_meter_style"
116
+ :options='$parent.$parent.meterstyle[model.f_meter_brand]'
117
+ close-on-select
118
+ condition="gm.f_meter_style='{}'">
119
+ </v-select>
120
+ <!-- <v-select v-if="!$parent.$parent.styles"-->
121
+ <!-- placeholder='气表型号'-->
122
+ <!-- :value.sync="model.f_meter_style"-->
123
+ <!-- v-model="model.f_meter_style"-->
124
+ <!-- :options='$parent.$parent.Warningstyles'-->
125
+ <!-- close-on-select-->
126
+ <!-- condition="f_meter_style='{}'">-->
127
+ <!-- </v-select>-->
128
+ </div>
129
+ <div class="col-sm-2 form-group">
130
+ <label class="font_normal_body" style="word-break:keep-all;">上报时间</label>
131
+ <datepicker style="width:60%" placeholder="起始时间"
132
+ :value.sync="model.startDate"
133
+ v-model="model.startDate"
134
+ :format="'yyyy-MM-dd HH:mm:ss'"
135
+ ></datepicker>
136
+ </div>
137
+ <div class="col-sm-2 form-group">
138
+ <label class="font_normal_body" style="word-break:keep-all;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
139
+ <datepicker style="width:60%" placeholder="结束时间"
140
+ :value.sync="model.endDate"
141
+ v-model="model.endDate"
142
+ :format="'yyyy-MM-dd HH:mm:ss'"
143
+ ></datepicker>
144
+ </div>
145
+ <div class="col-sm-2 form-group">
146
+ <label class="font_normal_body">气价类型</label>
147
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
148
+ @change="$parent.$parent.pricetypechanged"
149
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
150
+ close-on-select v-ref:type>
151
+ </v-select>
152
+ </div>
153
+ <div class="col-sm-2 form-group">
154
+ <label class="font_normal_body">气价名称</label>
155
+ <v-select :value.sync="model.f_price_id"
156
+ v-model="model.f_price_id"
157
+ :multiple="true"
158
+ :options="$parent.$parent.getPricenames"
159
+ condition="uf.f_price_id in {}"
160
+ ></v-select>
161
+ </div>
162
+ <!-- <div class="col-sm-2 form-group">-->
163
+ <!-- <label class="font_normal_body">壁&ensp;挂&ensp;炉</label>-->
164
+ <!-- <v-select id="f_meter_brand"-->
165
+ <!-- v-model="model.f_usetype"-->
166
+ <!-- placeholder='壁挂炉'-->
167
+ <!-- :value.sync="model.f_usetype"-->
168
+ <!-- :options='$parent.$parent.usetypes'-->
169
+ <!-- condition="" :search="false"-->
170
+ <!-- close-on-select style="width: 60%">-->
171
+ <!-- </v-select>-->
172
+ <!-- </div>-->
173
+ <!-- <div class="col-sm-2 form-group">-->
174
+ <!-- <label class="font_normal_body">房屋类型</label>-->
175
+ <!-- <v-select :value.sync="model.f_house_type" v-model="model.f_house_type"-->
176
+ <!-- :options='$parent.$parent.houseTypes' placeholder='请选择'-->
177
+ <!-- close-on-select-->
178
+ <!-- condition=""></v-select>-->
179
+ <!-- </div>-->
180
+ <!-- <div class="col-sm-2 form-group">-->
181
+ <!-- <label class="font_normal_body">安装位置</label>-->
182
+ <!-- <v-select :value.sync="model.f_position" v-model="model.f_position"-->
183
+ <!-- :options='$parent.$parent.positions' placeholder='请选择'-->
184
+ <!-- condition=""-->
185
+ <!-- close-on-select></v-select>-->
186
+ <!-- </div>-->
187
+ </div>
188
+ </div>
189
+ </criteria>
190
+ <data-grid id="reportgas" :model="model" partial='list' class="list_area table_sy" v-ref:grid>
191
+ <template partial='head'>
192
+ <tr>
193
+ <th style="text-align:center">序号</th>
194
+ <th style="text-align:center"><nobr>上报日期</nobr></th>
195
+ <th style="text-align:center" title="安装户数=正常户数+停用户数+未注册户数"><nobr>安装户数</nobr></th>
196
+
197
+ <th style="text-align:center" title="停用户数:表具状态为停用的用户数"><nobr>停用户数</nobr></th>
198
+ <th style="text-align:center" title="在用户数:表具状态为正常的用户数"><nobr>在用户数</nobr></th>
199
+
200
+ <th style="text-align:center" title="用户使用率=在用户数/正常户数"><nobr>用户使用率</nobr></th>
201
+ <th style="text-align:center"><nobr>抄表成功户数</nobr></th>
202
+ <th style="text-align:center"><nobr>总用气量</nobr></th>
203
+ <th style="text-align:center"><nobr>总用气金额</nobr></th>
204
+ <th style="text-align:center" title="日均用气量=总用气量/在用户数"><nobr>日均用气量</nobr></th>
205
+ <!--<th style="text-align:center"><nobr>指令成功户数</nobr></th>-->
206
+ <th style="text-align:center" title="抄表成功率=抄表成功户数/在用户数"><nobr>抄表成功率</nobr></th>
207
+ <!--<th style="text-align:center" title="指令成功率=指令成功户数/抄表成功户数"><nobr>指令成功率</nobr></th>-->
208
+ <!--<th style="text-align:center" title="综合成功率=指令成功户数/在用户数"><nobr>综合成功率</nobr></th>-->
209
+ </tr>
210
+ </template>
211
+ <template partial='body' partial='list' v-ref:grid>
212
+ <tr>
213
+ <td style="text-align:center">{{$index + 1}}</td>
214
+ <td style="text-align:center;width: 170px;"><nobr>{{row.f_insert_date}}</nobr></td>
215
+ <td style="text-align:center">{{row.anzhuang}}</td>
216
+
217
+ <th style="text-align:center">{{row.c0}}</th>
218
+ <td style="text-align:center"><nobr>{{row.c}}</nobr></td>
219
+
220
+ <td style="text-align:center"><nobr>{{row.user_bv}}%</nobr></td>
221
+ <!--<td style="text-align:center"><nobr>{{row.f_gas}}</nobr></td>-->
222
+ <td style="text-align:center">{{row.c1}}</td>
223
+ <td style="text-align:center">{{row.f_gas_all}}</td>
224
+ <td style="text-align:center">{{row.f_fee_all}}</td>
225
+ <td style="text-align:center">{{row.f_gas1}}</td>
226
+ <td style="text-align:center">{{row.f_bv1}}%</td>
227
+ <!--<td style="text-align:center">{{row.f_bv2}}%</td>-->
228
+ <!--<td style="text-align:center;width: 170px;"><nobr>{{row.f_bv3}}%</nobr></td>-->
229
+ </tr>
230
+ </template>
231
+ <template partial='foot'></template>
232
+ </data-grid>
233
+ </criteria-paged>
234
+ <table class="table-hover">
235
+ <tr style="position: relative" class="table-bordered">
236
+ <td
237
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
238
+ 汇总信息
239
+ </td>
240
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
241
+ 总用气量:&emsp;{{model.sums.f_gas_all}}
242
+ </td>
243
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
244
+ 总用气金额:&emsp;{{model.sums.f_fee_all}}
245
+ </td>
246
+ </tr>
247
+ </table>
248
+ </div>
249
+ <!-- <div style="height: 40px;width: 100%;" v-show="echarts">-->
250
+ <!-- <button class="button_search button_spacing" @click="showEcharts()">隐藏图表</button>-->
251
+ <!-- </div>-->
252
+
253
+ </div>
254
+ <!--图显示模板-->
255
+ <div class="flex-row" v-if="echarts" style="width: 100%;height: 98%;">
256
+ <user-gas-echarts-list :condition="condition" :startdate="startDate"
257
+ :enddate="endDate" :echarts="echarts"></user-gas-echarts-list>
258
+ </div>
259
+ </template>
260
+ <script>
261
+ import {HttpResetClass, PagedList} from 'vue-client'
262
+ import UserGasEcharts from './UserGasEchartsList'
263
+ import * as Util from '../../Util'
264
+ import plugins from '../../plugins/GetLoginInfoService'
265
+ import plugin from 'system-clients/src/plugins/GetLoginInfoService'
266
+ let readySomething = async function (self) {
267
+ self.$refs.paged.$refs.cri.model.startDate = Util.addDate(new Date(),-6).substring(0,10) + ' 00:00:00'
268
+ self.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
269
+ await self.$MagLoadParams.loadParam()
270
+ self.initQueryParam()
271
+ self.$refs.paged.$refs.cri.search()
272
+ }
273
+ export default {
274
+ title: '抄表分析',
275
+ props: ['data'],
276
+ components: {UserGasEcharts},
277
+ data () {
278
+ return {
279
+ resshow:['slicearea'],
280
+ prices: [],
281
+ model: new PagedList('api/af-revenue/sql/webmeter_getNewHandChanceList', 50, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'},{
282
+ f_gas_all: 0,
283
+ f_fee_all: 0
284
+ }),
285
+ condition: '1=1',
286
+ startDate: '',
287
+ gasproperties:[{label: '全部', value: ''}],
288
+ endDate: '',
289
+ meterbrand: [],
290
+ meterstyle: {},
291
+ WarningType: [
292
+ {label: '全部', value: ''}
293
+ ],
294
+ Warningstyles: [
295
+ {label: '全部', value: ''}
296
+ ],
297
+ styles:false,
298
+ orgid:[this.$login.f.orgid],
299
+ getfield:{"f_insert_date":"上报日期","anzhuang":"安装户数",
300
+ "c0":"停用户数",
301
+ "c":"在用户数","user_bv":"用户使用率",
302
+ "c1":"抄表成功户数",
303
+ "f_gas_all":"总用气量","f_gas":"日均户均用气量(成功)",
304
+ "f_gas1":"日均户均用气量(在用)",
305
+ "f_bv1":"抄表成功率"
306
+ },
307
+ criteriaShow:false,
308
+ echarts: false,
309
+ orgCondtionStr: '(\'' + this.$login.f.orgid + '\')',
310
+ searchshow: false,
311
+ initres: {
312
+ org:[this.$login.f.orgid],
313
+ dep:[],
314
+ user:[]
315
+ },
316
+ zonesdata:'',
317
+ obj: {
318
+ userid: this.$login.f.id,
319
+ source: `tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
320
+ res: this.$login.f.f_fengongsi,
321
+ resids: this.$login.f.orgid
322
+ },
323
+ f_filialeid: this.$login.f.orgid,
324
+ usetypes: [{label: '全部', value: ''},{label: '是', value: `= '壁挂炉'`},{label: '否', value: `!= '壁挂炉'`}]
325
+ }
326
+ },
327
+ ready () {
328
+ readySomething(this).then(() => {
329
+ this.$emit('ready')
330
+ }).catch((error) => {
331
+ this.$emit('error', error)
332
+ })
333
+ },
334
+ methods: {
335
+ initQueryParam () {
336
+ let meters = this.$MagGetSaleParam.getGasbrand().filter(item => item.value.f_meter_type==='物联网表')
337
+ let arr = meters.map(res => {
338
+ let sty = res.value.gasmodel.map(row => {
339
+ return {
340
+ label: row.label,
341
+ value: row.value.f_meter_style
342
+ }
343
+ })
344
+ this.meterstyle[res.value.f_meter_brand] = [{label: '全部', value: ''}, ...sty]
345
+ return {
346
+ label: res.label,
347
+ value: res.value.f_meter_brand
348
+ }
349
+ })
350
+ this.meterbrand = [{label: '全部', value: ''}, ...arr]
351
+ //初始化气表价格
352
+ this.prices = this.$MagGetSaleParam.getPrices()
353
+ },
354
+ showMeterStyle() {
355
+ this.styles = true
356
+ },
357
+ userTypeChange () {
358
+ this.gasproperties=[{label: '全部', value: ''}]
359
+ if(this.$refs.paged.$refs.cri.model !==null) {
360
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
361
+
362
+ if(this.$refs.paged.$refs.cri.model.f_user_type && this.$refs.paged.$refs.cri.model.f_user_type.length>0){
363
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
364
+ }
365
+ // this.gasproperties.push({label: '全部', value: ''})
366
+ }
367
+ else{
368
+ this.gasproperties =[{label: '全部', value: ''}]
369
+ }
370
+ },
371
+ hidden(){
372
+ this.criteriaShow = !this.criteriaShow
373
+ },
374
+ // 查询开关
375
+ seachchange () {
376
+ this.searchshow = !this.searchshow
377
+ },
378
+
379
+ // 显示柱状图
380
+ showEcharts () {
381
+ this.echarts = !this.echarts
382
+ console.log(this.echarts)
383
+ },
384
+ close () {
385
+ this.show = false
386
+ },
387
+ // SaveAsFile(str) {
388
+ // this.$showMessage('您是否需要导出本页数据?', ['confirm', 'cancel']).then((res) => {
389
+ // if (res === 'confirm') {
390
+ // let style = '<style>' +
391
+ // 'td {border-width: 1px;padding: 2px;border-style: solid; border-color:black; border-collapse:collapse;} .tdright{text-align: right;} .tdcenter{text-align: center;}</style>';
392
+ // let strHtml = style + document.getElementById(str).innerHTML;
393
+ // console.log(strHtml);
394
+ // let LODOP = getLodop();
395
+ // LODOP.PRINT_INIT('');
396
+ // LODOP.ADD_PRINT_TABLE(5, 5, '99%', '100%', strHtml);
397
+ // LODOP.SAVE_TO_FILE('抄表统计.xls')
398
+ // }
399
+ // })
400
+ // },
401
+ clearmsg () {
402
+ this.$refs.paged.$refs.cri.model = {}
403
+ this.$refs.paged.$refs.cri.model.startDate = Util.addDate(new Date(),-6).substring(0,10) + ' 00:00:00'
404
+ this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
405
+ },
406
+ search (args) {
407
+ this.startDate = this.$refs.paged.$refs.cri.model.startDate
408
+ this.endDate = this.$refs.paged.$refs.cri.model.endDate
409
+ if (this.endDate == '' || this.startDate == '') {
410
+ return this.$showMessage("时间区间的开始和结束时间不能为空!")
411
+ }
412
+ if (this.orgCondtionStr){
413
+ this.condition = this.$refs.paged.$refs.cri.condition + ` and uf.f_orgid in ${this.orgCondtionStr}`
414
+ }
415
+ else
416
+ this.condition = this.$refs.paged.$refs.cri.condition + ` and uf.f_orgid = '${this.orgCondtionStr}'`
417
+ if(this.zonesdata){
418
+ this.condition = this.$refs.paged.$refs.cri.condition + ` and ${this.zonesdata}`
419
+ }
420
+ console.log('args.condition',args.condition)
421
+ console.log('this.condition',this.condition)
422
+ this.condition = this.condition.replace(/f_zones/, "a.f_slice_area")
423
+ args.condition = this.condition
424
+ this.model.search(args.condition, args.model)
425
+ },
426
+ // getRes (obj) {
427
+ // this.orgCondtionStr = plugins.convertToIn(obj)
428
+ // }
429
+ getRes (obj) {
430
+ this.orgCondtionStr = plugins.convertToIn(obj.resids)?plugin.convertToIn(obj.resids):'(\'' + this.$login.f.orgid + '\')'
431
+ if(obj.indexOf("f_zones = ")>0){
432
+ this.zonesdata = obj.substring(obj.indexOf("f_zones = "))
433
+ }else{
434
+ this.zonesdata=''
435
+ }
436
+ },
437
+ pricetypechanged(){
438
+ this.$refs.paged.$refs.cri.model.f_price_id = []
439
+ },
440
+ // getRes(condition,obj) {
441
+ // this.orgCondtionStr = condition
442
+ // this.orgname = obj.orgnames[0]
443
+ // this.depname = obj.depnames[0]
444
+ // }
445
+ },
446
+ computed: {
447
+ getPricenames() {
448
+ let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
449
+ let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
450
+ let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
451
+ console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
452
+ if(this.$refs.paged.$refs.cri.model !==null) {
453
+ let rs = []
454
+ let priceArr = []
455
+ if ( pricetype.length >0) {
456
+ let params = {
457
+ f_price_type: pricetype[0],
458
+ filter: this.f_filialeid,
459
+ prices: this.prices
460
+ }
461
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
462
+ let temp = {}
463
+ temp.label = item.label
464
+ temp.value = item.value.f_price_id
465
+ priceArr.push(temp)
466
+ })
467
+ rs = [{label: '全部', value: ''}, ...priceArr]
468
+ }
469
+ if (rs.length === 0) {
470
+ console.log('rs读出来是空')
471
+ this.$refs.paged.$refs.cri.model.f_price_id = ''
472
+ }
473
+ return rs
474
+ }
475
+ },
476
+ pricetypes() {
477
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
478
+ },
479
+ houseTypes() {
480
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('房屋类型')]
481
+ },
482
+ positions() {
483
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('安装位置')]
484
+ },
485
+ getCondition() {
486
+ var con=""
487
+ if (this.orgCondtionStr) {
488
+ con= `${this.$refs.paged.$refs.cri.condition} and u.f_orgid in ${this.orgCondtionStr}`
489
+ }
490
+ else{
491
+ con= `${this.$refs.paged.$refs.cri.condition} `
492
+ }
493
+ return {
494
+ condition: con ,
495
+ startDate:`${this.$refs.paged.$refs.cri.model.startDate}`,
496
+ endDate:`${this.$refs.paged.$refs.cri.model.endDate}`
497
+ }
498
+
499
+ },
500
+ usertypes () {
501
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
502
+ },
503
+ // usertypes () {
504
+ // return this.$getParams('用户类型', [{label: '全部', value: ''}])
505
+ // },
506
+ f_outlets () {
507
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('网点查询用')]
508
+ },
509
+ valveStatus () {
510
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
511
+ },
512
+ Getuserstyle () {
513
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类型')]
514
+ }
515
+ }
516
+ }
517
+ </script>
518
+ <style>
519
+ .mystyle{
520
+ margin-left:80px;
521
+ }
522
+ .datapanel {
523
+ color: #333;
524
+ background-color: white;
525
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
526
+ padding: 10px 10px 10px 10px;
527
+ border-radius:15px;
528
+ }
529
+ </style>
@@ -12,4 +12,6 @@ export default function () {
12
12
  Vue.component('meter-query', (resolve) => { require(['./MeterQuery'], resolve) })
13
13
  // 用户查询
14
14
  Vue.component('user-query', (resolve) => { require(['./UserQuery'], resolve) })
15
+ // 上报统计分析--抄表分析
16
+ Vue.component('user-gas-list', (resolve) => { require(['./UserGasList'], resolve) })
15
17
  }
@@ -856,4 +856,8 @@ export default function () {
856
856
  Vue.component('manage-metertype-number', (resolve) => {
857
857
  require(['./components/SellReport/ManageMetertypeNumber'], resolve)
858
858
  })
859
+ // 用户数量统计报表
860
+ Vue.component('tc_user_summary_report', (resolve) => {
861
+ require(['./components/SellReport/tongchuan/tcUserSummaryReport'], resolve)
862
+ })
859
863
  }