manage-client 3.0.47-wsd → 3.0.50-wsd

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": "3.0.47-wsd",
3
+ "version": "3.0.50-wsd",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -30,7 +30,7 @@
30
30
  <button class="button_export button_spacing" @click="$parent.$parent.showTotalForm()" >显示汇总</button>
31
31
  <export-excel
32
32
  :choose-col="true"
33
- :data="{condition: $parent.$parent.condition}"
33
+ :data="{condition: $parent.$parent.condition,startDate: $parent.$parent.startDate, endDate: $parent.$parent.endDate}"
34
34
  :field="$parent.$parent.getfield" sql-name="webmeter_getUserGasList" sqlurl="rs/logic/exportfile"
35
35
  template-name='webmeter_getUserGasList'></export-excel>
36
36
  <!-- <button class="btn btn-success" @click="$parent.$parent.showEcharts()">显示图表</button>-->
@@ -203,7 +203,7 @@
203
203
  </div>
204
204
  <!--汇总表显示模板-->
205
205
  <div v-show="isActiveTotalForm">
206
- <user-gas-eform></user-gas-eform>
206
+ <user-gas-eform :startdate="startDate" :enddate="endDate"></user-gas-eform>
207
207
  </div>
208
208
  </template>
209
209
 
@@ -217,6 +217,9 @@
217
217
  let readySomething = async function (self) {
218
218
  self.$refs.paged.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
219
219
  self.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
220
+
221
+ self.startDate = self.$refs.paged.$refs.cri.model.startDate
222
+ self.endDate = self.$refs.paged.$refs.cri.model.endDate
220
223
  await self.$MagLoadParams.loadParam(self.$login.f)
221
224
  self.initParams()
222
225
  }
