manage-client 3.2.43-aode → 3.2.44-aode

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,220 +1,254 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main">
4
- <div class="flex">
5
- <criteria-paged :model="model" v-ref:paged>
6
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri v-show="$parent.criteriaShow">
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- <div class="row">
9
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" :mul="false" v-ref:sel></res-select-group>
10
- <div class="col-sm-2" >
11
- <label for="YeadDate" class="font_normal_body">统计年份</label>
12
- <datepicker placeholder="结束日期" style="width:60%"
13
- v-model="model.YeadDate"
14
- :value.sync="model.YeadDate"
15
- :format="'yyyy'"
16
- :show-reset-button="true"
17
- :select-year="true">
18
- </datepicker>
19
- </div>
20
- <div class="col-sm-2">
21
- <label class="font_normal_body">包含APP</label>
22
- <v-select :value.sync="model.f_hasapp" v-model="model.f_hasapp"
23
- :options='$parent.$parent.hasapps' placeholder='请选择'
24
- condition="f_operator {} "
25
- close-on-select></v-select>
26
- </div>
27
- </div>
28
- <div class="row">
29
- <div class="span" style = "float:right;margin-top:10px">
30
- <button class="button_search button_spacing" @click="search()">查询</button>
31
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
32
-
33
-
34
- <export-excel :data="$parent.$parent.getCondition"
35
- :field="$parent.$parent.getfield" :defaultselect="$parent.$parent.selectfields"
36
- sqlurl="rs/logic/exportfile" sql-name="aode_YearByChargeType" template-name='年报(缴费类型)' :choose-col="true"></export-excel>
37
- <year-by-charge-print :countmodel="{sumsmodel:$parent.$parent.sumsmodel,model:$parent.$parent.model,orgname:$parent.$parent.orgname,depname:$parent.$parent.depname}"></year-by-charge-print>
38
- </div>
39
- </div>
40
- </div>
41
- </criteria>
42
- <data-grid :model="model" :sumsmodel="sumsmodel" partial='list' class="list_area table_sy" @dblclick="$parent.dblclick" v-ref:grid>
43
- <template partial='head'>
44
- <tr>
45
- <th><nobr>月份</nobr></th>
46
- <th><nobr>开户人次</nobr></th>
47
- <th><nobr>开户气量</nobr></th>
48
- <th><nobr>开户金额</nobr></th>
49
- <th><nobr>再购人次</nobr></th>
50
- <th><nobr>再购气量</nobr></th>
51
- <th><nobr>再购金额</nobr></th>
52
- <th><nobr>合计人次</nobr></th>
53
- <th><nobr>合计气量</nobr></th>
54
- <th><nobr>合计金额</nobr></th>
55
- </tr>
56
- </template>
57
- <template partial='body'>
58
- <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
59
- <td style="text-align: center;"><nobr>{{row.f_count_open}}</nobr></td>
60
- <td style="text-align: center;"><nobr>{{row.f_pregas_open}}</nobr></td>
61
- <td style="text-align: center;"><nobr>{{row.f_collection_open}}</nobr></td>
62
- <td style="text-align: center;"><nobr>{{row.f_count_zg}}</nobr></td>
63
- <td style="text-align: center;"><nobr>{{row.f_pregas_zg}}</nobr></td>
64
- <td style="text-align: center;"><nobr>{{row.f_collection_zg}}</nobr></td>
65
- <td style="text-align: center;"><nobr>{{row.f_count}}</nobr></td>
66
- <td style="text-align: center;"><nobr>{{row.f_pregas}}</nobr></td>
67
- <td style="text-align: center;"><nobr>{{row.f_collection}}</nobr></td>
68
- </template>
69
- <template partial='foot'>
70
- <td style="text-align: center;background-color: mistyrose"><nobr>合计:</nobr></td>
71
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_count_open}}</nobr></td>
72
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_pregas_open}}</nobr></td>
73
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_collection_open}}</nobr></td>
74
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_count_zg}}</nobr></td>
75
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_pregas_zg}}</nobr></td>
76
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_collection_zg}}</nobr></td>
77
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_count}}</nobr></td>
78
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_pregas}}</nobr></td>
79
- <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_collection}}</nobr></td>
80
- </template>
81
- </data-grid>
82
- </criteria-paged>
83
- </div>
84
- </div>
85
- </div>
86
- </template>
87
-
88
- <script>
89
- import { PagedList } from 'vue-client'
90
- // import defaultPrint from '../config/DefaultPrint'
91
- import exportConfig from '../../config/exportConfig'
92
- let readySomething = async function (self) {
93
- let year = new Date().getFullYear()
94
- self.$refs.paged.$refs.cri.model.YeadDate = year+""
95
- self.$refs.paged.$refs.cri.model.f_hasapp = [`!= '悦生活'`]
96
- // await self.$refs.paged.$refs.cri.search()
97
- // self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
98
- }
99
-
100
- export default {
101
- title: '年报(缴费类型)',
102
- data() {
103
- return {
104
- model: new PagedList('rs/sql/aode_YearByChargeType', 35, {YeadDate: 'this.model.YeadDate'},{
105
- f_count_open:0,
106
- f_pregas_open:0,
107
- f_collection_open:0,
108
- f_count_zg:0,
109
- f_pregas_zg:0,
110
- f_collection_zg:0,
111
- f_count: 0,
112
- f_pregas: 0,
113
- f_collection: 0
114
- }),
115
- initres: {
116
- org:[this.$login.f.orgid],
117
- dep:[this.$login.f.depids],
118
- user:[this.$login.f.id]
119
- },
120
- sumsmodel: {},
121
- orgname: '',
122
- depname: '',
123
- criteriaShow: true,
124
- hasapps: [{label: '包含APP', value: ''}, {label: '不包含APP', value: "!= '悦生活'"}],
125
- orgCondtionStr:'',
126
- defaultfield:["f_operate_date","f_count_open","f_pregas_open","f_collection_open","f_count_zg","f_pregas_zg","f_collection_zg","f_count","f_pregas","f_collection"],
127
- sumName:[
128
- 'f_count_open','f_pregas_open','f_collection_open',
129
- 'f_count_zg', 'f_pregas_zg','f_collection_zg',
130
- 'f_count','f_pregas','f_collection'],
131
- selectfields:[],
132
- }
133
- },
134
- ready(){
135
- readySomething(this).then(() => {
136
- this.$emit('ready')
137
- }).catch((error) => {
138
- this.$emit('error', error)
139
- })
140
- for(var item in exportConfig.dataReportConfig){
141
- this.selectfields.push(item)
142
- }
143
- },
144
- methods: {
145
- async selfSearch (args) {
146
- let f_orgstr = this.orgCondtionStr
147
- if(!this.orgCondtionStr){
148
- f_orgstr = 'and f_orgid = ' + this.$login.f.orgid
149
- }
150
- args.condition = `${args.condition} ` + f_orgstr
151
- await this.model.search(args.condition, args.model)
152
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
153
- console.log('计算合计。', this.sumsmodel)
154
- if (this.$refs.paged.$refs.grid.model.rows.length === 0) {
155
- for (let key in this.sumsmodel) {
156
- this.sumsmodel[key] = 0
157
- }
158
- }
159
- this.$dispatch('getdata', this.sumsmodel)
160
- },
161
- clear(){
162
- //清空部门和人员
163
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
164
- //部门和人员变为全选
165
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
166
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
167
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
168
- this.$refs.paged.$refs.cri.model[key] = ''
169
- })
170
- },
171
- show(){
172
- this.criteriaShow = true
173
- },
174
- hidden(){
175
- this.criteriaShow = false
176
- },
177
- getRes(condition,obj) {
178
- this.orgCondtionStr = condition
179
- this.orgname = obj.orgnames[0]
180
- this.depname = obj.depnames[0]
181
- },
182
- },
183
- watch:{
184
- 'all' (val) {
185
- if (val) {
186
- this.modelval = this.bodyData
187
- } else {
188
- this.modelval = defaultPrint.config
189
- this.put()
190
- }
191
- },
192
- 'modelval.length' () {
193
- this.put()
194
- },
195
- },
196
- computed:{
197
- getCondition(){
198
- return {condition: `${this.$refs.paged.$refs.cri.condition}`+this.orgCondtionStr,
199
- YeadDate:`${this.$refs.paged.$refs.cri.model.YeadDate}`}
200
- },
201
- getfield(){
202
- return exportConfig.yearByChargeConfig
203
- },
204
- userstates () {
205
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')]
206
- },
207
- sliceArea () {
208
- let rs = new Array()
209
- for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
210
- let temp = {
211
- label: this.$login.f.f_allArea[i].label,
212
- value: this.$login.f.f_allArea[i].label
213
- }
214
- rs.push(temp)
215
- }
216
- return [{label: '全部', value: ''}, ...rs]
217
- }
218
- }
219
- }
220
- </script>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri v-show="$parent.criteriaShow">
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" :mul="false" v-ref:sel></res-select-group>
10
+ <div class="col-sm-2" >
11
+ <label for="YeadDate" class="font_normal_body">统计年份</label>
12
+ <datepicker placeholder="结束日期" style="width:60%"
13
+ v-model="model.YeadDate"
14
+ :value.sync="model.YeadDate"
15
+ :format="'yyyy'"
16
+ :show-reset-button="true"
17
+ :select-year="true">
18
+ </datepicker>
19
+ </div>
20
+ <div class="col-sm-2">
21
+ <label class="font_normal_body">包含APP</label>
22
+ <v-select :value.sync="model.f_hasapp" v-model="model.f_hasapp"
23
+ :options='$parent.$parent.hasapps' placeholder='请选择'
24
+ condition="f_operator {} "
25
+ close-on-select></v-select>
26
+ </div>
27
+ </div>
28
+ <div class="row">
29
+ <div class="span" style = "float:right;margin-top:10px">
30
+ <button class="button_search button_spacing" @click="search()">查询</button>
31
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
32
+
33
+
34
+ <!-- <export-excel :data="$parent.$parent.getCondition"-->
35
+ <!-- :field="$parent.$parent.getfield" :defaultselect="$parent.$parent.selectfields"-->
36
+ <!-- sqlurl="rs/logic/exportfile" sql-name="aode_YearByChargeType" template-name='年报(缴费类型)' :choose-col="true"></export-excel>-->
37
+ <export-excel-hand :data="$parent.$parent.getCondition"
38
+ :field="$parent.$parent.getfield"
39
+ :other-data="$parent.$parent.other"
40
+ :footer-data="$parent.$parent.footer" v-ref:exports
41
+ :sumname="$parent.$parent.sumName"
42
+ :defaultselect="$parent.$parent.selectfields"
43
+ sqlurl="rs/logic/reportExportfile" sql-name="aode_YearByChargeType" template-name='年报(缴费类型)'
44
+ :choose-col="true"></export-excel-hand>
45
+ <year-by-charge-print :countmodel="{sumsmodel:$parent.$parent.sumsmodel,model:$parent.$parent.model,orgname:$parent.$parent.orgname,depname:$parent.$parent.depname}"></year-by-charge-print>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </criteria>
50
+ <data-grid :model="model" :sumsmodel="sumsmodel" partial='list' class="list_area table_sy" @dblclick="$parent.dblclick" v-ref:grid>
51
+ <template partial='head'>
52
+ <tr>
53
+ <th><nobr>月份</nobr></th>
54
+ <th><nobr>开户人次</nobr></th>
55
+ <th><nobr>开户气量</nobr></th>
56
+ <th><nobr>开户金额</nobr></th>
57
+ <th><nobr>再购人次</nobr></th>
58
+ <th><nobr>再购气量</nobr></th>
59
+ <th><nobr>再购金额</nobr></th>
60
+ <th><nobr>合计人次</nobr></th>
61
+ <th><nobr>合计气量</nobr></th>
62
+ <th><nobr>合计金额</nobr></th>
63
+ </tr>
64
+ </template>
65
+ <template partial='body'>
66
+ <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
67
+ <td style="text-align: center;"><nobr>{{row.f_count_open}}</nobr></td>
68
+ <td style="text-align: center;"><nobr>{{row.f_pregas_open}}</nobr></td>
69
+ <td style="text-align: center;"><nobr>{{row.f_collection_open}}</nobr></td>
70
+ <td style="text-align: center;"><nobr>{{row.f_count_zg}}</nobr></td>
71
+ <td style="text-align: center;"><nobr>{{row.f_pregas_zg}}</nobr></td>
72
+ <td style="text-align: center;"><nobr>{{row.f_collection_zg}}</nobr></td>
73
+ <td style="text-align: center;"><nobr>{{row.f_count}}</nobr></td>
74
+ <td style="text-align: center;"><nobr>{{row.f_pregas}}</nobr></td>
75
+ <td style="text-align: center;"><nobr>{{row.f_collection}}</nobr></td>
76
+ </template>
77
+ <template partial='foot'>
78
+ <td style="text-align: center;background-color: mistyrose"><nobr>合计:</nobr></td>
79
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_count_open}}</nobr></td>
80
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_pregas_open}}</nobr></td>
81
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_collection_open}}</nobr></td>
82
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_count_zg}}</nobr></td>
83
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_pregas_zg}}</nobr></td>
84
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_collection_zg}}</nobr></td>
85
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_count}}</nobr></td>
86
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_pregas}}</nobr></td>
87
+ <td style="text-align: center;background-color: mistyrose"><nobr>{{model.sums.f_collection}}</nobr></td>
88
+ </template>
89
+ </data-grid>
90
+ </criteria-paged>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </template>
95
+
96
+ <script>
97
+ import { PagedList } from 'vue-client'
98
+ // import defaultPrint from '../config/DefaultPrint'
99
+ import exportConfig from '../../config/exportConfig'
100
+ let readySomething = async function (self) {
101
+ let year = new Date().getFullYear()
102
+ self.$refs.paged.$refs.cri.model.YeadDate = year+""
103
+ self.$refs.paged.$refs.cri.model.f_hasapp = [`!= '悦生活'`]
104
+ // await self.$refs.paged.$refs.cri.search()
105
+ // self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
106
+ }
107
+
108
+ export default {
109
+ title: '年报(缴费类型)',
110
+ data() {
111
+ return {
112
+ model: new PagedList('rs/sql/aode_YearByChargeType', 35, {YeadDate: 'this.model.YeadDate'},{
113
+ f_count_open:0,
114
+ f_pregas_open:0,
115
+ f_collection_open:0,
116
+ f_count_zg:0,
117
+ f_pregas_zg:0,
118
+ f_collection_zg:0,
119
+ f_count: 0,
120
+ f_pregas: 0,
121
+ f_collection: 0
122
+ }),
123
+ initres: {
124
+ org:[this.$login.f.orgid],
125
+ dep:[this.$login.f.depids],
126
+ user:[this.$login.f.id]
127
+ },
128
+ sumsmodel: {},
129
+ other:[],
130
+ footer:[],
131
+ orgname: '',
132
+ depname: '',
133
+ criteriaShow: true,
134
+ hasapps: [{label: '包含APP', value: ''}, {label: '不包含APP', value: "!= '悦生活'"}],
135
+ orgCondtionStr:'',
136
+ defaultfield:["f_operate_date","f_count_open","f_pregas_open","f_collection_open","f_count_zg","f_pregas_zg","f_collection_zg","f_count","f_pregas","f_collection"],
137
+ sumName:[
138
+ 'f_count_open','f_pregas_open','f_collection_open',
139
+ 'f_count_zg', 'f_pregas_zg','f_collection_zg',
140
+ 'f_count','f_pregas','f_collection'],
141
+ selectfields:[],
142
+ }
143
+ },
144
+ ready(){
145
+ readySomething(this).then(() => {
146
+ this.$emit('ready')
147
+ }).catch((error) => {
148
+ this.$emit('error', error)
149
+ })
150
+ for(var item in exportConfig.dataReportConfig){
151
+ this.selectfields.push(item)
152
+ }
153
+ },
154
+ methods: {
155
+ getotherfooter(){
156
+ this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
157
+ this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
158
+ this.other=[];
159
+ this.footer=[];
160
+ let exportdata = this.getCondition;
161
+ let otherInData=[];
162
+ otherInData.push(`导出时间: ${this.$login.toStandardDateString()}`);
163
+ otherInData.push(`导出人:${this.$login.f.name}`)
164
+ let footerData=[],exportfield=this.getfield;
165
+ footerData.push("合计");
166
+ let self = this;
167
+ for(var field in self.sumsmodel){
168
+ footerData.push(`${self.sumsmodel[field]}`);
169
+ }
170
+ this.footer.push(footerData);
171
+ this.other.push(otherInData);
172
+ },
173
+ async selfSearch (args) {
174
+ let f_orgstr = this.orgCondtionStr
175
+ if(!this.orgCondtionStr){
176
+ f_orgstr = 'and f_orgid = ' + this.$login.f.orgid
177
+ }
178
+ args.condition = `${args.condition} ` + f_orgstr
179
+ await this.model.search(args.condition, args.model)
180
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
181
+ console.log('计算合计。', this.sumsmodel)
182
+ if (this.$refs.paged.$refs.grid.model.rows.length === 0) {
183
+ for (let key in this.sumsmodel) {
184
+ this.sumsmodel[key] = 0
185
+ }
186
+ }
187
+ this.$dispatch('getdata', this.sumsmodel)
188
+ },
189
+ clear(){
190
+ //清空部门和人员
191
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
192
+ //部门和人员变为全选
193
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
194
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
195
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
196
+ this.$refs.paged.$refs.cri.model[key] = ''
197
+ })
198
+ },
199
+ show(){
200
+ this.criteriaShow = true
201
+ },
202
+ sumsmodel:{
203
+ handler: function(val) {
204
+ this.getotherfooter();
205
+ },
206
+ deep: true
207
+ },
208
+ hidden(){
209
+ this.criteriaShow = false
210
+ },
211
+ getRes(condition,obj) {
212
+ this.orgCondtionStr = condition
213
+ this.orgname = obj.orgnames[0]
214
+ this.depname = obj.depnames[0]
215
+ },
216
+ },
217
+ watch:{
218
+ 'all' (val) {
219
+ if (val) {
220
+ this.modelval = this.bodyData
221
+ } else {
222
+ this.modelval = defaultPrint.config
223
+ this.put()
224
+ }
225
+ },
226
+ 'modelval.length' () {
227
+ this.put()
228
+ },
229
+ },
230
+ computed:{
231
+ getCondition(){
232
+ return {condition: `${this.$refs.paged.$refs.cri.condition}`+this.orgCondtionStr,
233
+ YeadDate:`${this.$refs.paged.$refs.cri.model.YeadDate}`}
234
+ },
235
+ getfield(){
236
+ return exportConfig.yearByChargeConfig
237
+ },
238
+ userstates () {
239
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')]
240
+ },
241
+ sliceArea () {
242
+ let rs = new Array()
243
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
244
+ let temp = {
245
+ label: this.$login.f.f_allArea[i].label,
246
+ value: this.$login.f.f_allArea[i].label
247
+ }
248
+ rs.push(temp)
249
+ }
250
+ return [{label: '全部', value: ''}, ...rs]
251
+ }
252
+ }
253
+ }
254
+ </script>