manage-client 3.3.93 → 3.3.94

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.
@@ -0,0 +1,266 @@
1
+ <template>
2
+ <div class="basic-main" style="height: 98%">
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-4" >
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-4" >
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
+ <div class="col-sm-4">
30
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp; </label>
31
+ <right-tree @re-res="$parent.$parent.getRes"></right-tree>
32
+ </div>
33
+ <div class="col-sm-4">
34
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;部门&nbsp;&nbsp;&nbsp; </label>
35
+ <res-select restype='department'
36
+ is-mul="false"
37
+ @res-select="$parent.$parent.getdep"
38
+ :parentresid="$parent.$parent.depresid"
39
+ :initresid='$parent.$parent.depid'>
40
+ </res-select>
41
+
42
+ </div>
43
+ <div class="col-sm-4">
44
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人员&nbsp;&nbsp;&nbsp; </label>
45
+ <res-select restype='user'
46
+ is-mul="false"
47
+ @res-select="$parent.$parent.getuser"
48
+ :parentresid="$parent.$parent.userresid"
49
+ :initresid='$parent.$parent.operatorid'>
50
+ </res-select>
51
+ </div>
52
+ <div class="col-sm-4">
53
+ <label class="font_normal_body" title="参数名称:气表类型">气表类型</label>
54
+ <v-select :value.sync="model.f_meter_type"
55
+ :options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_type"
56
+ condition="f_meter_type = '{}'"
57
+ close-on-select></v-select>
58
+ </div>
59
+
60
+ <div class="col-sm-4">
61
+ <label class="font_normal_body">收费类型</label>
62
+ <v-select :value.sync="model.f_type" multiple
63
+ :options='$parent.$parent.chargetype' placeholder='请选择'
64
+ close-on-select clear-button
65
+ condition="f_type in {}"
66
+ v-model="model.f_type"></v-select>
67
+ </div>
68
+ </div>
69
+ <div class="span" style = "float:right;">
70
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
71
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
72
+ <report-excel id='gasprice'></report-excel>
73
+ </div>
74
+ </div>
75
+ </criteria>
76
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
77
+ <table class='tableprint' style="margin: 0px auto;">
78
+ <thead>
79
+ <tr>
80
+ <th colspan='18' style="font-weight: normal; text-align: left;">
81
+ <h2 style="text-align: center">{{$parent.orgname}}</h2>
82
+ <h3 style="text-align: center">补气费统计报表</h3>
83
+ </th>
84
+ </tr>
85
+ <tr>
86
+ <th colspan='18' style="font-weight: normal; text-align: center;">
87
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
88
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;<br/>
89
+ 打印时间:{{{$parent.printTime}}}
90
+ </th>
91
+ </tr>
92
+ <tr>
93
+ <th colspan='18' style="font-weight: normal; text-align: center;">
94
+ <div>
95
+ <span v-show="$parent.depname.trim()!=''">网点:{{$parent.depname}}</span>
96
+ <span v-show="$parent.operatorname.trim()!=''">操作员:{{$parent.operatorname}}</span>
97
+ </div>
98
+ </th>
99
+ </tr>
100
+ </thead>
101
+ <tr>
102
+ <td colspan='18'>
103
+ {{{ model.data.substring(26,model.data.length-8) }}}
104
+ </td>
105
+ </tr>
106
+ <tfoot>
107
+ <tr style="text-align: left">
108
+ <th colspan='6'>财务审核:</th>
109
+ <th colspan='6'>收款审核:</th>
110
+ <th colspan='6'>收款员:</th>
111
+ </tr>
112
+ </tfoot>
113
+ </table>
114
+ {{{ $parent.reportStr}}}
115
+ </div>
116
+ </criteria-paged>
117
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
118
+ <header slot="modal-header" class="modal-header">
119
+ <h4 class="modal-title">输入文件名称</h4>
120
+ </header>
121
+ <article slot="modal-body" class="modal-body">
122
+ <div class="form-group">
123
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
124
+ </div>
125
+ </article>
126
+ <footer slot="modal-footer" class="modal-footer">
127
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
128
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
129
+ </footer>
130
+ </modal>
131
+ </div>
132
+ </template>
133
+
134
+ <script>
135
+ import { DataModel } from 'vue-client'
136
+ import co from 'co'
137
+ let saveFile = function * (self) {
138
+ // 线验证文件是否重名
139
+ let count = yield self.$resetpost('rs/sql/manageSingleTable',
140
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
141
+ {resolveMsg: null, rejectMsg: null})
142
+ if (count.data.length > 0) {
143
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
144
+ return
145
+ }
146
+ let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
147
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
148
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
149
+ f_outlets: this.$login.f.depname})
150
+ if (saveBack.data.status === 'succeed') {
151
+ self.show = false
152
+ self.filename = ''
153
+ // 后台保存完成,通知刷新
154
+ self.$dispatch('save-success', self.filename)
155
+ }
156
+ }
157
+ export default {
158
+ title: '补气费统计报表',
159
+ props: ['data'],
160
+ data () {
161
+ return {
162
+ printTime: this.$login.toStandardTimeString(),
163
+ depresid: [],
164
+
165
+ userresid: [],
166
+ f_orgid: this.$login.f.orgid,
167
+ f_depid: this.$login.f.depids,
168
+ f_operatorid: this.$login.f.id,
169
+ operatorid: [],
170
+ depid: [],
171
+ orgname: '',
172
+ depname: '',
173
+ operatorname: '',
174
+ meterbrands: [],
175
+ orgCondtionStr: '1=1',
176
+ model: new DataModel('rs/report/fillgasSummary', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
177
+ f_orgid: 'this.model.f_orgid'}),
178
+ reportStr: null,
179
+ show: false,
180
+ }
181
+ },
182
+ ready () {
183
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
184
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
185
+ console.log(this.$login.f)
186
+ },
187
+ methods: {
188
+ searchData () {
189
+ this.$refs.paged.$refs.criteria.search()
190
+ },
191
+ selfSearch (args) {
192
+ this.printTime = this.$login.toStandardTimeString()
193
+ let orgcondition = ` f_orgid in ('${this.f_orgid}')`
194
+ if (this.f_depid[0]) {
195
+ orgcondition += ` and f_depid in ('${this.f_depid}')`
196
+ }
197
+ if(this.f_operatorid[0]) {
198
+ orgcondition += ` and f_operatorid in ('${this.f_operatorid}')`
199
+ }
200
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
201
+ this.$refs.paged.search(args)
202
+ },
203
+ getRes (obj) {
204
+ this.orgname = obj.res[0]
205
+ this.depresid = obj.resids
206
+ this.f_orgid = obj.resids
207
+ },
208
+ getdep (obj, val) {
209
+ this.userresid = obj
210
+ this.f_depid = obj
211
+ },
212
+ getuser ( obj, val) {
213
+ this.operatorname = val[0]
214
+ this.f_operatorid = obj
215
+ },
216
+
217
+ // 根据文件路径获取储存的报表内容
218
+ getFileContent (path) {
219
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
220
+ this.reportStr = res.data.filecontent
221
+ this.model.state = '正确'
222
+ })
223
+ },
224
+ confirm () {
225
+ if (!this.filename || this.filename === '') {
226
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
227
+ }
228
+ let saveGen = saveFile(this)
229
+ co(saveGen)
230
+ },
231
+ close () {
232
+ this.show = false
233
+ },
234
+ // 将报表保存成文件
235
+ confirmReport () {
236
+ this.show = true
237
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
238
+ },
239
+ },
240
+ watch: {
241
+ 'data' (val) {
242
+ if (val.f_files_path) {
243
+ this.getFileContent(val.f_files_path)
244
+ } else {
245
+ this.reportStr = null
246
+ }
247
+ }
248
+ },
249
+ computed: {
250
+ metertypes () {
251
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
252
+ },
253
+ chargetype () {
254
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('补气类型')]
255
+ }
256
+ }
257
+ }
258
+ </script>
259
+ <style scoped>
260
+ .noborder{
261
+ border: none;
262
+ }
263
+ .fontSize{
264
+ font-size: 13px;
265
+ }
266
+ </style>
@@ -0,0 +1,267 @@
1
+ <template>
2
+ <div class="basic-main" style="height: 98%">
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-4" >
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-4" >
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
+ <div class="col-sm-4">
30
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp; </label>
31
+ <right-tree @re-res="$parent.$parent.getRes"></right-tree>
32
+ </div>
33
+ <div class="col-sm-4">
34
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;部门&nbsp;&nbsp;&nbsp; </label>
35
+ <res-select restype='department'
36
+ is-mul="false"
37
+ @res-select="$parent.$parent.getdep"
38
+ :parentresid="$parent.$parent.depresid"
39
+ :initresid='$parent.$parent.depid'>
40
+ </res-select>
41
+
42
+ </div>
43
+ <div class="col-sm-4">
44
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人员&nbsp;&nbsp;&nbsp; </label>
45
+ <res-select restype='user'
46
+ is-mul="false"
47
+ @res-select="$parent.$parent.getuser"
48
+ :parentresid="$parent.$parent.userresid"
49
+ :initresid='$parent.$parent.operatorid'>
50
+ </res-select>
51
+ </div>
52
+ <div class="col-sm-4">
53
+ <label class="font_normal_body" title="参数名称:气表类型">气表类型</label>
54
+ <v-select :value.sync="model.f_meter_type"
55
+ :options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_type"
56
+ condition="f_meter_type = '{}'"
57
+ close-on-select></v-select>
58
+ </div>
59
+
60
+ <div class="col-sm-4">
61
+ <label class="font_normal_body">收费类型</label>
62
+ <v-select :value.sync="model.f_type" multiple
63
+ :options='$parent.$parent.chargetype' placeholder='请选择'
64
+ close-on-select clear-button
65
+ condition="f_type in {}"
66
+ v-model="model.f_type"></v-select>
67
+ </div>
68
+ </div>
69
+ <div class="span" style = "float:right;">
70
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
71
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
72
+ <report-excel id='gasprice'></report-excel>
73
+ </div>
74
+ </div>
75
+ </criteria>
76
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
77
+ <table class='tableprint' style="margin: 0px auto;">
78
+ <thead>
79
+ <tr>
80
+ <th colspan='18' style="font-weight: normal; text-align: left;">
81
+ <h2 style="text-align: center">{{$parent.orgname}}</h2>
82
+ <h3 style="text-align: center">收费月统计报表</h3>
83
+ </th>
84
+ </tr>
85
+ <tr>
86
+ <th colspan='18' style="font-weight: normal; text-align: center;">
87
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
88
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;<br/>
89
+ 打印时间:{{{$parent.printTime}}}
90
+ </th>
91
+ </tr>
92
+ <tr>
93
+ <th colspan='18' style="font-weight: normal; text-align: center;">
94
+ <div>
95
+ <span v-show="$parent.depname.trim()!=''">网点:{{$parent.depname}}</span>
96
+ <span v-show="$parent.operatorname.trim()!=''">操作员:{{$parent.operatorname}}</span>
97
+ </div>
98
+ </th>
99
+ </tr>
100
+ </thead>
101
+ <tr>
102
+ <td colspan='18'>
103
+ {{{ model.data.substring(26,model.data.length-8) }}}
104
+ </td>
105
+ </tr>
106
+ <tfoot>
107
+ <tr style="text-align: left">
108
+ <th colspan='6'>财务审核:</th>
109
+ <th colspan='6'>收款审核:</th>
110
+ <th colspan='6'>收款员:</th>
111
+ </tr>
112
+ </tfoot>
113
+ </table>
114
+ {{{ $parent.reportStr}}}
115
+ </div>
116
+ </criteria-paged>
117
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
118
+ <header slot="modal-header" class="modal-header">
119
+ <h4 class="modal-title">输入文件名称</h4>
120
+ </header>
121
+ <article slot="modal-body" class="modal-body">
122
+ <div class="form-group">
123
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
124
+ </div>
125
+ </article>
126
+ <footer slot="modal-footer" class="modal-footer">
127
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
128
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
129
+ </footer>
130
+ </modal>
131
+ </div>
132
+ </template>
133
+
134
+ <script>
135
+ import { DataModel } from 'vue-client'
136
+ import co from 'co'
137
+ let saveFile = function * (self) {
138
+ // 线验证文件是否重名
139
+ let count = yield self.$resetpost('rs/sql/manageSingleTable',
140
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
141
+ {resolveMsg: null, rejectMsg: null})
142
+ if (count.data.length > 0) {
143
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
144
+ return
145
+ }
146
+ let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
147
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
148
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
149
+ f_outlets: this.$login.f.depname})
150
+ if (saveBack.data.status === 'succeed') {
151
+ self.show = false
152
+ self.filename = ''
153
+ // 后台保存完成,通知刷新
154
+ self.$dispatch('save-success', self.filename)
155
+ }
156
+ }
157
+ export default {
158
+ title: '收费月统计报表',
159
+ props: ['data'],
160
+ data () {
161
+ return {
162
+ printTime: this.$login.toStandardTimeString(),
163
+ depresid: [],
164
+
165
+ userresid: [],
166
+ f_orgid: this.$login.f.orgid,
167
+ f_depid: this.$login.f.depids,
168
+ f_operatorid: this.$login.f.id,
169
+ operatorid: [],
170
+ depid: [],
171
+ orgname: '',
172
+ depname: '',
173
+ operatorname: '',
174
+ meterbrands: [],
175
+ orgCondtionStr: '1=1',
176
+ model: new DataModel('rs/report/monthSellSummary', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
177
+ f_orgid: 'this.model.f_orgid'}),
178
+ reportStr: null,
179
+ show: false,
180
+ }
181
+ },
182
+ ready () {
183
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardYearMonth() + '-01 00:00:00'
184
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
185
+ console.log(this.$login.f)
186
+ },
187
+ methods: {
188
+ searchData () {
189
+ this.$refs.paged.$refs.criteria.search()
190
+ },
191
+ selfSearch (args) {
192
+ this.printTime = this.$login.toStandardTimeString()
193
+ let orgcondition = ` f_orgid in ('${this.f_orgid}')`
194
+ if (this.f_depid[0]) {
195
+ orgcondition += ` and f_depid in ('${this.f_depid}')`
196
+ }
197
+ if(this.f_operatorid[0]) {
198
+ orgcondition += ` and f_operatorid in ('${this.f_operatorid}')`
199
+ }
200
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
201
+ this.$refs.paged.search(args)
202
+ },
203
+ getRes (obj) {
204
+ this.orgname = obj.res[0]
205
+ this.depresid = obj.resids
206
+ this.f_orgid = obj.resids
207
+ },
208
+ getdep (obj, val) {
209
+ // this.depname = val[0]
210
+ this.userresid = obj
211
+ this.f_depid = obj
212
+ },
213
+ getuser ( obj, val) {
214
+ this.operatorname = val[0]
215
+ this.f_operatorid = obj
216
+ },
217
+
218
+ // 根据文件路径获取储存的报表内容
219
+ getFileContent (path) {
220
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
221
+ this.reportStr = res.data.filecontent
222
+ this.model.state = '正确'
223
+ })
224
+ },
225
+ confirm () {
226
+ if (!this.filename || this.filename === '') {
227
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
228
+ }
229
+ let saveGen = saveFile(this)
230
+ co(saveGen)
231
+ },
232
+ close () {
233
+ this.show = false
234
+ },
235
+ // 将报表保存成文件
236
+ confirmReport () {
237
+ this.show = true
238
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
239
+ },
240
+ },
241
+ watch: {
242
+ 'data' (val) {
243
+ if (val.f_files_path) {
244
+ this.getFileContent(val.f_files_path)
245
+ } else {
246
+ this.reportStr = null
247
+ }
248
+ }
249
+ },
250
+ computed: {
251
+ metertypes () {
252
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('气表类型')]
253
+ },
254
+ chargetype () {
255
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('收费类型')]
256
+ }
257
+ }
258
+ }
259
+ </script>
260
+ <style scoped>
261
+ .noborder{
262
+ border: none;
263
+ }
264
+ .fontSize{
265
+ font-size: 13px;
266
+ }
267
+ </style>