@@ -1,212 +1,212 @@
1
- <template lang="html">
2
- <div class="basic-main" id="unit">
3
- <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
4
- <div class="row">
5
- <div class="col-sm-1">
6
- <label class="font_normal_body">汇总项</label>
7
- </div>
8
- <div class="col-sm-1">
9
- <input id="year" type="checkbox" v-model="nameForSql" value="year"/>
10
- <label class="font_normal_body" for="year">年份</label>
11
- </div>
12
- <div class="col-sm-1">
13
- <input id="month" type="checkbox" v-model="nameForSql" value="month"/>
14
- <label class="font_normal_body" for="month">月份</label>
15
- </div>
16
- <div class="col-sm-1">
17
- <input id="week" type="checkbox" v-model="nameForSql" value="week"/>
18
- <label class="font_normal_body" for="week">周</label>
19
- </div>
20
- <div class="col-sm-1">
21
- <input id="day" type="checkbox" v-model="nameForSql" value="day"/>
22
- <label class="font_normal_body" for="day">日</label>
23
- </div>
24
- <div class="col-sm-1">
25
- <input id="f_userType" type="checkbox" v-model="nameForSql" value="f_user_type"/>
26
- <label class="font_normal_body" for="f_userType">用户类型</label>
27
- </div>
28
- <div class="col-sm-1">
29
- <input id="f_gasproperties" type="checkbox" v-model="nameForSql" value="f_gasproperties"/>
30
- <label class="font_normal_body" for="f_gasproperties">用气性质</label>
31
- </div>
32
- <div class="col-sm-1">
33
- <input id="f_gasbrand" type="checkbox" v-model="nameForSql" value="f_meter_brand"/>
34
- <label class="font_normal_body" for="f_meter_brand">气表品牌</label>
35
- </div>
36
- <div class="col-sm-1">
37
- <input id="f_orgname" type="checkbox" v-model="nameForSql" value="f_orgname"/>
38
- <label class="font_normal_body" for="f_orgname">公司</label>
39
- </div>
40
-
41
- <span style="float: right">
42
- <button @click="searchData" class="button_search button_spacing">查询</button>
43
- <button @click="$parent.notShowTotalForm()" class="button_clear button_spacing">隐藏汇总</button>
44
- <report-excel class="button_export button_spacing" id="table" style="width: 28%"></report-excel>
45
- <report-print class="button_export button_spacing" height='100%' id="table" left='0' top='3cm'
46
- width='100%'></report-print></span>
47
- </div>
48
- </div>
49
- <div id="table">
50
- <table class="table table-bordered">
51
- <thead class="text-left">
52
- <tr style="text-align:center">
53
- <p style="padding: 8px;text-align:center;" class="font_normal_body">用户用气汇总</p>
54
- </tr>
55
- <tr>
56
- <th style="text-align:center" v-if="nameForSql.includes('year')">年份</th>
57
- <th style="text-align:center" v-if="nameForSql.includes('month')">月份</th>
58
- <th style="text-align:center" v-if="nameForSql.includes('week')">周</th>
59
- <th style="text-align:center" v-if="nameForSql.includes('day')">日</th>
60
- <th style="text-align:center" v-if="nameForSql.includes('f_user_type')">用户类型</th>
61
- <th style="text-align:center" v-if="nameForSql.includes('f_gasproperties')">用气性质</th>
62
- <th style="text-align:center" v-if="nameForSql.includes('f_meter_brand')">气表品牌</th>
63
- <th style="text-align:center" v-if="nameForSql.includes('f_orgname')">公司</th>
64
- <th style="text-align:center">
65
- <nobr>总用气气量(m³)</nobr>
66
- </th>
67
- <th style="text-align:center">
68
- <nobr>总用气金额(元)</nobr>
69
- </th>
70
- <!--<th style="text-align:center"><nobr>一阶总气量(m³)</nobr></th>-->
71
- <!--<th style="text-align:center"><nobr>一阶总金额(元)</nobr></th>-->
72
- <!--<th style="text-align:center"><nobr>二阶总气量(m³)</nobr></th>-->
73
- <!--<th style="text-align:center"><nobr>二阶总金额(元)</nobr></th>-->
74
- <!--<th style="text-align:center"><nobr>三阶总气量(m³)</nobr></th>-->
75
- <!--<th style="text-align:center"><nobr>三阶总金额(元)</nobr></th>-->
76
- </tr>
77
- </thead>
78
- <tbody>
79
- <tr v-for="item in model2">
80
- <td style="text-align:center" v-if="nameForSql.includes('year')">{{item.year}}</td>
81
- <td style="text-align:center" v-if="nameForSql.includes('month')">{{item.month}}</td>
82
- <td style="text-align:center" v-if="nameForSql.includes('week')">{{item.week}}</td>
83
- <td style="text-align:center" v-if="nameForSql.includes('day')">{{item.day}}</td>
84
- <td style="text-align:center" v-if="nameForSql.includes('f_user_type')">{{item.f_user_type}}</td>
85
- <td style="text-align:center" v-if="nameForSql.includes('f_gasproperties')">{{item.f_gasproperties}}</td>
86
- <td style="text-align:center" v-if="nameForSql.includes('f_meter_brand')">{{item.f_meter_brand}}</td>
87
- <td style="text-align:center" v-if="nameForSql.includes('f_orgname')">{{item.f_orgname}}</td>
88
- <td style="text-align:center">{{item.f_oughtamount}}</td>
89
- <td style="text-align:center">{{item.f_oughtfee}}</td>
90
- <!--<td style="text-align:center">{{item.f_gas1}}</td>-->
91
- <!--<td style="text-align:center">{{item.f_money1}}</td>-->
92
- <!--<td style="text-align:center">{{item.f_gas2}}</td>-->
93
- <!--<td style="text-align:center">{{item.f_money2}}</td>-->
94
- <!--<td style="text-align:center">{{item.f_gas3}}</td>-->
95
- <!--<td style="text-align:center">{{item.f_money3}}</td>-->
96
- </tr>
97
- </tbody>
98
- </table>
99
- </div>
100
- </div>
101
- </template>
102
-
103
- <script>
104
- import {HttpResetClass} from 'vue-client'
105
- import * as Util from '../../../Util'
106
-
107
- export default {
108
- props: {
109
- startdate: {
110
- type: String,
111
- default: Util.toStandardDateString()
112
- },
113
- enddate: {
114
- type: String,
115
- default: Util.toStandardDateString()
116
- },
117
- // condition: {
118
- // type: String,
119
- // default: '1=1'
120
- // },
121
- // groupNameByDate: {
122
- // type: [],
123
- // default:['year']
124
- // }
125
- },
126
- data() {
127
- return {
128
- model2: null,
129
- conditionForSql: '1=1',
130
- nameForSql: [],
131
- groupNameForSql: '',
132
-
133
- }
134
- },
135
- ready() {
136
- },
137
- methods: {
138
- async searchData() {
139
- if (this.groupNameForSql) {
140
- console.log('拼接前~~~~~~~~~~~~~~~~~')
141
- console.log(this.conditionForSql)
142
- // this.conditionForSql=`${this.conditionForSql} and h.f_hand_date >= '${this.startdate}' and h.f_hand_date <= '${this.enddate}'`
143
- console.log('拼接后======================')
144
- console.log(this.conditionForSql)
145
- let load = new HttpResetClass()
146
- let res = await load.load('POST', 'rs/sql/webmeter_getUserGasSum',
147
- {data: {condition: this.conditionForSql, groupname: this.groupNameForSql}},
148
- {resolveMsg: null, rejectMsg: null})
149
- console.log('res返回', res)
150
- this.model2 = res.data
151
- console.log('res返回123', this.model2)
152
- } else {
153
- window.alert("请选择汇总项")
154
- }
155
- },
156
- //拼接groupName1
157
- getGroupName1() {
158
- console.log("this.nameForSql.length:" + this.nameForSql.length)
159
- let str = ''
160
- let i = 0
161
- for (; i < this.nameForSql.length - 1; i++) {
162
- str += this.nameForSql[i] + ','
163
- }
164
- str += this.nameForSql[i]
165
- this.groupNameForSql = str.trim()
166
- }
167
- },
168
- watch: {
169
- 'nameForSql'() {
170
- // this.nameForSql =this.groupNameByDate;
171
- this.getGroupName1()
172
- },
173
- '$parent.condition'(val) {
174
- this.conditionForSql = val
175
- }
176
- }
177
- }
178
- </script>
179
-
180
- <style scoped>
181
- .mystyle2 {
182
- width: 100%;
183
- height: 35px;
184
- /*background: #00A3F0;*/
185
- padding-left: 15px;
186
- float: left;
187
- }
188
-
189
- .datapanel {
190
- color: #333;
191
- background-color: white;
192
- box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
193
- padding: 10px 30px 10px 30px;
194
- border-radius: 15px;
195
- }
196
- table tbody {
197
- display:block;
198
- height:700px;
199
- overflow-y:scroll;
200
- }
201
-
202
- table thead, tbody tr {
203
- display:table;
204
- width:100%;
205
- table-layout:fixed;
206
- }
207
-
208
- table thead {
209
- width: calc( 100% - 1em )
210
- }
211
- table thead th{ background:#f2f6fa;}
212
- </style>
1
+ <template lang="html">
2
+ <div class="basic-main" id="unit">
3
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
4
+ <div class="row">
5
+ <div class="col-sm-1">
6
+ <label class="font_normal_body">汇总项</label>
7
+ </div>
8
+ <div class="col-sm-1">
9
+ <input id="year" type="checkbox" v-model="nameForSql" value="year"/>
10
+ <label class="font_normal_body" for="year">年份</label>
11
+ </div>
12
+ <div class="col-sm-1">
13
+ <input id="month" type="checkbox" v-model="nameForSql" value="month"/>
14
+ <label class="font_normal_body" for="month">月份</label>
15
+ </div>
16
+ <div class="col-sm-1">
17
+ <input id="week" type="checkbox" v-model="nameForSql" value="week"/>
18
+ <label class="font_normal_body" for="week">周</label>
19
+ </div>
20
+ <div class="col-sm-1">
21
+ <input id="day" type="checkbox" v-model="nameForSql" value="day"/>
22
+ <label class="font_normal_body" for="day">日</label>
23
+ </div>
24
+ <div class="col-sm-1">
25
+ <input id="f_userType" type="checkbox" v-model="nameForSql" value="f_user_type"/>
26
+ <label class="font_normal_body" for="f_userType">用户类型</label>
27
+ </div>
28
+ <div class="col-sm-1">
29
+ <input id="f_gasproperties" type="checkbox" v-model="nameForSql" value="f_gasproperties"/>
30
+ <label class="font_normal_body" for="f_gasproperties">用气性质</label>
31
+ </div>
32
+ <div class="col-sm-1">
33
+ <input id="f_gasbrand" type="checkbox" v-model="nameForSql" value="f_meter_brand"/>
34
+ <label class="font_normal_body" for="f_meter_brand">气表品牌</label>
35
+ </div>
36
+ <div class="col-sm-1">
37
+ <input id="f_orgname" type="checkbox" v-model="nameForSql" value="f_orgname"/>
38
+ <label class="font_normal_body" for="f_orgname">公司</label>
39
+ </div>
40
+
41
+ <span style="float: right">
42
+ <button @click="searchData" class="button_search button_spacing">查询</button>
43
+ <button @click="$parent.notShowTotalForm()" class="button_clear button_spacing">隐藏汇总</button>
44
+ <report-excel class="button_export button_spacing" id="table" style="width: 28%"></report-excel>
45
+ <report-print class="button_export button_spacing" height='100%' id="table" left='0' top='3cm'
46
+ width='100%'></report-print></span>
47
+ </div>
48
+ </div>
49
+ <div id="table">
50
+ <table class="table table-bordered">
51
+ <thead class="text-left">
52
+ <tr style="text-align:center">
53
+ <p style="padding: 8px;text-align:center;" class="font_normal_body">用户用气汇总</p>
54
+ </tr>
55
+ <tr>
56
+ <th style="text-align:center" v-if="nameForSql.includes('year')">年份</th>
57
+ <th style="text-align:center" v-if="nameForSql.includes('month')">月份</th>
58
+ <th style="text-align:center" v-if="nameForSql.includes('week')">周</th>
59
+ <th style="text-align:center" v-if="nameForSql.includes('day')">日</th>
60
+ <th style="text-align:center" v-if="nameForSql.includes('f_user_type')">用户类型</th>
61
+ <th style="text-align:center" v-if="nameForSql.includes('f_gasproperties')">用气性质</th>
62
+ <th style="text-align:center" v-if="nameForSql.includes('f_meter_brand')">气表品牌</th>
63
+ <th style="text-align:center" v-if="nameForSql.includes('f_orgname')">公司</th>
64
+ <th style="text-align:center">
65
+ <nobr>总用气气量(m³)</nobr>
66
+ </th>
67
+ <th style="text-align:center">
68
+ <nobr>总用气金额(元)</nobr>
69
+ </th>
70
+ <!--<th style="text-align:center"><nobr>一阶总气量(m³)</nobr></th>-->
71
+ <!--<th style="text-align:center"><nobr>一阶总金额(元)</nobr></th>-->
72
+ <!--<th style="text-align:center"><nobr>二阶总气量(m³)</nobr></th>-->
73
+ <!--<th style="text-align:center"><nobr>二阶总金额(元)</nobr></th>-->
74
+ <!--<th style="text-align:center"><nobr>三阶总气量(m³)</nobr></th>-->
75
+ <!--<th style="text-align:center"><nobr>三阶总金额(元)</nobr></th>-->
76
+ </tr>
77
+ </thead>
78
+ <tbody>
79
+ <tr v-for="item in model2">
80
+ <td style="text-align:center" v-if="nameForSql.includes('year')">{{item.year}}</td>
81
+ <td style="text-align:center" v-if="nameForSql.includes('month')">{{item.month}}</td>
82
+ <td style="text-align:center" v-if="nameForSql.includes('week')">{{item.week}}</td>
83
+ <td style="text-align:center" v-if="nameForSql.includes('day')">{{item.day}}</td>
84
+ <td style="text-align:center" v-if="nameForSql.includes('f_user_type')">{{item.f_user_type}}</td>
85
+ <td style="text-align:center" v-if="nameForSql.includes('f_gasproperties')">{{item.f_gasproperties}}</td>
86
+ <td style="text-align:center" v-if="nameForSql.includes('f_meter_brand')">{{item.f_meter_brand}}</td>
87
+ <td style="text-align:center" v-if="nameForSql.includes('f_orgname')">{{item.f_orgname}}</td>
88
+ <td style="text-align:center">{{item.f_oughtamount}}</td>
89
+ <td style="text-align:center">{{item.f_oughtfee}}</td>
90
+ <!--<td style="text-align:center">{{item.f_gas1}}</td>-->
91
+ <!--<td style="text-align:center">{{item.f_money1}}</td>-->
92
+ <!--<td style="text-align:center">{{item.f_gas2}}</td>-->
93
+ <!--<td style="text-align:center">{{item.f_money2}}</td>-->
94
+ <!--<td style="text-align:center">{{item.f_gas3}}</td>-->
95
+ <!--<td style="text-align:center">{{item.f_money3}}</td>-->
96
+ </tr>
97
+ </tbody>
98
+ </table>
99
+ </div>
100
+ </div>
101
+ </template>
102
+
103
+ <script>
104
+ import {HttpResetClass} from 'vue-client'
105
+ import * as Util from '../../../Util'
106
+
107
+ export default {
108
+ props: {
109
+ startdate: {
110
+ type: String,
111
+ default: Util.toStandardDateString()
112
+ },
113
+ enddate: {
114
+ type: String,
115
+ default: Util.toStandardDateString()
116
+ },
117
+ // condition: {
118
+ // type: String,
119
+ // default: '1=1'
120
+ // },
121
+ // groupNameByDate: {
122
+ // type: [],
123
+ // default:['year']
124
+ // }
125
+ },
126
+ data() {
127
+ return {
128
+ model2: null,
129
+ conditionForSql: '1=1',
130
+ nameForSql: [],
131
+ groupNameForSql: '',
132
+
133
+ }
134
+ },
135
+ ready() {
136
+ },
137
+ methods: {
138
+ async searchData() {
139
+ if (this.groupNameForSql) {
140
+ console.log('拼接前~~~~~~~~~~~~~~~~~')
141
+ console.log(this.conditionForSql)
142
+ this.conditionForSql=`${this.conditionForSql} and h.f_hand_date >= '${this.startdate}' and h.f_hand_date <= '${this.enddate}'`
143
+ console.log('拼接后======================')
144
+ console.log(this.conditionForSql)
145
+ let load = new HttpResetClass()
146
+ let res = await load.load('POST', 'rs/sql/webmeter_getUserGasSum',
147
+ {data: {condition: this.conditionForSql, groupname: this.groupNameForSql}},
148
+ {resolveMsg: null, rejectMsg: null})
149
+ console.log('res返回', res)
150
+ this.model2 = res.data
151
+ console.log('res返回123', this.model2)
152
+ } else {
153
+ window.alert("请选择汇总项")
154
+ }
155
+ },
156
+ //拼接groupName1
157
+ getGroupName1() {
158
+ console.log("this.nameForSql.length:" + this.nameForSql.length)
159
+ let str = ''
160
+ let i = 0
161
+ for (; i < this.nameForSql.length - 1; i++) {
162
+ str += this.nameForSql[i] + ','
163
+ }
164
+ str += this.nameForSql[i]
165
+ this.groupNameForSql = str.trim()
166
+ }
167
+ },
168
+ watch: {
169
+ 'nameForSql'() {
170
+ // this.nameForSql =this.groupNameByDate;
171
+ this.getGroupName1()
172
+ },
173
+ '$parent.condition'(val) {
174
+ this.conditionForSql = val
175
+ }
176
+ }
177
+ }
178
+ </script>
179
+
180
+ <style scoped>
181
+ .mystyle2 {
182
+ width: 100%;
183
+ height: 35px;
184
+ /*background: #00A3F0;*/
185
+ padding-left: 15px;
186
+ float: left;
187
+ }
188
+
189
+ .datapanel {
190
+ color: #333;
191
+ background-color: white;
192
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
193
+ padding: 10px 30px 10px 30px;
194
+ border-radius: 15px;
195
+ }
196
+ table tbody {
197
+ display:block;
198
+ height:700px;
199
+ overflow-y:scroll;
200
+ }
201
+
202
+ table thead, tbody tr {
203
+ display:table;
204
+ width:100%;
205
+ table-layout:fixed;
206
+ }
207
+
208
+ table thead {
209
+ width: calc( 100% - 1em )
210
+ }
211
+ table thead th{ background:#f2f6fa;}
212
+ </style>