manage-client 4.0.14 → 4.0.16

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 (28) hide show
  1. package/build/dev-server.js +3 -3
  2. package/package.json +1 -1
  3. package/src/components/SellReport/ManageChargeBillBeiFangShiYe.vue +251 -0
  4. package/src/components/SellReport/ManageFillGasQueryBeiFangShiYe.vue +251 -0
  5. package/src/components/SellReport/ManageOtherChargeBeiFangShiYe.vue +251 -0
  6. package/src/components/SellReport/ManageSellGasQueryBeiFangShiYe.vue +251 -0
  7. package/src/components/SellReport/ManageUseGasQueryBeiFangShiYe.vue +251 -0
  8. package/src/components/SellReport/ManageUserClassifyBeiFangShiYe.vue +271 -0
  9. package/src/filiale/qingjian/SellingTable.vue +220 -0
  10. package/src/filiale/qingjian/reportManage.js +7 -0
  11. package/src/filiale/tongchuan/BusinessClassify.vue +386 -0
  12. package/src/filiale/tongchuan/DepartmentPrick.vue +292 -0
  13. package/src/filiale/tongchuan/GasPrice.vue +13 -39
  14. package/src/filiale/tongchuan/ManageBusSummary.vue +8 -9
  15. package/src/filiale/tongchuan/ManageHandInputtor.vue +261 -0
  16. package/src/filiale/tongchuan/ManageSellType.vue +267 -0
  17. package/src/filiale/tongchuan/ManageUserCount.vue +369 -0
  18. package/src/filiale/tongchuan/MarketMonth.vue +297 -0
  19. package/src/filiale/tongchuan/SaleMonthReport.vue +155 -0
  20. package/src/filiale/tongchuan/UserClassify.vue +249 -0
  21. package/src/filiale/tongchuan/reportManage.js +34 -1
  22. package/src/filiale/xihu/NewQueryInstruct.vue +665 -0
  23. package/src/filiale/xihu/webmeterManage.js +6 -0
  24. package/src/main.js +2 -0
  25. package/src/reportManage.js +22 -0
  26. package/src/filiale/jinbin/exportConfig.js +0 -1110
  27. package/src/filiale/jinbin/sale/businessquery/ChargeQuery.vue +0 -1372
  28. package/src/filiale/jinbin/sale.js +0 -7
