manage-client 3.3.171 → 3.3.174

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.
@@ -1,290 +1,292 @@
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
- <div class="col-sm-3 form-group" >
48
- <label class="font_normal_body" for="org">公&emsp;&emsp;司:</label>
49
- <manage-right-tree id="org" @re-res="$parent.$parent.getRes" style="width: 60%" v-ref:org></manage-right-tree>
50
- </div>
51
- <div class="col-sm-3 form-group">
52
- <label class="font_normal_body" for="dep" >部&emsp;&emsp;门:</label>
53
- <v-select id="dep" style="width: 60%"
54
- :multiple="false"
55
- @change="$parent.$parent.getDep"
56
- :value.sync="model.f_depid"
57
- v-model="model.f_depid"
58
- :options='$parent.$parent.depresid' placeholder='请选择'
59
- condition="f_depid in {}">
60
- </v-select>
61
-
62
- </div>
63
- <div class="col-sm-3 form-group">
64
- <label class="font_normal_body" for="oper">人&emsp;&emsp;员:</label>
65
- <v-select id="oper" style="width: 60%"
66
- :multiple="false"
67
- @change="$parent.$parent.getOpe"
68
- :value.sync="model.f_operatorid"
69
- v-model="model.f_operatorid"
70
- :options='$parent.$parent.userresid' placeholder='请选择'
71
- condition="f_operatorid in {}">
72
- </v-select>
73
- </div>
74
- <div class="col-sm-3 form-group">
75
- <label class="font_normal_body" for="oper1">格式一</label>
76
- <input type="radio" name="reportStyle" id="oper1" v-model="$parent.$parent.reportStyle" value="1">
77
- <label class="font_normal_body" for="oper2">格式二</label>
78
- <input type="radio" name="reportStyle" id="oper2" v-model="$parent.$parent.reportStyle" value="2">
79
- </div>
80
- </div>
81
- <div class="span" style = "float:right;">
82
- <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
83
- <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
84
- <report-excel id='gasprice'></report-excel>
85
- </div>
86
- </div>
87
- </criteria>
88
- <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
89
- <table class='tableprint' style="margin: 0px auto">
90
- <thead>
91
- <tr>
92
- <th :colspan='$parent.tablen' style="font-weight: normal; text-align: left;">
93
- <h3 style="text-align: center">营业分类统计</h3>
94
- </th>
95
- </tr>
96
- <tr>
97
- <th :colspan='$parent.tablen' style="font-weight: normal; text-align: center;">
98
- 时间区间:{{$refs.criteria.model.startDate}} - {{ $refs.criteria.model.endDate }}<br/>
99
- 打印时间:{{$parent.printTime}}
100
- </th>
101
- </tr>
102
- <tr>
103
- <th :colspan='$parent.tablen' style="font-weight: normal; text-align: center;">
104
- <div>
105
- <span v-show="$parent.orgname[0]">公司:{{$parent.orgname}}</span>
106
- <span v-show="$parent.depname[0]"> 部门:{{$parent.depname}}</span>
107
- <span v-show="$parent.operatorname[0]">人员:{{$parent.operatorname}}</span>
108
- </div>
109
- </th>
110
- </tr>
111
- </thead>
112
- <tr>
113
- <td :colspan='$parent.tablen' class="noborder">
114
- {{{ model.data.substring(26,model.data.length-8) }}}
115
- </td>
116
- </tr>
117
- <tfoot>
118
- <tr style="text-align: left">
119
- <th :colspan='Math.floor($parent.tablen/3)'>财务审核:</th>
120
- <th :colspan='Math.round($parent.tablen/3)'>收款审核:</th>
121
- <th :colspan='Math.round($parent.tablen/3)'>收款员:</th>
122
- </tr>
123
- </tfoot>
124
- </table>
125
- </div>
126
- </criteria-paged>
127
- </div>
128
- </template>
129
-
130
- <script>
131
- import {DataModel, HttpResetClass} from 'vue-client'
132
- import co from 'co'
133
- let getorg = async function (self) {
134
- new HttpResetClass().load("POST",'api/af-revenue/sql/singleTableParam',
135
- {
136
- data: {
137
- items: 'name label,id value',
138
- tablename: 't_department',
139
- condition: `1=1`
140
- }
141
- },
142
- {resolveMsg: null, rejectMsg: null})
143
- .then((res) => {
144
- self.depresid = res.data
145
- })
146
- new HttpResetClass().load("POST",'api/af-revenue/sql/singleTableParam',
147
- {
148
- data: {
149
- items: 'name label,id value',
150
- tablename: 't_user',
151
- condition: `state = '在职' and f_department_name is not null`
152
- }
153
- },
154
- {resolveMsg: null, rejectMsg: null})
155
- .then((res) => {
156
- self.userresid = res.data
157
- })
158
- }
159
- export default {
160
- title: '营业分类统计',
161
- props: ['data'],
162
- data () {
163
- return {
164
- printTime: this.$login.toStandardTimeString(),
165
- depresid: [],
166
- userresid: [],
167
- f_orgid: this.$login.f.orgid,
168
- f_depid: this.$login.f.depids,
169
- f_operatorid: this.$login.f.id,
170
- operatorid: [],
171
- depid: [],
172
- tablen:0,
173
- reportStyle: 1,
174
- orgname: '',
175
- depname: '',
176
- operatorname: '',
177
- orgCondtionStr: '1=1',
178
- model: new DataModel('api/af-revenue/report/BusinessClassify', {
179
- startDate: 'this.model.startDate',
180
- endDate: 'this.model.endDate',
181
- yearStartDate: 'this.model.yearStartDate',
182
- yearEndDate: 'this.model.yearEndDate',
183
- f_orgid: 'this.model.f_orgid'}),
184
- reportStr: null,
185
- show: false,
186
- }
187
- },
188
- ready () {
189
- getorg(this)
190
- this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
191
- this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
192
- console.log(this.$login.f)
193
- },
194
- methods: {
195
- searchData () {
196
- this.$refs.paged.$refs.criteria.search()
197
- },
198
- getDep(val){
199
- this.depname = this.depresid.filter(x => x.value ==val).map(x=>x.label).toString()
200
- console.log('dep',this.depname )
201
- },
202
- getOpe(val){
203
- this.operatorname = this.userresid.filter(x => x.value ==val).map(x=>x.label).toString()
204
- console.log('dep',this.operatorname )
205
- },
206
- distinctJson(obj){
207
- let at = []
208
- for (let i = 0; i < obj.length; i++) {
209
- let flag = false
210
- if (i == 0 ) {
211
- at.push(obj[i])
212
- } else {
213
- for (let j = 0; j < at.length; j++) {
214
- if (JSON.stringify(obj[i]) == JSON.stringify(at[j])) {
215
- flag = true
216
- }
217
- }
218
- if (!flag) {
219
- at.push(obj[i])
220
- }
221
- }
222
- }
223
- return at
224
- },
225
- selfSearch (args) {
226
- console.log('---------------->', this.reportStyle)
227
- this.printTime = this.$login.toStandardTimeString()
228
- let orgcondition = '1=1'
229
- if (this.f_orgid) {
230
- orgcondition += ` and f_orgid in (${this.f_orgid})`
231
- }
232
- orgcondition += ' and ' + args.condition
233
- this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
234
- if (this.reportStyle == '1') {
235
- let load = new HttpResetClass()
236
- load.load("POST", 'api/af-revenue/sql/UserCountNum',
237
- {data: {
238
- startDate: args.model.startDate,
239
- endDate: args.model.endDate,
240
- yearStartDate: args.model.yearStartDate,
241
- yearEndDate: args.model.yearEndDate,
242
- f_orgid: orgcondition
243
- }},
244
- {resolveMsg: null, rejectMsg: null})
245
- .then((res) => {
246
- let info = res.data
247
- let gasproperties = info.map(item => {return {f_gasproperties: item.f_gasproperties}})
248
- let district = info.map(item => {
249
- return { f_gasproperties: item.f_gasproperties, f_district: item.f_district }
250
- })
251
- let meter_type = info.map(item => {
252
- return { f_meter_type: item.f_meter_type }
253
- })
254
- this.model.url = 'api/af-revenue/report/BusinessClassify'
255
- this.$refs.paged.$refs.criteria.model.f_orgid = {
256
- left1: JSON.stringify(this.distinctJson(gasproperties)),
257
- left2: JSON.stringify(this.distinctJson(district)),
258
- left3: JSON.stringify(this.distinctJson(meter_type)),
259
- infoall: JSON.stringify(info)
260
- }
261
- this.$refs.paged.search(args)
262
- })
263
- } else {
264
- this.model.url = 'api/af-revenue/report/BusinessClassifyTwo'
265
- this.$refs.paged.search(args)
266
- }
267
- },
268
- getRes (obj) {
269
- this.orgname = obj.res[0]
270
- this.f_orgid = obj.resids
271
- }
272
- },
273
- watch: {
274
- 'model.data' (val) {
275
- this.tablen = val.split('</tr>').map(item => item.split('</td>').length-1).reduce((x, y) => x > y ? x : y)
276
- },
277
- 'reportStyle'(val) {
278
- this.$refs.paged.$refs.criteria.search()
279
- }
280
- },
281
- computed: {
282
-
283
- }
284
- }
285
- </script>
286
- <style scoped>
287
- .noborder{
288
- border: none;
289
- }
290
- </style>
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
+ <div class="col-sm-3 form-group" >
48
+ <label class="font_normal_body" for="org">公&emsp;&emsp;司:</label>
49
+ <manage-right-tree id="org" @re-res="$parent.$parent.getRes" style="width: 60%" v-ref:org></manage-right-tree>
50
+ </div>
51
+ <div class="col-sm-3 form-group">
52
+ <label class="font_normal_body" for="dep" >部&emsp;&emsp;门:</label>
53
+ <v-select id="dep" style="width: 60%"
54
+ :multiple="false"
55
+ @change="$parent.$parent.getDep"
56
+ :value.sync="model.f_depid"
57
+ v-model="model.f_depid"
58
+ :options='$parent.$parent.depresid' placeholder='请选择'
59
+ condition="f_depid in {}">
60
+ </v-select>
61
+
62
+ </div>
63
+ <div class="col-sm-3 form-group">
64
+ <label class="font_normal_body" for="oper">人&emsp;&emsp;员:</label>
65
+ <v-select id="oper" style="width: 60%"
66
+ :multiple="false"
67
+ @change="$parent.$parent.getOpe"
68
+ :value.sync="model.f_operatorid"
69
+ v-model="model.f_operatorid"
70
+ :options='$parent.$parent.userresid' placeholder='请选择'
71
+ condition="f_operatorid in {}">
72
+ </v-select>
73
+ </div>
74
+ <div class="col-sm-3 form-group">
75
+ <label class="font_normal_body" for="oper1">格式一</label>
76
+ <input type="radio" name="reportStyle" id="oper1" v-model="$parent.$parent.reportStyle" value="1">
77
+ <label class="font_normal_body" for="oper2">格式二</label>
78
+ <input type="radio" name="reportStyle" id="oper2" v-model="$parent.$parent.reportStyle" value="2">
79
+ </div>
80
+ </div>
81
+ <div class="span" style = "float:right;">
82
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
83
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
84
+ <report-excel id='gasprice'></report-excel>
85
+ </div>
86
+ </div>
87
+ </criteria>
88
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
89
+ <table class='tableprint' style="margin: 0px auto">
90
+ <thead>
91
+ <tr>
92
+ <th :colspan='$parent.tablen' style="font-weight: normal; text-align: left;">
93
+ <h3 style="text-align: center">营业分类统计</h3>
94
+ </th>
95
+ </tr>
96
+ <tr>
97
+ <th :colspan='$parent.tablen' style="font-weight: normal; text-align: center;">
98
+ 时间区间:{{$refs.criteria.model.startDate}} - {{ $refs.criteria.model.endDate }}<br/>
99
+ 打印时间:{{$parent.printTime}}
100
+ </th>
101
+ </tr>
102
+ <tr>
103
+ <th :colspan='$parent.tablen' style="font-weight: normal; text-align: center;">
104
+ <div>
105
+ <span v-show="$parent.orgname[0]">公司:{{$parent.orgname}}</span>
106
+ <span v-show="$parent.depname[0]"> 部门:{{$parent.depname}}</span>
107
+ <span v-show="$parent.operatorname[0]">人员:{{$parent.operatorname}}</span>
108
+ </div>
109
+ </th>
110
+ </tr>
111
+ </thead>
112
+ <tr>
113
+ <td :colspan='$parent.tablen' class="noborder">
114
+ {{{ model.data.substring(26,model.data.length-8) }}}
115
+ </td>
116
+ </tr>
117
+ <tfoot>
118
+ <tr style="text-align: left">
119
+ <th :colspan='Math.floor($parent.tablen/3)'>财务审核:</th>
120
+ <th :colspan='Math.round($parent.tablen/3)'>收款审核:</th>
121
+ <th :colspan='Math.round($parent.tablen/3)'>收款员:</th>
122
+ </tr>
123
+ </tfoot>
124
+ </table>
125
+ </div>
126
+ </criteria-paged>
127
+ </div>
128
+ </template>
129
+
130
+ <script>
131
+ import {DataModel, HttpResetClass} from 'vue-client'
132
+ import co from 'co'
133
+ let getorg = async function (self) {
134
+ new HttpResetClass().load("POST",'api/af-revenue/sql/singleTableParam',
135
+ {
136
+ data: {
137
+ items: 'name label,id value',
138
+ tablename: 't_department',
139
+ condition: `1=1`
140
+ }
141
+ },
142
+ {resolveMsg: null, rejectMsg: null})
143
+ .then((res) => {
144
+ self.depresid = res.data
145
+ })
146
+ new HttpResetClass().load("POST",'api/af-revenue/sql/singleTableParam',
147
+ {
148
+ data: {
149
+ items: 'name label,id value',
150
+ tablename: 't_user',
151
+ condition: `state = '在职' and f_department_name is not null`
152
+ }
153
+ },
154
+ {resolveMsg: null, rejectMsg: null})
155
+ .then((res) => {
156
+ self.userresid = res.data
157
+ })
158
+ }
159
+ export default {
160
+ title: '营业分类统计',
161
+ props: ['data'],
162
+ data () {
163
+ return {
164
+ printTime: this.$login.toStandardTimeString(),
165
+ depresid: [],
166
+ userresid: [],
167
+ f_orgid: this.$login.f.orgid,
168
+ f_depid: this.$login.f.depids,
169
+ f_operatorid: this.$login.f.id,
170
+ operatorid: [],
171
+ depid: [],
172
+ tablen:0,
173
+ reportStyle: 1,
174
+ orgname: '',
175
+ depname: '',
176
+ operatorname: '',
177
+ orgCondtionStr: '1=1',
178
+ model: new DataModel('api/af-revenue/report/BusinessClassify', {
179
+ startDate: 'this.model.startDate',
180
+ endDate: 'this.model.endDate',
181
+ yearStartDate: 'this.model.yearStartDate',
182
+ yearEndDate: 'this.model.yearEndDate',
183
+ f_orgid: 'this.model.f_orgid'}),
184
+ reportStr: null,
185
+ show: false,
186
+ }
187
+ },
188
+ ready () {
189
+ getorg(this)
190
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
191
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
192
+ console.log(this.$login.f)
193
+ },
194
+ methods: {
195
+ searchData () {
196
+ this.$refs.paged.$refs.criteria.search()
197
+ },
198
+ getDep(val){
199
+ this.depname = this.depresid.filter(x => x.value ==val).map(x=>x.label).toString()
200
+ console.log('dep',this.depname )
201
+ },
202
+ getOpe(val){
203
+ this.operatorname = this.userresid.filter(x => x.value ==val).map(x=>x.label).toString()
204
+ console.log('dep',this.operatorname )
205
+ },
206
+ distinctJson(obj){
207
+ let at = []
208
+ for (let i = 0; i < obj.length; i++) {
209
+ let flag = false
210
+ if (i == 0 ) {
211
+ at.push(obj[i])
212
+ } else {
213
+ for (let j = 0; j < at.length; j++) {
214
+ if (JSON.stringify(obj[i]) == JSON.stringify(at[j])) {
215
+ flag = true
216
+ }
217
+ }
218
+ if (!flag) {
219
+ at.push(obj[i])
220
+ }
221
+ }
222
+ }
223
+ return at
224
+ },
225
+ selfSearch (args) {
226
+ console.log('---------------->', this.reportStyle)
227
+ this.printTime = this.$login.toStandardTimeString()
228
+ let orgcondition = '1=1'
229
+ if (this.f_orgid) {
230
+ orgcondition += ` and f_orgid in (${this.f_orgid})`
231
+ }
232
+ orgcondition += ' and ' + args.condition
233
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
234
+ if (this.reportStyle == '1') {
235
+ let load = new HttpResetClass()
236
+ load.load("POST", 'api/af-revenue/sql/UserCountNum',
237
+ {data: {
238
+ startDate: args.model.startDate,
239
+ endDate: args.model.endDate,
240
+ yearStartDate: args.model.yearStartDate,
241
+ yearEndDate: args.model.yearEndDate,
242
+ f_orgid: orgcondition
243
+ }},
244
+ {resolveMsg: null, rejectMsg: null})
245
+ .then((res) => {
246
+ let info = res.data
247
+ let gasproperties = info.map(item => {return {f_gasproperties: item.f_gasproperties}})
248
+ let district = info.map(item => {
249
+ return { f_gasproperties: item.f_gasproperties, f_district: item.f_district }
250
+ })
251
+ let meter_type = info.map(item => {
252
+ return { f_meter_type: item.f_meter_type }
253
+ })
254
+ this.model.url = 'api/af-revenue/report/BusinessClassify'
255
+ this.$refs.paged.$refs.criteria.model.f_orgid = {
256
+ left1: JSON.stringify(this.distinctJson(gasproperties)),
257
+ left2: JSON.stringify(this.distinctJson(district)),
258
+ left3: JSON.stringify(this.distinctJson(meter_type)),
259
+ infoall: JSON.stringify(info)
260
+ }
261
+ this.$refs.paged.search(args)
262
+ })
263
+ } else {
264
+ this.model.url = 'api/af-revenue/report/BusinessClassifyTwo'
265
+ this.$refs.paged.search(args)
266
+ }
267
+ },
268
+ getRes (obj) {
269
+ this.orgname = obj.res[0]
270
+ this.f_orgid = obj.resids
271
+ }
272
+ },
273
+ watch: {
274
+ 'model.data' (val) {
275
+ if (val) {
276
+ this.tablen = val.split('</tr>').map(item => item.split('</td>').length-1).reduce((x, y) => x > y ? x : y)
277
+ }
278
+ },
279
+ 'reportStyle'(val) {
280
+ this.$refs.paged.$refs.criteria.search()
281
+ }
282
+ },
283
+ computed: {
284
+
285
+ }
286
+ }
287
+ </script>
288
+ <style scoped>
289
+ .noborder{
290
+ border: none;
291
+ }
292
+ </style>