@@ -0,0 +1,220 @@
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
+ <p class="bg-info text-center" style="padding: 8px;">财务统计报表</p>
6
+ <div class="form-group" v-if="!$parent.$parent.data.f_files_path"></div>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group" >
10
+ <label class="font_normal_body" for="startDate">开始日期:</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :disabled-days-of-Week="[]"
15
+ :format="'yyyy-MM-dd HH:mm:ss'"
16
+ :show-reset-button="reset">
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-2 form-group" >
20
+ <label class="font_normal_body" for="endDate">结束日期:</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :disabled-days-of-Week="[]"
25
+ :format="'yyyy-MM-dd HH:mm:ss'"
26
+ :show-reset-button="reset">
27
+ </datepicker>
28
+ </div>
29
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:res_select></res-select-group>
30
+ </div>
31
+ <div class="span" style = "float:right;">
32
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
33
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
34
+ <report-excel id='gasprice'></report-excel>
35
+ </div>
36
+ </div>
37
+ </criteria>
38
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
39
+ <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
40
+ <thead>
41
+ <tr>
42
+ <th colspan='12' style="font-weight: normal; text-align: left;">
43
+ <h3 style="text-align: center">{{$parent.orgname==null||$parent.orgname==''?$parent.orgname}}财务统计报表</h3>
44
+ </th>
45
+ </tr>
46
+ <tr>
47
+ <th colspan='12' style="font-weight: normal; text-align: center;">
48
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
49
+ 结束时间:{{ model.model.endDate }}<br>
50
+ 打印时间:{{$parent.printTime}}
51
+ </th>
52
+ </tr>
53
+ <tr>
54
+ <th colspan='12' style="font-weight: normal; text-align: center;">
55
+ <span style="font-weight: normal;" v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
56
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
57
+ <span style="font-weight: normal" v-show="$parent.operatorname.trim()!=''">人员:{{$parent.operatorname}}</span>
58
+ </th>
59
+ </tr>
60
+ </thead>
61
+ <tr>
62
+ <td colspan='12'>
63
+ {{{ model.data.substring(26,model.data.length-8) }}}
64
+ </td>
65
+ </tr>
66
+ <tfoot>
67
+ <tr style="text-align: left">
68
+ <th colspan='4'>财务审核:</th>
69
+ <th colspan='4'>收款审核:</th>
70
+ <th colspan='4'>收款员:</th>
71
+ </tr>
72
+ </tfoot>
73
+ </table>
74
+ {{{ $parent.reportStr}}}
75
+ </div>
76
+ </criteria-paged>
77
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
78
+ <header slot="modal-header" class="modal-header">
79
+ <h4 class="modal-title">输入文件名称</h4>
80
+ </header>
81
+ <article slot="modal-body" class="modal-body">
82
+ <div class="form-group">
83
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
84
+ </div>
85
+ </article>
86
+ <footer slot="modal-footer" class="modal-footer">
87
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
88
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
89
+ </footer>
90
+ </modal>
91
+ </div>
92
+ </template>
93
+
94
+ <script>
95
+ import { DataModel } from 'vue-client'
96
+ import co from 'co'
97
+ let saveFile = function * (self) {
98
+ // 线验证文件是否重名
99
+ let count = yield self.$resetpost('api/af-revenue/sql/manageSingleTable',
100
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
101
+ {resolveMsg: null, rejectMsg: null})
102
+ if (count.data.length > 0) {
103
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
104
+ return
105
+ }
106
+ let saveBack = yield self.$resetpost('api/af-revenue/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
107
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
108
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
109
+ f_outlets: this.$login.f.depname})
110
+ if (saveBack.data.status === 'succeed') {
111
+ self.show = false
112
+ self.filename = ''
113
+ // 后台保存完成,通知刷新
114
+ self.$dispatch('save-success', self.filename)
115
+ }
116
+ }
117
+ export default {
118
+ title: '财务统计报表',
119
+ props: ['data'],
120
+ data () {
121
+ return {
122
+ printTime: this.$login.toStandardTimeString(),
123
+ depresid: [],
124
+ userresid: [],
125
+ f_orgid: this.$login.f.orgid,
126
+ f_depid: this.$login.f.depids,
127
+ f_operatorid: this.$login.f.id,
128
+ operatorid: [],
129
+ depid: [],
130
+ orgname: '',
131
+ depname: '',
132
+ operatorname: '',
133
+ orgCondtionStr: '1=1',
134
+ model: new DataModel('api/af-revenue/report/sellingTable', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
135
+ f_orgid: 'this.model.f_orgid'}),
136
+ reportStr: null,
137
+ show: false,
138
+ initres: {
139
+ org: [this.$login.f.orgid],
140
+ dep: [],
141
+ user: []
142
+ }
143
+ }
144
+ },
145
+ ready () {
146
+ this.$refs.paged.$refs.criteria.$refs.res_select.sliceareashow = false
147
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
148
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
149
+ // this.$refs.paged.$refs.criteria.search()
150
+ console.log(this.$login.f)
151
+ },
152
+ methods: {
153
+ searchData () {
154
+ this.$refs.paged.$refs.criteria.search()
155
+ },
156
+ selfSearch (args) {
157
+ this.printTime = this.$login.toStandardTimeString()
158
+ console.log('xxxxxxxxxxx',this.orgCondtionStr)
159
+ let orgstr = '1=1 '
160
+ if(this.orgCondtionStr){
161
+ orgstr+=this.orgCondtionStr
162
+ }
163
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgstr
164
+ this.$refs.paged.search(args)
165
+ },
166
+ // 根据文件路径获取储存的报表内容
167
+ getFileContent (path) {
168
+ this.$resetpost('api/af-revenue/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
169
+ this.reportStr = res.data.filecontent
170
+ this.model.state = '正确'
171
+ })
172
+ },
173
+ confirm () {
174
+ if (!this.filename || this.filename === '') {
175
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
176
+ }
177
+ let saveGen = saveFile(this)
178
+ co(saveGen)
179
+ },
180
+ close () {
181
+ this.show = false
182
+ },
183
+ // 将报表保存成文件
184
+ confirmReport () {
185
+ this.show = true
186
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
187
+ },
188
+ async getRes (condition, obj) {
189
+ this.orgCondtionStr = condition
190
+ if(obj.orgnames.length>0){
191
+ this.orgname = obj.orgnames[0];
192
+ }
193
+ if(obj.operatornames.length>0){
194
+ let users = await this.$resetpost('api/af-revenue/sql/manageSingleTable',
195
+ {data: {tablename: 't_user', condition: ` id = '${obj.operatornames[0]}'`}},
196
+ {resolveMsg: null, rejectMsg: null});
197
+ if(users.data){
198
+ this.operatorname = users.data[0].name;
199
+ }
200
+ }
201
+ }
202
+ },
203
+ watch: {
204
+ 'data' (val) {
205
+ if (val.f_files_path) {
206
+ this.getFileContent(val.f_files_path)
207
+ } else {
208
+ this.reportStr = null
209
+ }
210
+ }
211
+ },
212
+ computed: {
213
+ }
214
+ }
215
+ </script>
216
+ <style scoped>
217
+ .noborder{
218
+ border: none;
219
+ }
220
+ </style>
@@ -0,0 +1,7 @@
1
+ // 分公司特殊组件页面注册
2
+ import Vue from 'vue'
3
+
4
+ export default function () {
5
+ // 财务报表(用气性质)
6
+ Vue.component('selling-table', (resolve) => { require(['./SellingTable'], resolve) })
7
+ }
@@ -0,0 +1,386 @@
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-3" >
8
+ <label class="font_normal_body" for="startDate">月开始日期:</label>
9
+ <datepicker id="startDate" placeholder="月开始日期" style="width: 60%"
10
+ v-model="model.startDate"
11
+ :value.sync="model.startDate"
12
+ :disabled-days-of-Week="[]"
13
+ :format="'yyyy-MM-dd 00:00:00'"
14
+ :show-reset-button="reset">
15
+ </datepicker>
16
+ </div>
17
+ <div class="col-sm-3" >
18
+ <label class="font_normal_body" for="endDate">月结束日期:</label>
19
+ <datepicker id="endDate" placeholder="月结束日期" style="width: 60%"
20
+ v-model="model.endDate"
21
+ :value.sync="model.endDate"
22
+ :disabled-days-of-Week="[]"
23
+ :format="'yyyy-MM-dd 23:59:59'"
24
+ :show-reset-button="reset">
25
+ </datepicker>
26
+ </div>
27
+ <div class="col-sm-3" >
28
+ <label class="font_normal_body" for="yearStartDate">年开始日期:</label>
29
+ <datepicker id="yearStartDate" placeholder="年开始日期" style="width: 60%"
30
+ v-model="model.yearStartDate"
31
+ :value.sync="model.yearStartDate"
32
+ :disabled-days-of-Week="[]"
33
+ :format="'yyyy-MM-dd 00:00:00'"
34
+ :show-reset-button="reset">
35
+ </datepicker>
36
+ </div>
37
+ <div class="col-sm-3" >
38
+ <label class="font_normal_body" for="yearEndDate">年结束日期:</label>
39
+ <datepicker id="yearEndDate" placeholder="年结束日期" style="width: 60%"
40
+ v-model="model.yearEndDate"
41
+ :value.sync="model.yearEndDate"
42
+ :disabled-days-of-Week="[]"
43
+ :format="'yyyy-MM-dd 23:59:59'"
44
+ :show-reset-button="reset">
45
+ </datepicker>
46
+ </div>
47
+ <res-select-group :show-component="['company']" :initres="$parent.$parent.initres" :selectin="true" :cascade =true @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
48
+ <div class="col-sm-3 form-group">
49
+ <label class="font_normal_body" for="dep" >部&emsp;&emsp;门:</label>
50
+ <v-select id="dep" style="width: 60%"
51
+ :multiple="true"
52
+ @change="$parent.$parent.getDep"
53
+ :value.sync="model.f_depid"
54
+ v-model="model.f_depid"
55
+ :options='$parent.$parent.depresid' placeholder='请选择'
56
+ condition="f_depid in {}">
57
+ </v-select>
58
+
59
+ </div>
60
+ <div class="col-sm-3 form-group">
61
+ <label class="font_normal_body" for="oper">人&emsp;&emsp;员:</label>
62
+ <v-select id="oper" style="width: 60%"
63
+ :multiple="true"
64
+ @change="$parent.$parent.getOpe"
65
+ :value.sync="model.f_operatorid"
66
+ v-model="model.f_operatorid"
67
+ :options='$parent.$parent.userresid' placeholder='请选择'
68
+ condition="f_operatorid in {}">
69
+ </v-select>
70
+ </div>
71
+ <div class="col-sm-3 form-group">
72
+ <label class="font_normal_body" for="oper1">格式一</label>
73
+ <input type="radio" name="reportStyle" id="oper1" v-model="$parent.$parent.reportStyle" value="1">
74
+ <label class="font_normal_body" for="oper2">格式二</label>
75
+ <input type="radio" name="reportStyle" id="oper2" v-model="$parent.$parent.reportStyle" value="2">
76
+ </div>
77
+ </div>
78
+ <div class="span" style = "float:right;">
79
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
80
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
81
+ <report-excel id='gasprice'></report-excel>
82
+ </div>
83
+ </div>
84
+ </criteria>
85
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
86
+ <table class='tableprint' style="margin: 0px auto">
87
+ <thead>
88
+ <tr>
89
+ <th :colspan='$parent.tablen' style="font-weight: normal; text-align: left;">
90
+ <h3 style="text-align: center">营业分类统计</h3>
91
+ </th>
92
+ </tr>
93
+ <tr>
94
+ <th :colspan='$parent.tablen' style="font-weight: normal; text-align: center;">
95
+ 时间区间:{{$refs.criteria.model.startDate}} - {{ $refs.criteria.model.endDate }}<br/>
96
+ 打印时间:{{$parent.printTime}}
97
+ </th>
98
+ </tr>
99
+ <tr>
100
+ <th :colspan='$parent.tablen' style="font-weight: normal; text-align: center;">
101
+ <div>
102
+ <span v-show="$parent.orgname[0]">公司:{{$parent.orgname}}</span>
103
+ <span v-show="$parent.depname[0]"> 部门:{{$parent.depname}}</span>
104
+ <span v-show="$parent.operatorname[0]">人员:{{$parent.operatorname}}</span>
105
+ </div>
106
+ </th>
107
+ </tr>
108
+ </thead>
109
+ <tr>
110
+ <td :colspan='$parent.tablen' class="noborder">
111
+ {{{ model.data.substring(26,model.data.length-8) }}}
112
+ </td>
113
+ </tr>
114
+ <tfoot>
115
+ <tr style="text-align: left">
116
+ <th :colspan='Math.floor($parent.tablen/3)'>财务审核:</th>
117
+ <th :colspan='Math.round($parent.tablen/3)'>收款审核:</th>
118
+ <th :colspan='Math.round($parent.tablen/3)'>收款员:</th>
119
+ </tr>
120
+ </tfoot>
121
+ </table>
122
+ </div>
123
+ </criteria-paged>
124
+ </div>
125
+ </template>
126
+
127
+ <script>
128
+ import {DataModel, HttpResetClass} from 'vue-client'
129
+ import co from 'co'
130
+ let getorg = async function (self) {
131
+ new HttpResetClass().load("POST",'api/af-revenue/sql/singleTableParam',
132
+ {
133
+ data: {
134
+ items: 'name label,id value',
135
+ tablename: 't_department',
136
+ condition: `1=1`
137
+ }
138
+ },
139
+ {resolveMsg: null, rejectMsg: null})
140
+ .then((res) => {
141
+ self.depresid = res.data
142
+ })
143
+ new HttpResetClass().load("POST",'api/af-revenue/sql/singleTableParam',
144
+ {
145
+ data: {
146
+ items: 'name label,id value',
147
+ tablename: 't_user',
148
+ condition: `state = '在职' and f_department_name is not null`
149
+ }
150
+ },
151
+ {resolveMsg: null, rejectMsg: null})
152
+ .then((res) => {
153
+ self.userresid = res.data
154
+ })
155
+ }
156
+ export default {
157
+ title: '营业分类统计',
158
+ props: ['data'],
159
+ data () {
160
+ return {
161
+ printTime: this.$login.toStandardTimeString(),
162
+ depresid: [],
163
+ userresid: [],
164
+ initres: {
165
+ org:[this.$login.f.orgid],
166
+ dep:[],
167
+ user:[]
168
+ },
169
+ f_orgid: this.$login.f.orgid,
170
+ f_depid: this.$login.f.depids,
171
+ f_operatorid: this.$login.f.id,
172
+ operatorid: [],
173
+ depid: [],
174
+ tablen:0,
175
+ reportStyle: 1,
176
+ orgname: '',
177
+ depname: '',
178
+ operatorname: '',
179
+ orgCondtionStr: '1=1',
180
+ model: new DataModel('api/af-revenue/report/BusinessClassify', {
181
+ startDate: 'this.model.startDate',
182
+ endDate: 'this.model.endDate',
183
+ yearStartDate: 'this.model.yearStartDate',
184
+ yearEndDate: 'this.model.yearEndDate',
185
+ f_orgid: 'this.model.f_orgid'}),
186
+ reportStr: null,
187
+ show: false,
188
+ }
189
+ },
190
+ ready () {
191
+ getorg(this)
192
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
193
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
194
+ console.log(this.$login.f)
195
+ },
196
+ methods: {
197
+ adjustParams(startDateStr,endDateStr) {
198
+ const now = new Date()
199
+ const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0)
200
+
201
+ const startDate = new Date(startDateStr)
202
+ const endDate = new Date(endDateStr)
203
+ let result
204
+ if (startDate < todayStart && endDate >= todayStart) {
205
+ // startDate 在今天之前,endDate 在今天或之后
206
+ let splitDates = 2
207
+ let month = now.getMonth() + 1
208
+ let date = now.getDate()
209
+ const yesterday = new Date(now);
210
+ yesterday.setDate(yesterday.getDate() - 1);
211
+ let month2 = yesterday.getMonth() + 1
212
+ let date2 = yesterday.getDate()
213
+ result = {
214
+ splitDates: splitDates,
215
+ yesterdayEnd: (yesterday.getFullYear() + '-' + (month2 < 10 ? '0' + month2 : month2) + '-' + (date2 < 10 ? '0' + date2 : date2) + ' 23:59:59'),
216
+ todayStart: now.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) + ' 00:00:00'
217
+ }
218
+ } else if (startDate >= todayStart && endDate >= todayStart) {
219
+ // startDate 和 endDate 都在今天或之后
220
+ let splitDates = 0
221
+ result = {
222
+ splitDates: splitDates
223
+ }
224
+ } else {
225
+ // startDate 和 endDate 都在今天之前
226
+ let splitDates = 1
227
+ result = {
228
+ splitDates: splitDates
229
+ }
230
+ }
231
+ function padZero(num) {
232
+ return num.toString().padStart(2, '0');
233
+ }
234
+ return result;
235
+ },
236
+ searchData () {
237
+ this.$refs.paged.$refs.criteria.search()
238
+ },
239
+ getDep(val){
240
+ this.depname = this.depresid.filter(x => x.value ==val).map(x=>x.label).toString()
241
+ console.log('dep',this.depname )
242
+ },
243
+ getOpe(val){
244
+ this.operatorname = this.userresid.filter(x => x.value ==val).map(x=>x.label).toString()
245
+ console.log('dep',this.operatorname )
246
+ },
247
+ distinctJson(obj){
248
+ let at = []
249
+ for (let i = 0; i < obj.length; i++) {
250
+ let flag = false
251
+ if (i == 0 ) {
252
+ at.push(obj[i])
253
+ } else {
254
+ for (let j = 0; j < at.length; j++) {
255
+ if (JSON.stringify(obj[i]) == JSON.stringify(at[j])) {
256
+ flag = true
257
+ }
258
+ }
259
+ if (!flag) {
260
+ at.push(obj[i])
261
+ }
262
+ }
263
+ }
264
+ return at
265
+ },
266
+ selfSearch (args) {
267
+ console.log('---------------->', this.reportStyle)
268
+ this.printTime = this.$login.toStandardTimeString()
269
+ let orgcondition = '1=1'
270
+ let orgstr = this.orgCondtionStr
271
+ if (this.f_orgid) {
272
+ orgcondition += orgstr
273
+ }
274
+ orgcondition += ' and ' + args.condition
275
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
276
+ let monthObj = null
277
+ let yearObj = null
278
+ if (this.$refs.paged.$refs.criteria.model.startDate && this.$refs.paged.$refs.criteria.model.endDate ) {
279
+ monthObj = this.adjustParams(this.$refs.paged.$refs.criteria.model.startDate, this.$refs.paged.$refs.criteria.model.endDate)
280
+ }
281
+ if (this.$refs.paged.$refs.criteria.model.yearStartDate && this.$refs.paged.$refs.criteria.model.yearEndDate) {
282
+ yearObj = this.adjustParams(this.$refs.paged.$refs.criteria.model.yearStartDate, this.$refs.paged.$refs.criteria.model.yearEndDate)
283
+ }
284
+ console.log('========', monthObj)
285
+ console.log('========', yearObj)
286
+ if (this.reportStyle == '1') {
287
+ let load = new HttpResetClass()
288
+ let params = {
289
+ startDate: args.model.startDate,
290
+ endDate: args.model.endDate,
291
+ monthRealTime: 0,
292
+ yearRealTime: 0,
293
+ monthRealStart: '',
294
+ monthHistoryEnd: '',
295
+ yearRealStart: '',
296
+ yearHistoryEnd: '',
297
+ yearStartDate: args.model.yearStartDate,
298
+ yearEndDate: args.model.yearEndDate,
299
+ f_orgid: orgcondition
300
+ }
301
+ if (monthObj && monthObj.splitDates === 2) {
302
+ params.monthRealTime = monthObj.splitDates
303
+ params.monthRealStart = monthObj.todayStart
304
+ params.monthHistoryEnd = monthObj.yesterdayEnd
305
+ } else if (monthObj) {
306
+ params.monthRealTime = monthObj.splitDates
307
+ }
308
+ if (yearObj && yearObj.splitDates === 2) {
309
+ params.yearRealTime = yearObj.splitDates
310
+ params.yearRealStart = yearObj.todayStart
311
+ params.yearHistoryEnd = yearObj.yesterdayEnd
312
+ } else if (yearObj) {
313
+ params.yearRealTime = yearObj.splitDates
314
+ }
315
+ load.load("POST", 'api/af-revenue/sql/UserCountNum',
316
+ {data: params},
317
+ {resolveMsg: null, rejectMsg: null})
318
+ .then((res) => {
319
+ let info = res.data
320
+ let gasproperties = info.map(item => {return {f_gasproperties: item.f_gasproperties}})
321
+ let district = info.map(item => {
322
+ return { f_gasproperties: item.f_gasproperties, f_district: item.f_district }
323
+ })
324
+ let meter_type = info.map(item => {
325
+ return { f_meter_type: item.f_meter_type }
326
+ })
327
+ this.model.url = 'api/af-revenue/report/BusinessClassify'
328
+ this.$refs.paged.$refs.criteria.model.f_orgid = {
329
+ left1: JSON.stringify(this.distinctJson(gasproperties)),
330
+ left2: JSON.stringify(this.distinctJson(district)),
331
+ left3: JSON.stringify(this.distinctJson(meter_type)),
332
+ infoall: JSON.stringify(info)
333
+ }
334
+ this.$refs.paged.search(args)
335
+ })
336
+ } else {
337
+ this.model.params.monthRealTime = 0
338
+ this.model.params.yearRealTime = 0
339
+ this.model.params.monthRealStart = ''
340
+ this.model.params.monthHistoryEnd = ''
341
+ this.model.params.yearRealStart = ''
342
+ this.model.params.yearHistoryEnd = ''
343
+ if (monthObj && monthObj.splitDates === 2) {
344
+ this.model.params.monthRealTime = monthObj.splitDates
345
+ this.model.params.monthRealStart = monthObj.todayStart
346
+ this.model.params.monthHistoryEnd = monthObj.yesterdayEnd
347
+ }else if (monthObj) {
348
+ this.model.params.monthRealTime = monthObj.splitDates
349
+ }
350
+ if (yearObj && yearObj.splitDates === 2) {
351
+ this.model.params.yearRealTime = yearObj.splitDates
352
+ this.model.params.yearRealStart = yearObj.todayStart
353
+ this.model.params.yearHistoryEnd = yearObj.yesterdayEnd
354
+ }else if (yearObj) {
355
+ this.model.params.yearRealTime = yearObj.splitDates
356
+ }
357
+ this.model.url = 'api/af-revenue/report/BusinessClassifyTwo'
358
+ this.$refs.paged.search(args)
359
+ }
360
+ },
361
+ getRes (condition, obj) {
362
+ this.orgCondtionStr = condition
363
+ this.orgname = obj.orgnames[0]
364
+ this.depname = obj.depnames[0]
365
+ }
366
+ },
367
+ watch: {
368
+ 'model.data' (val) {
369
+ if (val) {
370
+ this.tablen = val.split('</tr>').map(item => item.split('</td>').length-1).reduce((x, y) => x > y ? x : y)
371
+ }
372
+ },
373
+ 'reportStyle'(val) {
374
+ this.$refs.paged.$refs.criteria.search()
375
+ }
376
+ },
377
+ computed: {
378
+
379
+ }
380
+ }
381
+ </script>
382
+ <style scoped>
383
+ .noborder{
384
+ border: none;
385
+ }
386
+ </style>